-
Notifications
You must be signed in to change notification settings - Fork 1
/
src_app_custom-elements_announcement-bar_announcement-bar_module_ts.832088749075f16b.js
2 lines (2 loc) · 1.83 KB
/
src_app_custom-elements_announcement-bar_announcement-bar_module_ts.832088749075f16b.js
1
2
"use strict";(self.webpackChunksite=self.webpackChunksite||[]).push([["src_app_custom-elements_announcement-bar_announcement-bar_module_ts"],{3632:(C,s,o)=>{o.r(s),o.d(s,{AnnouncementBarModule:()=>A});var u=o(3267),i=o(2008),d=o(1455),l=o(4824),f=o(2068),h=o(4788),n=o(5460),p=o(7724);function v(t,c){if(1&t&&(n.I0R(0,"div",1)(1,"div",2),n.wR5(2,"img",3)(3,"p",4),n.I0R(4,"a",5),n.OEk(5,"Learn More"),n.C$Y()()()),2&t){const a=n.GaO();n.yG2(2),n.E7m("src",a.announcement.imageUrl,n.K6U),n.yG2(),n.E7m("innerHTML",a.announcement.message,n.E3n),n.yG2(),n.E7m("href",a.announcement.linkUrl,n.K6U)}}const m=h.y2+"announcements.json";let g=(()=>{var t;class c{constructor(e,r){this.http=e,this.logger=r}ngOnInit(){this.http.get(m).pipe((0,l.a)(e=>(this.logger.error(new Error(`${m} request failed: ${e.message}`)),[])),(0,f.k)(e=>this.findCurrentAnnouncement(e)),(0,l.a)(e=>(this.logger.error(new Error(`${m} contains invalid data: ${e.message}`)),[]))).subscribe(e=>this.announcement=e)}findCurrentAnnouncement(e){return e.filter(r=>new Date(r.startDate).valueOf()<Date.now()).filter(r=>new Date(r.endDate).valueOf()>Date.now())[0]}}return(t=c).\u0275fac=function(e){return new(e||t)(n.GI1(i.KK),n.GI1(p.Y))},t.\u0275cmp=n.In1({type:t,selectors:[["aio-announcement-bar"]],decls:1,vars:1,consts:[["class","homepage-container",4,"ngIf"],[1,"homepage-container"],[1,"announcement-bar"],[3,"src"],[3,"innerHTML"],[1,"button",3,"href"]],template:function(e,r){1&e&&n.yuY(0,v,6,3,"div",0),2&e&&n.E7m("ngIf",r.announcement)},dependencies:[u.u_],encapsulation:2}),c})(),A=(()=>{var t;class c{constructor(){this.customElementComponent=g}}return(t=c).\u0275fac=function(e){return new(e||t)},t.\u0275mod=n.a4G({type:t}),t.\u0275inj=n.s3X({imports:[u.MD,d.k,i.SU]}),c})()}}]);
//# sourceMappingURL=src_app_custom-elements_announcement-bar_announcement-bar_module_ts.832088749075f16b.js.map