1import{a as he,b as Ce}from"./chunk-PFSRPNRK.js";import{j as ue}from"./chunk-QEDE2XME.js";import{d as me,f as de}from"./chunk-UE5WHPKG.js";import{a as _e,b as we,f as fe}from"./chunk-JONQS34E.js";import{D as y,E as oe,Ga as se,Ha as le,L as E,Ra as ce,W as re,a as ie,c as ne,ga as O,gb as T,ia as ae,z as M,zb as pe}from"./chunk-MW6ACQAD.js";import{$ as R,Aa as B,Cb as r,Ec as P,Gc as _,Hc as v,Ic as x,Je as N,Nb as W,Ob as z,Oc as J,Qb as G,Qc as L,Rb as F,Sb as a,T as I,Ub as H,Vc as A,Wc as D,Yc as Q,Zb as d,Ze as te,aa as h,cc as s,dc as p,ec as u,fa as c,fb as n,ic as Z,ke as S,nc as X,oa as U,pa as V,pd as Y,qc as K,rc as m,sa as $,te as q,ue as ee,vb as C,wb as g,zb as j}from"./chunk-QZLAYFPN.js";import{a as f}from"./chunk-6AR4TEKW.js";var ge=(()=>{class e{constructor(){this.usheruApi=c(ae),this.http=c(ne),this.env=c(E),this.document=c(Y),this.headers=this.usheruApi.getStandardHeader(),this.countrySelectionService=c(le),this.translationsService=c(O);}getNews(t=1,i,l){let k={trLanguage:this.translationsService.currentLanguage().code};return l=f(f({},l||{}),k),this.countrySelectionService.initialCountry$.pipe(I(w=>this.getNewsApi(t,i,w,l)));}getNewsItem(t){if(this.isLocalEnv&&this.placeholderData?.newsPosts){let i=typeof this.placeholderData.newsPosts=="boolean"?"1":this.placeholderData.newsPosts;return console.warn("Using placeholder data for news"),this.http.get(`https://cdnstatic.usheru.com/assets/placeholder-data/newsPosts-${i}.json`);}return this.http.get(`${this.env.api.url}/newsPosts/${t}`,{headers:this.headers});}getNewsApi(t=1,i,l,k){let w=new ie({fromObject:f({postLimit:i,page:t},k||{})});return l&&(w=w.set("country",l.id)),this.http.get(this.env.api.newsPostsUrl(),{headers:this.headers,params:w});}get isLocalEnv(){return this.env.mode=="develop"||this.env.mode=="demo"||re(this.document);}get placeholderData(){return this.env?.placeholderData;}static{this.ɵfac=function(i){return new(i||e)();};}static{this.ɵprov=R({token:e,factory:e.ɵfac,providedIn:"root"});}}return e;})();var Ee=()=>[S,q,M,me,he,_e,ee],xe=e=>({$implicit:e});function Oe(e,o){if(e&1&&(s(0,"p",5),_(1),p()),e&2){let t=m(3);F("data-translate","public.commons.news.subtitle"),n(),x(" ",t.newsSubtitle," ");}}function Te(e,o){if(e&1&&(s(0,"a",6),X(1,2),p()),e&2){let t=m(3);a("routerLink",t.viewAllLink);}}function be(e,o){if(e&1&&(s(0,"button",9),u(1,"ush-arrow",10),p(),s(2,"button",11),u(3,"ush-arrow",12),p()),e&2){let t=m(3);a("id",t.arrowLeftCssSelector),n(),a("template",t.arrowTemplate),n(),a("id",t.arrowRightCssSelector),n(),a("template",t.arrowTemplate);}}function ke(e,o){}function Fe(e,o){if(e&1&&r(0,ke,0,0,"ng-template",8),e&2){let t=m(3),i=P(5);a("ngTemplateOutlet",i)("ngTemplateOutletContext",L(2,xe,t.items));}}function Pe(e,o){}function Le(e,o){if(e&1&&r(0,Pe,0,0,"ng-template",8),e&2){m(4);let t=P(5);a("ngTemplateOutlet",t)("ngTemplateOutletContext",L(2,xe,o));}}function Ae(e,o){e&1&&u(0,"p-skeleton");}function De(e,o){if(e&1&&(s(0,"div",13),r(1,Ae,1,0,"p-skeleton",14),p()),e&2){let t=m(4);n(),a("ngForOf",t.Array(5));}}function Ie(e,o){if(e&1&&(r(0,Le,1,4,null,8),A(1,"async"),r(2,De,2,1,"div",13)),e&2){let t,i=m(3);d((t=D(1,1,i.news$))?0:2,t);}}function Re(e,o){if(e&1&&(s(0,"div",3)(1,"h2",4),_(2),p(),r(3,Oe,2,2,"p",5)(4,Te,2,1,"a",6)(5,be,4,4),s(6,"div",7),r(7,Fe,1,4,null,8)(8,Ie,3,3),p()()),e&2){let t=m(2);n(),F("data-translate","title.news"),n(),v(t.title),n(),d(!t.isMovieStieConfig()&&t.newsSubtitle?3:-1),n(),d(!t.isMovieStieConfig()&&t.viewAllLink&&!t.hideViewAll?4:-1),n(),d(t.isMovieStieConfig()?-1:5),n(2),d(t.items&&t.items.length?7:8);}}function Ue(e,o){e&1&&u(0,"div",3);}function Ve(e,o){if(e&1&&(r(0,Re,9,6,"div",3),A(1,"async"),r(2,Ue,1,0,"div",3)),e&2){let t,i=m();d(i.isBrowser&&(!i.hideOnZeroResults||((t=D(1,1,i.news$))==null?null:t.length)>0)?0:2);}}function $e(e,o){e&1&&u(0,"div",15);}function Be(e,o){if(e&1&&(s(0,"swiper-slide",18),u(1,"community-elements-ui-news-card",19),p()),e&2){let t=o.$implicit;n(),a("news",t);}}function je(e,o){if(e&1&&(s(0,"swiper-container",16,1),r(2,Be,2,1,"swiper-slide",17),p()),e&2){let t=o.$implicit,i=m();a("config",i.isMovieStieConfig()?i.movieSiteSwiperConfig:i.swiperConfig),n(2),a("ngForOf",t);}}var Se=(()=>{class e extends ue{constructor(){super(...arguments),this.newsService=c(ge),this.Array=Array,this.viewAllLink="/news",this.newsSubtitle="Newsletter, announcements, reviews and more.",this.hideViewAll=!1,this.hideOnZeroResults=!1,this.isMovieStieConfig=B(!1),this.news$=void 0,this.title="News",this.movieSiteSwiperConfig={slidesPerView:1,spaceBetween:30,scrollbar:!0,breakpoints:{480:{slidesPerView:2,spaceBetween:30},768:{slidesPerView:3,spaceBetween:30},1024:{slidesPerView:4,spaceBetween:30}},pagination:{clickable:!0,type:"bullets"},autoplay:{delay:5e3},loop:!0};}set news(t){this.items=t;}beforeInitSwiper(){this.updateNoItemsBinding(),this.news$=this.newsService.getNews(1,10,this.params);}static{this.ɵfac=(()=>{let t;return function(l){return(t||(t=$(e)))(l||e);};})();}static{this.ɵcmp=C({type:e,selectors:[["community-feature-news-carousel"]],inputs:{news:"news",viewAllLink:"viewAllLink",newsSubtitle:"newsSubtitle",hideViewAll:"hideViewAll",hideOnZeroResults:"hideOnZeroResults",isMovieStieConfig:[1,"isMovieStieConfig"]},standalone:!1,features:[j],decls:6,vars:1,consts:()=>{let t;return t="View all",[["newsCarousel",""],["swiper",""],t,[1,"carousel__wrapper"],[1,"carousel__title"],[1,"carousel__description"],[1,"carousel__view-all","hyperlink",3,"routerLink"],[1,"carousel__content"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["pButton","","aria-label","Previous new",1,"carousel__arrow","carousel__left-arrow",3,"id"],["orientation","left",3,"template"],["pButton","","aria-label","Next new",1,"carousel__arrow","carousel__right-arrow",3,"id"],["orientation","right",3,"template"],[1,"skeleton-news-wrapper"],[4,"ngFor","ngForOf"],[2,"height","400px","width","100%","background","transparent"],["ushSwi
1perElement","","init","false",3,"config"],["lazy","true",4,"ngFor","ngForOf"],["lazy","true"],[3,"news"]];},template:function(i,l){i&1&&(r(0,Ve,3,3)(1,$e,1,0),W(2,0,Ee,null,1),G(0,-1),r(4,je,3,2,"ng-template",null,0,Q)),i&2&&(n(2),z(l.news$!==void 0));},styles:["[_nghost-%COMP%]{--feature-news-skeleton-width: 220px;--feature-news-skeleton-height: 262px;--feature-news-margin-right: 10px;display:block;overflow:hidden}[_nghost-%COMP%]:empty{display:none}swiper-container[_ngcontent-%COMP%]{width:100%;height:auto}swiper-slide[_ngcontent-%COMP%]{width:min-content}swiper-container[_ngcontent-%COMP%]::part(container){overflow:visible}swiper-container[_ngcontent-%COMP%]::part(scrollbar){bottom:-20px}@media all and (min-width: 768px){swiper-container[_ngcontent-%COMP%]::part(scrollbar){display:none}}.skeleton-news-wrapper[_ngcontent-%COMP%]{display:flex}.skeleton-news-wrapper[_ngcontent-%COMP%] .p-skeleton{margin-right:var(--feature-news-margin-right, unset)!important;width:var(--feature-news-skeleton-width, auto)!important;height:var(--feature-news-skeleton-height, unset)!important}@media all and (min-width: 576px){.skeleton-news-wrapper[_ngcontent-%COMP%] .p-skeleton{--feature-news-margin-right: 30px;--feature-news-skeleton-width: 300px}}"]});}}return e;})();function We(e,o){if(e&1){let t=Z();s(0,"a",1),K("click",function(){U(t);let l=m();return V(l.onRedirectToNews());}),s(1,"div",2),u(2,"img",3),p(),s(3,"div",4)(4,"h3",5),_(5),p(),s(6,"p",6),_(7),p()()();}if(e&2){let t=m();a("externalLink",t.news.url)("routerLink","/news-article/"+t.news.id)("title",t.news.title),n(2),a("ngSrc",t.news.imageUrl||t.placeholderImage)("alt",(t.news==null?null:t.news.title)+"news card"),n(2),H("longText",t.news.title.length>t.longtext),n(),x(" ",t.news.title.slice(0,t.longtext)," "),n(2),v(t.date);}}var Ne=(()=>{class e{constructor(){this.channelService=c(se),this.translationsService=c(O),this.trackingService=c(ce),this.env=c(E),this.longtext=80,this.placeholderImage=this.env.newsParams?.placeholderImg||this.channelService.getDefaultImg("landscape");}ngOnInit(){this.date=new Date(this.news.publishDate).toLocaleDateString(this.translationsService?.currentLanguage()?.code,{day:"numeric",month:"long",year:"numeric"});}onRedirectToNews(){this.trackingService.trackEvent({action:"ViewPost",properties:{category:"News",label:this.news.title,new:this.news.title,idNew:this.news.id}});}static{this.ɵfac=function(i){return new(i||e)();};}static{this.ɵcmp=C({type:e,selectors:[["community-elements-ui-news-card"]],inputs:{longtext:"longtext",news:"news"},standalone:!1,decls:1,vars:1,consts:[[1,"ui-news-card",3,"externalLink","routerLink","title"],[1,"ui-news-card",3,"click","externalLink","routerLink","title"],[1,"ui-news-card__image-wrapper"],["width","260","height","146",1,"ui-news-card__image",3,"ngSrc","alt"],[1,"ui-news-card__content"],[1,"ui-news-card__title","two-rows-ellipsis"],[1,"ui-news-card__date"]],template:function(i,l){i&1&&r(0,We,8,9,"a",0),i&2&&d(l.news?0:-1);},dependencies:[M,te,oe],styles:['.ui-news-card[_ngcontent-%COMP%]{display:block;
1box-shadow:var(--box-shadow, 0 2px 4px rgba(0, 0, 0, .1));border-radius:var(--border-radius, var(--borderRadius, 0));background:var(--new-card_background, var(--colorLightGrey, #d9d9d9));width:var(--news-card-width, 220px);height:var(--news-card-height);color:var(--new-card_color, var(--text-color, var(--textColor)));text-decoration:none}@media all and (min-width: 768px){.ui-news-card[_ngcontent-%COMP%]{width:var(--news-card-width, 300px)}}.ui-news-card__image-wrapper[_ngcontent-%COMP%]{display:flex;position:relative;top:-20px;top:var(--news-card-image-top, -20px);margin:20px auto -20px;width:var(--news-card-image-wrapper-width, min-content)}.ui-news-card__image[_ngcontent-%COMP%]{display:flex;border-radius:var(--border-radius, var(--borderRadius, 0));aspect-ratio:var(--aspect-ratio-landscape, 16/9);width:var(--news-card-image-width, 190px);height:auto;object-fit:cover}@media all and (min-width: 768px){.ui-news-card__image[_ngcontent-%COMP%]{width:var(--news-card-image-width, 260px)}}.ui-news-card__content[_ngcontent-%COMP%]{padding:var(--spacing-md, 10px)}.ui-news-card__content[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:inherit;line-height:calc(1.17em + 6px)}.ui-news-card__content[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{margin-right:auto;margin-left:auto;width:100%}.ui-news-card__date[_ngcontent-%COMP%]{margin-top:var(--news-card-date-margin-top);margin-bottom:0;font-size:var(--font-size-080, .9rem)}.ui-news-card__title[_ngcontent-%COMP%]{margin:var(--spacing-md, 10px) auto var(--spacing-md, 10px) auto;text-align:center}.ui-news-card__title[_ngcontent-%COMP%]:is(.longText):after{content:"..."}']});}}return e;})();var Me=(()=>{class e{static{this.ɵfac=function(i){return new(i||e)();};}static{this.ɵmod=g({type:e});}static{this.ɵinj=h({imports:[N,y.forChild([]),fe,T]});}}return e;})();var zt=(()=>{class e{static{this.ɵfac=function(i){return new(i||e)();};}static{this.ɵmod=g({type:e});}static{this.ɵinj=h({imports:[N,y.forChild([]),de,Me,T,Ce,we]});}}return e;})();J(Se,function(){return[S,pe,Ne];},[]);export{ge as a,Se as b,zt as c};/**i18n:0868a0e9473b685559a14add8a0630516373ec974a47a0a823e56021a722e10f*/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.