1import{b as u,e as y}from"./chunk-ORYG223R.js";import{c as f,d as g}from"./chunk-4SFIQJY6.js";import{a}from"./chunk-6N7EQFEI.js";import{a as T}from"./chunk-D5JDQXU4.js";import{A as m,K as c,da as h,ia as p,p as l}from"./chunk-4ACY4JWQ.js";var U=(()=>{let s=class s{constructor(){this.meta=p(f),this.title=p(g),this.router=p(y),this.translate=p(T),this.baseUrl=a.baseUrl,this.titleSuffix=a.title}activate(){this.sub&&this.sub.unsubscribe(),this.sub=this.router.events.pipe(m(t=>t instanceof u),l(t=>{let e=t.snapshot;for(;e.firstChild!==null;)e=e.firstChild;let{data:i}=e;return i}),c((t,e)=>t?.key===void 0||e?.key===void 0?!1:t.key===e.key)).subscribe(t=>{let e=(i,r)=>{this.setTags({title:i,description:r,titleSuffix:t.titleSuffix??this.titleSuffix,image:t.image,keywords:t.keywords?.join(", ")||""})};if(t.key&&(!t.title||!t.description)){let i=[];!t.title&&t.title!==""&&i.push(`seo.${t.key}.title`),t.description||i.push(`seo.${t.key}.desc`),i.length>0&&this.translate.selectTranslate(i).subscribe(r=>{let[o,d]=r;e(t.title??o??"",t.description??d??"")})}else e(t.title??"",t.description??"")})}deactivate(){this.sub?.unsubscribe()}setTags(t){let e={title:t.title??"",description:t.description,titleSuffix:this.titleSuffix,image:t.image,keywords:t.keywords,url:this.router.url};e?.titleSuffix&&this.setTitle(e.titleSuffix,e.title??""),e?.description&&this.setDescription(e.description),e?.image&&this.setImage(e.image),e?.keywords&&this.setKeywords(e.keywords),e?.url&&this.setUrl(e.url)}setNameTag(t){let{name:e,content:i,itemprop:r=""}=t,o={name:e,content:i,itemprop:r??""};this.meta.getTag(`name="${e}"`)?this.meta.updateTag(o):this.meta.addTag(o)}setNameTags(t){t.forEach(e=>{this.setNameTag(e)})}setPropertyTag(t){let{property:e,content:i,itemprop:r=""}=t,o={property:e,content:i,itemprop:r};this.meta.getTag(`property="${e}"`)?this.meta.updateTag(o):this.meta.addTag(o)}setPropertyTags(t){t.forEach(e=>{this.setPropertyTag(e)})}setUrl(t){this.meta.updateTag({property:"og:url",itemprop:"url",content:`${this.baseUrl}${t}`})}setTitle(t,e){let i=e!==void 0&&e!==""?`${e} - ${t}`:t;this.title.setTitle(i),this.setPropertyTag({property:"og:title",itemprop:"title",content:i}),this.setPropertyTag({property:"twitter:title",itemprop:"title",content:i})}setDescription(t){this.setNameTag({name:"description",itemprop:"description",content:t}),this.setPropertyTag({property:"og:description",itemprop:"description",content:t}),this.setPropertyTag({property:"twitter:description",itemprop:"description",content:t})}setImage(t){this.setPropertyTag({property:"twitter:image",itemprop:"image",content:t}),this.setPropertyTag({property:"og:image",itemprop:"image",content:t}),this.setPropertyTag({property:"og:image:secure_url",itemprop:"image",content:t})}setKeywords(t){this.setNameTag({name:"keywords",itemprop:"keywords",content:t})}};s.\u0275fac=function(e){return new(e||s)},s.\u0275prov=h({token:s,factory:s.\u0275fac,providedIn:"root"});let n=s;return n})();export{U as a};
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.