1import{a as X}from"./chunk-DDRMLQGP.js";import{a as f}from"./chunk-KJIUKXJ4.js";import{u as K}from"./chunk-F2UDG76F.js";import"./chunk-KPFW5WDZ.js";import"./chunk-IQBVAIDQ.js";import"./chunk-L2XAKF7E.js";import"./chunk-B7NBARZN.js";import"./chunk-IZI3LWX3.js";import{a as Q}from"./chunk-HWMTSDLJ.js";import"./chunk-SCJMMS4R.js";import"./chunk-GLB6FXVW.js";import"./chunk-NKZ7GERH.js";import"./chunk-PLWO6N5B.js";import"./chunk-NYVODJB2.js";import"./chunk-JWTTV2TH.js";import"./chunk-HKNOB5YZ.js";import{v as U,w as G,y as J}from"./chunk-WFKL35DD.js";import"./chunk-2CBKXUP7.js";import{$c as q,Aa as V,fa as z}from"./chunk-DM3NC7AB.js";import{$b as D,Ac as j,Bc as p,Cc as m,Dc as l,Ec as g,Fa as B,Jb as o,K as _,Mc as L,Oe as k,Pc as $,Qa as E,Ra as I,Rc as c,Ta as T,Vb as H,Wb as s,a as y,ac as O,be as N,fc as M,hb as A,ta as S,td as F,uc as d,ve as W,w as b,wa as x,wc as u,x as w,yc as R,zc as P}from"./chunk-WVBH4ZDA.js";import{a as h,b as v}from"./chunk-YDOXD4O3.js";function ee(i,t){}function te(i,t){if(i&1&&M(0,ee,0,0,"ng-template",8),i&2){let e=c().$implicit;p("cxComponentWrapper",e)}}function ie(i,t){if(i&1&&(m(0,"div",6),d(1,te,1,1,null,8),l()),i&2){let e=t.$implicit;o(),u(e?1:-1)}}function ne(i,t){if(i&1){let e=L();m(0,"div",7)(1,"button",9),$("click",function(){E(e);let r=c(2);return I(r.togglePlayPauseBtn())}),g(2,"app-amor-icon",10)(3,"app-amor-icon",10),l(),m(4,"div",11),g(5,"div",12)(6,"div",13)(7,"div",14),l()()}if(i&2){let e=c(2);o(2),p("icon","fa-Play"),o(),p("icon","fa-Pause"),o(2),p("ngClass",e.uid+"-previous-button"),o(),p("ngClass",e.uid+"-pagination"),o(),p("ngClass",e.uid+"-next-button")}}function oe(i,t){if(i&1&&(m(0,"div",0)(1,"div",1)(2,"div",2)(3,"ul",3)(4,"div",4)(5,"div",5),P(6,ie,2,1,"div",6,R),l()()()()(),d(8,ne,8,5,"div",7),l()),i&2){let e=c();o(2),p("id",e.uid),o(),p("id",F("",e.uid,"_carousel-scroll")),o(),p("ngClass",e.uid?e.uid:""),o(2),j(e.heroComponents),o(2),u(e.heroComponents!=null&&e.heroComponents.length?8:-1)}}var C=class i{constructor(t,e,n,r,a,re,ae,se,pe){this.cmsComponentData=t;this.cmsService=e;this.changeDetect=n;this.winRef=r;this.renderer=a;this.elementRef=re;this.headerService=ae;this.minHeightService=se;this.document=pe;this.subscriptions$=new y;this.heroComponents=[];this.components$=this.cmsComponentData.data$.pipe(x(t=>{let e=t;e.uid&&this.setComponentProperties(e)}),S(t=>w((t?.heroComponents??"").split(" ").map(e=>this.cmsService.getComponentData(e).pipe(b(n=>{if(n)return n.flexType||(n=v(h({},n),{flexType:n.typeCode})),h({},n)}),_(n=>n!==void 0))))))}ngOnInit(){this.subscriptions$.add(this.components$.subscribe(t=>{t&&(this.minHeightService?.setMinHeightFromCMS(t,this.elementRef),this.winRef.isBrowser()&&(this.heroComponents=t,this.changeDetect.detectChanges(),this.swiperConfig(),this.setTabIndex(!0)))}))}swiperConfig(){this.config={slidesPerView:1,direction:"horizontal",allowTouchMove:!0,preloadImages:!1,lazy:!0,lazyPreloadPrevNext:1,watchSlidesProgress:!0,scrollOnFocus:!1,autoplay:!0,loop:!0,rewind:!1,autoHeight:!0,breakpoints:{320:{autoplay:!1,loop:!1,rewind:!1},768:{autoplay:!1,loop:!1,rewind:!1},1281:{autoplay:{delay:6e3,pauseOnMouseEnter:!0,stopOnLastSlide:!1,disableOnInteraction:!1},loop:!0,rewind:!1}},a11y:{enabled:!0},navigation:{enabled:!0,nextEl:`.${this.uid}-next-button`,prevEl:`.${this.uid}-previous-button`},pagination:{el:`.${this.uid}-pagination`,type:"fraction"},on:{slideChange:()=>{this.setTabIndex(!0)}}},this.swiper=new K("."+this.uid,this.config),this.setOnFocus(this.swiper),setTimeout(()=>this.updateSwiper(),500)}updateSwiper(){this.swiper&&this.swiper.update()}setOnFocus(t){this.elementRef.nativeElement.querySelectorAll(".swiper-slide").forEach(e=>{let n=e.getElementsByTagName("a");for(let r=0;r<n.length;r++){let a=n[r];this.renderer.listen(a,"focus",()=>{this.swiper.autoplay.stop()}),this.renderer.listen(a,"blur",()=>{this.swiper.autoplay.start()})}})}setTabIndex(t){this.elementRef.nativeElement.querySelectorAll(".swiper-slide").forEach(e=>{let n=e.classList.contains("swiper-slide-visible"),r=e.getElementsByTagName("a");if(n){for(let a=0;a<r.length;a++)r[a].setAttribute("tabindex","0");this.renderer.setAttribute(e,"aria-hidden","false")}else{for(let a=0;a<r.length;a++)r[a].setAttribute("tabindex","-1");this.renderer.setAttribute(e,"aria-hidden","true")}})}togglePlayPauseBtn(){this.toggleBtn=this.document.getElementById("hero-carousel-play-pause"),this.swiper.autoplay.running?(this.swiper.autoplay.stop(),this.toggleBtn.classList.add("play"),this.toggleBtn.classList.remove("pause"),this.toggleBtn.setAttribute("aria-label","play")):(this.swiper.autoplay.start(),this.toggleBtn.classList.add("pause"),this.toggleBtn.classList.remove("play"),this.toggleBtn.setAttribute("aria-label","pause"))}setComponentProperties(t){this.componentData=t,this.uid=t.uid}ngOnDestroy(){this.swiper&&(this.swiper.detachEvents(),this.swiper.destroy()),this.subscriptions$.unsubscribe()}static{this.\u0275fac=function(e){return new(e||i)(s(U),s(q),s(N),s(V),s(H),s(A),s(X),s(Q),s(T))}}static{this.\u0275cmp=D({type:i,selectors:[["app-amor-hero-banner-carousel"]],standalone:!1,decls:1,vars:1,consts:[[1,"amor-container","se-component"],[1,"amor-hero-carousel"],[1,"amor-hero-carousel-container",3,"id"],["role","presentation",1,"carousel-scroll","carousel__ol_viewport",3,"id"],[1,"swiper",3,"ngClass"],[1,"swiper-wrapper"],[1,"swiper-slide"],[1,"amor-hero-carousel-control
1s"],[3,"cxComponentWrapper"],["type","button","aria-label","pause","id","hero-carousel-play-pause",1,"btn-rounded","play-Pause-Btn","pause",3,"click"],[3,"icon"],[1,"navigation"],[1,"btn-rounded","icon","fa-Arrow-Left","prev-btn",3,"ngClass"],[1,"swiper-pagination",3,"ngClass"],[1,"btn-rounded","icon","fa-Arrow-Right","next-btn",3,"ngClass"]],template:function(e,n){e&1&&d(0,oe,9,5,"div",0),e&2&&u(n.heroComponents?0:-1)},dependencies:[W,G,f],encapsulation:2})}};var Y=class i{static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275mod=O({type:i})}static{this.\u0275inj=B({providers:[z({cmsComponents:{AmorHeroBannerCarouselComponent:{component:C}}})],imports:[k,J,f]})}};export{Y as AmorHeroBannerCarouselModule};
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.