1import{c as L,d as m}from"./chunk-BZVQ2IZU.js";import{a as b}from"./chunk-LH4OPW2Z.js";import{a as T,b as B}from"./chunk-G5636L4A.js";import{F as n,Ia as F,J as s,O as g,V as f,W as S,Wb as O,Yb as p,Zb as h,ia as k,ib as _,nb as D,tc as c,uc as l}from"./chunk-6UVWZF5V.js";var z=(()=>{let t=class t{constructor(){this.eRef=s(S),this.appImgFallback=D.required()}loadFallbackOnError(){let i=this.eRef.nativeElement;i.src=this.appImgFallback()}};t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=k({type:t,selectors:[["img","appImgFallback",""]],hostBindings:function(e,r){e&1&&F("error",function(){return r.loadFallbackOnError()})},inputs:{appImgFallback:[1,"appImgFallback"]}});let a=t;return a})();var y=class{static excerpt(t,o=55){if(!t)return"";if(t.length>o){if(t=t.substring(0,o),t.indexOf(" ")===-1)return t.substring(0,o-3)+"\u2026";let i=t.lastIndexOf(" ");t=t.substring(0,i);let e=t.lastIndexOf(" "),r=t.substring(e,i);for(;r.length<4&&t.indexOf(" ")!==-1;)i=e,t=t.substring(0,i),e=t.lastIndexOf(" "),r=t.substring(e,i);(t.charAt(t.length-1)==="."||t.charAt(t.length-1)===",")&&(t=t.slice(0,-1)),t=t.substring(0,i)+"\u2026"}return t}static attachSeoImages(t,o){return t.seo_image?o.image=t.seo_image.facebook:o.image=h.websiteUrl+"/assets/img/seo/seo-budva.jpg",t.seo_fb_image?o.seo_fb_image_url=t.seo_fb_image.facebook:o.seo_fb_image_url=h.websiteUrl+"/assets/img/seo/seo-budva.jpg",t.seo_tw_image?o.seo_tw_image_url=t.seo_tw_image.twitter:o.seo_tw_image_url=h.websiteUrl+"/assets/img/seo/seo-budva.jpg",o}};var A=class{constructor(t){this.toTransliterate=["title","description","url_label","seo_title","seo_description"],Object.assign(this,t)}},E=(()=>{let t=class t extends c{constructor(){super(...arguments),this.mediaAdapter=s(m),this.mediaAuthorAdapter=s(L),this.categoryAdapter=s(v),this.localeCode=s(_),this.transliterationService=s(l)}adapt(i,e){let r=new A(super.adapt(i));switch(this.localeCode){case"en":r.locale="en";break;case"ru":r.locale="ru";break;case"sr-Cyrl-ME":r.locale="cyr";break;case"sr-Latn-ME":r.locale="me";break}if(r.type=e||"",!r.url){let d="/";p==="en"?d="/en/":p==="ru"?d="/ru/":p==="cyr"&&(d="/cyr/"),r.type==="article"&&(r.url=`${h.websiteUrl}${d}${O[p].articleDetail}/${r.slug}`),r.type==="page"&&(r.url=`${h.websiteUrl}${d}${r.path}`)}return r.seo_image&&(r.seo_image=this.mediaAdapter.adapt({data:r.seo_image})),r.image&&(r.image=this.mediaAdapter.adapt({data:r.image})),r.name&&!r.title&&(r.title=r.name),r.published_at&&(r.publishedAtDate=b.fromSQL(r.published_at,{zone:"UTC"}).toJSDate()),r.seo_description?r.description=r.seo_description:r.description&&r.description.length>160?r.seo_description=r.description.replace(/<\/?[^>]+(>|$)/g,"").substr(0,160):r.seo_description="Budva",r.category&&(r.category=this.categoryAdapter.adapt(r.category)),r.author&&(r.author=this.mediaAuthorAdapter.adapt({data:r.author})),this.transliterationService.transliterate(new A(r))}adaptArray(i,e){return i&&i.data&&i.data.data?i=i.data.data:i&&i.data&&(i=i.data),i.map(r=>this.adapt({data:r},e))}};t.\u0275fac=(()=>{let i;return function(r){return(i||(i=f(t)))(r||t)}})(),t.\u0275prov=n({token:t,factory:t.\u0275fac,providedIn:"root"});let a=t;return a})();var j=class{constructor(t){this.is_adapted=!1,this.toTransliterate=["name","description","custom_cta_label","url_label"],Object.assign(this,t),this.init()}init(){this.slotables||(this.slotables=[]),this.data_source==="article-type"?this.data_source_key="at":this.data_source_key="tags",this.pivot||(this.pivot={})}},$=(()=>{let t=class t extends c{constructor(){super(...arguments),this.mediaAdapter=s(m),this.slotAdapter=s(E),this.transliterationService=s(l)}adapt(i){let e=new j(super.adapt(i));return e.is_adapted?e:(e.slotables&&(e.slotables=this.slotAdapter.adaptArray(e.slotables,e.slot_type)),e.slotables?.length===1&&(e.first_slot=e.slotables[0]),e.image&&(e.image=this.mediaAdapter.adapt(e.image)),e.data_source_object_ids&&typeof e.data_source_object_ids=="string"&&(e.data_source_object_ids=JSON.parse(e.data_source_object_ids)),e.is_adapted=!0,this.transliterationService.transliterate(e))}};t.\u0275fac=(()=>{let i;return function(r){return(i||(i=f(t)))(r||t)}})(),t.\u0275prov=n({token:t,factory:t.\u0275fac,providedIn:"root"});let a=t;return a})(),H=class{constructor(t,o){this.isHighlighted=0,this.modules=t,this.hasFixedWidth=o,this.isHighlighted=this.isModuleHighlighted(t)?1:0}isModuleHighlighted(t){return t.find(o=>o.is_highlighted)}};var I=class{constructor(t){this.is_adapted=!1,this.toTransliterate=["title"],Object.assign(this,t)}},M=(()=>{let t=class t extends c{constructor(){super(...arguments),this.transliterationService=s(l)}adapt(i){let e=new I(super.adapt(i));return e.is_adapted?e:(e.url=e.path,e.is_adapted=!0,this.transliterationService.transliterate(e))}};t.\u0275fac=(()=>{let i;return function(r){return(i||(i=f(t)))(r||t)}})(),t.\u0275prov=n({token:t,factory:t.\u0275fac,providedIn:"root"});let a=t;return a})();var w=class{constructor(t){this.is_adapted=!1,this.toTransliterate=["title","description"],Object.assign(this,t),this.init()}init(){this.locale==="en"?this.url="/en/"+this.path:this.locale==="ru"?this.url="/ru/"+this.path:this.url="/"+this.path,this.modules||(this.modules=[])}getTranslation(t){if(t==="cyr"&&(t="me"),this.locale===t)return this;let o=null;return this.translations&&this.translations.forEach(i=>
1{i.locale===t&&(o=i)}),o}getSeoItem(){let t=this.seo_title?this.seo_title:this.title,o=this.seo_description;!o&&this.description&&(o=this.description.replace(/<\/?[^>]+(>|$)/g,"").substr(0,160));let i=new T({title:t,description:o,seo_fb_title:this.seo_fb_title?this.seo_fb_title:t,seo_fb_description:this.seo_fb_description?this.seo_fb_description:o,seo_fb_type:"website",seo_tw_title:this.seo_tw_title?this.seo_tw_title:t,seo_tw_type:"website",url:B[p]?.url+"/"+(this.path??"")});return y.attachSeoImages(this,i)}isHomepage(){return this.locale==="me"||this.locale==="cyr"?this.path==="pocetna":this.path==="homepage"}},C=(()=>{let t=class t extends c{constructor(){super(),this.mediaAdapter=s(m),this.categoryAdapter=s(v),this.breadcrumbAdapter=s(M),this.injector=s(g),this.locale=s(_),this.transliterationService=s(l)}adapt(i){let e=new w(super.adapt(i));if(e.is_adapted)return e;if(e.modules){let r=this.injector.get($);e.modules=r.adaptArray(e.modules)}return e.category&&(e.category=this.categoryAdapter.adapt(e.category)),e.children&&(e.children=super.adaptArray(e.children),e.first_level_children=e?.children?.filter(r=>r?.level===1),e.first_level_children=e.first_level_children.sort((r,d)=>d.updatedAtDate-r.updatedAtDate)),e.translations&&(e.translations=this.adaptArray(e.translations)),e.seo_image&&(e.seo_image=this.mediaAdapter.adapt(e.seo_image)),e.seo_fb_image&&(e.seo_fb_image=this.mediaAdapter.adapt(e.seo_fb_image)),e.seo_tw_image&&(e.seo_tw_image=this.mediaAdapter.adapt(e.seo_tw_image)),e.breadcrumbs&&(e.breadcrumbs=this.breadcrumbAdapter.adaptArray(e.breadcrumbs)),e.updated_at&&(e.updatedAtDate=b.fromSQL(e.updated_at,{zone:"UTC"}).toJSDate()),e.is_adapted=!0,this.transliterationService.transliterate(e)}};t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n({token:t,factory:t.\u0275fac,providedIn:"root"});let a=t;return a})();var x=class{constructor(t){this.toTransliterate=["name"],Object.assign(this,t)}},v=(()=>{let t=class t extends c{constructor(){super(),this.injector=s(g),this.transliterationService=s(l)}adapt(i){let e=new x(super.adapt(i));return e.parent_category&&(e.parent_category=this.adapt(e.parent_category)),e.page&&(e.page=this.injector.get(C).adapt(e.page)),this.transliterationService.transliterate(e)}};t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n({token:t,factory:t.\u0275fac,providedIn:"root"});let a=t;return a})();export{z as a,y as b,v as c,$ as d,H as e,C as f}; 2/**i18n:815e79ca9ff31b6067af49cc65d5da3c0aea1d08012bd765910c8888bb3980e5*/
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.