import{l as d,m as f,r as h}from"./chunk-TMLMNYD2.js";import{F as s,ce as o,ja as m,oa as n,t as c,v as p,zd as l}from"./chunk-5GNLCBDT.js";var b=(()=>{class a{title;metaService;doc;constructor(e,i,t){this.title=e,this.metaService=i,this.doc=t}setTags(e,i=!0){if(e){e.forEach(r=>{r.property=="og:title"?(this.metaService.updateTag({property:r.property,content:r.content+" | "+o?.siteParams?.legalName}),this.title.setTitle(r.content+" | "+o?.siteParams?.legalName)):this.metaService.updateTag({property:r.property,content:r.content})}),this.metaService.updateTag({property:"og:url",content:this.doc.URL}),this.metaService.updateTag({property:"og:type",content:"website"}),this.metaService.updateTag({name:"twitter:card",content:"summary"}),o.siteParams?.twitterUser!=null&&this.metaService.updateTag({name:"twitter:site",content:o.siteParams?.twitterUser});let t=this.doc.createElement("link");t.setAttribute("rel","canonical"),this.doc.head.appendChild(t),t.setAttribute("href",this.doc.URL)}}getTags(e,i){e.events.pipe(s(t=>t instanceof h),c(t=>i),c(t=>{for(;t.firstChild;)t=t.firstChild;return t}),s(t=>t.outlet==="primary"),p(t=>t.data)).subscribe(t=>{this.setTags(t.metaTags,!1)})}static \u0275fac=function(i){return new(i||a)(n(f),n(d),n(l))};static \u0275prov=m({token:a,factory:a.\u0275fac,providedIn:"root"})}return a})();export{b as a};
