1import{a as E}from"./chunk-FG7NZ2FO.js";import"./chunk-2HCZWAG7.js";import{a as k}from"./chunk-RSN73FRZ.js";import{a as A}from"./chunk-DF7WOO6L.js";import{d as L,k as F,m as v,u as N}from"./chunk-JXPCPXGO.js";import{f as I,h as D}from"./chunk-SCOLU66M.js";import{e as B}from"./chunk-T4RP7A5Y.js";import"./chunk-XTCFZ3KI.js";import{y as U}from"./chunk-CSDGJEBX.js";import{$b as g,Aa as _,F as S,Fc as w,Gc as T,Pc as C,Tb as h,Vb as u,_b as f,ac as l,bb as P,bc as y,fb as a,ha as o,id as p,l as d,qc as x,wb as O}from"./chunk-57UVUD7B.js";import"./chunk-C6Q5SG76.js";function z(i,t){if(i&1&&(g(0,"span"),w(1),l()),i&2){let e=x();a(),T(e.item().title)}}function H(i,t){if(i&1&&(g(0,"div",3)(1,"div"),y(2,"img",4)(3,"div",5),l()()),i&2){let e=x();a(2),f("alt",C(e.item().imgAlt!==""?e.item().imgAlt:"Blog Sindbad - foto: "+e.item().title))("title",C(e.item().title))("ngSrc",e.imgSrc()!==""?e.imgSrc():"/assets/images/alert.webp"),a(),f("innerHTML",e.html(),P)}}var G=class i{urlGenerator=o(E);router=o(D);languageService=o(N);route=o(I);communicationService=o(A);sr=o(B);metaTagsService=o(k);idFromUrl=p(()=>this.route.snapshot.paramMap.get("id-:title")?.split("-")[0]??"");completeTitleFromUrl=p(()=>this.route.snapshot.paramMap.get("id-:title")??"");item=L(Number(this.idFromUrl())>0?this.communicationService.getBlogDetails({idLanguage:this.languageService.currentLanguage(),idArticle:Number(this.idFromUrl()),isArticle:1}).pipe(S(()=>d(null))):d(null),{initialValue:void 0});imgSrc=p(()=>{let t=this.item()?.imgSrc;return t?t.replace("/images/media/",v.imagesMediaEndPoint+"/"):"/assets/images/alert.webp"});html=p(()=>{if(this.item()){let t=this.item().fullContent.replaceAll("/images/media/",v.imagesMediaEndPoint+"/");return this.sr.bypassSecurityTrustHtml(t)}return null});constructor(){_(()=>{let t=this.item(),e=Number(this.idFromUrl());if(!e||isNaN(e)||e<=0){this.router.navigateByUrl("/404",{skipLocationChange:!0});return}if(t===void 0)return;if(t===null){this.router.navigateByUrl("/404",{skipLocationChange:!0});return}let m=t.summary?.trim()??"",s=m.length>=90?m:t.fullContent??t.title;s=s.replace(/<script[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<style[^>]*>[\s\S]*?<\/style>/gi,"").replace(/<[^>]+>/g,"").replace(/ /g," ").replace(/&/g,"&").replace(/\s+/g," ").trim();let M=160,n=s;if(n.length>M){let r=n.slice(0,M),c=r.lastIndexOf(".");if(c>60)n=r.slice(0,c+1).trim();else{let b=r.lastIndexOf(" ");n=r.slice(0,b>60?b:r.length).trim()+"\u2026"}}if(n.length<40&&t.title&&!n.includes(t.title)&&(n=`${n} \u2014 ${t.title}`.trim()),this.metaTagsService.setArticleMeta(t.title,n,this.imgSrc()),this.metaTagsService.setBlogArticleAlternates(e,t.title),this.languageService.currentLanguage()==="pl"||this.languageService.currentLanguage()==="en"||this.languageService.currentLanguage()==="de"){let r=this.completeTitleFromUrl(),c=`${this.idFromUrl()}-${this.urlGenerator.getTitleLink(t?t.title:"")}`;r!==c&&this.router.navigateByUrl("/404",{skipLocationChange:!0})}else this.idFromUrl()!==this.completeTitleFromUrl()&&this.router.navigateByUrl("/404",{skipLocationChange:!0})})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=O({type:i,selectors:[["app-blog-item"]],decls:6,vars:2,consts:[[1,"col-sm-12"],[1,"mainContentPanel"],["id","top-header",1,"mb-3"],["id","top-content",1,"top-content-blog"],["width","720","height","480",1,"img-fluid",3,"ngSrc","alt","title"],[3,"innerHTML"]],template:function(e,m){e&1&&(g(0,"div",0)(1,"div",1)(2,"header",2)(3,"h1"),h(4,z,2,1,"span"),l()(),h(5,H,4,6,"div",3),l()()),e&2&&(a(4),u(m.item()!==void 0?4:-1),a(),u(m.item()!==void 0?5:-1))},dependencies:[U,F],styles:["[_ngcontent-%COMP%]:root{--grid-breakpoint-xs: 0;--grid-breakpoint-sm: 768px;--grid-breakpoint-md: 1280px;--grid-max-width-xs: 767px;--grid-max-width-sm: 1279px;
1--grid-max-width-md: 1400px;--container-max-width-xs: 720px;--container-max-width-sm: 730px;--container-max-width-md: 1200px}[_nghost-%COMP%] #top-content h1, [_nghost-%COMP%] #top-content h2, [_nghost-%COMP%] #top-content h3, [_nghost-%COMP%] #top-content h4, [_nghost-%COMP%] #top-content p, [_nghost-%COMP%] #top-content font{text-align:justify;margin-bottom:20px}[_nghost-%COMP%] #top-content h1 img, [_nghost-%COMP%] #top-content h2 img, [_nghost-%COMP%] #top-content h3 img, [_nghost-%COMP%] #top-content h4 img, [_nghost-%COMP%] #top-content p img, [_nghost-%COMP%] #top-content font img{margin-left:40px;margin-bottom:20px}[_nghost-%COMP%] #top-content img{max-width:100%}[_nghost-%COMP%] #top-content.top-content-blog img{float:right;margin-left:30px;margin-bottom:15px;max-width:500px}[_nghost-%COMP%] #top-content.top-content-blog, [_nghost-%COMP%] #top-content.top-content-blog div, [_nghost-%COMP%] #top-content.top-content-blog font, [_nghost-%COMP%] #top-content.top-content-blog p, [_nghost-%COMP%] #top-content.top-content-blog font p, [_nghost-%COMP%] #top-content.top-content-blog div p, [_nghost-%COMP%] #top-content.top-content-blog div p b, [_nghost-%COMP%] #top-content.top-content-blog span{font-size:16px!important;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Arial,sans-serif!important;color:#000;text-indent:0!important;line-height:1.5!important;text-align:left!important}[_nghost-%COMP%] #top-content.top-content-blog a{display:inline}img.float-start[_ngcontent-%COMP%]{margin-right:15px} .clearfix{clear:both}@media(min-width:768px)and (max-width:1279px){[_nghost-%COMP%] #top-content.top-content-blog img{max-width:250px;width:250px}}@media(max-width:-1px){[_nghost-%COMP%] #top-content.top-content-blog img{max-width:100%;width:100%;margin-left:0;float:none}}@media(max-width:1279px){[_nghost-%COMP%] #top-content.top-content-blog img{float:right;margin-left:0;margin-bottom:15px;width:100%!important;max-width:720px!important}}"],changeDetection:0})};export{G as BlogItemComponent};
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.