@everymatrix/blog-articles-grid 1.99.20 → 1.99.22
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.
- package/dist/blog-articles-grid/blog-articles-grid_2.entry.js +1 -1
- package/dist/cjs/blog-articles-grid_2.cjs.entry.js +19 -2
- package/dist/collection/components/blog-articles-grid/blog-articles-grid.css +9 -0
- package/dist/collection/components/blog-articles-grid/blog-articles-grid.js +2 -1
- package/dist/collection/utils/locale.utils.js +16 -0
- package/dist/esm/blog-articles-grid_2.entry.js +19 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as n}from"./index-4af8e775.js";const e={en:{error:"Error",readmore:"Read more",home:"Home",blog:"Blog",blogPageTitle:"Blog"},ro:{error:"Eroare",readmore:"Read more",home:"Acasă",blog:"Blog",blogPageTitle:"Blog"},fr:{error:"Error",readmore:"Read more",home:"Accueil",blog:"Blog",blogPageTitle:"Blog"},ar:{error:"خطأ",readmore:"Read more",home:"الرئيسية",blog:"المدونة",blogPageTitle:"المدونة"},hu:{error:"خطأ",readmore:"Tovább olvasom",home:"Kezdőlap",blog:"Blog",blogPageTitle:"Blog"},hr:{error:"Greška",readmore:"Pročitaj više",home:"Početna",blog:"Blog",blogPageTitle:"Blog"},"pt-br":{error:"Erro",readmore:"Ler mais",home:"Início",blog:"Blog",blogPageTitle:"Blog"},"es-mx":{error:"Error",readmore:"Leer más",home:"Inicio",blog:"Blog",blogPageTitle:"Blog"}},s=(t,i,n)=>{var s;const o=null!=i?i:"en",a=null===(s=null==n?void 0:n[o])||void 0===s?void 0:s[t];return"string"==typeof a?a:e[o in e?o:"en"][t]},o="__WIDGET_GLOBAL_STYLE_CACHE__";function a(t,i){if(t){const n=document.createElement("style");n.innerHTML=i,t.appendChild(n)}}function r(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 h(t,i,n,e=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!e)return n=function(t,i){const n=document.createElement("style");return window.emMessageBus.subscribe(i,(i=>{t&&(n.innerHTML=i,t.appendChild(n))}))}(t,i),n;window[o]||(window[o]={}),n=function(t,i){return window.emMessageBus.subscribe(i,(n=>{if(!t)return;const e=t.getRootNode(),s=window[o];let a=s[i]&&s[i].sheet;a?s[i].refCount=s[i].refCount+1:(a=new CSSStyleSheet,a.replaceSync(n),s[i]={sheet:a,refCount:1});const r=e.adoptedStyleSheets||[];r.includes(a)||(e.adoptedStyleSheets=[...r,a])}))}(t,i);const s=n.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]}s()},n}function l(t){return t.includes("android")}const d=class{constructor(e){t(this,e),this.articleActionButton=i(this,"articleActionButton",7),this.lastPage=1,this.isInitialized=!1,this.paginationDefaultStyling="\n nav#PaginationContainer {\n justify-content: right;\n }\n .LeftItems a .NavigationButton {\n display: none;\n }\n .LeftItems a:after, .RightItems a:after {\n padding: 7px 12px;\n font-size: 18px;\n font-weight: 700;\n line-height: 46px;\n }\n .LeftItems a:after {\n content: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1.2em' viewBox='0 0 320 512'%3E%3C!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --%3E%3Cpath d='M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z'/%3E%3C/svg%3E\");\n }\n .RightItems a:after {\n content: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1.2em' viewBox='0 0 320 512'%3E%3C!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --%3E%3Cpath d='M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z'/%3E%3C/svg%3E\");\n display: block;\n height: 38px;\n }\n div.LeftItems a, div.RightItems a {\n width: unset;\n height: 40px;\n background-color: #fff;\n color: #000;\n border: 1px solid #000;\n overflow: hidden;\n &[aria-disabled=\"true\"] {\n background-color: #989898;\n }\n }\n div.LeftItems a {\n min-width: 60px;\n border-radius: 20px 0 0 20px;\n border-right: 0;\n }\n div.RightItems a {\n display: flex;\n min-width: 100px;\n justify-content: space-evenly;\n align-items: center;\n border-radius: 0 20px 20px 0;\n text-transform: none;\n }\n .RightItems a .NavigationButton {\n padding: 12px 0 12px 12px;\n font-weight: 700;\n }",this.renderContentConditionally=t=>t&&(!t.includes("<bannermatrix-banner")||this.bannerMatrixReady)?n("p",{class:"BlogContent",innerHTML:t}):null,this.cmsEndpoint=void 0,this.language="en",this.translationUrl="",this.userRoles="everyone",this.cmsEnv="stage",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.showPublishingDate=!0,this.showBlogSubcategories=!1,this.hideCategory="",this.showImage=!0,this.showTitle=!0,this.showPageTitle=!1,this.showBreadcrumb=!1,this.showContent=!0,this.showButton=!0,this.hideError=!1,this.usePostmessage=void 0,this.postMessageEvent="",this.blogsLimit="0",this.paginationActive=void 0,this.arrowsActive=!0,this.secondaryArrowsActive=!1,this.numberedNavActive=!1,this.intlDateTimeFormat="",this.page="1",this.category=void 0,this.pageQueryParam=void 0,this.eventId=void 0,this.paginationBlogList={offset:0},this.currentPage=0,this.hasErrors=!1,this.isLoading=!0,this.bannerMatrixReady=!1,this.nextPage="",this.previousPage="",this.device="mobile",this.displayedBlogResponse=void 0,this.paginationBlogResponse=void 0,this.allBlogResponse=void 0,this.totalBlogs=0,this.customTranslations={},this.selectedCategory="all",this.categories=[]}getArticleId(t,i){var n;if(0!==t.button||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;const e={postId:i.postID.toString(),slug:i.slug,customPath:i.customPath};this.usePostmessage?(t.preventDefault(),window.postMessage(Object.assign({type:this.postMessageEvent},e))):null===(n=this.articleActionButton)||void 0===n||n.emit(e)}handleBannerReady(){this.bannerMatrixReady=!0}watchEndpoint(t,i){this.isInitialized&&(this.setCurrentPage(this.toPageNumber(this.page)),(t||""===t)&&t!=i&&this.cmsEndpoint&&this.language&&this.getBlogArticleGrid())}handlePageChange(t){if(!this.isInitialized)return;const i=this.toPageNumber(t);String(i)===t?i!==this.currentPage+1&&(this.setCurrentPage(i),this.cmsEndpoint&&this.language&&this.getBlogArticleGrid(!0)):this.page=String(i)}handlePopState(){this.pageQueryParam&&(this.page=String(this.toPageNumber(this.getPageFromUrl())))}toPageNumber(t){const i=parseInt(null!=t?t:"",10);return i>0?i:1}setCurrentPage(t){this.currentPage=t-1,this.paginationBlogList=Object.assign(Object.assign({},this.paginationBlogList),{offset:this.currentPage*(parseInt(this.blogsLimit,10)||0)})}getPageFromUrl(){return this.pageQueryParam?new URL(window.location.href).searchParams.get(this.pageQueryParam):null}pushPageToUrl(t){if(!this.pageQueryParam)return;const i=new URL(window.location.href);i.searchParams.set(this.pageQueryParam,String(t)),window.history.pushState(null,"",`${i.pathname}${i.search}${i.hash}`)}handleClientStylingChange(t,i){t!==i&&a(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,i){t!==i&&this.clientStylingUrl&&r(this.stylingContainer,this.clientStylingUrl)}async loadTranslations(){if(this.translationUrl)try{const t=await fetch(this.translationUrl);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);this.customTranslations=await t.json()}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}else this.customTranslations={}}hpPageChange(t){const{offset:i,limit:n}=t.detail,e=Math.floor(i/n)+1;e>=1&&e<=this.lastPage&&e!==this.currentPage+1&&(this.announcePage(e),this.page=String(e))}announcePage(t){window.postMessage({type:"BlogArticlesGridActivePagination",currentPage:t-1},window.location.href),this.pushPageToUrl(t)}getActiveCategory(){return this.categories.find((t=>t.id===this.selectedCategory))}sortArticlesByDate(t){return t.sort(((t,i)=>t.publishingDate>i.publishingDate?-1:t.publishingDate<i.publishingDate?1:0)),t}findLatestFeatured(t){let i=t.filter((t=>t.isFeaturedPost));return 0===i.length?null:(i=this.sortArticlesByDate(i),i[0])}moveLatestFeatureToStart(t,i){if(!i)return t;const n=t.indexOf(i);return-1!==n&&(t.splice(n,1),t.unshift(i)),t}async fetchBlogPosts(t,i=!1){const n=new URL(`${this.cmsEndpoint}/${this.language}/blog-posts`);if(this.showBlogSubcategories&&this.selectedCategory&&"all"!==this.selectedCategory){const t=this.categories.find((t=>t.id==this.selectedCategory));(null==t?void 0:t.slug)&&n.searchParams.append("category",t.slug)}return n.searchParams.append("per_page",i?"300":this.blogsLimit),n.searchParams.append("page",`${t||this.currentPage+1}`),n.searchParams.append("env",this.cmsEnv),n.searchParams.append("userRoles",this.userRoles),n.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"})()),fetch(n.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=>{let n=t.items;const e=this.findLatestFeatured(n);return n=this.sortArticlesByDate(n),n=this.moveLatestFeatureToStart(n,e),t=Object.assign(Object.assign({},t),{items:n}),i?this.allBlogResponse=t:this.paginationBlogResponse=t,t})).catch((t=>(this.hasErrors=!0,console.log("Error",t),{})))}async fetchCategories(){try{const t=new URL(`${this.cmsEndpoint}/${this.language}/blog-posts/category`),i=await fetch(t.href);if(!i.ok)throw new Error("Failed to fetch categories");const n=await i.json(),e=this.hideCategory.split(",").map((t=>t.trim().toLowerCase())).filter(Boolean),s=n.filter((t=>{var i;return!e.includes(null===(i=t.name)||void 0===i?void 0:i.toLowerCase())}));this.categories=[{id:"all",name:"All"},...s]}catch(t){console.error("Error fetching categories",t)}}async getBlogArticleGrid(t=!1,i){var n,e,s,o,a,r,h;this.isLoading=!0;try{let l;if(this.eventId&&this.eventId.length>0){const o=(null===(n=this.allBlogResponse)||void 0===n?void 0:n.items)?this.allBlogResponse:await this.fetchBlogPosts(1,!0),a=o.items.filter((({eventIds:t})=>{var i;return t.includes(null!==(i=this.eventId)&&void 0!==i?i:"-")}));a.length?(l=Object.assign(Object.assign({},o),{items:a,total:Math.min(parseInt(this.blogsLimit),a.length)}),window.postMessage({type:"OP:blogReady",payload:{hasBlog:!0}},"*")):(window.postMessage({type:"OP:blogReady",payload:{hasBlog:!1}},"*"),l=(null===(s=null===(e=this.paginationBlogResponse)||void 0===e?void 0:e.items)||void 0===s?void 0:s.length)&&!t?this.paginationBlogResponse:await this.fetchBlogPosts(i))}else l=(null===(a=null===(o=this.paginationBlogResponse)||void 0===o?void 0:o.items)||void 0===a?void 0:a.length)&&!t?this.paginationBlogResponse:await this.fetchBlogPosts(i);this.displayedBlogResponse=l,this.totalBlogs=l.total,this.lastPage=+((null===(h=null===(r=l.pages.last)||void 0===r?void 0:r.match(/&page=(\d+)/))||void 0===h?void 0:h[1])||1),this.nextPage=l.pages.next,this.previousPage=l.pages.previous,this.isLoading=!1,this.hasErrors=!1}catch(t){this.hasErrors=!0,console.log("Error",t)}}async componentWillLoad(){var t;if(this.showBlogSubcategories&&(await this.fetchCategories(),this.category)){const t=this.categories.find((t=>{var i;return(null===(i=t.name)||void 0===i?void 0:i.toLowerCase().replace(/\s+/g,"-"))===this.category}));t?(this.selectedCategory=t.id,this.emitActiveCategory()):window.postMessage({type:"BlogCategoryNotFound"},window.location.href)}const i=this.toPageNumber(null!==(t=this.getPageFromUrl())&&void 0!==t?t:this.page);return this.page=String(i),this.setCurrentPage(i),this.cmsEndpoint&&this.language&&this.blogsLimit&&this.getBlogArticleGrid(),this.loadTranslations()}emitActiveCategory(){var t;const i=this.categories.find((t=>t.id===this.selectedCategory));window.postMessage({type:"BlogArticlesActiveCategory",category:"all"===this.selectedCategory?null:null==i?void 0:i.name,metadata:"all"===this.selectedCategory?null:null!==(t=null==i?void 0:i.metadata)&&void 0!==t?t:null},window.location.href)}async handleCategoryChange(t){this.isLoading||this.selectedCategory===t||(this.selectedCategory=t,this.emitActiveCategory(),0!==this.currentPage&&(this.setCurrentPage(1),this.page="1"),await this.getBlogArticleGrid(!0,1))}handleClientStyling(){void 0===window.emMessageBus?(this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&r(this.stylingContainer,this.clientStylingUrl)):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling(),this.isInitialized=!0,window.postMessage({type:"BlogArticlesGridLoaded"},window.location.href),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 l(t)&&(t.includes("mobile")||t.includes("mobi")||i<=599)}(i,n))return"mobile";if(function(t,i){return l(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"})()}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}setImage(t){var i,n;return(null===(n=null===(i=t.sources)||void 0===i?void 0:i["mobile"===this.device?0:"tablet"===this.device?1:2])||void 0===n?void 0:n.pictureSource)||t.src}parseDate(t){const i=new Date(t);if(i instanceof Date&&!Number.isNaN(i.getTime()))return i;const[n,e,s]=t.trim().split("/").map(Number);return new Date(s,e-1,n)}formatDate(t){const i=this.parseDate(t);return new Intl.DateTimeFormat(this.intlDateTimeFormat).format(i)}render(){if(this.hasErrors)return n("div",{class:"BlogsContainer"},!this.hideError&&n("div",{class:"ErrorMessage"},s("error",this.language,this.customTranslations)));const t=[];for(let i=0;i<parseInt(this.blogsLimit);i++)t.push(n("div",{class:"GridContainer FeaturedPost Skeleton"},n("div",{class:"GridWrapper"},n("div",{class:"GridSector"},n("div",{class:"VisualContent LoadingImage"})),n("div",{class:"GridSector"},n("div",{class:"BlogTitle LoadingStripe LoadingSmallStripe"}),n("div",{class:"BlogDetails LoadingStripe LoadingMediumStripe"}),n("div",{class:"BlogLink LoadingStripe LoadingLongStripe"})))));const i=Boolean(this.paginationActive)&&this.totalBlogs>+this.blogsLimit,e=this.mbSource?void 0:this.clientStyling||this.paginationDefaultStyling,o=this.getActiveCategory();return n("div",{ref:t=>this.stylingContainer=t},this.showBreadcrumb&&n("nav",{class:"breadcrumb","aria-label":"Breadcrumb"},n("a",{href:`/${encodeURIComponent(this.language)}`},s("home",this.language,this.customTranslations)),n("span",{"aria-hidden":"true"},"›"),n("span",{"aria-current":"page"},s("blog",this.language,this.customTranslations))),this.showPageTitle&&n("h1",{class:"BlogPageTitle"}," ","all"!==this.selectedCategory?null==o?void 0:o.name:s("blogPageTitle",this.language,this.customTranslations)," "),"all"!==this.selectedCategory&&(null==o?void 0:o.description)&&n("div",{class:"BlogPageDescription",innerHTML:o.description}),n("div",{class:"BlogPageContainer"},this.showBlogSubcategories&&n("div",{class:"BlogCategoriesSliderWrapper"},n("div",{class:"CarouselWrapper"},n("div",{class:"CarouselContainer"},n("div",{class:"BlogCategoriesWrapper"},n("div",{class:"CategoryButtons"},this.categories.map((t=>n("button",{disabled:this.isLoading||this.selectedCategory===t.id,key:t.id,class:{CategoryButton:!0,active:this.selectedCategory===t.id},onClick:()=>{this.handleCategoryChange(t.id)}},t.name)))))))),n("div",{class:"BlogGridPaginationWrapper"},i&&n("helper-pagination",{"next-page":this.nextPage,"prev-page":this.previousPage,offset:this.paginationBlogList.offset,limit:parseInt(this.blogsLimit,10),total:this.totalBlogs,language:this.language,"mb-source":this.mbSource,"client-styling":e,"client-styling-url":this.clientStylingUrl,"arrows-active":this.arrowsActive,"secondary-arrows-active":this.secondaryArrowsActive,"numbered-nav-active":this.numberedNavActive,"page-query-param":this.pageQueryParam})),!this.isLoading&&n("div",{class:`GridContainerWrapper BlogPage-${this.currentPage} ${this.device}`},this.displayedBlogResponse&&this.displayedBlogResponse.items.map((t=>{var i,e;return n("div",{key:t.postID,class:t.isFeaturedPost?"GridContainer FeaturedPost":"GridContainer"},n("div",{class:"GridWrapper"},n("div",{class:"GridSector"},this.showPublishingDate&&n("div",{class:"BlogDate"},n("time",{dateTime:t.publishingDate},this.formatDate(t.publishingDate))),this.showImage&&(null===(i=t.image)||void 0===i?void 0:i.src)?n("img",{class:"VisualContent",src:this.setImage(t.image),alt:t.image.alt||t.title,width:"400",height:"225",loading:"lazy"}):(null===(e=t.video)||void 0===e?void 0:e.sources[this.device])?n("video",{class:"VisualContent",src:t.video.sources[this.device]}):n("span",{class:"VisualContent",style:{color:"#fff"}},"No Image")),n("div",{class:"GridSector"},this.showTitle&&n("h2",{class:"BlogTitle"},n("a",{class:"BlogCardLink",href:`/${encodeURIComponent(this.language)}/blog/${encodeURIComponent(t.customPath||t.slug)}`,onClick:i=>this.getArticleId(i,t)},t.title)),this.showContent&&this.renderContentConditionally(t.descriptionPreview),this.showButton&&n("span",{class:"BlogLink"},s("readmore",this.language,this.customTranslations)))))}))),this.isLoading&&n("div",{class:"GridContainerWrapper LoadingGrid"},t)))}static get watchers(){return{hasErrors:["watchEndpoint"],cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],cmsEnv:["watchEndpoint"],userRoles:["watchEndpoint"],blogsLimit:["watchEndpoint"],eventId:["watchEndpoint"],page:["handlePageChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"],translationUrl:["loadTranslations"]}}};d.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 padding: 0 20px;\n margin: 40px auto 20px;\n color: var(--emw--color-white, #FFFFFF);\n}\n.breadcrumb a {\n color: inherit;\n}\n\n.BlogPageTitle {\n max-width: 1300px;\n padding: 0 20px;\n margin: 0 auto;\n color: var(--emw--color-primary);\n font-size: 22px;\n font-weight: 600;\n line-height: 1.2;\n}\n\n.BlogPageDescription {\n max-width: 1300px;\n padding: 0 20px;\n margin: 0 auto;\n color: var(--emw--color-typography);\n line-height: 1.2;\n}\n\n.BlogPageContainer {\n background: #0A0A17;\n padding: 20px;\n}\n\n.GridContainerWrapper {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 20px;\n}\n\n.BlogPage-0 .GridContainer.FeaturedPost:first-child {\n width: 100%;\n flex-basis: auto;\n}\n\n.GridContainer {\n position: relative;\n container-type: inline-size;\n container-name: article;\n border-radius: 15px;\n color: #000;\n overflow: hidden;\n}\n.GridContainer.FeaturedPost:first-child {\n grid-column: 1/-1;\n width: 100%;\n}\n.GridContainer .GridWrapper {\n display: flex;\n flex-direction: row;\n height: 280px;\n background: var(--emw--color-white, #FFFFFF);\n}\n.GridContainer .GridSector {\n flex-basis: 50%;\n position: relative;\n}\n.GridContainer .GridSector:first-of-type {\n height: 280px;\n display: flex;\n}\n.GridContainer .GridSector:last-of-type {\n position: static;\n padding: 20px 40px;\n display: flex;\n flex-direction: column;\n}\n.GridContainer .VisualContent {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.GridContainer .BlogDate {\n position: absolute;\n bottom: 0px;\n left: 30px;\n font-size: 12px;\n border-radius: 5px 5px 0 0;\n padding: 10px;\n width: fit-content;\n text-align: center;\n color: var(--emw--color-white, #FFFFFF);\n background-color: #CD0B5E;\n z-index: 1;\n pointer-events: none;\n}\n.GridContainer .BlogTitle {\n margin: 0;\n font-size: 24px;\n font-weight: 400;\n color: #000;\n padding-bottom: 10px;\n}\n.GridContainer .BlogTitle .BlogCardLink {\n display: block;\n color: inherit;\n text-decoration: none;\n cursor: pointer;\n}\n.GridContainer .BlogTitle .BlogCardLink::after {\n content: "";\n position: absolute;\n inset: 0;\n z-index: 2;\n}\n.GridContainer .BlogContent {\n margin: 0;\n display: -webkit-box;\n font-size: 14px;\n line-height: 1.2em;\n -webkit-line-clamp: 6;\n color: #000;\n -webkit-box-orient: vertical;\n box-sizing: border-box;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n.GridContainer .BlogLink {\n color: #22B04E;\n font-size: 14px;\n position: absolute;\n bottom: 16px;\n padding-top: 2.5px;\n}\n\n@container article (max-width: 550px) {\n .GridContainer .GridWrapper {\n height: 380px;\n flex-direction: column;\n }\n .GridContainer .GridWrapper .GridSector:first-of-type {\n height: 120px;\n flex-shrink: 0;\n flex-basis: 150px;\n }\n .GridContainer .GridWrapper .GridSector:last-of-type {\n padding: 20px 20px 40px;\n }\n}\n.LoadingImage {\n width: 100%;\n height: 100%;\n background-color: var(--emw--color-gray-100, #E6E6E6);\n}\n\n.LoadingStripe {\n border: 1px solid var(--emw--color-white, #FFFFFF);\n height: 20%;\n background-color: var(--emw--color-gray-100, #E6E6E6);\n margin-bottom: 5px;\n}\n\n.LoadingSmallStripe {\n width: 40%;\n}\n\n.LoadingMediumStripe {\n width: 70%;\n}\n\n.BlogLink.LoadingLongStripe {\n position: static;\n width: 100%;\n}\n\n.GridContainerWrapper.LoadingGrid .GridSector {\n justify-content: space-around;\n}\n\n.GridContainerWrapper.LoadingGrid .LoadingImage, .GridContainerWrapper.LoadingGrid .LoadingStripe {\n animation: pulsatingLoader 2s ease-in-out 0s infinite reverse;\n -webkit-animation: pulsatingLoader 2s ease-in-out 0s infinite reverse;\n}\n\n@keyframes pulsatingLoader {\n 0% {\n opacity: 0.5;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n@-webkit-keyframes pulsatingLoader {\n 0% {\n opacity: 0.5;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n.BlogCategoriesWrapper {\n margin-bottom: 24px;\n}\n\n.FilterLabel {\n margin-bottom: 12px;\n color: var(--emw--color-white, #fff);\n font-weight: 600;\n}\n\n.CategoryButtons {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n}\n\n.CategoryButton {\n padding: 10px 20px;\n border-radius: 999px;\n border: 1px solid currentColor;\n background: transparent;\n color: var(--emw--color-white, #fff);\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.CategoryButton.active {\n background: var(--emw--casino-color-primary, var(--emw--color-primary, #22B04E));\n color: var(--emw--color-background, #fff);\n}';const c=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),g={en:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ro:{firstPage:"Prima",previousPage:"Anterior",nextPage:"Urmatoarea",lastPage:"Ultima"},fr:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ar:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},hu:{firstPage:"First",previousPage:"Previous",nextPage:"Következő",lastPage:"Last"},hr:{firstPage:"Prva",previousPage:"Prethodna",nextPage:"Slijedeća",lastPage:"Zadnja"}},p=(t,i)=>g[void 0!==i&&i in g?i:"en"][t],u=class{constructor(n){t(this,n),this.hpPageChange=i(this,"hpPageChange",7),this.userAgent=window.navigator.userAgent,this.currentPage=1,this.navigateTo=t=>{var i;switch(t){case"firstPage":this.offsetInt=0;break;case"lastPage":this.offsetInt=this.endInt*this.limitInt;break;case"previousPage":this.offsetInt-=this.limitInt;break;case"nextPage":this.offsetInt+=this.limitInt;break;case"fivePagesBack":this.offsetInt-=5*this.limitInt,this.offsetInt=this.offsetInt<=0?0:this.offsetInt;break;case"fivePagesForward":this.offsetInt+=5*this.limitInt,this.offsetInt=this.offsetInt/this.limitInt>=this.endInt?this.endInt*this.limitInt:this.offsetInt}this.previousPage=!!this.offsetInt,null===(i=this.hpPageChange)||void 0===i||i.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.paginationNavigation=(t,i)=>{var n;this.previousPage=!0,isNaN(t)?0===i&&this.currentPage<=4?this.navigateTo("firstPage"):0===i&&this.currentPage>4?this.navigateTo("fivePagesBack"):4===i&&this.endInt-this.currentPage>=2&&this.navigateTo("fivePagesForward"):1===t?(this.offsetInt=t-1,this.previousPage=!1):this.offsetInt=(t-1)*this.limitInt,null===(n=this.hpPageChange)||void 0===n||n.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.nextPage="",this.prevPage="",this.offset=0,this.limit=1,this.total=1,this.language="en",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.arrowsActive=!0,this.secondaryArrowsActive=!1,this.numberedNavActive=!1,this.pageQueryParam=void 0,this.page=1,this.offsetInt=0,this.lastPage=!1,this.previousPage=!1,this.limitInt=0,this.totalInt=0,this.pagesArray=[],this.endInt=0}handleClientStylingChange(t,i){t!==i&&a(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,i){t!==i&&this.clientStylingUrl&&r(this.stylingContainer,this.clientStylingUrl)}componentWillRender(){this.offsetInt=this.offset,this.limitInt=this.limit,this.currentPage=this.offsetInt/this.limitInt+1,this.limitInt=this.limit,this.totalInt=this.total,this.endInt=Math.ceil(this.totalInt/this.limitInt)-1,this.lastPage=!(this.offsetInt>=this.endInt*this.limitInt),1==this.currentPage||2==this.currentPage?(this.pagesArray=Array.from({length:4},((t,i)=>i+1)),this.pagesArray.push("...")):this.currentPage>=3&&this.endInt-this.currentPage>=2?(this.pagesArray=Array.from({length:3},((t,i)=>this.currentPage+i-1)),this.pagesArray.push("..."),this.pagesArray.unshift("...")):this.endInt-this.currentPage<3&&(this.pagesArray=Array.from({length:4},((t,i)=>this.endInt-2+i)),this.pagesArray.unshift("..."))}handleClientStyling(){void 0===window.emMessageBus?(this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&r(this.stylingContainer,this.clientStylingUrl)):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling()}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}pageHref(t){if(!this.pageQueryParam)return"#";const i=new URL(window.location.href);return i.searchParams.set(this.pageQueryParam,String(t+this.page-1)),`${i.search}${i.hash}`}render(){let t=n("ul",{class:"PaginationArea"},this.pagesArray.map(((t,i)=>{const e="number"==typeof t?t:0===i?Math.max(1,this.currentPage-5):Math.min(this.endInt+1,this.currentPage+5);return n("li",{class:"PaginationItem"+(t===this.currentPage?" ActiveItem":" ")+" "+(c(this.userAgent)?"MobileButtons":"")},n("a",{href:this.pageHref(e),"aria-current":t===this.currentPage?"page":void 0,"aria-disabled":t===this.currentPage?"true":void 0,tabIndex:t===this.currentPage?-1:void 0,onClick:n=>{n.preventDefault(),t!==this.currentPage&&this.paginationNavigation(t,i)}},n("span",null,t)))}))),i=n("a",{href:this.prevPage?this.pageHref(1):"#","aria-disabled":this.prevPage?void 0:"true",tabIndex:this.prevPage?void 0:-1,onClick:t=>{t.preventDefault(),this.prevPage&&this.navigateTo("firstPage")}},n("span",{class:"NavigationButton"},p("firstPage",this.language)),n("span",{class:"NavigationIcon"})),e=n("div",{class:"LeftItems"},this.secondaryArrowsActive&&i,n("a",{href:this.prevPage?this.pageHref(this.currentPage-1):"#",rel:"prev","aria-label":p("previousPage",this.language),"aria-disabled":this.prevPage?void 0:"true",tabIndex:this.prevPage?void 0:-1,onClick:t=>{t.preventDefault(),this.prevPage&&this.navigateTo("previousPage")}},n("span",{class:"NavigationButton"},p("previousPage",this.language)),n("span",{class:"NavigationIcon"})));c(this.userAgent)&&(e=n("div",{class:"LeftItems"},n("a",{href:this.prevPage?this.pageHref(this.currentPage-1):"#",rel:"prev","aria-label":p("previousPage",this.language),"aria-disabled":this.prevPage?void 0:"true",tabIndex:this.prevPage?void 0:-1,onClick:t=>{t.preventDefault(),this.prevPage&&this.navigateTo("previousPage")}},n("span",{class:"NavigationButton"},p("previousPage",this.language)),n("span",{class:"NavigationIcon"}))));let s=n("a",{href:this.nextPage?this.pageHref(this.endInt+1):"#","aria-disabled":this.nextPage?void 0:"true",tabIndex:this.nextPage?void 0:-1,onClick:t=>{t.preventDefault(),this.nextPage&&this.navigateTo("lastPage")}},n("span",{class:"NavigationButton"},p("lastPage",this.language)),n("span",{class:"NavigationIcon"})),o=n("div",{class:"RightItems"},n("a",{href:this.nextPage?this.pageHref(this.currentPage+1):"#",rel:"next","aria-label":p("nextPage",this.language),"aria-disabled":this.nextPage?void 0:"true",tabIndex:this.nextPage?void 0:-1,onClick:t=>{t.preventDefault(),this.nextPage&&this.navigateTo("nextPage")}},n("span",{class:"NavigationButton"},p("nextPage",this.language)),n("span",{class:"NavigationIcon"})),this.secondaryArrowsActive&&s);return c(this.userAgent)&&(o=n("div",{class:"RightItems"},n("a",{href:this.nextPage?this.pageHref(this.currentPage+1):"#",rel:"next","aria-label":p("nextPage",this.language),"aria-disabled":this.nextPage?void 0:"true",tabIndex:this.nextPage?void 0:-1,onClick:t=>{t.preventDefault(),this.nextPage&&this.navigateTo("nextPage")}},n("span",{class:"NavigationButton"},p("nextPage",this.language)),n("span",{class:"NavigationIcon"})))),n("nav",{id:"PaginationContainer",class:"PaginationContainer","aria-label":"Blog pagination",ref:t=>this.stylingContainer=t},this.arrowsActive&&e,this.numberedNavActive&&t,this.arrowsActive&&o)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};u.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems a:not(:first-child),.RightItems a:not(:last-child){margin:0 10px}.LeftItems a,.RightItems a{padding:0;background-color:#009993;border-color:#009993}.PaginationArea{display:inline-flex;gap:10px;list-style:none}.PaginationArea li{margin:0;padding:0}.PaginationArea li a{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:#000;cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem a{background:#009993;border-color:#009993;color:#fff}.PaginationItem.ActiveItem a[aria-disabled=true]{pointer-events:none;cursor:not-allowed}.PaginationItem a:hover,.PaginationItem a:active{background:#009993;border-color:#009993;color:#fff;opacity:0.8}a{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;text-decoration:none;width:100px;height:32px;border:1px solid #524e52;border-radius:5px;background:#524e52;color:#fff;font-size:14px;font:inherit;cursor:pointer;transition:all 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}a:hover,a:active{background:#004D4A;border-color:#004D4A}a[aria-disabled=true]{background-color:#ccc;border-color:#ccc;color:#fff;cursor:not-allowed}@media screen and (max-width: 720px){a{width:90px;font-size:14px}}@media screen and (max-width: 480px){a{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){a{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem a:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem a:hover{background:#009993;border-color:#009993;color:#fff}}';export{d as blog_articles_grid,u as helper_pagination}
|
|
1
|
+
import{r as t,c as i,h as e}from"./index-4af8e775.js";const n={en:{error:"Error",readmore:"Read more",home:"Home",blog:"Blog",blogPageTitle:"Blog",emptyState:"We haven’t published any posts yet. Check back soon.",emptyCategoryState:"We haven’t published any posts in this category. Check back soon, or browse all our articles."},ro:{error:"Eroare",readmore:"Read more",home:"Acasă",blog:"Blog",blogPageTitle:"Blog",emptyState:"We haven’t published any posts yet. Check back soon.",emptyCategoryState:"We haven’t published any posts in this category. Check back soon, or browse all our articles."},fr:{error:"Error",readmore:"Read more",home:"Accueil",blog:"Blog",blogPageTitle:"Blog",emptyState:"We haven’t published any posts yet. Check back soon.",emptyCategoryState:"We haven’t published any posts in this category. Check back soon, or browse all our articles."},ar:{error:"خطأ",readmore:"Read more",home:"الرئيسية",blog:"المدونة",blogPageTitle:"المدونة",emptyState:"We haven’t published any posts yet. Check back soon.",emptyCategoryState:"We haven’t published any posts in this category. Check back soon, or browse all our articles."},hu:{error:"خطأ",readmore:"Tovább olvasom",home:"Kezdőlap",blog:"Blog",blogPageTitle:"Blog",emptyState:"We haven’t published any posts yet. Check back soon.",emptyCategoryState:"We haven’t published any posts in this category. Check back soon, or browse all our articles."},hr:{error:"Greška",readmore:"Pročitaj više",home:"Početna",blog:"Blog",blogPageTitle:"Blog",emptyState:"We haven’t published any posts yet. Check back soon.",emptyCategoryState:"We haven’t published any posts in this category. Check back soon, or browse all our articles."},"pt-br":{error:"Erro",readmore:"Ler mais",home:"Início",blog:"Blog",blogPageTitle:"Blog",emptyState:"We haven’t published any posts yet. Check back soon.",emptyCategoryState:"We haven’t published any posts in this category. Check back soon, or browse all our articles."},"es-mx":{error:"Error",readmore:"Leer más",home:"Inicio",blog:"Blog",blogPageTitle:"Blog",emptyState:"We haven’t published any posts yet. Check back soon.",emptyCategoryState:"We haven’t published any posts in this category. Check back soon, or browse all our articles."}},s=(t,i,e)=>{var s;const a=null!=i?i:"en",o=null===(s=null==e?void 0:e[a])||void 0===s?void 0:s[t];return"string"==typeof o?o:n[a in n?a:"en"][t]},a="__WIDGET_GLOBAL_STYLE_CACHE__";function o(t,i){if(t){const e=document.createElement("style");e.innerHTML=i,t.appendChild(e)}}function r(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 h(t,i,e,n=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!n)return e=function(t,i){const e=document.createElement("style");return window.emMessageBus.subscribe(i,(i=>{t&&(e.innerHTML=i,t.appendChild(e))}))}(t,i),e;window[a]||(window[a]={}),e=function(t,i){return window.emMessageBus.subscribe(i,(e=>{if(!t)return;const n=t.getRootNode(),s=window[a];let o=s[i]&&s[i].sheet;o?s[i].refCount=s[i].refCount+1:(o=new CSSStyleSheet,o.replaceSync(e),s[i]={sheet:o,refCount:1});const r=n.adoptedStyleSheets||[];r.includes(o)||(n.adoptedStyleSheets=[...r,o])}))}(t,i);const s=e.unsubscribe.bind(e);return e.unsubscribe=()=>{if(window[a][i]){const t=window[a][i];t.refCount>1?t.refCount=t.refCount-1:delete window[a][i]}s()},e}function l(t){return t.includes("android")}const d=class{constructor(n){t(this,n),this.articleActionButton=i(this,"articleActionButton",7),this.lastPage=1,this.isInitialized=!1,this.paginationDefaultStyling="\n nav#PaginationContainer {\n justify-content: right;\n }\n .LeftItems a .NavigationButton {\n display: none;\n }\n .LeftItems a:after, .RightItems a:after {\n padding: 7px 12px;\n font-size: 18px;\n font-weight: 700;\n line-height: 46px;\n }\n .LeftItems a:after {\n content: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1.2em' viewBox='0 0 320 512'%3E%3C!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --%3E%3Cpath d='M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z'/%3E%3C/svg%3E\");\n }\n .RightItems a:after {\n content: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1.2em' viewBox='0 0 320 512'%3E%3C!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --%3E%3Cpath d='M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z'/%3E%3C/svg%3E\");\n display: block;\n height: 38px;\n }\n div.LeftItems a, div.RightItems a {\n width: unset;\n height: 40px;\n background-color: #fff;\n color: #000;\n border: 1px solid #000;\n overflow: hidden;\n &[aria-disabled=\"true\"] {\n background-color: #989898;\n }\n }\n div.LeftItems a {\n min-width: 60px;\n border-radius: 20px 0 0 20px;\n border-right: 0;\n }\n div.RightItems a {\n display: flex;\n min-width: 100px;\n justify-content: space-evenly;\n align-items: center;\n border-radius: 0 20px 20px 0;\n text-transform: none;\n }\n .RightItems a .NavigationButton {\n padding: 12px 0 12px 12px;\n font-weight: 700;\n }",this.renderContentConditionally=t=>t&&(!t.includes("<bannermatrix-banner")||this.bannerMatrixReady)?e("p",{class:"BlogContent",innerHTML:t}):null,this.cmsEndpoint=void 0,this.language="en",this.translationUrl="",this.userRoles="everyone",this.cmsEnv="stage",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.showPublishingDate=!0,this.showBlogSubcategories=!1,this.hideCategory="",this.showImage=!0,this.showTitle=!0,this.showPageTitle=!1,this.showBreadcrumb=!1,this.showContent=!0,this.showButton=!0,this.hideError=!1,this.usePostmessage=void 0,this.postMessageEvent="",this.blogsLimit="0",this.paginationActive=void 0,this.arrowsActive=!0,this.secondaryArrowsActive=!1,this.numberedNavActive=!1,this.intlDateTimeFormat="",this.page="1",this.category=void 0,this.pageQueryParam=void 0,this.eventId=void 0,this.paginationBlogList={offset:0},this.currentPage=0,this.hasErrors=!1,this.isLoading=!0,this.bannerMatrixReady=!1,this.nextPage="",this.previousPage="",this.device="mobile",this.displayedBlogResponse=void 0,this.paginationBlogResponse=void 0,this.allBlogResponse=void 0,this.totalBlogs=0,this.customTranslations={},this.selectedCategory="all",this.categories=[]}getArticleId(t,i){var e;if(0!==t.button||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;const n={postId:i.postID.toString(),slug:i.slug,customPath:i.customPath};this.usePostmessage?(t.preventDefault(),window.postMessage(Object.assign({type:this.postMessageEvent},n))):null===(e=this.articleActionButton)||void 0===e||e.emit(n)}handleBannerReady(){this.bannerMatrixReady=!0}watchEndpoint(t,i){this.isInitialized&&(this.setCurrentPage(this.toPageNumber(this.page)),(t||""===t)&&t!=i&&this.cmsEndpoint&&this.language&&this.getBlogArticleGrid())}handlePageChange(t){if(!this.isInitialized)return;const i=this.toPageNumber(t);String(i)===t?i!==this.currentPage+1&&(this.setCurrentPage(i),this.cmsEndpoint&&this.language&&this.getBlogArticleGrid(!0)):this.page=String(i)}handlePopState(){this.pageQueryParam&&(this.page=String(this.toPageNumber(this.getPageFromUrl())))}toPageNumber(t){const i=parseInt(null!=t?t:"",10);return i>0?i:1}setCurrentPage(t){this.currentPage=t-1,this.paginationBlogList=Object.assign(Object.assign({},this.paginationBlogList),{offset:this.currentPage*(parseInt(this.blogsLimit,10)||0)})}getPageFromUrl(){return this.pageQueryParam?new URL(window.location.href).searchParams.get(this.pageQueryParam):null}pushPageToUrl(t){if(!this.pageQueryParam)return;const i=new URL(window.location.href);i.searchParams.set(this.pageQueryParam,String(t)),window.history.pushState(null,"",`${i.pathname}${i.search}${i.hash}`)}handleClientStylingChange(t,i){t!==i&&o(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,i){t!==i&&this.clientStylingUrl&&r(this.stylingContainer,this.clientStylingUrl)}async loadTranslations(){if(this.translationUrl)try{const t=await fetch(this.translationUrl);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);this.customTranslations=await t.json()}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}else this.customTranslations={}}hpPageChange(t){const{offset:i,limit:e}=t.detail,n=Math.floor(i/e)+1;n>=1&&n<=this.lastPage&&n!==this.currentPage+1&&(this.announcePage(n),this.page=String(n))}announcePage(t){window.postMessage({type:"BlogArticlesGridActivePagination",currentPage:t-1},window.location.href),this.pushPageToUrl(t)}getActiveCategory(){return this.categories.find((t=>t.id===this.selectedCategory))}sortArticlesByDate(t){return t.sort(((t,i)=>t.publishingDate>i.publishingDate?-1:t.publishingDate<i.publishingDate?1:0)),t}findLatestFeatured(t){let i=t.filter((t=>t.isFeaturedPost));return 0===i.length?null:(i=this.sortArticlesByDate(i),i[0])}moveLatestFeatureToStart(t,i){if(!i)return t;const e=t.indexOf(i);return-1!==e&&(t.splice(e,1),t.unshift(i)),t}async fetchBlogPosts(t,i=!1){const e=new URL(`${this.cmsEndpoint}/${this.language}/blog-posts`);if(this.showBlogSubcategories&&this.selectedCategory&&"all"!==this.selectedCategory){const t=this.categories.find((t=>t.id==this.selectedCategory));(null==t?void 0:t.slug)&&e.searchParams.append("category",t.slug)}return e.searchParams.append("per_page",i?"300":this.blogsLimit),e.searchParams.append("page",`${t||this.currentPage+1}`),e.searchParams.append("env",this.cmsEnv),e.searchParams.append("userRoles",this.userRoles),e.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"})()),fetch(e.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=>{let e=t.items;const n=this.findLatestFeatured(e);return e=this.sortArticlesByDate(e),e=this.moveLatestFeatureToStart(e,n),t=Object.assign(Object.assign({},t),{items:e}),i?this.allBlogResponse=t:this.paginationBlogResponse=t,t})).catch((t=>(this.hasErrors=!0,console.log("Error",t),{})))}async fetchCategories(){try{const t=new URL(`${this.cmsEndpoint}/${this.language}/blog-posts/category`),i=await fetch(t.href);if(!i.ok)throw new Error("Failed to fetch categories");const e=await i.json(),n=this.hideCategory.split(",").map((t=>t.trim().toLowerCase())).filter(Boolean),s=e.filter((t=>{var i;return!n.includes(null===(i=t.name)||void 0===i?void 0:i.toLowerCase())}));this.categories=[{id:"all",name:"All"},...s]}catch(t){console.error("Error fetching categories",t)}}async getBlogArticleGrid(t=!1,i){var e,n,s,a,o,r,h;this.isLoading=!0;try{let l;if(this.eventId&&this.eventId.length>0){const a=(null===(e=this.allBlogResponse)||void 0===e?void 0:e.items)?this.allBlogResponse:await this.fetchBlogPosts(1,!0),o=a.items.filter((({eventIds:t})=>{var i;return t.includes(null!==(i=this.eventId)&&void 0!==i?i:"-")}));o.length?(l=Object.assign(Object.assign({},a),{items:o,total:Math.min(parseInt(this.blogsLimit),o.length)}),window.postMessage({type:"OP:blogReady",payload:{hasBlog:!0}},"*")):(window.postMessage({type:"OP:blogReady",payload:{hasBlog:!1}},"*"),l=(null===(s=null===(n=this.paginationBlogResponse)||void 0===n?void 0:n.items)||void 0===s?void 0:s.length)&&!t?this.paginationBlogResponse:await this.fetchBlogPosts(i))}else l=(null===(o=null===(a=this.paginationBlogResponse)||void 0===a?void 0:a.items)||void 0===o?void 0:o.length)&&!t?this.paginationBlogResponse:await this.fetchBlogPosts(i);this.displayedBlogResponse=l,this.totalBlogs=l.total,this.lastPage=+((null===(h=null===(r=l.pages.last)||void 0===r?void 0:r.match(/&page=(\d+)/))||void 0===h?void 0:h[1])||1),this.nextPage=l.pages.next,this.previousPage=l.pages.previous,this.isLoading=!1,this.hasErrors=!1}catch(t){this.hasErrors=!0,console.log("Error",t)}}async componentWillLoad(){var t;if(this.showBlogSubcategories&&(await this.fetchCategories(),this.category)){const t=this.categories.find((t=>{var i;return(null===(i=t.name)||void 0===i?void 0:i.toLowerCase().replace(/\s+/g,"-"))===this.category}));t?(this.selectedCategory=t.id,this.emitActiveCategory()):window.postMessage({type:"BlogCategoryNotFound"},window.location.href)}const i=this.toPageNumber(null!==(t=this.getPageFromUrl())&&void 0!==t?t:this.page);return this.page=String(i),this.setCurrentPage(i),this.cmsEndpoint&&this.language&&this.blogsLimit&&this.getBlogArticleGrid(),this.loadTranslations()}emitActiveCategory(){var t;const i=this.categories.find((t=>t.id===this.selectedCategory));window.postMessage({type:"BlogArticlesActiveCategory",category:"all"===this.selectedCategory?null:null==i?void 0:i.name,metadata:"all"===this.selectedCategory?null:null!==(t=null==i?void 0:i.metadata)&&void 0!==t?t:null},window.location.href)}async handleCategoryChange(t){this.isLoading||this.selectedCategory===t||(this.selectedCategory=t,this.emitActiveCategory(),0!==this.currentPage&&(this.setCurrentPage(1),this.page="1"),await this.getBlogArticleGrid(!0,1))}handleClientStyling(){void 0===window.emMessageBus?(this.clientStyling&&o(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&r(this.stylingContainer,this.clientStylingUrl)):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling(),this.isInitialized=!0,window.postMessage({type:"BlogArticlesGridLoaded"},window.location.href),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"})()}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}setImage(t){var i,e;return(null===(e=null===(i=t.sources)||void 0===i?void 0:i["mobile"===this.device?0:"tablet"===this.device?1:2])||void 0===e?void 0:e.pictureSource)||t.src}parseDate(t){const i=new Date(t);if(i instanceof Date&&!Number.isNaN(i.getTime()))return i;const[e,n,s]=t.trim().split("/").map(Number);return new Date(s,n-1,e)}formatDate(t){const i=this.parseDate(t);return new Intl.DateTimeFormat(this.intlDateTimeFormat).format(i)}render(){var t;if(this.hasErrors)return e("div",{class:"BlogsContainer"},!this.hideError&&e("div",{class:"ErrorMessage"},s("error",this.language,this.customTranslations)));const i=[];for(let t=0;t<parseInt(this.blogsLimit);t++)i.push(e("div",{class:"GridContainer FeaturedPost Skeleton"},e("div",{class:"GridWrapper"},e("div",{class:"GridSector"},e("div",{class:"VisualContent LoadingImage"})),e("div",{class:"GridSector"},e("div",{class:"BlogTitle LoadingStripe LoadingSmallStripe"}),e("div",{class:"BlogDetails LoadingStripe LoadingMediumStripe"}),e("div",{class:"BlogLink LoadingStripe LoadingLongStripe"})))));const n=Boolean(this.paginationActive)&&this.totalBlogs>+this.blogsLimit,a=this.mbSource?void 0:this.clientStyling||this.paginationDefaultStyling,o=this.getActiveCategory();return e("div",{ref:t=>this.stylingContainer=t},this.showBreadcrumb&&e("nav",{class:"breadcrumb","aria-label":"Breadcrumb"},e("a",{href:`/${encodeURIComponent(this.language)}`},s("home",this.language,this.customTranslations)),e("span",{"aria-hidden":"true"},"›"),e("span",{"aria-current":"page"},s("blog",this.language,this.customTranslations))),this.showPageTitle&&e("h1",{class:"BlogPageTitle"}," ","all"!==this.selectedCategory?null==o?void 0:o.name:s("blogPageTitle",this.language,this.customTranslations)," "),"all"!==this.selectedCategory&&(null==o?void 0:o.description)&&e("div",{class:"BlogPageDescription",innerHTML:o.description}),e("div",{class:"BlogPageContainer"},this.showBlogSubcategories&&e("div",{class:"BlogCategoriesSliderWrapper"},e("div",{class:"CarouselWrapper"},e("div",{class:"CarouselContainer"},e("div",{class:"BlogCategoriesWrapper"},e("div",{class:"CategoryButtons"},this.categories.map((t=>e("button",{disabled:this.isLoading||this.selectedCategory===t.id,key:t.id,class:{CategoryButton:!0,active:this.selectedCategory===t.id},onClick:()=>{this.handleCategoryChange(t.id)}},t.name)))))))),e("div",{class:"BlogGridPaginationWrapper"},n&&e("helper-pagination",{"next-page":this.nextPage,"prev-page":this.previousPage,offset:this.paginationBlogList.offset,limit:parseInt(this.blogsLimit,10),total:this.totalBlogs,language:this.language,"mb-source":this.mbSource,"client-styling":a,"client-styling-url":this.clientStylingUrl,"arrows-active":this.arrowsActive,"secondary-arrows-active":this.secondaryArrowsActive,"numbered-nav-active":this.numberedNavActive,"page-query-param":this.pageQueryParam})),!this.isLoading&&0===(null===(t=this.displayedBlogResponse)||void 0===t?void 0:t.items.length)&&e("p",{class:"EmptyState",role:"status"},s("all"===this.selectedCategory?"emptyState":"emptyCategoryState",this.language,this.customTranslations)),!this.isLoading&&e("div",{class:`GridContainerWrapper BlogPage-${this.currentPage} ${this.device}`},this.displayedBlogResponse&&this.displayedBlogResponse.items.map((t=>{var i,n;return e("div",{key:t.postID,class:t.isFeaturedPost?"GridContainer FeaturedPost":"GridContainer"},e("div",{class:"GridWrapper"},e("div",{class:"GridSector"},this.showPublishingDate&&e("div",{class:"BlogDate"},e("time",{dateTime:t.publishingDate},this.formatDate(t.publishingDate))),this.showImage&&(null===(i=t.image)||void 0===i?void 0:i.src)?e("img",{class:"VisualContent",src:this.setImage(t.image),alt:t.image.alt||t.title,width:"400",height:"225",loading:"lazy"}):(null===(n=t.video)||void 0===n?void 0:n.sources[this.device])?e("video",{class:"VisualContent",src:t.video.sources[this.device]}):e("span",{class:"VisualContent",style:{color:"#fff"}},"No Image")),e("div",{class:"GridSector"},this.showTitle&&e("h2",{class:"BlogTitle"},e("a",{class:"BlogCardLink",href:`/${encodeURIComponent(this.language)}/blog/${encodeURIComponent(t.customPath||t.slug)}`,onClick:i=>this.getArticleId(i,t)},t.title)),this.showContent&&this.renderContentConditionally(t.descriptionPreview),this.showButton&&e("span",{class:"BlogLink"},s("readmore",this.language,this.customTranslations)))))}))),this.isLoading&&e("div",{class:"GridContainerWrapper LoadingGrid"},i)))}static get watchers(){return{hasErrors:["watchEndpoint"],cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],cmsEnv:["watchEndpoint"],userRoles:["watchEndpoint"],blogsLimit:["watchEndpoint"],eventId:["watchEndpoint"],page:["handlePageChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"],translationUrl:["loadTranslations"]}}};d.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 padding: 0 20px;\n margin: 40px auto 20px;\n color: var(--emw--color-white, #FFFFFF);\n}\n.breadcrumb a {\n color: inherit;\n}\n\n.BlogPageTitle {\n max-width: 1300px;\n padding: 0 20px;\n margin: 0 auto;\n color: var(--emw--color-primary);\n font-size: 22px;\n font-weight: 600;\n line-height: 1.2;\n}\n\n.BlogPageDescription {\n max-width: 1300px;\n padding: 0 20px;\n margin: 0 auto;\n color: var(--emw--color-typography);\n line-height: 1.2;\n}\n\n.BlogPageContainer {\n background: #0A0A17;\n padding: 20px;\n}\n\n.EmptyState {\n color: var(--emw--color-white, #FFFFFF);\n display: flex;\n align-items: center;\n justify-content: center;\n height: 325px;\n margin: 0;\n}\n\n.GridContainerWrapper {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 20px;\n}\n\n.BlogPage-0 .GridContainer.FeaturedPost:first-child {\n width: 100%;\n flex-basis: auto;\n}\n\n.GridContainer {\n position: relative;\n container-type: inline-size;\n container-name: article;\n border-radius: 15px;\n color: #000;\n overflow: hidden;\n}\n.GridContainer.FeaturedPost:first-child {\n grid-column: 1/-1;\n width: 100%;\n}\n.GridContainer .GridWrapper {\n display: flex;\n flex-direction: row;\n height: 280px;\n background: var(--emw--color-white, #FFFFFF);\n}\n.GridContainer .GridSector {\n flex-basis: 50%;\n position: relative;\n}\n.GridContainer .GridSector:first-of-type {\n height: 280px;\n display: flex;\n}\n.GridContainer .GridSector:last-of-type {\n position: static;\n padding: 20px 40px;\n display: flex;\n flex-direction: column;\n}\n.GridContainer .VisualContent {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.GridContainer .BlogDate {\n position: absolute;\n bottom: 0px;\n left: 30px;\n font-size: 12px;\n border-radius: 5px 5px 0 0;\n padding: 10px;\n width: fit-content;\n text-align: center;\n color: var(--emw--color-white, #FFFFFF);\n background-color: #CD0B5E;\n z-index: 1;\n pointer-events: none;\n}\n.GridContainer .BlogTitle {\n margin: 0;\n font-size: 24px;\n font-weight: 400;\n color: #000;\n padding-bottom: 10px;\n}\n.GridContainer .BlogTitle .BlogCardLink {\n display: block;\n color: inherit;\n text-decoration: none;\n cursor: pointer;\n}\n.GridContainer .BlogTitle .BlogCardLink::after {\n content: "";\n position: absolute;\n inset: 0;\n z-index: 2;\n}\n.GridContainer .BlogContent {\n margin: 0;\n display: -webkit-box;\n font-size: 14px;\n line-height: 1.2em;\n -webkit-line-clamp: 6;\n color: #000;\n -webkit-box-orient: vertical;\n box-sizing: border-box;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n.GridContainer .BlogLink {\n color: #22B04E;\n font-size: 14px;\n position: absolute;\n bottom: 16px;\n padding-top: 2.5px;\n}\n\n@container article (max-width: 550px) {\n .GridContainer .GridWrapper {\n height: 380px;\n flex-direction: column;\n }\n .GridContainer .GridWrapper .GridSector:first-of-type {\n height: 120px;\n flex-shrink: 0;\n flex-basis: 150px;\n }\n .GridContainer .GridWrapper .GridSector:last-of-type {\n padding: 20px 20px 40px;\n }\n}\n.LoadingImage {\n width: 100%;\n height: 100%;\n background-color: var(--emw--color-gray-100, #E6E6E6);\n}\n\n.LoadingStripe {\n border: 1px solid var(--emw--color-white, #FFFFFF);\n height: 20%;\n background-color: var(--emw--color-gray-100, #E6E6E6);\n margin-bottom: 5px;\n}\n\n.LoadingSmallStripe {\n width: 40%;\n}\n\n.LoadingMediumStripe {\n width: 70%;\n}\n\n.BlogLink.LoadingLongStripe {\n position: static;\n width: 100%;\n}\n\n.GridContainerWrapper.LoadingGrid .GridSector {\n justify-content: space-around;\n}\n\n.GridContainerWrapper.LoadingGrid .LoadingImage, .GridContainerWrapper.LoadingGrid .LoadingStripe {\n animation: pulsatingLoader 2s ease-in-out 0s infinite reverse;\n -webkit-animation: pulsatingLoader 2s ease-in-out 0s infinite reverse;\n}\n\n@keyframes pulsatingLoader {\n 0% {\n opacity: 0.5;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n@-webkit-keyframes pulsatingLoader {\n 0% {\n opacity: 0.5;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n.BlogCategoriesWrapper {\n margin-bottom: 24px;\n}\n\n.FilterLabel {\n margin-bottom: 12px;\n color: var(--emw--color-white, #fff);\n font-weight: 600;\n}\n\n.CategoryButtons {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n}\n\n.CategoryButton {\n padding: 10px 20px;\n border-radius: 999px;\n border: 1px solid currentColor;\n background: transparent;\n color: var(--emw--color-white, #fff);\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.CategoryButton.active {\n background: var(--emw--casino-color-primary, var(--emw--color-primary, #22B04E));\n color: var(--emw--color-background, #fff);\n}';const c=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),g={en:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ro:{firstPage:"Prima",previousPage:"Anterior",nextPage:"Urmatoarea",lastPage:"Ultima"},fr:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ar:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},hu:{firstPage:"First",previousPage:"Previous",nextPage:"Következő",lastPage:"Last"},hr:{firstPage:"Prva",previousPage:"Prethodna",nextPage:"Slijedeća",lastPage:"Zadnja"}},p=(t,i)=>g[void 0!==i&&i in g?i:"en"][t],u=class{constructor(e){t(this,e),this.hpPageChange=i(this,"hpPageChange",7),this.userAgent=window.navigator.userAgent,this.currentPage=1,this.navigateTo=t=>{var i;switch(t){case"firstPage":this.offsetInt=0;break;case"lastPage":this.offsetInt=this.endInt*this.limitInt;break;case"previousPage":this.offsetInt-=this.limitInt;break;case"nextPage":this.offsetInt+=this.limitInt;break;case"fivePagesBack":this.offsetInt-=5*this.limitInt,this.offsetInt=this.offsetInt<=0?0:this.offsetInt;break;case"fivePagesForward":this.offsetInt+=5*this.limitInt,this.offsetInt=this.offsetInt/this.limitInt>=this.endInt?this.endInt*this.limitInt:this.offsetInt}this.previousPage=!!this.offsetInt,null===(i=this.hpPageChange)||void 0===i||i.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.paginationNavigation=(t,i)=>{var e;this.previousPage=!0,isNaN(t)?0===i&&this.currentPage<=4?this.navigateTo("firstPage"):0===i&&this.currentPage>4?this.navigateTo("fivePagesBack"):4===i&&this.endInt-this.currentPage>=2&&this.navigateTo("fivePagesForward"):1===t?(this.offsetInt=t-1,this.previousPage=!1):this.offsetInt=(t-1)*this.limitInt,null===(e=this.hpPageChange)||void 0===e||e.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.nextPage="",this.prevPage="",this.offset=0,this.limit=1,this.total=1,this.language="en",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.arrowsActive=!0,this.secondaryArrowsActive=!1,this.numberedNavActive=!1,this.pageQueryParam=void 0,this.page=1,this.offsetInt=0,this.lastPage=!1,this.previousPage=!1,this.limitInt=0,this.totalInt=0,this.pagesArray=[],this.endInt=0}handleClientStylingChange(t,i){t!==i&&o(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,i){t!==i&&this.clientStylingUrl&&r(this.stylingContainer,this.clientStylingUrl)}componentWillRender(){this.offsetInt=this.offset,this.limitInt=this.limit,this.currentPage=this.offsetInt/this.limitInt+1,this.limitInt=this.limit,this.totalInt=this.total,this.endInt=Math.ceil(this.totalInt/this.limitInt)-1,this.lastPage=!(this.offsetInt>=this.endInt*this.limitInt),1==this.currentPage||2==this.currentPage?(this.pagesArray=Array.from({length:4},((t,i)=>i+1)),this.pagesArray.push("...")):this.currentPage>=3&&this.endInt-this.currentPage>=2?(this.pagesArray=Array.from({length:3},((t,i)=>this.currentPage+i-1)),this.pagesArray.push("..."),this.pagesArray.unshift("...")):this.endInt-this.currentPage<3&&(this.pagesArray=Array.from({length:4},((t,i)=>this.endInt-2+i)),this.pagesArray.unshift("..."))}handleClientStyling(){void 0===window.emMessageBus?(this.clientStyling&&o(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&r(this.stylingContainer,this.clientStylingUrl)):this.stylingSubscription=h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling()}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}pageHref(t){if(!this.pageQueryParam)return"#";const i=new URL(window.location.href);return i.searchParams.set(this.pageQueryParam,String(t+this.page-1)),`${i.search}${i.hash}`}render(){let t=e("ul",{class:"PaginationArea"},this.pagesArray.map(((t,i)=>{const n="number"==typeof t?t:0===i?Math.max(1,this.currentPage-5):Math.min(this.endInt+1,this.currentPage+5);return e("li",{class:"PaginationItem"+(t===this.currentPage?" ActiveItem":" ")+" "+(c(this.userAgent)?"MobileButtons":"")},e("a",{href:this.pageHref(n),"aria-current":t===this.currentPage?"page":void 0,"aria-disabled":t===this.currentPage?"true":void 0,tabIndex:t===this.currentPage?-1:void 0,onClick:e=>{e.preventDefault(),t!==this.currentPage&&this.paginationNavigation(t,i)}},e("span",null,t)))}))),i=e("a",{href:this.prevPage?this.pageHref(1):"#","aria-disabled":this.prevPage?void 0:"true",tabIndex:this.prevPage?void 0:-1,onClick:t=>{t.preventDefault(),this.prevPage&&this.navigateTo("firstPage")}},e("span",{class:"NavigationButton"},p("firstPage",this.language)),e("span",{class:"NavigationIcon"})),n=e("div",{class:"LeftItems"},this.secondaryArrowsActive&&i,e("a",{href:this.prevPage?this.pageHref(this.currentPage-1):"#",rel:"prev","aria-label":p("previousPage",this.language),"aria-disabled":this.prevPage?void 0:"true",tabIndex:this.prevPage?void 0:-1,onClick:t=>{t.preventDefault(),this.prevPage&&this.navigateTo("previousPage")}},e("span",{class:"NavigationButton"},p("previousPage",this.language)),e("span",{class:"NavigationIcon"})));c(this.userAgent)&&(n=e("div",{class:"LeftItems"},e("a",{href:this.prevPage?this.pageHref(this.currentPage-1):"#",rel:"prev","aria-label":p("previousPage",this.language),"aria-disabled":this.prevPage?void 0:"true",tabIndex:this.prevPage?void 0:-1,onClick:t=>{t.preventDefault(),this.prevPage&&this.navigateTo("previousPage")}},e("span",{class:"NavigationButton"},p("previousPage",this.language)),e("span",{class:"NavigationIcon"}))));let s=e("a",{href:this.nextPage?this.pageHref(this.endInt+1):"#","aria-disabled":this.nextPage?void 0:"true",tabIndex:this.nextPage?void 0:-1,onClick:t=>{t.preventDefault(),this.nextPage&&this.navigateTo("lastPage")}},e("span",{class:"NavigationButton"},p("lastPage",this.language)),e("span",{class:"NavigationIcon"})),a=e("div",{class:"RightItems"},e("a",{href:this.nextPage?this.pageHref(this.currentPage+1):"#",rel:"next","aria-label":p("nextPage",this.language),"aria-disabled":this.nextPage?void 0:"true",tabIndex:this.nextPage?void 0:-1,onClick:t=>{t.preventDefault(),this.nextPage&&this.navigateTo("nextPage")}},e("span",{class:"NavigationButton"},p("nextPage",this.language)),e("span",{class:"NavigationIcon"})),this.secondaryArrowsActive&&s);return c(this.userAgent)&&(a=e("div",{class:"RightItems"},e("a",{href:this.nextPage?this.pageHref(this.currentPage+1):"#",rel:"next","aria-label":p("nextPage",this.language),"aria-disabled":this.nextPage?void 0:"true",tabIndex:this.nextPage?void 0:-1,onClick:t=>{t.preventDefault(),this.nextPage&&this.navigateTo("nextPage")}},e("span",{class:"NavigationButton"},p("nextPage",this.language)),e("span",{class:"NavigationIcon"})))),e("nav",{id:"PaginationContainer",class:"PaginationContainer","aria-label":"Blog pagination",ref:t=>this.stylingContainer=t},this.arrowsActive&&n,this.numberedNavActive&&t,this.arrowsActive&&a)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};u.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems a:not(:first-child),.RightItems a:not(:last-child){margin:0 10px}.LeftItems a,.RightItems a{padding:0;background-color:#009993;border-color:#009993}.PaginationArea{display:inline-flex;gap:10px;list-style:none}.PaginationArea li{margin:0;padding:0}.PaginationArea li a{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:#000;cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem a{background:#009993;border-color:#009993;color:#fff}.PaginationItem.ActiveItem a[aria-disabled=true]{pointer-events:none;cursor:not-allowed}.PaginationItem a:hover,.PaginationItem a:active{background:#009993;border-color:#009993;color:#fff;opacity:0.8}a{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;text-decoration:none;width:100px;height:32px;border:1px solid #524e52;border-radius:5px;background:#524e52;color:#fff;font-size:14px;font:inherit;cursor:pointer;transition:all 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}a:hover,a:active{background:#004D4A;border-color:#004D4A}a[aria-disabled=true]{background-color:#ccc;border-color:#ccc;color:#fff;cursor:not-allowed}@media screen and (max-width: 720px){a{width:90px;font-size:14px}}@media screen and (max-width: 480px){a{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){a{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem a:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem a:hover{background:#009993;border-color:#009993;color:#fff}}';export{d as blog_articles_grid,u as helper_pagination}
|
|
@@ -12,6 +12,8 @@ const TRANSLATIONS$1 = {
|
|
|
12
12
|
home: 'Home',
|
|
13
13
|
blog: 'Blog',
|
|
14
14
|
blogPageTitle: 'Blog',
|
|
15
|
+
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
16
|
+
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
15
17
|
},
|
|
16
18
|
ro: {
|
|
17
19
|
error: 'Eroare',
|
|
@@ -19,6 +21,8 @@ const TRANSLATIONS$1 = {
|
|
|
19
21
|
home: 'Acasă',
|
|
20
22
|
blog: 'Blog',
|
|
21
23
|
blogPageTitle: 'Blog',
|
|
24
|
+
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
25
|
+
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
22
26
|
},
|
|
23
27
|
fr: {
|
|
24
28
|
error: 'Error',
|
|
@@ -26,6 +30,8 @@ const TRANSLATIONS$1 = {
|
|
|
26
30
|
home: 'Accueil',
|
|
27
31
|
blog: 'Blog',
|
|
28
32
|
blogPageTitle: 'Blog',
|
|
33
|
+
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
34
|
+
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
29
35
|
},
|
|
30
36
|
ar: {
|
|
31
37
|
error: 'خطأ',
|
|
@@ -33,6 +39,8 @@ const TRANSLATIONS$1 = {
|
|
|
33
39
|
home: 'الرئيسية',
|
|
34
40
|
blog: 'المدونة',
|
|
35
41
|
blogPageTitle: 'المدونة',
|
|
42
|
+
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
43
|
+
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
36
44
|
},
|
|
37
45
|
hu: {
|
|
38
46
|
error: 'خطأ',
|
|
@@ -40,6 +48,8 @@ const TRANSLATIONS$1 = {
|
|
|
40
48
|
home: 'Kezdőlap',
|
|
41
49
|
blog: 'Blog',
|
|
42
50
|
blogPageTitle: 'Blog',
|
|
51
|
+
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
52
|
+
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
43
53
|
},
|
|
44
54
|
hr: {
|
|
45
55
|
error: 'Greška',
|
|
@@ -47,6 +57,8 @@ const TRANSLATIONS$1 = {
|
|
|
47
57
|
home: 'Početna',
|
|
48
58
|
blog: 'Blog',
|
|
49
59
|
blogPageTitle: 'Blog',
|
|
60
|
+
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
61
|
+
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
50
62
|
},
|
|
51
63
|
'pt-br': {
|
|
52
64
|
error: 'Erro',
|
|
@@ -54,6 +66,8 @@ const TRANSLATIONS$1 = {
|
|
|
54
66
|
home: 'Início',
|
|
55
67
|
blog: 'Blog',
|
|
56
68
|
blogPageTitle: 'Blog',
|
|
69
|
+
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
70
|
+
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
57
71
|
},
|
|
58
72
|
'es-mx': {
|
|
59
73
|
error: 'Error',
|
|
@@ -61,6 +75,8 @@ const TRANSLATIONS$1 = {
|
|
|
61
75
|
home: 'Inicio',
|
|
62
76
|
blog: 'Blog',
|
|
63
77
|
blogPageTitle: 'Blog',
|
|
78
|
+
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
79
|
+
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
64
80
|
}
|
|
65
81
|
};
|
|
66
82
|
const translate$1 = (key, customLang, customTranslations) => {
|
|
@@ -275,7 +291,7 @@ const getDevicePlatform = () => {
|
|
|
275
291
|
return 'mtWeb';
|
|
276
292
|
};
|
|
277
293
|
|
|
278
|
-
const blogArticlesGridCss = ":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 padding: 0 20px;\n margin: 40px auto 20px;\n color: var(--emw--color-white, #FFFFFF);\n}\n.breadcrumb a {\n color: inherit;\n}\n\n.BlogPageTitle {\n max-width: 1300px;\n padding: 0 20px;\n margin: 0 auto;\n color: var(--emw--color-primary);\n font-size: 22px;\n font-weight: 600;\n line-height: 1.2;\n}\n\n.BlogPageDescription {\n max-width: 1300px;\n padding: 0 20px;\n margin: 0 auto;\n color: var(--emw--color-typography);\n line-height: 1.2;\n}\n\n.BlogPageContainer {\n background: #0A0A17;\n padding: 20px;\n}\n\n.GridContainerWrapper {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 20px;\n}\n\n.BlogPage-0 .GridContainer.FeaturedPost:first-child {\n width: 100%;\n flex-basis: auto;\n}\n\n.GridContainer {\n position: relative;\n container-type: inline-size;\n container-name: article;\n border-radius: 15px;\n color: #000;\n overflow: hidden;\n}\n.GridContainer.FeaturedPost:first-child {\n grid-column: 1/-1;\n width: 100%;\n}\n.GridContainer .GridWrapper {\n display: flex;\n flex-direction: row;\n height: 280px;\n background: var(--emw--color-white, #FFFFFF);\n}\n.GridContainer .GridSector {\n flex-basis: 50%;\n position: relative;\n}\n.GridContainer .GridSector:first-of-type {\n height: 280px;\n display: flex;\n}\n.GridContainer .GridSector:last-of-type {\n position: static;\n padding: 20px 40px;\n display: flex;\n flex-direction: column;\n}\n.GridContainer .VisualContent {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.GridContainer .BlogDate {\n position: absolute;\n bottom: 0px;\n left: 30px;\n font-size: 12px;\n border-radius: 5px 5px 0 0;\n padding: 10px;\n width: fit-content;\n text-align: center;\n color: var(--emw--color-white, #FFFFFF);\n background-color: #CD0B5E;\n z-index: 1;\n pointer-events: none;\n}\n.GridContainer .BlogTitle {\n margin: 0;\n font-size: 24px;\n font-weight: 400;\n color: #000;\n padding-bottom: 10px;\n}\n.GridContainer .BlogTitle .BlogCardLink {\n display: block;\n color: inherit;\n text-decoration: none;\n cursor: pointer;\n}\n.GridContainer .BlogTitle .BlogCardLink::after {\n content: \"\";\n position: absolute;\n inset: 0;\n z-index: 2;\n}\n.GridContainer .BlogContent {\n margin: 0;\n display: -webkit-box;\n font-size: 14px;\n line-height: 1.2em;\n -webkit-line-clamp: 6;\n color: #000;\n -webkit-box-orient: vertical;\n box-sizing: border-box;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n.GridContainer .BlogLink {\n color: #22B04E;\n font-size: 14px;\n position: absolute;\n bottom: 16px;\n padding-top: 2.5px;\n}\n\n@container article (max-width: 550px) {\n .GridContainer .GridWrapper {\n height: 380px;\n flex-direction: column;\n }\n .GridContainer .GridWrapper .GridSector:first-of-type {\n height: 120px;\n flex-shrink: 0;\n flex-basis: 150px;\n }\n .GridContainer .GridWrapper .GridSector:last-of-type {\n padding: 20px 20px 40px;\n }\n}\n.LoadingImage {\n width: 100%;\n height: 100%;\n background-color: var(--emw--color-gray-100, #E6E6E6);\n}\n\n.LoadingStripe {\n border: 1px solid var(--emw--color-white, #FFFFFF);\n height: 20%;\n background-color: var(--emw--color-gray-100, #E6E6E6);\n margin-bottom: 5px;\n}\n\n.LoadingSmallStripe {\n width: 40%;\n}\n\n.LoadingMediumStripe {\n width: 70%;\n}\n\n.BlogLink.LoadingLongStripe {\n position: static;\n width: 100%;\n}\n\n.GridContainerWrapper.LoadingGrid .GridSector {\n justify-content: space-around;\n}\n\n.GridContainerWrapper.LoadingGrid .LoadingImage, .GridContainerWrapper.LoadingGrid .LoadingStripe {\n animation: pulsatingLoader 2s ease-in-out 0s infinite reverse;\n -webkit-animation: pulsatingLoader 2s ease-in-out 0s infinite reverse;\n}\n\n@keyframes pulsatingLoader {\n 0% {\n opacity: 0.5;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n@-webkit-keyframes pulsatingLoader {\n 0% {\n opacity: 0.5;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n.BlogCategoriesWrapper {\n margin-bottom: 24px;\n}\n\n.FilterLabel {\n margin-bottom: 12px;\n color: var(--emw--color-white, #fff);\n font-weight: 600;\n}\n\n.CategoryButtons {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n}\n\n.CategoryButton {\n padding: 10px 20px;\n border-radius: 999px;\n border: 1px solid currentColor;\n background: transparent;\n color: var(--emw--color-white, #fff);\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.CategoryButton.active {\n background: var(--emw--casino-color-primary, var(--emw--color-primary, #22B04E));\n color: var(--emw--color-background, #fff);\n}";
|
|
294
|
+
const blogArticlesGridCss = ":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 padding: 0 20px;\n margin: 40px auto 20px;\n color: var(--emw--color-white, #FFFFFF);\n}\n.breadcrumb a {\n color: inherit;\n}\n\n.BlogPageTitle {\n max-width: 1300px;\n padding: 0 20px;\n margin: 0 auto;\n color: var(--emw--color-primary);\n font-size: 22px;\n font-weight: 600;\n line-height: 1.2;\n}\n\n.BlogPageDescription {\n max-width: 1300px;\n padding: 0 20px;\n margin: 0 auto;\n color: var(--emw--color-typography);\n line-height: 1.2;\n}\n\n.BlogPageContainer {\n background: #0A0A17;\n padding: 20px;\n}\n\n.EmptyState {\n color: var(--emw--color-white, #FFFFFF);\n display: flex;\n align-items: center;\n justify-content: center;\n height: 325px;\n margin: 0;\n}\n\n.GridContainerWrapper {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 20px;\n}\n\n.BlogPage-0 .GridContainer.FeaturedPost:first-child {\n width: 100%;\n flex-basis: auto;\n}\n\n.GridContainer {\n position: relative;\n container-type: inline-size;\n container-name: article;\n border-radius: 15px;\n color: #000;\n overflow: hidden;\n}\n.GridContainer.FeaturedPost:first-child {\n grid-column: 1/-1;\n width: 100%;\n}\n.GridContainer .GridWrapper {\n display: flex;\n flex-direction: row;\n height: 280px;\n background: var(--emw--color-white, #FFFFFF);\n}\n.GridContainer .GridSector {\n flex-basis: 50%;\n position: relative;\n}\n.GridContainer .GridSector:first-of-type {\n height: 280px;\n display: flex;\n}\n.GridContainer .GridSector:last-of-type {\n position: static;\n padding: 20px 40px;\n display: flex;\n flex-direction: column;\n}\n.GridContainer .VisualContent {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.GridContainer .BlogDate {\n position: absolute;\n bottom: 0px;\n left: 30px;\n font-size: 12px;\n border-radius: 5px 5px 0 0;\n padding: 10px;\n width: fit-content;\n text-align: center;\n color: var(--emw--color-white, #FFFFFF);\n background-color: #CD0B5E;\n z-index: 1;\n pointer-events: none;\n}\n.GridContainer .BlogTitle {\n margin: 0;\n font-size: 24px;\n font-weight: 400;\n color: #000;\n padding-bottom: 10px;\n}\n.GridContainer .BlogTitle .BlogCardLink {\n display: block;\n color: inherit;\n text-decoration: none;\n cursor: pointer;\n}\n.GridContainer .BlogTitle .BlogCardLink::after {\n content: \"\";\n position: absolute;\n inset: 0;\n z-index: 2;\n}\n.GridContainer .BlogContent {\n margin: 0;\n display: -webkit-box;\n font-size: 14px;\n line-height: 1.2em;\n -webkit-line-clamp: 6;\n color: #000;\n -webkit-box-orient: vertical;\n box-sizing: border-box;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n.GridContainer .BlogLink {\n color: #22B04E;\n font-size: 14px;\n position: absolute;\n bottom: 16px;\n padding-top: 2.5px;\n}\n\n@container article (max-width: 550px) {\n .GridContainer .GridWrapper {\n height: 380px;\n flex-direction: column;\n }\n .GridContainer .GridWrapper .GridSector:first-of-type {\n height: 120px;\n flex-shrink: 0;\n flex-basis: 150px;\n }\n .GridContainer .GridWrapper .GridSector:last-of-type {\n padding: 20px 20px 40px;\n }\n}\n.LoadingImage {\n width: 100%;\n height: 100%;\n background-color: var(--emw--color-gray-100, #E6E6E6);\n}\n\n.LoadingStripe {\n border: 1px solid var(--emw--color-white, #FFFFFF);\n height: 20%;\n background-color: var(--emw--color-gray-100, #E6E6E6);\n margin-bottom: 5px;\n}\n\n.LoadingSmallStripe {\n width: 40%;\n}\n\n.LoadingMediumStripe {\n width: 70%;\n}\n\n.BlogLink.LoadingLongStripe {\n position: static;\n width: 100%;\n}\n\n.GridContainerWrapper.LoadingGrid .GridSector {\n justify-content: space-around;\n}\n\n.GridContainerWrapper.LoadingGrid .LoadingImage, .GridContainerWrapper.LoadingGrid .LoadingStripe {\n animation: pulsatingLoader 2s ease-in-out 0s infinite reverse;\n -webkit-animation: pulsatingLoader 2s ease-in-out 0s infinite reverse;\n}\n\n@keyframes pulsatingLoader {\n 0% {\n opacity: 0.5;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n@-webkit-keyframes pulsatingLoader {\n 0% {\n opacity: 0.5;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n.BlogCategoriesWrapper {\n margin-bottom: 24px;\n}\n\n.FilterLabel {\n margin-bottom: 12px;\n color: var(--emw--color-white, #fff);\n font-weight: 600;\n}\n\n.CategoryButtons {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n}\n\n.CategoryButton {\n padding: 10px 20px;\n border-radius: 999px;\n border: 1px solid currentColor;\n background: transparent;\n color: var(--emw--color-white, #fff);\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.CategoryButton.active {\n background: var(--emw--casino-color-primary, var(--emw--color-primary, #22B04E));\n color: var(--emw--color-background, #fff);\n}";
|
|
279
295
|
const BlogArticlesGridStyle0 = blogArticlesGridCss;
|
|
280
296
|
|
|
281
297
|
const BlogArticlesGrid = class {
|
|
@@ -733,6 +749,7 @@ const BlogArticlesGrid = class {
|
|
|
733
749
|
return new Intl.DateTimeFormat(this.intlDateTimeFormat).format(date);
|
|
734
750
|
}
|
|
735
751
|
render() {
|
|
752
|
+
var _a;
|
|
736
753
|
if (this.hasErrors) {
|
|
737
754
|
return (index.h("div", { class: "BlogsContainer" }, !this.hideError && (index.h("div", { class: "ErrorMessage" }, translate$1('error', this.language, this.customTranslations)))));
|
|
738
755
|
}
|
|
@@ -752,7 +769,7 @@ const BlogArticlesGrid = class {
|
|
|
752
769
|
active: this.selectedCategory === category.id,
|
|
753
770
|
}, onClick: () => {
|
|
754
771
|
this.handleCategoryChange(category.id);
|
|
755
|
-
} }, category.name)))))))), index.h("div", { class: "BlogGridPaginationWrapper" }, showPagination && index.h("helper-pagination", { "next-page": this.nextPage, "prev-page": this.previousPage, offset: this.paginationBlogList.offset, limit: parseInt(this.blogsLimit, 10), total: this.totalBlogs, language: this.language, "mb-source": this.mbSource, "client-styling": paginationClientStyling, "client-styling-url": this.clientStylingUrl, "arrows-active": this.arrowsActive, "secondary-arrows-active": this.secondaryArrowsActive, "numbered-nav-active": this.numberedNavActive, "page-query-param": this.pageQueryParam })), (!this.isLoading) &&
|
|
772
|
+
} }, category.name)))))))), index.h("div", { class: "BlogGridPaginationWrapper" }, showPagination && index.h("helper-pagination", { "next-page": this.nextPage, "prev-page": this.previousPage, offset: this.paginationBlogList.offset, limit: parseInt(this.blogsLimit, 10), total: this.totalBlogs, language: this.language, "mb-source": this.mbSource, "client-styling": paginationClientStyling, "client-styling-url": this.clientStylingUrl, "arrows-active": this.arrowsActive, "secondary-arrows-active": this.secondaryArrowsActive, "numbered-nav-active": this.numberedNavActive, "page-query-param": this.pageQueryParam })), !this.isLoading && ((_a = this.displayedBlogResponse) === null || _a === void 0 ? void 0 : _a.items.length) === 0 && (index.h("p", { class: "EmptyState", role: "status" }, translate$1(this.selectedCategory === 'all' ? 'emptyState' : 'emptyCategoryState', this.language, this.customTranslations))), (!this.isLoading) &&
|
|
756
773
|
index.h("div", { class: `GridContainerWrapper BlogPage-${this.currentPage} ${this.device}` }, this.displayedBlogResponse && this.displayedBlogResponse.items.map((data) => {
|
|
757
774
|
var _a, _b;
|
|
758
775
|
return index.h("div", { key: data.postID, class: data.isFeaturedPost ? 'GridContainer FeaturedPost' : 'GridContainer' }, index.h("div", { class: "GridWrapper" }, index.h("div", { class: "GridSector" }, this.showPublishingDate &&
|
|
@@ -39,6 +39,15 @@
|
|
|
39
39
|
padding: 20px;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
.EmptyState {
|
|
43
|
+
color: var(--emw--color-white, #FFFFFF);
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
height: 325px;
|
|
48
|
+
margin: 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
42
51
|
.GridContainerWrapper {
|
|
43
52
|
display: grid;
|
|
44
53
|
grid-template-columns: 1fr 1fr;
|
|
@@ -456,6 +456,7 @@ export class BlogArticlesGrid {
|
|
|
456
456
|
return new Intl.DateTimeFormat(this.intlDateTimeFormat).format(date);
|
|
457
457
|
}
|
|
458
458
|
render() {
|
|
459
|
+
var _a;
|
|
459
460
|
if (this.hasErrors) {
|
|
460
461
|
return (h("div", { class: "BlogsContainer" }, !this.hideError && (h("div", { class: "ErrorMessage" }, translate('error', this.language, this.customTranslations)))));
|
|
461
462
|
}
|
|
@@ -475,7 +476,7 @@ export class BlogArticlesGrid {
|
|
|
475
476
|
active: this.selectedCategory === category.id,
|
|
476
477
|
}, onClick: () => {
|
|
477
478
|
this.handleCategoryChange(category.id);
|
|
478
|
-
} }, category.name)))))))), h("div", { class: "BlogGridPaginationWrapper" }, showPagination && h("helper-pagination", { "next-page": this.nextPage, "prev-page": this.previousPage, offset: this.paginationBlogList.offset, limit: parseInt(this.blogsLimit, 10), total: this.totalBlogs, language: this.language, "mb-source": this.mbSource, "client-styling": paginationClientStyling, "client-styling-url": this.clientStylingUrl, "arrows-active": this.arrowsActive, "secondary-arrows-active": this.secondaryArrowsActive, "numbered-nav-active": this.numberedNavActive, "page-query-param": this.pageQueryParam })), (!this.isLoading) &&
|
|
479
|
+
} }, category.name)))))))), h("div", { class: "BlogGridPaginationWrapper" }, showPagination && h("helper-pagination", { "next-page": this.nextPage, "prev-page": this.previousPage, offset: this.paginationBlogList.offset, limit: parseInt(this.blogsLimit, 10), total: this.totalBlogs, language: this.language, "mb-source": this.mbSource, "client-styling": paginationClientStyling, "client-styling-url": this.clientStylingUrl, "arrows-active": this.arrowsActive, "secondary-arrows-active": this.secondaryArrowsActive, "numbered-nav-active": this.numberedNavActive, "page-query-param": this.pageQueryParam })), !this.isLoading && ((_a = this.displayedBlogResponse) === null || _a === void 0 ? void 0 : _a.items.length) === 0 && (h("p", { class: "EmptyState", role: "status" }, translate(this.selectedCategory === 'all' ? 'emptyState' : 'emptyCategoryState', this.language, this.customTranslations))), (!this.isLoading) &&
|
|
479
480
|
h("div", { class: `GridContainerWrapper BlogPage-${this.currentPage} ${this.device}` }, this.displayedBlogResponse && this.displayedBlogResponse.items.map((data) => {
|
|
480
481
|
var _a, _b;
|
|
481
482
|
return h("div", { key: data.postID, class: data.isFeaturedPost ? 'GridContainer FeaturedPost' : 'GridContainer' }, h("div", { class: "GridWrapper" }, h("div", { class: "GridSector" }, this.showPublishingDate &&
|
|
@@ -6,6 +6,8 @@ const TRANSLATIONS = {
|
|
|
6
6
|
home: 'Home',
|
|
7
7
|
blog: 'Blog',
|
|
8
8
|
blogPageTitle: 'Blog',
|
|
9
|
+
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
10
|
+
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
9
11
|
},
|
|
10
12
|
ro: {
|
|
11
13
|
error: 'Eroare',
|
|
@@ -13,6 +15,8 @@ const TRANSLATIONS = {
|
|
|
13
15
|
home: 'Acasă',
|
|
14
16
|
blog: 'Blog',
|
|
15
17
|
blogPageTitle: 'Blog',
|
|
18
|
+
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
19
|
+
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
16
20
|
},
|
|
17
21
|
fr: {
|
|
18
22
|
error: 'Error',
|
|
@@ -20,6 +24,8 @@ const TRANSLATIONS = {
|
|
|
20
24
|
home: 'Accueil',
|
|
21
25
|
blog: 'Blog',
|
|
22
26
|
blogPageTitle: 'Blog',
|
|
27
|
+
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
28
|
+
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
23
29
|
},
|
|
24
30
|
ar: {
|
|
25
31
|
error: 'خطأ',
|
|
@@ -27,6 +33,8 @@ const TRANSLATIONS = {
|
|
|
27
33
|
home: 'الرئيسية',
|
|
28
34
|
blog: 'المدونة',
|
|
29
35
|
blogPageTitle: 'المدونة',
|
|
36
|
+
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
37
|
+
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
30
38
|
},
|
|
31
39
|
hu: {
|
|
32
40
|
error: 'خطأ',
|
|
@@ -34,6 +42,8 @@ const TRANSLATIONS = {
|
|
|
34
42
|
home: 'Kezdőlap',
|
|
35
43
|
blog: 'Blog',
|
|
36
44
|
blogPageTitle: 'Blog',
|
|
45
|
+
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
46
|
+
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
37
47
|
},
|
|
38
48
|
hr: {
|
|
39
49
|
error: 'Greška',
|
|
@@ -41,6 +51,8 @@ const TRANSLATIONS = {
|
|
|
41
51
|
home: 'Početna',
|
|
42
52
|
blog: 'Blog',
|
|
43
53
|
blogPageTitle: 'Blog',
|
|
54
|
+
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
55
|
+
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
44
56
|
},
|
|
45
57
|
'pt-br': {
|
|
46
58
|
error: 'Erro',
|
|
@@ -48,6 +60,8 @@ const TRANSLATIONS = {
|
|
|
48
60
|
home: 'Início',
|
|
49
61
|
blog: 'Blog',
|
|
50
62
|
blogPageTitle: 'Blog',
|
|
63
|
+
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
64
|
+
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
51
65
|
},
|
|
52
66
|
'es-mx': {
|
|
53
67
|
error: 'Error',
|
|
@@ -55,6 +69,8 @@ const TRANSLATIONS = {
|
|
|
55
69
|
home: 'Inicio',
|
|
56
70
|
blog: 'Blog',
|
|
57
71
|
blogPageTitle: 'Blog',
|
|
72
|
+
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
73
|
+
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
58
74
|
}
|
|
59
75
|
};
|
|
60
76
|
export const translate = (key, customLang, customTranslations) => {
|
|
@@ -8,6 +8,8 @@ const TRANSLATIONS$1 = {
|
|
|
8
8
|
home: 'Home',
|
|
9
9
|
blog: 'Blog',
|
|
10
10
|
blogPageTitle: 'Blog',
|
|
11
|
+
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
12
|
+
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
11
13
|
},
|
|
12
14
|
ro: {
|
|
13
15
|
error: 'Eroare',
|
|
@@ -15,6 +17,8 @@ const TRANSLATIONS$1 = {
|
|
|
15
17
|
home: 'Acasă',
|
|
16
18
|
blog: 'Blog',
|
|
17
19
|
blogPageTitle: 'Blog',
|
|
20
|
+
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
21
|
+
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
18
22
|
},
|
|
19
23
|
fr: {
|
|
20
24
|
error: 'Error',
|
|
@@ -22,6 +26,8 @@ const TRANSLATIONS$1 = {
|
|
|
22
26
|
home: 'Accueil',
|
|
23
27
|
blog: 'Blog',
|
|
24
28
|
blogPageTitle: 'Blog',
|
|
29
|
+
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
30
|
+
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
25
31
|
},
|
|
26
32
|
ar: {
|
|
27
33
|
error: 'خطأ',
|
|
@@ -29,6 +35,8 @@ const TRANSLATIONS$1 = {
|
|
|
29
35
|
home: 'الرئيسية',
|
|
30
36
|
blog: 'المدونة',
|
|
31
37
|
blogPageTitle: 'المدونة',
|
|
38
|
+
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
39
|
+
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
32
40
|
},
|
|
33
41
|
hu: {
|
|
34
42
|
error: 'خطأ',
|
|
@@ -36,6 +44,8 @@ const TRANSLATIONS$1 = {
|
|
|
36
44
|
home: 'Kezdőlap',
|
|
37
45
|
blog: 'Blog',
|
|
38
46
|
blogPageTitle: 'Blog',
|
|
47
|
+
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
48
|
+
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
39
49
|
},
|
|
40
50
|
hr: {
|
|
41
51
|
error: 'Greška',
|
|
@@ -43,6 +53,8 @@ const TRANSLATIONS$1 = {
|
|
|
43
53
|
home: 'Početna',
|
|
44
54
|
blog: 'Blog',
|
|
45
55
|
blogPageTitle: 'Blog',
|
|
56
|
+
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
57
|
+
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
46
58
|
},
|
|
47
59
|
'pt-br': {
|
|
48
60
|
error: 'Erro',
|
|
@@ -50,6 +62,8 @@ const TRANSLATIONS$1 = {
|
|
|
50
62
|
home: 'Início',
|
|
51
63
|
blog: 'Blog',
|
|
52
64
|
blogPageTitle: 'Blog',
|
|
65
|
+
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
66
|
+
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
53
67
|
},
|
|
54
68
|
'es-mx': {
|
|
55
69
|
error: 'Error',
|
|
@@ -57,6 +71,8 @@ const TRANSLATIONS$1 = {
|
|
|
57
71
|
home: 'Inicio',
|
|
58
72
|
blog: 'Blog',
|
|
59
73
|
blogPageTitle: 'Blog',
|
|
74
|
+
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
75
|
+
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
60
76
|
}
|
|
61
77
|
};
|
|
62
78
|
const translate$1 = (key, customLang, customTranslations) => {
|
|
@@ -271,7 +287,7 @@ const getDevicePlatform = () => {
|
|
|
271
287
|
return 'mtWeb';
|
|
272
288
|
};
|
|
273
289
|
|
|
274
|
-
const blogArticlesGridCss = ":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 padding: 0 20px;\n margin: 40px auto 20px;\n color: var(--emw--color-white, #FFFFFF);\n}\n.breadcrumb a {\n color: inherit;\n}\n\n.BlogPageTitle {\n max-width: 1300px;\n padding: 0 20px;\n margin: 0 auto;\n color: var(--emw--color-primary);\n font-size: 22px;\n font-weight: 600;\n line-height: 1.2;\n}\n\n.BlogPageDescription {\n max-width: 1300px;\n padding: 0 20px;\n margin: 0 auto;\n color: var(--emw--color-typography);\n line-height: 1.2;\n}\n\n.BlogPageContainer {\n background: #0A0A17;\n padding: 20px;\n}\n\n.GridContainerWrapper {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 20px;\n}\n\n.BlogPage-0 .GridContainer.FeaturedPost:first-child {\n width: 100%;\n flex-basis: auto;\n}\n\n.GridContainer {\n position: relative;\n container-type: inline-size;\n container-name: article;\n border-radius: 15px;\n color: #000;\n overflow: hidden;\n}\n.GridContainer.FeaturedPost:first-child {\n grid-column: 1/-1;\n width: 100%;\n}\n.GridContainer .GridWrapper {\n display: flex;\n flex-direction: row;\n height: 280px;\n background: var(--emw--color-white, #FFFFFF);\n}\n.GridContainer .GridSector {\n flex-basis: 50%;\n position: relative;\n}\n.GridContainer .GridSector:first-of-type {\n height: 280px;\n display: flex;\n}\n.GridContainer .GridSector:last-of-type {\n position: static;\n padding: 20px 40px;\n display: flex;\n flex-direction: column;\n}\n.GridContainer .VisualContent {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.GridContainer .BlogDate {\n position: absolute;\n bottom: 0px;\n left: 30px;\n font-size: 12px;\n border-radius: 5px 5px 0 0;\n padding: 10px;\n width: fit-content;\n text-align: center;\n color: var(--emw--color-white, #FFFFFF);\n background-color: #CD0B5E;\n z-index: 1;\n pointer-events: none;\n}\n.GridContainer .BlogTitle {\n margin: 0;\n font-size: 24px;\n font-weight: 400;\n color: #000;\n padding-bottom: 10px;\n}\n.GridContainer .BlogTitle .BlogCardLink {\n display: block;\n color: inherit;\n text-decoration: none;\n cursor: pointer;\n}\n.GridContainer .BlogTitle .BlogCardLink::after {\n content: \"\";\n position: absolute;\n inset: 0;\n z-index: 2;\n}\n.GridContainer .BlogContent {\n margin: 0;\n display: -webkit-box;\n font-size: 14px;\n line-height: 1.2em;\n -webkit-line-clamp: 6;\n color: #000;\n -webkit-box-orient: vertical;\n box-sizing: border-box;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n.GridContainer .BlogLink {\n color: #22B04E;\n font-size: 14px;\n position: absolute;\n bottom: 16px;\n padding-top: 2.5px;\n}\n\n@container article (max-width: 550px) {\n .GridContainer .GridWrapper {\n height: 380px;\n flex-direction: column;\n }\n .GridContainer .GridWrapper .GridSector:first-of-type {\n height: 120px;\n flex-shrink: 0;\n flex-basis: 150px;\n }\n .GridContainer .GridWrapper .GridSector:last-of-type {\n padding: 20px 20px 40px;\n }\n}\n.LoadingImage {\n width: 100%;\n height: 100%;\n background-color: var(--emw--color-gray-100, #E6E6E6);\n}\n\n.LoadingStripe {\n border: 1px solid var(--emw--color-white, #FFFFFF);\n height: 20%;\n background-color: var(--emw--color-gray-100, #E6E6E6);\n margin-bottom: 5px;\n}\n\n.LoadingSmallStripe {\n width: 40%;\n}\n\n.LoadingMediumStripe {\n width: 70%;\n}\n\n.BlogLink.LoadingLongStripe {\n position: static;\n width: 100%;\n}\n\n.GridContainerWrapper.LoadingGrid .GridSector {\n justify-content: space-around;\n}\n\n.GridContainerWrapper.LoadingGrid .LoadingImage, .GridContainerWrapper.LoadingGrid .LoadingStripe {\n animation: pulsatingLoader 2s ease-in-out 0s infinite reverse;\n -webkit-animation: pulsatingLoader 2s ease-in-out 0s infinite reverse;\n}\n\n@keyframes pulsatingLoader {\n 0% {\n opacity: 0.5;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n@-webkit-keyframes pulsatingLoader {\n 0% {\n opacity: 0.5;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n.BlogCategoriesWrapper {\n margin-bottom: 24px;\n}\n\n.FilterLabel {\n margin-bottom: 12px;\n color: var(--emw--color-white, #fff);\n font-weight: 600;\n}\n\n.CategoryButtons {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n}\n\n.CategoryButton {\n padding: 10px 20px;\n border-radius: 999px;\n border: 1px solid currentColor;\n background: transparent;\n color: var(--emw--color-white, #fff);\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.CategoryButton.active {\n background: var(--emw--casino-color-primary, var(--emw--color-primary, #22B04E));\n color: var(--emw--color-background, #fff);\n}";
|
|
290
|
+
const blogArticlesGridCss = ":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 padding: 0 20px;\n margin: 40px auto 20px;\n color: var(--emw--color-white, #FFFFFF);\n}\n.breadcrumb a {\n color: inherit;\n}\n\n.BlogPageTitle {\n max-width: 1300px;\n padding: 0 20px;\n margin: 0 auto;\n color: var(--emw--color-primary);\n font-size: 22px;\n font-weight: 600;\n line-height: 1.2;\n}\n\n.BlogPageDescription {\n max-width: 1300px;\n padding: 0 20px;\n margin: 0 auto;\n color: var(--emw--color-typography);\n line-height: 1.2;\n}\n\n.BlogPageContainer {\n background: #0A0A17;\n padding: 20px;\n}\n\n.EmptyState {\n color: var(--emw--color-white, #FFFFFF);\n display: flex;\n align-items: center;\n justify-content: center;\n height: 325px;\n margin: 0;\n}\n\n.GridContainerWrapper {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 20px;\n}\n\n.BlogPage-0 .GridContainer.FeaturedPost:first-child {\n width: 100%;\n flex-basis: auto;\n}\n\n.GridContainer {\n position: relative;\n container-type: inline-size;\n container-name: article;\n border-radius: 15px;\n color: #000;\n overflow: hidden;\n}\n.GridContainer.FeaturedPost:first-child {\n grid-column: 1/-1;\n width: 100%;\n}\n.GridContainer .GridWrapper {\n display: flex;\n flex-direction: row;\n height: 280px;\n background: var(--emw--color-white, #FFFFFF);\n}\n.GridContainer .GridSector {\n flex-basis: 50%;\n position: relative;\n}\n.GridContainer .GridSector:first-of-type {\n height: 280px;\n display: flex;\n}\n.GridContainer .GridSector:last-of-type {\n position: static;\n padding: 20px 40px;\n display: flex;\n flex-direction: column;\n}\n.GridContainer .VisualContent {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.GridContainer .BlogDate {\n position: absolute;\n bottom: 0px;\n left: 30px;\n font-size: 12px;\n border-radius: 5px 5px 0 0;\n padding: 10px;\n width: fit-content;\n text-align: center;\n color: var(--emw--color-white, #FFFFFF);\n background-color: #CD0B5E;\n z-index: 1;\n pointer-events: none;\n}\n.GridContainer .BlogTitle {\n margin: 0;\n font-size: 24px;\n font-weight: 400;\n color: #000;\n padding-bottom: 10px;\n}\n.GridContainer .BlogTitle .BlogCardLink {\n display: block;\n color: inherit;\n text-decoration: none;\n cursor: pointer;\n}\n.GridContainer .BlogTitle .BlogCardLink::after {\n content: \"\";\n position: absolute;\n inset: 0;\n z-index: 2;\n}\n.GridContainer .BlogContent {\n margin: 0;\n display: -webkit-box;\n font-size: 14px;\n line-height: 1.2em;\n -webkit-line-clamp: 6;\n color: #000;\n -webkit-box-orient: vertical;\n box-sizing: border-box;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n.GridContainer .BlogLink {\n color: #22B04E;\n font-size: 14px;\n position: absolute;\n bottom: 16px;\n padding-top: 2.5px;\n}\n\n@container article (max-width: 550px) {\n .GridContainer .GridWrapper {\n height: 380px;\n flex-direction: column;\n }\n .GridContainer .GridWrapper .GridSector:first-of-type {\n height: 120px;\n flex-shrink: 0;\n flex-basis: 150px;\n }\n .GridContainer .GridWrapper .GridSector:last-of-type {\n padding: 20px 20px 40px;\n }\n}\n.LoadingImage {\n width: 100%;\n height: 100%;\n background-color: var(--emw--color-gray-100, #E6E6E6);\n}\n\n.LoadingStripe {\n border: 1px solid var(--emw--color-white, #FFFFFF);\n height: 20%;\n background-color: var(--emw--color-gray-100, #E6E6E6);\n margin-bottom: 5px;\n}\n\n.LoadingSmallStripe {\n width: 40%;\n}\n\n.LoadingMediumStripe {\n width: 70%;\n}\n\n.BlogLink.LoadingLongStripe {\n position: static;\n width: 100%;\n}\n\n.GridContainerWrapper.LoadingGrid .GridSector {\n justify-content: space-around;\n}\n\n.GridContainerWrapper.LoadingGrid .LoadingImage, .GridContainerWrapper.LoadingGrid .LoadingStripe {\n animation: pulsatingLoader 2s ease-in-out 0s infinite reverse;\n -webkit-animation: pulsatingLoader 2s ease-in-out 0s infinite reverse;\n}\n\n@keyframes pulsatingLoader {\n 0% {\n opacity: 0.5;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n@-webkit-keyframes pulsatingLoader {\n 0% {\n opacity: 0.5;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n.BlogCategoriesWrapper {\n margin-bottom: 24px;\n}\n\n.FilterLabel {\n margin-bottom: 12px;\n color: var(--emw--color-white, #fff);\n font-weight: 600;\n}\n\n.CategoryButtons {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n}\n\n.CategoryButton {\n padding: 10px 20px;\n border-radius: 999px;\n border: 1px solid currentColor;\n background: transparent;\n color: var(--emw--color-white, #fff);\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.CategoryButton.active {\n background: var(--emw--casino-color-primary, var(--emw--color-primary, #22B04E));\n color: var(--emw--color-background, #fff);\n}";
|
|
275
291
|
const BlogArticlesGridStyle0 = blogArticlesGridCss;
|
|
276
292
|
|
|
277
293
|
const BlogArticlesGrid = class {
|
|
@@ -729,6 +745,7 @@ const BlogArticlesGrid = class {
|
|
|
729
745
|
return new Intl.DateTimeFormat(this.intlDateTimeFormat).format(date);
|
|
730
746
|
}
|
|
731
747
|
render() {
|
|
748
|
+
var _a;
|
|
732
749
|
if (this.hasErrors) {
|
|
733
750
|
return (h("div", { class: "BlogsContainer" }, !this.hideError && (h("div", { class: "ErrorMessage" }, translate$1('error', this.language, this.customTranslations)))));
|
|
734
751
|
}
|
|
@@ -748,7 +765,7 @@ const BlogArticlesGrid = class {
|
|
|
748
765
|
active: this.selectedCategory === category.id,
|
|
749
766
|
}, onClick: () => {
|
|
750
767
|
this.handleCategoryChange(category.id);
|
|
751
|
-
} }, category.name)))))))), h("div", { class: "BlogGridPaginationWrapper" }, showPagination && h("helper-pagination", { "next-page": this.nextPage, "prev-page": this.previousPage, offset: this.paginationBlogList.offset, limit: parseInt(this.blogsLimit, 10), total: this.totalBlogs, language: this.language, "mb-source": this.mbSource, "client-styling": paginationClientStyling, "client-styling-url": this.clientStylingUrl, "arrows-active": this.arrowsActive, "secondary-arrows-active": this.secondaryArrowsActive, "numbered-nav-active": this.numberedNavActive, "page-query-param": this.pageQueryParam })), (!this.isLoading) &&
|
|
768
|
+
} }, category.name)))))))), h("div", { class: "BlogGridPaginationWrapper" }, showPagination && h("helper-pagination", { "next-page": this.nextPage, "prev-page": this.previousPage, offset: this.paginationBlogList.offset, limit: parseInt(this.blogsLimit, 10), total: this.totalBlogs, language: this.language, "mb-source": this.mbSource, "client-styling": paginationClientStyling, "client-styling-url": this.clientStylingUrl, "arrows-active": this.arrowsActive, "secondary-arrows-active": this.secondaryArrowsActive, "numbered-nav-active": this.numberedNavActive, "page-query-param": this.pageQueryParam })), !this.isLoading && ((_a = this.displayedBlogResponse) === null || _a === void 0 ? void 0 : _a.items.length) === 0 && (h("p", { class: "EmptyState", role: "status" }, translate$1(this.selectedCategory === 'all' ? 'emptyState' : 'emptyCategoryState', this.language, this.customTranslations))), (!this.isLoading) &&
|
|
752
769
|
h("div", { class: `GridContainerWrapper BlogPage-${this.currentPage} ${this.device}` }, this.displayedBlogResponse && this.displayedBlogResponse.items.map((data) => {
|
|
753
770
|
var _a, _b;
|
|
754
771
|
return h("div", { key: data.postID, class: data.isFeaturedPost ? 'GridContainer FeaturedPost' : 'GridContainer' }, h("div", { class: "GridWrapper" }, h("div", { class: "GridSector" }, this.showPublishingDate &&
|