PageSourceSearch

https://www.jared.com/scripts/amor-global-banner.module-2ZVYDHOI.js

js jared.com collected 2026-10-04 00:28:16 UTC 14,129 bytes, 1 lines download raw bytes

1import{a as be}from"./chunk-CMHVDQIH.js";import{a as ue}from"./chunk-SMF44L7A.js";import"./chunk-DZCCGFW7.js";import{a as de}from"./chunk-TWA2MPX6.js";import"./chunk-Z6DIW7TH.js";import"./chunk-5FNCQYVJ.js";import"./chunk-JXMTAIBB.js";import"./chunk-LWUUEIQO.js";import"./chunk-ZFUIHNPN.js";import{a as j}from"./chunk-KJIUKXJ4.js";import{u as me}from"./chunk-F2UDG76F.js";import"./chunk-BCT6AZ4D.js";import"./chunk-GBA5HQ3D.js";import"./chunk-L2XAKF7E.js";import"./chunk-ARHQJIEW.js";import"./chunk-J4G6UZTT.js";import{a as pe}from"./chunk-HWMTSDLJ.js";import"./chunk-SCJMMS4R.js";import"./chunk-GLB6FXVW.js";import"./chunk-7YDYSXNF.js";import"./chunk-PLWO6N5B.js";import"./chunk-NYVODJB2.js";import{ej as ce}from"./chunk-JWTTV2TH.js";import"./chunk-HKNOB5YZ.js";import{v as I,wa as le,y as re,za as se}from"./chunk-NGZBGJL5.js";import"./chunk-UBDARBLF.js";import{$c as ae,Aa as E,fa as oe,s as M}from"./chunk-DM3NC7AB.js";import{$b as T,Ac as ee,Ad as z,Bb as H,Bc as m,Cc as r,Dc as l,Ec as h,Ee as L,Fa as Y,Hd as f,Ic as $,Id as g,Jb as o,Jc as N,K as W,Mc as P,Oe as ie,Pc as B,Qa as y,Ra as x,Rc as c,Vb as S,Wb as s,Xa as J,a as D,ac as K,be as ne,dd as te,e as v,ed as b,fd as k,gd as w,hb as _,ta as Z,uc as u,ve as A,w as F,wa as q,wc as d,x as U,yc as Q,zc as X}from"./chunk-WVBH4ZDA.js";import{a as V,b as R}from"./chunk-YDOXD4O3.js";var De=n=>({"text-bold":n}),_e=n=>({"legal-link-modal":n});function Se(n,t){n&1&&(r(0,"span",2),b(1,"|"),l())}function Te(n,t){if(n&1&&(r(0,"span",8),b(1),f(2,"async"),l(),r(3,"span",9),b(4),f(5,"async"),l()),n&2){let e=c(2);o(),w("",g(2,2,e.clockDays$),"\xA0"),o(3),w("",g(5,4,e.clockDaysLabel$),"\xA0:\xA0")}}function Be(n,t){if(n&1&&(r(0,"div",5),u(1,Te,6,6),$(2),r(3,"span",8),b(4),f(5,"async"),l(),r(6,"span",9),b(7),f(8,"async"),l(),N(),$(9),r(10,"span",8),b(11),f(12,"async"),l(),r(13,"span",9),b(14),f(15,"async"),l(),N(),l()),n&2){let e=c();o(),d(e.days>0?1:-1),o(3),k(g(5,5,e.clockHours$)),o(3),w("\xA0",g(8,7,e.clockHoursLabel$),"\xA0"),o(4),w("",g(12,9,e.clockMinutes$),"\xA0"),o(3),k(g(15,11,e.clockMinutesLabel$))}}function ke(n,t){if(n&1&&h(0,"span",7),n&2){let e=c();m("innerHTML",e.sanitizer.bypassSecurityTrustHtml((e.componentDataVariable==null?null:e.componentDataVariable.legalText)??""),H)}}function Ae(n,t){if(n&1&&h(0,"app-amor-modal-trigger",10),n&2){let e=c(2);m("modalLabel",(e.componentDataVariable==null?null:e.componentDataVariable.legalLinkLabel)??"")("modalUrl",(e.componentDataVariable==null?null:e.componentDataVariable.legalUrl)??"")}}function Le(n,t){if(n&1&&(r(0,"cx-generic-link",12),h(1,"span",13),l()),n&2){let e=c(2);te("amor-global-banner-link body-three"),m("url",(e.componentDataVariable==null?null:e.componentDataVariable.legalUrl)??"")("target","_blank")("ariaLabel",e.componentDataVariable.legalLinkLabel+", Opens in a new tab"),o(),m("innerHTML",e.sanitizer.bypassSecurityTrustHtml((e.componentDataVariable==null?null:e.componentDataVariable.legalLinkLabel)??""),H)}}function Me(n,t){if(n&1&&u(0,Ae,1,2,"app-amor-modal-trigger",10)(1,Le,2,6,"cx-generic-link",11),n&2){let e=c();d(e.openLegalLinkAsModal?0:1)}}var O=class n{constructor(t,e,i,a,p,C,ge,He){this.componentData=t;this.sanitizer=e;this.headerService=i;this.ngZone=a;this.minHeightService=p;this.elementRef=C;this.windowRef=ge;this.renderer=He;this.subscriptions$=new D;this.isCountDownTimerCompShown=new v(!1);this.clockMinutesSubject=new v(new Date().getMinutes());this.clockHoursSubject=new v(new Date().getHours());this.clockDaysSubject=new v(new Date().getDay());this.clockMinutes$=this.clockMinutesSubject.asObservable();this.clockHours$=this.clockHoursSubject.asObservable();this.clockDays$=this.clockDaysSubject.asObservable();this.clockDaysLabelSubject=new v("DAYS");this.clockHoursLabelSubject=new v("HOURS");this.clockMinutesLabelSubject=new v("MINUTES");this.clockMinutesLabel$=this.clockMinutesLabelSubject.asObservable();this.clockHoursLabel$=this.clockHoursLabelSubject.asObservable();this.clockDaysLabel$=this.clockDaysLabelSubject.asObservable();this.isTimerSet=!1;this.openLegalLinkAsModal=!1}ngOnInit(){this.isTimerSet=this.componentDataVariable?.addTimer==="true",this.openLegalLinkAsModal=this.componentDataVariable?.isLegalLinkModal==="true",this.initializeCountDownAttributes()}initializeCountDownAttributes(){let t=this.componentDataVariable;this.minHeightService.setMinHeightFromCMS(t,this.elementRef),t?.countDownEndTime&&!this.isDatePast(t)&&!this.isDateFuture(t)?(this.headerService.countdownTimerFound$.next(!0),this.elementRef.nativeElement.classList.add("timer-active"),this.windowRef.isBrowser()&&(this.countDownStartDate=new Date(t.countDownStartTime).getTime(),this.countDownEndDate=new Date(t.countDownEndTime).getTime(),this.componentId=t.uid??"",this.initializeCountDownTimer())):(this.isDatePast(t)||this.isDateFuture(t))&&this.headerService.countdownTimerFound$.next(!1)}isDatePast(t){return new Date(t?.countDownEndTime).getTime()<new Date().getTime()}isDateFuture(t){return t?.countDownStartTime?new Date(t?.countDownStartTime).getTime()>
1new Date().getTime():!1}initializeCountDownTimer(){this.setCurrentTimeinMillis();let t=this.countDownStartDate-this.now;t>0?this.addTimerToStartClock(t):(this.refreshCountDownDisplay(),this.addClockTickTimer())}setCurrentTimeinMillis(){this.now=new Date().getTime()}addTimerToStartClock(t){setTimeout(()=>{this.refreshCountDownDisplay(),this.addClockTickTimer()},t)}refreshCountDownDisplay(){this.setCurrentTimeinMillis();let t=this.countDownEndDate-this.now;t<6e4?(clearInterval(this.tickTimerObj),this.isCountDownTimerCompShown.next(!1)):(this.displayClockLabels(t),this.isCountDownTimerCompShown.next(!0))}addClockTickTimer(){this.ngZone.runOutsideAngular(()=>{this.tickTimerObj=setInterval(()=>{this.refreshCountDownDisplay()},55e3)})}displayClockLabels(t){this.days=Math.floor(t/(1e3*60*60*24)),this.hours=Math.floor(t%(1e3*60*60*24)/(1e3*60*60)),this.minutes=Math.floor(t%(1e3*60*60)/(1e3*60)),this.clockMinutesSubject.next(this.minutes),this.clockHoursSubject.next(this.hours),this.clockDaysSubject.next(this.days),this.clockDaysLabelSubject.next(this.days===1?"DAY":"DAYS"),this.clockHoursLabelSubject.next(this.hours===1?"HR :":"HRS :"),this.clockMinutesLabelSubject.next(this.minutes===1?"MIN":"MINS")}ngOnDestroy(){this.tickTimerObj&&clearInterval(this.tickTimerObj),this.subscriptions$.unsubscribe()}static{this.\u0275fac=function(e){return new(e||n)(s(I),s(M),s(de),s(J),s(pe),s(_),s(E),s(S))}}static{this.\u0275cmp=T({type:n,selectors:[["app-amor-global-content-box"]],inputs:{componentDataVariable:"componentDataVariable"},standalone:!1,decls:11,vars:13,consts:[[1,"amor-global-banner-slide-content"],[1,"amor-global-banner-message","body-two"],[1,"amor-global-banner-divider","body-two"],[1,"amor-global-banner-link","body-two",3,"url"],[1,"amor-global-banner-linktext","body-two",3,"ngClass"],[1,"countdown-timer"],[1,"legal-text-container",3,"ngClass"],[1,"legal-text","body-three",3,"innerHTML"],[1,"body-two"],[1,"body-two","clock-label"],[3,"modalLabel","modalUrl"],[3,"class","url","target","ariaLabel"],[3,"url","target","ariaLabel"],[1,"amor-global-banner-linktext","body-three",3,"innerHTML"]],template:function(e,i){e&1&&(r(0,"div",0)(1,"span",1),b(2),l(),u(3,Se,2,0,"span",2),r(4,"cx-generic-link",3)(5,"span",4),b(6),l()(),u(7,Be,16,13,"div",5),r(8,"div",6),u(9,ke,1,1,"span",7),u(10,Me,2,1),l()()),e&2&&(o(2),k(i.componentDataVariable.promo1Message),o(),d(i.componentDataVariable.promo1LinkText?3:-1),o(),m("url",i.componentDataVariable.promo1Url),o(),m("ngClass",z(9,De,i.componentDataVariable.promo1LinkTextBold==="true")),o(),w(" ",i.componentDataVariable.promo1LinkText),o(),d(i.isTimerSet&&i.days+i.hours+i.minutes>0?7:-1),o(),m("ngClass",z(11,_e,i.openLegalLinkAsModal)),o(),d(i.componentDataVariable!=null&&i.componentDataVariable.legalText?9:-1),o(),d(i.componentDataVariable!=null&&i.componentDataVariable.legalLinkLabel&&(i.componentDataVariable!=null&&i.componentDataVariable.legalUrl)?10:-1))},dependencies:[A,le,ue,L],encapsulation:2})}};function Ie(n,t){n&1&&h(0,"div",4)}function je(n,t){if(n&1){let e=P();r(0,"div",5)(1,"button",8),B("click",function(){y(e);let a=c(2);return x(a.globalBannerTogglePlayPauseBtn())}),h(2,"app-amor-icon",9)(3,"app-amor-icon",9),l(),r(4,"div",10),B("click",function(){y(e);let a=c(2);return x(a.globalBannerNextSlide())})("keydown.enter",function(){y(e);let a=c(2);return x(a.globalBannerNextSlide())}),l()()}if(n&2){let e=c(2);o(2),m("icon","fa-Play-Circle"),o(),m("icon","fa-Pause-Circle"),o(),m("ngClass",e.uid+"-next-button")}}function Oe(n,t){if(n&1&&(r(0,"div",14),h(1,"app-amor-global-content-box",15),l()),n&2){let e=t.$implicit;o(),m("componentDataVariable",e)}}function Ge(n,t){if(n&1&&(r(0,"div",6)(1,"div",11)(2,"div",12)(3,"div",13),X(4,Oe,2,1,"div",14,Q),l()()()()),n&2){let e=c(2);m("ngClass",e.slideCount===1?"single-promo-banner-container":""),o(2),m("ngClass",e.uid?e.uid:""),o(2),ee(e.amorContentBoxes)}}function Ve(n,t){if(n&1){let e=P();r(0,"div",7)(1,"div",16),B("click",function(){y(e);let a=c(2);return x(a.globalBannerNextSlide())})("keydown.enter",function(){y(e);let a=c(2);return x(a.globalBannerNextSlide())}),l()()}if(n&2){let e=c(2);o(),m("ngClass",e.uid+"-next-button")}}function Re(n,t){if(n&1&&(r(0,"div",0)(1,"div",1)(2,"ul",2)(3,"div",3),u(4,Ie,1,0,"div",4),u(5,je,5,3,"div",5),u(6,Ge,6,2,"div",6),u(7,Ve,2,1,"div",7),l()()()()),n&2){let e=c();o(),m("ngClass",e.getBannerBgClass(t.bannerBgColor)),o(3),d(e.slideCount===1?4:-1),o(),d(e.slideCount>
11?5:-1),o(),d(e.amorContentBoxes&&e.amorContentBoxes.length>0?6:-1),o(),d(e.slideCount>1?7:-1)}}var G=class n{constructor(t,e,i,a,p,C,ge){this.componentData=t;this.sanitizer=e;this.elementRef=i;this.renderer=a;this.cmsService=p;this.changeDetect=C;this.winRef=ge;this.subscriptions$=new D;this.amorContentBoxes=[];this.components$=this.componentData.data$.pipe(q(t=>{let e=t;e.uid&&this.setComponentProperties(e)}),Z(t=>{let e=t?.countDownStartTime,i=t?.countDownEndTime;return U((t?.carouselItems??"").split(" ").map(a=>this.cmsService.getComponentData(a).pipe(F(p=>{if(p)return p.flexType||(p=R(V({},p),{flexType:p.typeCode})),R(V({},p),{countDownStartTime:e,countDownEndTime:i})}),W(p=>p!==void 0))))}))}setComponentProperties(t){this.uid=t.uid,this.slideCount=t.carouselItems?t.carouselItems.split(" ").length:0}ngOnInit(){this.subscriptions$.add(this.components$.subscribe(t=>{t&&(this.amorContentBoxes=t,this.changeDetect.detectChanges(),this.winRef.isBrowser()&&this.swiperGlobalBannerConfig())})),this.setTabIndex(!0)}getBannerBgClass(t){return t?.length>0&&ce[t]||""}swiperGlobalBannerConfig(){this.config={slidesPerView:1,direction:"horizontal",allowTouchMove:!0,scrollOnFocus:!1,watchSlidesProgress:!0,autoplay:{delay:6e3,disableOnInteraction:!1,pauseOnMouseEnter:!0},loop:!0,rewind:!1,autoHeight:!1,a11y:{enabled:!0,scrollOnFocus:!1},navigation:{enabled:!0,nextEl:`.${this.uid}-next-button`},on:{slideChange:()=>{this.setTabIndex(!0)}}};let t=`.global-banner-swiper.${this.uid}`;this.swiper=new me(t,this.config),this.setOnFocus(this.swiper)}globalBannerTogglePlayPauseBtn(){let t=this.elementRef.nativeElement.querySelector("#global-banner-playPauseButton");t&&(this.toggleBtn=t,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")))}globalBannerNextSlide(){this.swiper?.slideNext()}setOnFocus(t){this.elementRef.nativeElement.querySelectorAll(".swiper-slide").forEach(i=>{let a=i.getElementsByTagName("a");Array.from(a).forEach(p=>{this.renderer.listen(p,"focus",()=>{this.swiper?.autoplay?.stop()}),this.renderer.listen(p,"blur",()=>{this.toggleBtn.classList.contains("pause")&&this.swiper?.autoplay?.start()})})})}setTabIndex(t){this.elementRef.nativeElement.querySelectorAll(".swiper-slide").forEach(e=>{let i=e.classList.contains("swiper-slide-visible"),a=e.getElementsByTagName("a"),p=e.getElementsByTagName("button");if(i){for(let C of Array.from(a))C.setAttribute("tabindex","0");for(let C of Array.from(p))C.setAttribute("tabindex","0");this.renderer.setAttribute(e,"aria-hidden","false")}else{for(let C of Array.from(a))C.setAttribute("tabindex","-1");for(let C of Array.from(p))C.setAttribute("tabindex","-1");this.renderer.setAttribute(e,"aria-hidden","true")}})}ngOnDestroy(){this.subscriptions$.unsubscribe()}static{this.\u0275fac=function(e){return new(e||n)(s(I),s(M),s(_),s(S),s(ae),s(ne),s(E))}}static{this.\u0275cmp=T({type:n,selectors:[["app-amor-global-banner"]],hostAttrs:["ngSkipHydration","true"],standalone:!1,decls:2,vars:3,consts:[[1,"amor-container","se-component"],[1,"amor-global-banner",3,"ngClass"],["role","presentation",1,"global-banner-carousel-container","carousel-scroll","carousel__ol_viewport"],[1,"global-banner-carousel"],[1,"carousel-indicator"],[1,"carousel-controls"],[1,"multi-promo-banners",3,"ngClass"],[1,"global-banner-mobile-next-btn"],["id","global-banner-playPauseButton","type","button","aria-label","pause",1,"btn-amor","global-banner-playPauseButton","pause",3,"click"],[3,"icon"],["id","nextButton","tabindex","0","aria-label","next","role","button",1,"btn-amor","icon","fa-Arrow-Right","next-btn",3,"click","keydown.enter","ngClass"],[1,"global-banner-mobile"],[1,"swiper","global-banner-swiper",3,"ngClass"],[1,"swiper-wrapper"],[1,"swiper-slide"],[3,"componentDataVariable"],["id","nextButton","tabindex","0","aria-label","next","role","button",1,"btn-amor","icon","fa-Arrow-Right","next-btn-mobile",3,"click","keydown.enter","ngClass"]],template:function(e,i){if(e&1&&(u(0,Re,8,5,"div",0),f(1,"async")),e&2){let a;d((a=g(1,1,i.componentData.data$))?0:-1,a)}},dependencies:[A,j,O,L],encapsulation:2})}};var fe=class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275mod=K({type:n})}static{this.\u0275inj=Y({providers:[oe({cmsComponents:{AmorGlobalBannerComponent:{component:G}}})],imports:[ie,re,j,se,be]})}};export{fe as AmorGlobalBannerModule};

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.