@everymatrix/blog-article-details 1.99.26 → 1.99.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{r as t,h as i}from"./index-f613f8e8.js";const n={en:{error:"Error",home:"Home",blog:"Blog"},ro:{error:"Eroare",home:"Acasă",blog:"Blog"},fr:{error:"Error",home:"Accueil",blog:"Blog"},ar:{error:"خطأ",home:"الرئيسية",blog:"المدونة"},hr:{error:"Greška",home:"Početna",blog:"Blog"},"pt-br":{error:"Erro",home:"Início",blog:"Blog"},"es-mx":{error:"Error",home:"Inicio",blog:"Blog"}},e=(t,i)=>n[void 0!==i&&i in n?i:"en"][t],o="__WIDGET_GLOBAL_STYLE_CACHE__";function r(t,i){if(t){const n=document.createElement("style");n.innerHTML=i,t.appendChild(n)}}function s(t,i){if(!t||!i)return;const n=new URL(i);fetch(n.href).then((t=>t.text())).then((i=>{const n=document.createElement("style");n.innerHTML=i,t&&t.appendChild(n)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function a(t){return t.includes("android")}const h=class{constructor(n){t(this,n),this.renderContentConditionally=t=>t&&(!t.includes("<bannermatrix-banner")||this.bannerMatrixReady)?i("div",{class:"BlogContent",innerHTML:t}):null,this.setImage=t=>{let i="";switch(this.device){case"mobile":i=t.sources[0].pictureSource;break;case"tablet":i=t.sources[1].pictureSource;break;case"desktop":i=t.sources[2].pictureSource}return i},this.cmsEndpoint=void 0,this.language="en",this.userRoles="everyone",this.cmsEnv="stage",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.showPublishingDate=!0,this.showImage=!0,this.showTitle=!0,this.showBreadcrumb=!1,this.showContent=!0,this.postId=void 0,this.postSlug=void 0,this.postCustomPath=void 0,this.intlDateTimeFormat="",this.hasErrors=!1,this.isLoading=!0,this.bannerMatrixReady=!1,this.device="mobile"}handleBannerReady(){this.bannerMatrixReady=!0}watchEndpoint(t,i){t&&t!=i&&this.cmsEndpoint&&this.language&&(this.postCustomPath||this.postSlug||this.postId)&&this.getBlogArticleDetails()}handleClientStylingChange(t,i){t!==i&&r(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,i){t!==i&&this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl)}connectedCallback(){this.cmsEndpoint&&this.language&&(this.postCustomPath||this.postSlug||this.postId)&&this.getBlogArticleDetails()}getBlogArticleDetails(){if(!this.postId&&!this.postSlug&&!this.postCustomPath)throw this.hasErrors=!0,new Error("postId, postSlug or postCustomPath parameter has to be provided!");this.isLoading=!0;let t=new URL(`${this.cmsEndpoint}/${this.language}/blog-posts${this.postCustomPath?"":"/"+(this.postSlug||this.postId)}`);t.searchParams.append("env",this.cmsEnv),t.searchParams.append("userRoles",this.userRoles),t.searchParams.append("device",(()=>{const t=(()=>{let t=window.navigator.userAgent;return t.toLowerCase().match(/android/i)?"Android":t.toLowerCase().match(/iphone/i)?"iPhone":t.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})();if(t){if("PC"===t)return"dk";if("iPad"===t||"iPhone"===t)return"mtWeb"}return"mtWeb"})()),this.postCustomPath&&t.searchParams.append("customURL",this.postCustomPath),fetch(t.href).then((t=>{if(t.status>=300)throw this.hasErrors=!0,new Error("There was an error while fetching the data");return t.json()})).then((t=>{if(t.count>=1&&this.postCustomPath){let i=new Date(t.items[0].publishingDate),n=0;for(let e=1;e<t.items.length;e++){const o=new Date(t.items[e].publishingDate);i.getTime()<o.getTime()&&(i=o,n=e)}this.blogData=t.items[n]}else this.blogData=t;this.isLoading=!1})).catch((t=>{this.hasErrors=!0,console.log("Error",t)})).finally((()=>this.isLoading=!1))}handleClientStyling(){void 0===window.emMessageBus?(this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl)):this.stylingSubscription=function(t,i,n,e=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!e)return function(t,i){const n=document.createElement("style");return window.emMessageBus.subscribe(i,(i=>{t&&(n.innerHTML=i,t.appendChild(n))}))}(t,i);window[o]||(window[o]={});const r=(n=function(t,i){return window.emMessageBus.subscribe(i,(n=>{if(!t)return;const e=t.getRootNode(),r=window[o];let s=r[i]&&r[i].sheet;s?r[i].refCount=r[i].refCount+1:(s=new CSSStyleSheet,s.replaceSync(n),r[i]={sheet:s,refCount:1});const a=e.adoptedStyleSheets||[];a.includes(s)||(e.adoptedStyleSheets=[...a,s])}))}(t,i)).unsubscribe.bind(n);return n.unsubscribe=()=>{if(window[o][i]){const t=window[o][i];t.refCount>1?t.refCount=t.refCount-1:delete window[o][i]}r()},n}(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.detectAndAlertDeviceType(),this.handleClientStyling()}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}detectAndAlertDeviceType(){this.device=((t=!1)=>{if("undefined"==typeof window||"undefined"==typeof navigator)return"desktop";const i=navigator.userAgent.toLowerCase(),n=window.innerWidth;if(function(t){return!!t.includes("ipad")||t.includes("macintosh")&&navigator.maxTouchPoints>0}(i))return"tablet";if(function(t){return t.includes("iphone")||t.includes("ipod")}(i))return"mobile";if(function(t,i){return a(t)&&(t.includes("mobile")||t.includes("mobi")||i<=599)}(i,n))return"mobile";if(function(t,i){return a(t)&&!t.includes("mobile")&&!t.includes("mobi")&&i>599}(i,n))return"tablet";if(t){if(n<=599)return"mobile";if(n<=1099)return"tablet"}return"desktop"})()}parseDate(t){const i=new Date(t);if(i instanceof Date&&!Number.isNaN(i.getTime()))return i;const[n,e,o]=t.trim().split("/").map(Number);return new Date(o,e-1,n)}formatDate(t){const i=this.parseDate(t);return new Intl.DateTimeFormat(this.intlDateTimeFormat||"en-GB").format(i)}render(){var t,n,o,r,s,a;if(this.hasErrors)return i("div",{class:"BlogArticleDetails"},i("div",{class:"Title"},e("error",this.language)));const h=!this.isLoading&&this.showBreadcrumb?`/${encodeURIComponent(this.language)}`:"";return i("div",{ref:t=>this.stylingContainer=t},!this.isLoading&&i("div",{class:"DetailsContainer"},i("div",{class:"DetailsHeadWrapper"},this.showPublishingDate&&this.blogData.publishingDate&&i("div",{class:"BlogDate"},this.formatDate(null===(t=this.blogData)||void 0===t?void 0:t.publishingDate)),this.showImage&&i("div",{class:`BlogBanner ${this.device}`},(null===(n=this.blogData.image)||void 0===n?void 0:n.src)?i("div",{style:{background:`url(${this.setImage(this.blogData.image)}) no-repeat center center / cover`}}):(null===(o=this.blogData.video)||void 0===o?void 0:o.sources[this.device])?i("video",{src:this.blogData.video.sources[this.device],controls:!0}):i("h1",{style:{color:"white"}},"No Image"))),i("div",{class:"DetailsBodyWrapper"},this.showTitle&&i("div",{class:"BlogTitle"},null===(r=this.blogData)||void 0===r?void 0:r.title),this.showBreadcrumb&&i("nav",{class:"breadcrumb","aria-label":"Breadcrumb"},i("a",{href:h},e("home",this.language)),i("span",{"aria-hidden":"true"},"›"),i("a",{href:`${h}/blog`},e("blog",this.language)),i("span",{"aria-hidden":"true"},"›"),i("span",{"aria-current":"page"},null===(s=this.blogData)||void 0===s?void 0:s.title)),this.showContent&&this.renderContentConditionally(null===(a=this.blogData)||void 0===a?void 0:a.content))))}static get watchers(){return{postId:["watchEndpoint"],postSlug:["watchEndpoint"],postCustomPath:["watchEndpoint"],cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};h.style=":host {\n display: block;\n}\n\n.breadcrumb {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 0.5rem;\n max-width: 1300px;\n}\n.breadcrumb a {\n color: inherit;\n}\n\n.DetailsContainer {\n background-color: #07072A;\n color: #fff;\n display: flex;\n flex-direction: column;\n}\n.DetailsContainer .BlogBanner div {\n height: 400px;\n}\n.DetailsContainer .DetailsHeadWrapper {\n position: relative;\n}\n.DetailsContainer .DetailsBodyWrapper {\n padding: 30px;\n}\n.DetailsContainer .BlogDate {\n font-size: 12px;\n border-radius: 5px 5px 0 0;\n padding: 10px;\n width: fit-content;\n text-align: center;\n background-color: #0D0D4D;\n z-index: 1;\n text-wrap: nowrap;\n position: absolute;\n bottom: 0;\n left: 30px;\n}\n.DetailsContainer .BlogTitle {\n font-size: 24px;\n}\n.DetailsContainer .BlogContent {\n font-size: 14px;\n}\n.DetailsContainer .BlogContent p:last-child {\n margin-bottom: 0;\n}\n\n@container (max-width: 475px) {\n .DetailsContainer {\n font-size: 12px;\n }\n}";export{h as blog_article_details}
1
+ import{r as t,h as i}from"./index-39cf8680.js";const e={en:{error:"Error",home:"Home",blog:"Blog",backToBlog:"Back to blog",moreArticles:"More articles",previousArticle:"Previous article",nextArticle:"Next article"},ro:{error:"Error",home:"Home",blog:"Blog",backToBlog:"Back to blog",moreArticles:"More articles",previousArticle:"Previous article",nextArticle:"Next article"},fr:{error:"Error",home:"Home",blog:"Blog",backToBlog:"Back to blog",moreArticles:"More articles",previousArticle:"Previous article",nextArticle:"Next article"},ar:{error:"Error",home:"Home",blog:"Blog",backToBlog:"Back to blog",moreArticles:"More articles",previousArticle:"Previous article",nextArticle:"Next article"},hr:{error:"Error",home:"Home",blog:"Blog",backToBlog:"Back to blog",moreArticles:"More articles",previousArticle:"Previous article",nextArticle:"Next article"},"pt-br":{error:"Error",home:"Home",blog:"Blog",backToBlog:"Back to blog",moreArticles:"More articles",previousArticle:"Previous article",nextArticle:"Next article"},"es-mx":{error:"Error",home:"Home",blog:"Blog",backToBlog:"Back to blog",moreArticles:"More articles",previousArticle:"Previous article",nextArticle:"Next article"}},n=(t,i)=>e[void 0!==i&&i in e?i:"en"][t],o="__WIDGET_GLOBAL_STYLE_CACHE__";function r(t,i){if(t){const e=document.createElement("style");e.innerHTML=i,t.appendChild(e)}}function s(t,i){if(!t||!i)return;const e=new URL(i);fetch(e.href).then((t=>t.text())).then((i=>{const e=document.createElement("style");e.innerHTML=i,t&&t.appendChild(e)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function l(t){return t.includes("android")}const a=()=>{const t=(()=>{let t=window.navigator.userAgent;return t.toLowerCase().match(/android/i)?"Android":t.toLowerCase().match(/iphone/i)?"iPhone":t.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})();if(t){if("PC"===t)return"dk";if("iPad"===t||"iPhone"===t)return"mtWeb"}return"mtWeb"},h=class{constructor(e){t(this,e),this.articleRequest=0,this.neighboursRequest=0,this.renderContentConditionally=t=>t&&(!t.includes("<bannermatrix-banner")||this.bannerMatrixReady)?i("div",{class:"BlogContent",innerHTML:t}):null,this.cmsEndpoint=void 0,this.language="en",this.userRoles="everyone",this.cmsEnv="stage",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.showPublishingDate=!0,this.showImage=!0,this.showTitle=!0,this.showBreadcrumb=!1,this.hideCategory="",this.showContent=!0,this.showMoreArticles=!1,this.showBackButton=!1,this.postId=void 0,this.postSlug=void 0,this.postCustomPath=void 0,this.intlDateTimeFormat="",this.hasErrors=!1,this.isLoading=!0,this.bannerMatrixReady=!1,this.device="mobile",this.categories=[],this.neighbours={}}handleBannerReady(){this.bannerMatrixReady=!0}watchEndpoint(t,i){t!==i&&(this.cmsEndpoint&&this.language&&(this.postCustomPath||this.postSlug||this.postId)?this.getBlogArticleDetails():(this.articleRequest++,this.categories=[],this.neighbours={}))}handleMoreArticlesChange(){this.neighboursRequest++,this.neighbours={},this.showMoreArticles&&!this.isLoading&&this.blogData&&this.fetchMoreArticles(this.articleRequest)}handleClientStylingChange(t,i){t!==i&&r(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,i){t!==i&&this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl)}connectedCallback(){this.cmsEndpoint&&this.language&&(this.postCustomPath||this.postSlug||this.postId)&&this.getBlogArticleDetails()}getBlogArticleDetails(){if(!this.postId&&!this.postSlug&&!this.postCustomPath)throw this.hasErrors=!0,new Error("postId, postSlug or postCustomPath parameter has to be provided!");const t=++this.articleRequest;this.categories=[],this.neighbours={},this.neighboursRequest++,this.hasErrors=!1,this.isLoading=!0;let i=new URL(`${this.cmsEndpoint}/${this.language}/blog-posts${this.postCustomPath?"":"/"+(this.postSlug||this.postId)}`);i.searchParams.append("env",this.cmsEnv),i.searchParams.append("userRoles",this.userRoles),i.searchParams.append("device",a()),this.postCustomPath&&i.searchParams.append("customURL",this.postCustomPath),this.fetchCategories(t),fetch(i.href).then((t=>{if(t.status>=300)throw new Error("There was an error while fetching the data");return t.json()})).then((i=>{if(t===this.articleRequest){if(i.count>=1&&this.postCustomPath){let t=new Date(i.items[0].publishingDate),e=0;for(let n=1;n<i.items.length;n++){const o=new Date(i.items[n].publishingDate);t.getTime()<o.getTime()&&(t=o,e=n)}this.blogData=i.items[e]}else this.blogData=i;this.showMoreArticles&&this.fetchMoreArticles(t)}})).catch((i=>{t===this.articleRequest&&(this.hasErrors=!0,console.log("Error",i))})).finally((()=>{t===this.articleRequest&&(this.isLoading=!1)}))}async fetchMoreArticles(t){var i,e,n,o,r;if(!(this.cmsEndpoint&&this.language&&this.blogData&&this.showMoreArticles))return;const s=++this.neighboursRequest,l=null===(i=this.blogData)||void 0===i?void 0:i.postID,h=(null===(e=this.blogData)||void 0===e?void 0:e.customPath)||(null===(n=this.blogData)||void 0===n?void 0:n.slug)||this.postCustomPath||this.postSlug,c=[],d=new URL(`${this.cmsEndpoint}/${this.language}/blog-posts`);d.searchParams.set("per_page","20"),d.searchParams.set("env",this.cmsEnv),d.searchParams.set("userRoles",this.userRoles),d.searchParams.set("device",a());try{for(let i=1;this.showMoreArticles&&s===this.neighboursRequest&&t===this.articleRequest;i++){d.searchParams.set("page",String(i));const e=await fetch(d.href);if(!e.ok)throw new Error("Failed to fetch adjacent articles");const n=await e.json();if(!this.showMoreArticles||s!==this.neighboursRequest||t!==this.articleRequest)return;if(!Array.isArray(null==n?void 0:n.items))return;c.push(...n.items.filter((t=>"string"==typeof((null==t?void 0:t.customPath)||(null==t?void 0:t.slug))&&(t.customPath||t.slug))));const a=c.findIndex((t=>null!=l&&t.postID===l||h&&(t.customPath||t.slug)===h));if(a>=0&&(a<c.length-1||!(null===(o=n.pages)||void 0===o?void 0:o.next)))return void(this.neighbours={previous:c[a+1],next:c[a-1]});if(!(null===(r=n.pages)||void 0===r?void 0:r.next))return}}catch(t){console.error("Error fetching adjacent articles",t)}}async fetchCategories(t){try{const i=await fetch(`${this.cmsEndpoint}/${this.language}/blog-posts/category`);if(!i.ok)throw new Error("Failed to fetch categories");const e=await i.json();if(t===this.articleRequest){const t=this.hideCategory.split(",").map((t=>t.trim().toLowerCase())).filter(Boolean),i=Array.isArray(e)?e.filter((i=>"string"==typeof(null==i?void 0:i.name)&&i.name&&"string"==typeof i.slug&&i.slug&&!t.includes(i.name.toLowerCase()))):[];this.categories=i}}catch(i){t===this.articleRequest&&(this.categories=[])}}handleClientStyling(){void 0===window.emMessageBus?(this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl)):this.stylingSubscription=function(t,i,e,n=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!n)return function(t,i){const e=document.createElement("style");return window.emMessageBus.subscribe(i,(i=>{t&&(e.innerHTML=i,t.appendChild(e))}))}(t,i);window[o]||(window[o]={});const r=(e=function(t,i){return window.emMessageBus.subscribe(i,(e=>{if(!t)return;const n=t.getRootNode(),r=window[o];let s=r[i]&&r[i].sheet;s?r[i].refCount=r[i].refCount+1:(s=new CSSStyleSheet,s.replaceSync(e),r[i]={sheet:s,refCount:1});const l=n.adoptedStyleSheets||[];l.includes(s)||(n.adoptedStyleSheets=[...l,s])}))}(t,i)).unsubscribe.bind(e);return e.unsubscribe=()=>{if(window[o][i]){const t=window[o][i];t.refCount>1?t.refCount=t.refCount-1:delete window[o][i]}r()},e}(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.detectAndAlertDeviceType(),this.handleClientStyling()}disconnectedCallback(){this.articleRequest++,this.neighboursRequest++,this.stylingSubscription&&this.stylingSubscription.unsubscribe()}detectAndAlertDeviceType(){this.device=((t=!1)=>{if("undefined"==typeof window||"undefined"==typeof navigator)return"desktop";const i=navigator.userAgent.toLowerCase(),e=window.innerWidth;if(function(t){return!!t.includes("ipad")||t.includes("macintosh")&&navigator.maxTouchPoints>0}(i))return"tablet";if(function(t){return t.includes("iphone")||t.includes("ipod")}(i))return"mobile";if(function(t,i){return l(t)&&(t.includes("mobile")||t.includes("mobi")||i<=599)}(i,e))return"mobile";if(function(t,i){return l(t)&&!t.includes("mobile")&&!t.includes("mobi")&&i>599}(i,e))return"tablet";if(t){if(e<=599)return"mobile";if(e<=1099)return"tablet"}return"desktop"})()}parseDate(t){const i=new Date(t);if(i instanceof Date&&!Number.isNaN(i.getTime()))return i;const[e,n,o]=t.trim().split("/").map(Number);return new Date(o,n-1,e)}formatDate(t){const i=this.parseDate(t);return new Intl.DateTimeFormat(this.intlDateTimeFormat||"en-GB",{day:"numeric",month:"short",year:"numeric"}).format(i)}setImage(t){var i,e;return null===(e=null===(i=null==t?void 0:t.sources)||void 0===i?void 0:i["mobile"===this.device?0:"tablet"===this.device?1:2])||void 0===e?void 0:e.pictureSource}render(){var t,e,o,r,s,l,a;if(this.hasErrors)return i("div",{class:"BlogArticleDetails"},i("div",{class:"Title"},n("error",this.language)));const h=`/${encodeURIComponent(this.language)}`,c=!this.isLoading&&Array.isArray(null===(t=this.blogData)||void 0===t?void 0:t.blogCategory)?this.blogData.blogCategory.map((t=>this.categories.find((i=>i.slug===t)))).filter(Boolean):[],d=c[0],p=null===(e=this.blogData)||void 0===e?void 0:e.image,u=this.setImage(p),{previous:g,next:f}=this.neighbours;return i("div",{ref:t=>this.stylingContainer=t},!this.isLoading&&i("div",{class:"DetailsContainer"},this.showBackButton&&i("a",{class:"BackButton",href:`${h}/blog`},"← ",n("backToBlog",this.language)),i("div",{class:"DetailsHeadWrapper"},this.showPublishingDate&&this.blogData.publishingDate&&i("time",{class:"BlogDate",dateTime:this.blogData.publishingDate},this.formatDate(this.blogData.publishingDate)),this.showImage&&i("div",{class:`BlogBanner ${this.device}`},u?i("img",{src:u,alt:(null==p?void 0:p.alt)||""}):(null===(r=null===(o=this.blogData.video)||void 0===o?void 0:o.sources)||void 0===r?void 0:r[this.device])?i("video",{src:this.blogData.video.sources[this.device],controls:!0}):null)),i("div",{class:"DetailsBodyWrapper"},this.showTitle&&i("div",{class:"BlogTitle"},null===(s=this.blogData)||void 0===s?void 0:s.title),this.showBreadcrumb&&i("nav",{class:"breadcrumb","aria-label":"Breadcrumb"},i("a",{href:h},n("home",this.language)),i("span",{"aria-hidden":"true"},"›"),i("a",{href:`${h}/blog`},n("blog",this.language)),i("span",{"aria-hidden":"true"},"›"),d&&[i("a",{href:`${h}/blog/category/${encodeURIComponent(d.slug)}`},d.name),i("span",{"aria-hidden":"true"},"›")],i("span",{"aria-current":"page"},null===(l=this.blogData)||void 0===l?void 0:l.title)),c.length>0&&i("div",{class:"BlogCategoryPills"},c.map((t=>i("a",{class:"BlogCategoryLink",href:`${h}/blog/category/${encodeURIComponent(t.slug)}`},t.name)))),this.showContent&&this.renderContentConditionally(null===(a=this.blogData)||void 0===a?void 0:a.content)),this.showMoreArticles&&(g||f)&&i("nav",{class:"AdjacentPosts","aria-label":n("moreArticles",this.language)},g&&i("a",{href:`${h}/blog/${encodeURIComponent(g.customPath||g.slug||"")}`,rel:"prev"},"← ",n("previousArticle",this.language),": ",g.title||g.customPath||g.slug),f&&i("a",{href:`${h}/blog/${encodeURIComponent(f.customPath||f.slug||"")}`,rel:"next"},n("nextArticle",this.language),": ",f.title||f.customPath||f.slug," →"))))}static get watchers(){return{postId:["watchEndpoint"],postSlug:["watchEndpoint"],postCustomPath:["watchEndpoint"],cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],cmsEnv:["watchEndpoint"],userRoles:["watchEndpoint"],showMoreArticles:["handleMoreArticlesChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};h.style=":host {\n display: block;\n}\n\n.breadcrumb {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 0.5rem;\n max-width: 1300px;\n margin-bottom: 30px;\n}\n.breadcrumb a {\n color: inherit;\n}\n\n.DetailsContainer {\n background-color: #07072A;\n position: relative;\n color: #fff;\n display: flex;\n flex-direction: column;\n}\n.DetailsContainer .BlogBanner img {\n display: block;\n width: 100%;\n height: 400px;\n object-fit: cover;\n}\n.DetailsContainer .DetailsHeadWrapper {\n position: relative;\n}\n.DetailsContainer .DetailsBodyWrapper {\n padding: 30px;\n}\n.DetailsContainer .BlogDate {\n font-size: 12px;\n border-radius: 5px 5px 0 0;\n padding: 10px;\n width: fit-content;\n text-align: center;\n background-color: #0D0D4D;\n z-index: 1;\n text-wrap: nowrap;\n position: absolute;\n bottom: 0;\n left: 30px;\n}\n.DetailsContainer .BlogTitle {\n font-size: 24px;\n}\n.DetailsContainer .BlogCategoryPills {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n.DetailsContainer .BlogCategoryLink {\n position: relative;\n z-index: 3;\n padding: 4px 12px;\n border: 1px solid currentColor;\n border-radius: 999px;\n color: inherit;\n font-size: 12px;\n text-decoration: none;\n}\n.DetailsContainer .BlogContent {\n font-size: 14px;\n}\n.DetailsContainer .BlogContent p:last-child {\n margin-bottom: 0;\n}\n\n.BackButton {\n position: absolute;\n top: 30px;\n left: 30px;\n z-index: 2;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n box-sizing: border-box;\n min-width: 100px;\n height: 32px;\n padding: 0 12px;\n border: none;\n border-radius: 5px;\n background: var(--emw--color-primary, #524e52);\n color: var(--emw--color-typography-contrast, #fff);\n font: inherit;\n text-decoration: none;\n text-align: center;\n white-space: nowrap;\n cursor: pointer;\n transition: all 0.1s linear;\n}\n\n.DetailsContainer:not(:has(.BlogBanner img, .BlogBanner video)) .BackButton {\n position: static;\n align-self: flex-start;\n margin: 30px 30px 16px;\n}\n.DetailsContainer:not(:has(.BlogBanner img, .BlogBanner video)) .BlogDate {\n position: static;\n display: block;\n margin-left: 30px;\n}\n.DetailsContainer:not(:has(.BlogBanner img, .BlogBanner video)) .BlogBanner {\n display: none;\n}\n\n.AdjacentPosts {\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n gap: 20px;\n padding: 30px;\n}\n.AdjacentPosts a {\n flex: 1 1 250px;\n}\n\n.AdjacentPosts a {\n color: var(--emw--color-primary, #fff);\n font: inherit;\n text-decoration: underline;\n}\n\n.BackButton:focus-visible,\n.AdjacentPosts a:focus-visible {\n outline: 2px solid var(--emw--color-primary, #fff);\n outline-offset: 3px;\n}\n\n@container (max-width: 475px) {\n .DetailsContainer {\n font-size: 12px;\n }\n}";export{h as blog_article_details}
@@ -1 +1 @@
1
- import{p as t,b as n}from"./index-f613f8e8.js";export{s as setNonce}from"./index-f613f8e8.js";import{g as e}from"./app-globals-0f993ce5.js";(()=>{const n=import.meta.url,e={};return""!==n&&(e.resourcesUrl=new URL(".",n).href),t(e)})().then((async t=>(await e(),n([["blog-article-details",[[1,"blog-article-details",{cmsEndpoint:[513,"cms-endpoint"],language:[513],userRoles:[513,"user-roles"],cmsEnv:[513,"cms-env"],mbSource:[1,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],showPublishingDate:[516,"show-publishing-date"],showImage:[516,"show-image"],showTitle:[516,"show-title"],showBreadcrumb:[516,"show-breadcrumb"],showContent:[516,"show-content"],postId:[513,"post-id"],postSlug:[513,"post-slug"],postCustomPath:[513,"post-custom-path"],intlDateTimeFormat:[1,"intl-date-time-format"],hasErrors:[32],isLoading:[32],bannerMatrixReady:[32],device:[32]},[[8,"BannerMatrixReady","handleBannerReady"]],{postId:["watchEndpoint"],postSlug:["watchEndpoint"],postCustomPath:["watchEndpoint"],cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}]]]],t))));
1
+ import{p as t,b as e}from"./index-39cf8680.js";export{s as setNonce}from"./index-39cf8680.js";import{g as n}from"./app-globals-0f993ce5.js";(()=>{const e=import.meta.url,n={};return""!==e&&(n.resourcesUrl=new URL(".",e).href),t(n)})().then((async t=>(await n(),e([["blog-article-details",[[1,"blog-article-details",{cmsEndpoint:[513,"cms-endpoint"],language:[513],userRoles:[513,"user-roles"],cmsEnv:[513,"cms-env"],mbSource:[1,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],showPublishingDate:[516,"show-publishing-date"],showImage:[516,"show-image"],showTitle:[516,"show-title"],showBreadcrumb:[516,"show-breadcrumb"],hideCategory:[513,"hide-category"],showContent:[516,"show-content"],showMoreArticles:[516,"show-more-articles"],showBackButton:[516,"show-back-button"],postId:[513,"post-id"],postSlug:[513,"post-slug"],postCustomPath:[513,"post-custom-path"],intlDateTimeFormat:[1,"intl-date-time-format"],hasErrors:[32],isLoading:[32],bannerMatrixReady:[32],device:[32],categories:[32],neighbours:[32]},[[8,"BannerMatrixReady","handleBannerReady"]],{postId:["watchEndpoint"],postSlug:["watchEndpoint"],postCustomPath:["watchEndpoint"],cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],cmsEnv:["watchEndpoint"],userRoles:["watchEndpoint"],showMoreArticles:["handleMoreArticlesChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}]]]],t))));
@@ -0,0 +1,2 @@
1
+ var t=Object.defineProperty,e=new WeakMap,n=t=>e.get(t),l=(t,n)=>e.set(n.t=t,n),o=(t,e)=>(0,console.error)(t,e),s=new Map,r=new Map,i="slot-fb{display:contents}slot-fb[hidden]{display:none}",c="undefined"!=typeof window?window:{},u=c.document||{head:{}},a={l:0,o:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},f=t=>Promise.resolve(t),h=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),d=!1,p=[],m=[],y=(t,e)=>n=>{t.push(n),d||(d=!0,e&&4&a.l?w($):a.raf($))},v=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){o(t)}t.length=0},$=()=>{v(p),v(m),(d=p.length>0)&&a.raf($)},w=t=>f().then(t),b=y(m,!0),S={},g=t=>"object"==(t=typeof t)||"function"===t;function j(t){var e,n,l;return null!=(l=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((e,n)=>{for(var l in n)t(e,l,{get:n[l],enumerable:!0})})({},{err:()=>O,map:()=>C,ok:()=>k,unwrap:()=>P,unwrapErr:()=>x});var k=t=>({isOk:!0,isErr:!1,value:t}),O=t=>({isOk:!1,isErr:!0,value:t});function C(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>k(t))):k(n)}if(t.isErr)return O(t.value);throw"should never get here"}var E,M,P=t=>{if(t.isOk)return t.value;throw t.value},x=t=>{if(t.isErr)return t.value;throw t.value},T=(t,e,...n)=>{let l=null,o=!1,s=!1;const r=[],i=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?i(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof t&&!g(l))&&(l+=""),o&&s?r[r.length-1].i+=l:r.push(o?A(null,l):l),s=o)};if(i(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}const c=A(t,null);return c.u=e,r.length>0&&(c.h=r),c},A=(t,e)=>({l:0,p:t,i:e,m:null,h:null,u:null}),L={},N=new WeakMap,R=t=>"sc-"+t.v,U=(t,e,n,l,o,s)=>{if(n!==l){let r=((t,e)=>e in t)(t,e);if(e.toLowerCase(),"class"===e){const e=t.classList,o=F(n),s=F(l);e.remove(...o.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!o.includes(t))))}else if("ref"===e)l&&l(t);else{const i=g(l);if((r||i&&null!==l)&&!o)try{if(t.tagName.includes("-"))t[e]=l;else{const o=null==l?"":l;"list"===e?r=!1:null!=n&&t[e]==o||(t[e]=o)}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&s||o)&&!i&&t.setAttribute(e,l=!0===l?"":l)}}},D=/\s/,F=t=>t?t.split(D):[],H=(t,e,n)=>{const l=11===e.m.nodeType&&e.m.host?e.m.host:e.m,o=t&&t.u||S,s=e.u||S;for(const t of W(Object.keys(o)))t in s||U(l,t,o[t],void 0,n,e.l);for(const t of W(Object.keys(s)))U(l,t,o[t],s[t],n,e.l)};function W(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var q=!1,G=(t,e,n)=>{const l=e.h[n];let o,s,r=0;if(null!==l.i)o=l.m=u.createTextNode(l.i);else if(o=l.m=u.createElement(l.p),H(null,l,q),null!=E&&o["s-si"]!==E&&o.classList.add(o["s-si"]=E),l.h)for(r=0;r<l.h.length;++r)s=G(t,l,r),s&&o.appendChild(s);return o["s-hn"]=M,o},V=(t,e,n,l,o,s)=>{let r,i=t;for(i.shadowRoot&&i.tagName===M&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=G(null,n,o),r&&(l[o].m=r,J(i,r,e)))},_=(t,e,n)=>{for(let l=e;l<=n;++l){const e=t[l];if(e){const t=e.m;I(e),t&&t.remove()}}},z=(t,e)=>t.p===e.p,B=(t,e,n=!1)=>{const l=e.m=t.m,o=t.h,s=e.h,r=e.i;null===r?(H(t,e,q),null!==o&&null!==s?((t,e,n,l,o=!1)=>{let s,r=0,i=0,c=e.length-1,u=e[0],a=e[c],f=l.length-1,h=l[0],d=l[f];for(;r<=c&&i<=f;)null==u?u=e[++r]:null==a?a=e[--c]:null==h?h=l[++i]:null==d?d=l[--f]:z(u,h)?(B(u,h,o),u=e[++r],h=l[++i]):z(a,d)?(B(a,d,o),a=e[--c],d=l[--f]):z(u,d)?(B(u,d,o),J(t,u.m,a.m.nextSibling),u=e[++r],d=l[--f]):z(a,h)?(B(a,h,o),J(t,a.m,u.m),a=e[--c],h=l[++i]):(s=G(e&&e[i],n,i),h=l[++i],s&&J(u.m.parentNode,s,u.m));r>c?V(t,null==l[f+1]?null:l[f+1].m,n,l,i,f):i>f&&_(e,r,c)})(l,o,e,s,n):null!==s?(null!==t.i&&(l.textContent=""),V(l,null,e,s,0,s.length-1)):null!==o&&_(o,0,o.length-1)):t.i!==r&&(l.data=r)},I=t=>{t.u&&t.u.ref&&t.u.ref(null),t.h&&t.h.map(I)},J=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),K=(t,e)=>{e&&!t.$&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.$=e)))},Q=(t,e)=>{if(t.l|=16,!(4&t.l))return K(t,t.S),b((()=>X(t,e)));t.l|=512},X=(t,e)=>{const n=t.t;if(!n)throw Error(`Can't render component <${t.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);return e&&(t.l|=256,t.j&&(t.j.map((([t,e])=>ot(n,t,e))),t.j=void 0)),Y(void 0,(()=>tt(t,n,e)))},Y=(t,e)=>Z(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),Z=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,tt=async(t,e,n)=>{var l;const o=t.$hostElement$,s=o["s-rc"];n&&(t=>{const e=t.k,n=t.$hostElement$,l=e.l,o=((t,e)=>{var n;const l=R(e),o=r.get(l);if(t=11===t.nodeType?t:u,o)if("string"==typeof o){let s,r=N.get(t=t.head||t);if(r||N.set(t,r=new Set),!r.has(l)){{s=u.createElement("style"),s.innerHTML=o;const e=null!=(n=a.O)?n:j(u);null!=e&&s.setAttribute("nonce",e),t.insertBefore(s,t.querySelector("link"))}4&e.l&&(s.innerHTML+=i),r&&r.add(l)}}else t.adoptedStyleSheets.includes(o)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(t);et(t,e,o,n),s&&(s.map((t=>t())),o["s-rc"]=void 0);{const e=null!=(l=o["s-p"])?l:[],n=()=>nt(t);0===e.length?n():(Promise.all(e).then(n),t.l|=4,e.length=0)}},et=(t,e,n,l)=>{try{e=e.render(),t.l&=-17,t.l|=2,((t,e,n=!1)=>{const l=t.$hostElement$,o=t.k,s=t.C||A(null,null),r=(t=>t&&t.p===L)(e)?e:T(null,null,e);if(M=l.tagName,o.M&&(r.u=r.u||{},o.M.map((([t,e])=>r.u[e]=l[t]))),n&&r.u)for(const t of Object.keys(r.u))l.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(r.u[t]=l[t]);r.p=null,r.l|=4,t.C=r,r.m=s.m=l.shadowRoot||l,E=l["s-sc"],B(s,r,n)})(t,e,l)}catch(e){o(e,t.$hostElement$)}return null},nt=t=>{const e=t.$hostElement$,n=t.t,l=t.S;64&t.l||(t.l|=64,st(e),ot(n,"componentDidLoad"),t.P(e),l||lt()),t.$&&(t.$(),t.$=void 0),512&t.l&&w((()=>Q(t,!1))),t.l&=-517},lt=()=>{st(u.documentElement),w((()=>(t=>{const e=a.ce("appload",{detail:{namespace:"blog-article-details"}});return t.dispatchEvent(e),e})(c)))},ot=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){o(t)}},st=t=>t.classList.add("hydrated"),rt=(t,e,l)=>{var s,r;const i=t.prototype;if(e.T||e.A||t.watchers){t.watchers&&!e.A&&(e.A=t.watchers);const c=Object.entries(null!=(s=e.T)?s:{});if(c.map((([t,[s]])=>{(31&s||2&l&&32&s)&&Object.defineProperty(i,t,{get(){return((t,e)=>n(this).L.get(e))(0,t)},set(l){((t,e,l,s)=>{const r=n(t);if(!r)throw Error(`Couldn't find host element for "${s.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=r.$hostElement$,c=r.L.get(e),u=r.l,a=r.t;if(l=((t,e)=>null==t||g(t)?t:4&e?"false"!==t&&(""===t||!!t):1&e?t+"":t)(l,s.T[e][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(r.L.set(e,l),a)){if(s.A&&128&u){const t=s.A[e];t&&t.map((t=>{try{a[t](l,c,e)}catch(t){o(t,i)}}))}2==(18&u)&&Q(r,!1)}})(this,t,l,e)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;i.attributeChangedCallback=function(t,o,s){a.jmp((()=>{var r;const c=l.get(t);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=e.A)?void 0:r[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,s,o,t)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=e.A)?r:{}),...c.filter((([t,e])=>15&e[0])).map((([t,n])=>{var o;const s=n[1]||t;return l.set(s,t),512&n[0]&&(null==(o=e.M)||o.push([t,s])),s}))]))}}return t},it=t=>{ot(t,"connectedCallback")},ct=t=>{ot(t,"disconnectedCallback")},ut=(t,l={})=>{var f;const d=[],p=l.exclude||[],m=c.customElements,y=u.head,v=y.querySelector("meta[charset]"),$=u.createElement("style"),w=[];let b,S=!0;Object.assign(a,l),a.o=new URL(l.resourcesUrl||"./",u.baseURI).href;let g=!1;if(t.map((t=>{t[1].map((l=>{var i;const c={l:l[0],v:l[1],T:l[2],N:l[3]};4&c.l&&(g=!0),c.T=l[2],c.N=l[3],c.M=[],c.A=null!=(i=l[4])?i:{};const u=c.v,f=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const l={l:0,$hostElement$:t,k:n,L:new Map};l.R=new Promise((t=>l.P=t)),t["s-p"]=[],t["s-rc"]=[],e.set(t,l)})(t=this,c),1&c.l)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.v}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){const t=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,at(this,t,c.N)),b&&(clearTimeout(b),b=null),S?w.push(this):a.jmp((()=>(t=>{if(!(1&a.l)){const e=n(t),l=e.k,i=()=>{};if(1&e.l)at(t,e,l.N),(null==e?void 0:e.t)?it(e.t):(null==e?void 0:e.R)&&e.R.then((()=>it(e.t)));else{e.l|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){K(e,e.S=n);break}}l.T&&Object.entries(l.T).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let l;if(!(32&e.l)){if(e.l|=32,n.U){const t=(t=>{const e=t.v.replace(/-/g,"_"),n=t.U;if(!n)return;const l=s.get(n);return l?l[e]:import(`./${n}.entry.js`).then((t=>(s.set(n,t),t[e])),o)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(t&&"then"in t){const e=()=>{};l=await t,e()}else l=t;if(!l)throw Error(`Constructor for "${n.v}#${e.D}" was not found`);l.isProxied||(n.A=l.watchers,rt(l,n,2),l.isProxied=!0);const r=()=>{};e.l|=8;try{new l(e)}catch(t){o(t)}e.l&=-9,e.l|=128,r(),it(e.t)}else l=t.constructor,customElements.whenDefined(t.localName).then((()=>e.l|=128));if(l&&l.style){let t;"string"==typeof l.style&&(t=l.style);const e=R(n);if(!r.has(e)){const l=()=>{};((t,e,n)=>{let l=r.get(t);h&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,r.set(t,l)})(e,t,!!(1&n.l)),l()}}}const i=e.S,c=()=>Q(e,!0);i&&i["s-rc"]?i["s-rc"].push(c):c()})(t,e,l)}i()}})(this)))}disconnectedCallback(){a.jmp((()=>(async()=>{if(!(1&a.l)){const t=n(this);t.F&&(t.F.map((t=>t())),t.F=void 0),(null==t?void 0:t.t)?ct(t.t):(null==t?void 0:t.R)&&t.R.then((()=>ct(t.t)))}})()))}componentOnReady(){return n(this).R}};c.U=t[0],p.includes(u)||m.get(u)||(d.push(u),m.define(u,rt(f,c,1)))}))})),d.length>0&&(g&&($.textContent+=i),$.textContent+=d.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",$.innerHTML.length)){$.setAttribute("data-styles","");const t=null!=(f=a.O)?f:j(u);null!=t&&$.setAttribute("nonce",t),y.insertBefore($,v?v.nextSibling:y.firstChild)}S=!1,w.length?w.map((t=>t.connectedCallback())):a.jmp((()=>b=setTimeout(lt,30)))},at=(t,e,n)=>{n&&n.map((([n,l,o])=>{const s=ht(t,n),r=ft(e,o),i=dt(n);a.ael(s,l,r,i),(e.F=e.F||[]).push((()=>a.rel(s,l,r,i)))}))},ft=(t,e)=>n=>{var l;try{256&t.l?null==(l=t.t)||l[e](n):(t.j=t.j||[]).push([e,n])}catch(t){o(t)}},ht=(t,e)=>8&e?c:t,dt=t=>({passive:!!(1&t),capture:!!(2&t)}),pt=t=>a.O=t;export{ut as b,T as h,f as p,l as r,pt as s}
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-5d8e9655.js');
5
+ const index = require('./index-566a22cc.js');
6
6
 
7
7
  const DEFAULT_LANGUAGE = 'en';
8
8
  const TRANSLATIONS = {
@@ -10,36 +10,64 @@ const TRANSLATIONS = {
10
10
  error: 'Error',
11
11
  home: 'Home',
12
12
  blog: 'Blog',
13
+ backToBlog: 'Back to blog',
14
+ moreArticles: 'More articles',
15
+ previousArticle: 'Previous article',
16
+ nextArticle: 'Next article',
13
17
  },
14
18
  ro: {
15
- error: 'Eroare',
16
- home: 'Acasă',
19
+ error: 'Error',
20
+ home: 'Home',
17
21
  blog: 'Blog',
22
+ backToBlog: 'Back to blog',
23
+ moreArticles: 'More articles',
24
+ previousArticle: 'Previous article',
25
+ nextArticle: 'Next article',
18
26
  },
19
27
  fr: {
20
28
  error: 'Error',
21
- home: 'Accueil',
29
+ home: 'Home',
22
30
  blog: 'Blog',
31
+ backToBlog: 'Back to blog',
32
+ moreArticles: 'More articles',
33
+ previousArticle: 'Previous article',
34
+ nextArticle: 'Next article',
23
35
  },
24
36
  ar: {
25
- error: 'خطأ',
26
- home: 'الرئيسية',
27
- blog: 'المدونة',
37
+ error: 'Error',
38
+ home: 'Home',
39
+ blog: 'Blog',
40
+ backToBlog: 'Back to blog',
41
+ moreArticles: 'More articles',
42
+ previousArticle: 'Previous article',
43
+ nextArticle: 'Next article',
28
44
  },
29
45
  hr: {
30
- error: 'Greška',
31
- home: 'Početna',
46
+ error: 'Error',
47
+ home: 'Home',
32
48
  blog: 'Blog',
49
+ backToBlog: 'Back to blog',
50
+ moreArticles: 'More articles',
51
+ previousArticle: 'Previous article',
52
+ nextArticle: 'Next article',
33
53
  },
34
54
  'pt-br': {
35
- error: 'Erro',
36
- home: 'Início',
55
+ error: 'Error',
56
+ home: 'Home',
37
57
  blog: 'Blog',
58
+ backToBlog: 'Back to blog',
59
+ moreArticles: 'More articles',
60
+ previousArticle: 'Previous article',
61
+ nextArticle: 'Next article',
38
62
  },
39
63
  'es-mx': {
40
64
  error: 'Error',
41
- home: 'Inicio',
65
+ home: 'Home',
42
66
  blog: 'Blog',
67
+ backToBlog: 'Back to blog',
68
+ moreArticles: 'More articles',
69
+ previousArticle: 'Previous article',
70
+ nextArticle: 'Next article',
43
71
  }
44
72
  };
45
73
  const translate = (key, customLang) => {
@@ -252,12 +280,14 @@ const getDevicePlatform = () => {
252
280
  return 'mtWeb';
253
281
  };
254
282
 
255
- const blogArticleDetailsCss = ":host {\n display: block;\n}\n\n.breadcrumb {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 0.5rem;\n max-width: 1300px;\n}\n.breadcrumb a {\n color: inherit;\n}\n\n.DetailsContainer {\n background-color: #07072A;\n color: #fff;\n display: flex;\n flex-direction: column;\n}\n.DetailsContainer .BlogBanner div {\n height: 400px;\n}\n.DetailsContainer .DetailsHeadWrapper {\n position: relative;\n}\n.DetailsContainer .DetailsBodyWrapper {\n padding: 30px;\n}\n.DetailsContainer .BlogDate {\n font-size: 12px;\n border-radius: 5px 5px 0 0;\n padding: 10px;\n width: fit-content;\n text-align: center;\n background-color: #0D0D4D;\n z-index: 1;\n text-wrap: nowrap;\n position: absolute;\n bottom: 0;\n left: 30px;\n}\n.DetailsContainer .BlogTitle {\n font-size: 24px;\n}\n.DetailsContainer .BlogContent {\n font-size: 14px;\n}\n.DetailsContainer .BlogContent p:last-child {\n margin-bottom: 0;\n}\n\n@container (max-width: 475px) {\n .DetailsContainer {\n font-size: 12px;\n }\n}";
283
+ const blogArticleDetailsCss = ":host {\n display: block;\n}\n\n.breadcrumb {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 0.5rem;\n max-width: 1300px;\n margin-bottom: 30px;\n}\n.breadcrumb a {\n color: inherit;\n}\n\n.DetailsContainer {\n background-color: #07072A;\n position: relative;\n color: #fff;\n display: flex;\n flex-direction: column;\n}\n.DetailsContainer .BlogBanner img {\n display: block;\n width: 100%;\n height: 400px;\n object-fit: cover;\n}\n.DetailsContainer .DetailsHeadWrapper {\n position: relative;\n}\n.DetailsContainer .DetailsBodyWrapper {\n padding: 30px;\n}\n.DetailsContainer .BlogDate {\n font-size: 12px;\n border-radius: 5px 5px 0 0;\n padding: 10px;\n width: fit-content;\n text-align: center;\n background-color: #0D0D4D;\n z-index: 1;\n text-wrap: nowrap;\n position: absolute;\n bottom: 0;\n left: 30px;\n}\n.DetailsContainer .BlogTitle {\n font-size: 24px;\n}\n.DetailsContainer .BlogCategoryPills {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n.DetailsContainer .BlogCategoryLink {\n position: relative;\n z-index: 3;\n padding: 4px 12px;\n border: 1px solid currentColor;\n border-radius: 999px;\n color: inherit;\n font-size: 12px;\n text-decoration: none;\n}\n.DetailsContainer .BlogContent {\n font-size: 14px;\n}\n.DetailsContainer .BlogContent p:last-child {\n margin-bottom: 0;\n}\n\n.BackButton {\n position: absolute;\n top: 30px;\n left: 30px;\n z-index: 2;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n box-sizing: border-box;\n min-width: 100px;\n height: 32px;\n padding: 0 12px;\n border: none;\n border-radius: 5px;\n background: var(--emw--color-primary, #524e52);\n color: var(--emw--color-typography-contrast, #fff);\n font: inherit;\n text-decoration: none;\n text-align: center;\n white-space: nowrap;\n cursor: pointer;\n transition: all 0.1s linear;\n}\n\n.DetailsContainer:not(:has(.BlogBanner img, .BlogBanner video)) .BackButton {\n position: static;\n align-self: flex-start;\n margin: 30px 30px 16px;\n}\n.DetailsContainer:not(:has(.BlogBanner img, .BlogBanner video)) .BlogDate {\n position: static;\n display: block;\n margin-left: 30px;\n}\n.DetailsContainer:not(:has(.BlogBanner img, .BlogBanner video)) .BlogBanner {\n display: none;\n}\n\n.AdjacentPosts {\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n gap: 20px;\n padding: 30px;\n}\n.AdjacentPosts a {\n flex: 1 1 250px;\n}\n\n.AdjacentPosts a {\n color: var(--emw--color-primary, #fff);\n font: inherit;\n text-decoration: underline;\n}\n\n.BackButton:focus-visible,\n.AdjacentPosts a:focus-visible {\n outline: 2px solid var(--emw--color-primary, #fff);\n outline-offset: 3px;\n}\n\n@container (max-width: 475px) {\n .DetailsContainer {\n font-size: 12px;\n }\n}";
256
284
  const BlogArticleDetailsStyle0 = blogArticleDetailsCss;
257
285
 
258
286
  const BlogArticleDetails = class {
259
287
  constructor(hostRef) {
260
288
  index.registerInstance(this, hostRef);
289
+ this.articleRequest = 0;
290
+ this.neighboursRequest = 0;
261
291
  this.renderContentConditionally = (content) => {
262
292
  if (!content)
263
293
  return null;
@@ -267,21 +297,6 @@ const BlogArticleDetails = class {
267
297
  }
268
298
  return null;
269
299
  };
270
- this.setImage = (image) => {
271
- let source = '';
272
- switch (this.device) {
273
- case 'mobile':
274
- source = image.sources[0].pictureSource;
275
- break;
276
- case 'tablet':
277
- source = image.sources[1].pictureSource;
278
- break;
279
- case 'desktop':
280
- source = image.sources[2].pictureSource;
281
- break;
282
- }
283
- return source;
284
- };
285
300
  this.cmsEndpoint = undefined;
286
301
  this.language = 'en';
287
302
  this.userRoles = 'everyone';
@@ -293,7 +308,10 @@ const BlogArticleDetails = class {
293
308
  this.showImage = true;
294
309
  this.showTitle = true;
295
310
  this.showBreadcrumb = false;
311
+ this.hideCategory = '';
296
312
  this.showContent = true;
313
+ this.showMoreArticles = false;
314
+ this.showBackButton = false;
297
315
  this.postId = undefined;
298
316
  this.postSlug = undefined;
299
317
  this.postCustomPath = undefined;
@@ -302,15 +320,30 @@ const BlogArticleDetails = class {
302
320
  this.isLoading = true;
303
321
  this.bannerMatrixReady = false;
304
322
  this.device = 'mobile';
323
+ this.categories = [];
324
+ this.neighbours = {};
305
325
  }
306
326
  // Rerender when bannermatrix has finished loaded. Issue when bannermatrix passed as content from CMS.
307
327
  handleBannerReady() {
308
328
  this.bannerMatrixReady = true;
309
329
  }
310
330
  watchEndpoint(newValue, oldValue) {
311
- if (newValue && newValue != oldValue && this.cmsEndpoint && this.language && (this.postCustomPath || this.postSlug || this.postId)) {
331
+ if (newValue === oldValue)
332
+ return;
333
+ if (this.cmsEndpoint && this.language && (this.postCustomPath || this.postSlug || this.postId)) {
312
334
  this.getBlogArticleDetails();
313
335
  }
336
+ else {
337
+ this.articleRequest++;
338
+ this.categories = [];
339
+ this.neighbours = {};
340
+ }
341
+ }
342
+ handleMoreArticlesChange() {
343
+ this.neighboursRequest++;
344
+ this.neighbours = {};
345
+ if (this.showMoreArticles && !this.isLoading && this.blogData)
346
+ this.fetchMoreArticles(this.articleRequest);
314
347
  }
315
348
  handleClientStylingChange(newValue, oldValue) {
316
349
  if (newValue !== oldValue) {
@@ -333,6 +366,11 @@ const BlogArticleDetails = class {
333
366
  this.hasErrors = true;
334
367
  throw new Error('postId, postSlug or postCustomPath parameter has to be provided!');
335
368
  }
369
+ const request = ++this.articleRequest;
370
+ this.categories = [];
371
+ this.neighbours = {};
372
+ this.neighboursRequest++;
373
+ this.hasErrors = false;
336
374
  this.isLoading = true;
337
375
  let url = new URL(`${this.cmsEndpoint}/${this.language}/blog-posts${this.postCustomPath ? '' : '/' + (this.postSlug || this.postId)}`);
338
376
  url.searchParams.append('env', this.cmsEnv);
@@ -341,15 +379,17 @@ const BlogArticleDetails = class {
341
379
  if (this.postCustomPath) {
342
380
  url.searchParams.append('customURL', this.postCustomPath);
343
381
  }
382
+ this.fetchCategories(request);
344
383
  fetch(url.href)
345
384
  .then((res) => {
346
385
  if (res.status >= 300) {
347
- this.hasErrors = true;
348
386
  throw new Error('There was an error while fetching the data');
349
387
  }
350
388
  return res.json();
351
389
  })
352
390
  .then((blogContent) => {
391
+ if (request !== this.articleRequest)
392
+ return;
353
393
  if (blogContent.count >= 1 && this.postCustomPath) {
354
394
  let firstBlogPublishDate = new Date(blogContent.items[0].publishingDate);
355
395
  let indexOfLatestPublished = 0;
@@ -365,13 +405,80 @@ const BlogArticleDetails = class {
365
405
  else {
366
406
  this.blogData = blogContent;
367
407
  }
368
- this.isLoading = false;
408
+ if (this.showMoreArticles)
409
+ this.fetchMoreArticles(request);
369
410
  })
370
411
  .catch((err) => {
412
+ if (request !== this.articleRequest)
413
+ return;
371
414
  this.hasErrors = true;
372
415
  console.log('Error', err);
373
416
  })
374
- .finally(() => this.isLoading = false);
417
+ .finally(() => {
418
+ if (request === this.articleRequest)
419
+ this.isLoading = false;
420
+ });
421
+ }
422
+ async fetchMoreArticles(articleRequest) {
423
+ var _a, _b, _c, _d, _e;
424
+ if (!this.cmsEndpoint || !this.language || !this.blogData || !this.showMoreArticles)
425
+ return;
426
+ const request = ++this.neighboursRequest;
427
+ const currentId = (_a = this.blogData) === null || _a === void 0 ? void 0 : _a.postID;
428
+ const currentPath = ((_b = this.blogData) === null || _b === void 0 ? void 0 : _b.customPath) || ((_c = this.blogData) === null || _c === void 0 ? void 0 : _c.slug) || this.postCustomPath || this.postSlug;
429
+ const posts = [];
430
+ const url = new URL(`${this.cmsEndpoint}/${this.language}/blog-posts`);
431
+ url.searchParams.set('per_page', '20');
432
+ url.searchParams.set('env', this.cmsEnv);
433
+ url.searchParams.set('userRoles', this.userRoles);
434
+ url.searchParams.set('device', getDevicePlatform());
435
+ try {
436
+ for (let page = 1; this.showMoreArticles && request === this.neighboursRequest && articleRequest === this.articleRequest; page++) {
437
+ url.searchParams.set('page', String(page));
438
+ const response = await fetch(url.href);
439
+ if (!response.ok)
440
+ throw new Error('Failed to fetch adjacent articles');
441
+ const data = await response.json();
442
+ if (!this.showMoreArticles || request !== this.neighboursRequest || articleRequest !== this.articleRequest)
443
+ return;
444
+ if (!Array.isArray(data === null || data === void 0 ? void 0 : data.items))
445
+ return;
446
+ posts.push(...data.items.filter(post => typeof ((post === null || post === void 0 ? void 0 : post.customPath) || (post === null || post === void 0 ? void 0 : post.slug)) === 'string' && (post.customPath || post.slug)));
447
+ const index = posts.findIndex(post => (currentId != null && post.postID === currentId) || (currentPath && (post.customPath || post.slug) === currentPath));
448
+ if (index >= 0 && (index < posts.length - 1 || !((_d = data.pages) === null || _d === void 0 ? void 0 : _d.next))) {
449
+ this.neighbours = { previous: posts[index + 1], next: posts[index - 1] };
450
+ return;
451
+ }
452
+ if (!((_e = data.pages) === null || _e === void 0 ? void 0 : _e.next))
453
+ return;
454
+ }
455
+ }
456
+ catch (error) {
457
+ console.error('Error fetching adjacent articles', error);
458
+ }
459
+ }
460
+ async fetchCategories(request) {
461
+ try {
462
+ const response = await fetch(`${this.cmsEndpoint}/${this.language}/blog-posts/category`);
463
+ if (!response.ok)
464
+ throw new Error('Failed to fetch categories');
465
+ const categories = await response.json();
466
+ if (request === this.articleRequest) {
467
+ const hiddenCategories = this.hideCategory
468
+ .split(',')
469
+ .map(value => value.trim().toLowerCase())
470
+ .filter(Boolean);
471
+ const visibleCategories = Array.isArray(categories)
472
+ ? categories.filter(category => typeof (category === null || category === void 0 ? void 0 : category.name) === 'string' && category.name && typeof category.slug === 'string' && category.slug
473
+ && !hiddenCategories.includes(category.name.toLowerCase()))
474
+ : [];
475
+ this.categories = visibleCategories;
476
+ }
477
+ }
478
+ catch (_a) {
479
+ if (request === this.articleRequest)
480
+ this.categories = [];
481
+ }
375
482
  }
376
483
  handleClientStyling() {
377
484
  if (window.emMessageBus !== undefined) {
@@ -388,6 +495,8 @@ const BlogArticleDetails = class {
388
495
  this.handleClientStyling();
389
496
  }
390
497
  disconnectedCallback() {
498
+ this.articleRequest++;
499
+ this.neighboursRequest++;
391
500
  this.stylingSubscription && this.stylingSubscription.unsubscribe();
392
501
  }
393
502
  detectAndAlertDeviceType() {
@@ -404,17 +513,32 @@ const BlogArticleDetails = class {
404
513
  }
405
514
  formatDate(dateString) {
406
515
  const date = this.parseDate(dateString);
407
- return new Intl.DateTimeFormat(this.intlDateTimeFormat || 'en-GB').format(date);
516
+ return new Intl.DateTimeFormat(this.intlDateTimeFormat || 'en-GB', { day: 'numeric', month: 'short', year: 'numeric' }).format(date);
517
+ }
518
+ setImage(image) {
519
+ var _a, _b;
520
+ const sourceIndex = this.device === 'mobile' ? 0 : this.device === 'tablet' ? 1 : 2;
521
+ return (_b = (_a = image === null || image === void 0 ? void 0 : image.sources) === null || _a === void 0 ? void 0 : _a[sourceIndex]) === null || _b === void 0 ? void 0 : _b.pictureSource;
408
522
  }
409
523
  render() {
410
- var _a, _b, _c, _d, _e, _f;
524
+ var _a, _b, _c, _d, _e, _f, _g;
411
525
  if (this.hasErrors) {
412
526
  return (index.h("div", { class: "BlogArticleDetails" }, index.h("div", { class: "Title" }, translate('error', this.language))));
413
527
  }
414
- const homeUrl = !this.isLoading && this.showBreadcrumb ? `/${encodeURIComponent(this.language)}` : '';
415
- return (index.h("div", { ref: el => this.stylingContainer = el }, !this.isLoading && (index.h("div", { class: "DetailsContainer" }, index.h("div", { class: "DetailsHeadWrapper" }, this.showPublishingDate && this.blogData.publishingDate &&
416
- index.h("div", { class: "BlogDate" }, this.formatDate((_a = this.blogData) === null || _a === void 0 ? void 0 : _a.publishingDate)), this.showImage && (index.h("div", { class: `BlogBanner ${this.device}` }, ((_b = this.blogData.image) === null || _b === void 0 ? void 0 : _b.src) ? (index.h("div", { style: { background: `url(${this.setImage(this.blogData.image)}) no-repeat center center / cover` } })) : (((_c = this.blogData.video) === null || _c === void 0 ? void 0 : _c.sources[this.device]) ? (index.h("video", { src: this.blogData.video.sources[this.device], controls: true })) : (index.h("h1", { style: { color: "white" } }, "No Image")))))), index.h("div", { class: "DetailsBodyWrapper" }, this.showTitle &&
417
- index.h("div", { class: "BlogTitle" }, (_d = this.blogData) === null || _d === void 0 ? void 0 : _d.title), this.showBreadcrumb && (index.h("nav", { class: "breadcrumb", "aria-label": "Breadcrumb" }, index.h("a", { href: homeUrl }, translate('home', this.language)), index.h("span", { "aria-hidden": "true" }, "\u203A"), index.h("a", { href: `${homeUrl}/blog` }, translate('blog', this.language)), index.h("span", { "aria-hidden": "true" }, "\u203A"), index.h("span", { "aria-current": "page" }, (_e = this.blogData) === null || _e === void 0 ? void 0 : _e.title))), this.showContent && this.renderContentConditionally((_f = this.blogData) === null || _f === void 0 ? void 0 : _f.content))))));
528
+ const homeUrl = `/${encodeURIComponent(this.language)}`;
529
+ const categories = !this.isLoading && Array.isArray((_a = this.blogData) === null || _a === void 0 ? void 0 : _a.blogCategory)
530
+ ? this.blogData.blogCategory.map(slug => this.categories.find(category => category.slug === slug)).filter(Boolean)
531
+ : [];
532
+ const primaryCategory = categories[0];
533
+ const image = (_b = this.blogData) === null || _b === void 0 ? void 0 : _b.image;
534
+ const imageSrc = this.setImage(image);
535
+ const { previous, next } = this.neighbours;
536
+ return (index.h("div", { ref: el => this.stylingContainer = el }, !this.isLoading && (index.h("div", { class: "DetailsContainer" }, this.showBackButton && (index.h("a", { class: "BackButton", href: `${homeUrl}/blog` }, "\u2190 ", translate('backToBlog', this.language))), index.h("div", { class: "DetailsHeadWrapper" }, this.showPublishingDate && this.blogData.publishingDate &&
537
+ index.h("time", { class: "BlogDate", dateTime: this.blogData.publishingDate }, this.formatDate(this.blogData.publishingDate)), this.showImage && (index.h("div", { class: `BlogBanner ${this.device}` }, imageSrc ? (index.h("img", { src: imageSrc, alt: (image === null || image === void 0 ? void 0 : image.alt) || '' })) : (((_d = (_c = this.blogData.video) === null || _c === void 0 ? void 0 : _c.sources) === null || _d === void 0 ? void 0 : _d[this.device]) ? (index.h("video", { src: this.blogData.video.sources[this.device], controls: true })) : (null))))), index.h("div", { class: "DetailsBodyWrapper" }, this.showTitle &&
538
+ index.h("div", { class: "BlogTitle" }, (_e = this.blogData) === null || _e === void 0 ? void 0 : _e.title), this.showBreadcrumb && (index.h("nav", { class: "breadcrumb", "aria-label": "Breadcrumb" }, index.h("a", { href: homeUrl }, translate('home', this.language)), index.h("span", { "aria-hidden": "true" }, "\u203A"), index.h("a", { href: `${homeUrl}/blog` }, translate('blog', this.language)), index.h("span", { "aria-hidden": "true" }, "\u203A"), primaryCategory && [
539
+ index.h("a", { href: `${homeUrl}/blog/category/${encodeURIComponent(primaryCategory.slug)}` }, primaryCategory.name),
540
+ index.h("span", { "aria-hidden": "true" }, "\u203A"),
541
+ ], index.h("span", { "aria-current": "page" }, (_f = this.blogData) === null || _f === void 0 ? void 0 : _f.title))), categories.length > 0 && (index.h("div", { class: "BlogCategoryPills" }, categories.map(category => (index.h("a", { class: "BlogCategoryLink", href: `${homeUrl}/blog/category/${encodeURIComponent(category.slug)}` }, category.name))))), this.showContent && this.renderContentConditionally((_g = this.blogData) === null || _g === void 0 ? void 0 : _g.content)), this.showMoreArticles && (previous || next) && (index.h("nav", { class: "AdjacentPosts", "aria-label": translate('moreArticles', this.language) }, previous && index.h("a", { href: `${homeUrl}/blog/${encodeURIComponent(previous.customPath || previous.slug || '')}`, rel: "prev" }, "\u2190 ", translate('previousArticle', this.language), ": ", previous.title || previous.customPath || previous.slug), next && index.h("a", { href: `${homeUrl}/blog/${encodeURIComponent(next.customPath || next.slug || '')}`, rel: "next" }, translate('nextArticle', this.language), ": ", next.title || next.customPath || next.slug, " \u2192")))))));
418
542
  }
419
543
  static get watchers() { return {
420
544
  "postId": ["watchEndpoint"],
@@ -422,6 +546,9 @@ const BlogArticleDetails = class {
422
546
  "postCustomPath": ["watchEndpoint"],
423
547
  "cmsEndpoint": ["watchEndpoint"],
424
548
  "language": ["watchEndpoint"],
549
+ "cmsEnv": ["watchEndpoint"],
550
+ "userRoles": ["watchEndpoint"],
551
+ "showMoreArticles": ["handleMoreArticlesChange"],
425
552
  "clientStyling": ["handleClientStylingChange"],
426
553
  "clientStylingUrl": ["handleClientStylingChangeURL"]
427
554
  }; }
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-5d8e9655.js');
5
+ const index = require('./index-566a22cc.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["blog-article-details.cjs",[[1,"blog-article-details",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"showPublishingDate":[516,"show-publishing-date"],"showImage":[516,"show-image"],"showTitle":[516,"show-title"],"showBreadcrumb":[516,"show-breadcrumb"],"showContent":[516,"show-content"],"postId":[513,"post-id"],"postSlug":[513,"post-slug"],"postCustomPath":[513,"post-custom-path"],"intlDateTimeFormat":[1,"intl-date-time-format"],"hasErrors":[32],"isLoading":[32],"bannerMatrixReady":[32],"device":[32]},[[8,"BannerMatrixReady","handleBannerReady"]],{"postId":["watchEndpoint"],"postSlug":["watchEndpoint"],"postCustomPath":["watchEndpoint"],"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
22
+ return index.bootstrapLazy([["blog-article-details.cjs",[[1,"blog-article-details",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"showPublishingDate":[516,"show-publishing-date"],"showImage":[516,"show-image"],"showTitle":[516,"show-title"],"showBreadcrumb":[516,"show-breadcrumb"],"hideCategory":[513,"hide-category"],"showContent":[516,"show-content"],"showMoreArticles":[516,"show-more-articles"],"showBackButton":[516,"show-back-button"],"postId":[513,"post-id"],"postSlug":[513,"post-slug"],"postCustomPath":[513,"post-custom-path"],"intlDateTimeFormat":[1,"intl-date-time-format"],"hasErrors":[32],"isLoading":[32],"bannerMatrixReady":[32],"device":[32],"categories":[32],"neighbours":[32]},[[8,"BannerMatrixReady","handleBannerReady"]],{"postId":["watchEndpoint"],"postSlug":["watchEndpoint"],"postCustomPath":["watchEndpoint"],"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"cmsEnv":["watchEndpoint"],"userRoles":["watchEndpoint"],"showMoreArticles":["handleMoreArticlesChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'blog-article-details';
24
- const BUILD = /* blog-article-details */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: false, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
24
+ const BUILD = /* blog-article-details */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: false, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
25
25
 
26
26
  /*
27
27
  Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
@@ -392,27 +392,6 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
392
392
  const newClasses = parseClassList(newValue);
393
393
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
394
394
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
395
- } else if (memberName === "style") {
396
- {
397
- for (const prop in oldValue) {
398
- if (!newValue || newValue[prop] == null) {
399
- if (prop.includes("-")) {
400
- elm.style.removeProperty(prop);
401
- } else {
402
- elm.style[prop] = "";
403
- }
404
- }
405
- }
406
- }
407
- for (const prop in newValue) {
408
- if (!oldValue || newValue[prop] !== oldValue[prop]) {
409
- if (prop.includes("-")) {
410
- elm.style.setProperty(prop, newValue[prop]);
411
- } else {
412
- elm.style[prop] = newValue[prop];
413
- }
414
- }
415
- }
416
395
  } else if (memberName === "ref") {
417
396
  if (newValue) {
418
397
  newValue(elm);
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-5d8e9655.js');
5
+ const index = require('./index-566a22cc.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["blog-article-details.cjs",[[1,"blog-article-details",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"showPublishingDate":[516,"show-publishing-date"],"showImage":[516,"show-image"],"showTitle":[516,"show-title"],"showBreadcrumb":[516,"show-breadcrumb"],"showContent":[516,"show-content"],"postId":[513,"post-id"],"postSlug":[513,"post-slug"],"postCustomPath":[513,"post-custom-path"],"intlDateTimeFormat":[1,"intl-date-time-format"],"hasErrors":[32],"isLoading":[32],"bannerMatrixReady":[32],"device":[32]},[[8,"BannerMatrixReady","handleBannerReady"]],{"postId":["watchEndpoint"],"postSlug":["watchEndpoint"],"postCustomPath":["watchEndpoint"],"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
11
+ return index.bootstrapLazy([["blog-article-details.cjs",[[1,"blog-article-details",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"showPublishingDate":[516,"show-publishing-date"],"showImage":[516,"show-image"],"showTitle":[516,"show-title"],"showBreadcrumb":[516,"show-breadcrumb"],"hideCategory":[513,"hide-category"],"showContent":[516,"show-content"],"showMoreArticles":[516,"show-more-articles"],"showBackButton":[516,"show-back-button"],"postId":[513,"post-id"],"postSlug":[513,"post-slug"],"postCustomPath":[513,"post-custom-path"],"intlDateTimeFormat":[1,"intl-date-time-format"],"hasErrors":[32],"isLoading":[32],"bannerMatrixReady":[32],"device":[32],"categories":[32],"neighbours":[32]},[[8,"BannerMatrixReady","handleBannerReady"]],{"postId":["watchEndpoint"],"postSlug":["watchEndpoint"],"postCustomPath":["watchEndpoint"],"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"cmsEnv":["watchEndpoint"],"userRoles":["watchEndpoint"],"showMoreArticles":["handleMoreArticlesChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;