sass-template-common 0.10.17 → 0.10.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2057,14 +2057,14 @@ export declare class MainComponentServices {
|
|
|
2057
2057
|
data: Array<Outstanding>;
|
|
2058
2058
|
};
|
|
2059
2059
|
} | undefined>;
|
|
2060
|
-
getNewsListZoneWrapper(section: string, size: number, imagesizes?: string): Promise<AxiosResponse<NewListResponse, any, {}> | undefined>;
|
|
2061
|
-
getNewsDestacadoDiario(section: string): Promise<never[] | AxiosResponse<NewListResponse, any, {}>>;
|
|
2062
|
-
getNewsDestacadoDiarioImage(section: string): Promise<never[] | AxiosResponse<NewListResponse, any, {}>>;
|
|
2063
|
-
getNewsAltoImpacto(section: string): Promise<AxiosResponse<NewListResponse, any, {}> | undefined>;
|
|
2064
|
-
getNewsDestacadoVertical(section: string): Promise<never[] | AxiosResponse<NewListResponse, any, {}>>;
|
|
2065
|
-
getNewsDestacadoHorizontal(section: string): Promise<never[] | AxiosResponse<NewListResponse, any, {}>>;
|
|
2060
|
+
getNewsListZoneWrapper(section: string, zone: string, size: number, imagesizes?: string): Promise<AxiosResponse<NewListResponse, any, {}> | undefined>;
|
|
2061
|
+
getNewsDestacadoDiario(section: string, zone: string): Promise<never[] | AxiosResponse<NewListResponse, any, {}>>;
|
|
2062
|
+
getNewsDestacadoDiarioImage(section: string, zone: string): Promise<never[] | AxiosResponse<NewListResponse, any, {}>>;
|
|
2063
|
+
getNewsAltoImpacto(section: string, zone: string): Promise<AxiosResponse<NewListResponse, any, {}> | undefined>;
|
|
2064
|
+
getNewsDestacadoVertical(section: string, zone: string): Promise<never[] | AxiosResponse<NewListResponse, any, {}>>;
|
|
2065
|
+
getNewsDestacadoHorizontal(section: string, zone: string): Promise<never[] | AxiosResponse<NewListResponse, any, {}>>;
|
|
2066
2066
|
GetByOptions: any;
|
|
2067
|
-
getMainBlockData(params: Params, section?: string): Promise<{
|
|
2067
|
+
getMainBlockData(params: Params, section?: string, zone?: string): Promise<{
|
|
2068
2068
|
section: string;
|
|
2069
2069
|
news: any;
|
|
2070
2070
|
}>;
|
|
@@ -4629,42 +4629,44 @@ class p1 {
|
|
|
4629
4629
|
}
|
|
4630
4630
|
return a();
|
|
4631
4631
|
}
|
|
4632
|
-
getNewsListZoneWrapper(t, n, a) {
|
|
4632
|
+
getNewsListZoneWrapper(t, n, a, r) {
|
|
4633
4633
|
return this.getNewsListZone({
|
|
4634
|
-
zone: "destacadas",
|
|
4635
|
-
size:
|
|
4634
|
+
zone: n || "destacadas",
|
|
4635
|
+
size: a,
|
|
4636
4636
|
onmainpage: t ? "section" : void 0,
|
|
4637
4637
|
section: t,
|
|
4638
4638
|
newstype: this.config.newsType,
|
|
4639
4639
|
exclude: this.exclude,
|
|
4640
|
-
imagesizes:
|
|
4640
|
+
imagesizes: r
|
|
4641
4641
|
});
|
|
4642
4642
|
}
|
|
4643
|
-
async getNewsDestacadoDiario(t) {
|
|
4643
|
+
async getNewsDestacadoDiario(t, n) {
|
|
4644
4644
|
try {
|
|
4645
|
-
const [
|
|
4645
|
+
const [a, r] = await Promise.all([
|
|
4646
4646
|
this.getNewsListZoneWrapper(
|
|
4647
4647
|
t,
|
|
4648
|
+
n,
|
|
4648
4649
|
1,
|
|
4649
4650
|
this.customMainImagesSize || `${this.contract.video.xl}${this.contract.video.lg}`
|
|
4650
4651
|
),
|
|
4651
|
-
this.getNewsListZoneWrapper(t, 5)
|
|
4652
|
+
this.getNewsListZoneWrapper(t, n, 5)
|
|
4652
4653
|
]);
|
|
4653
|
-
return !
|
|
4654
|
-
...
|
|
4655
|
-
...
|
|
4656
|
-
],
|
|
4657
|
-
} catch (
|
|
4654
|
+
return !a?.data?.data || !r?.data?.data ? [] : (a.data.data = [
|
|
4655
|
+
...a.data.data,
|
|
4656
|
+
...r.data.data.slice(1)
|
|
4657
|
+
], a);
|
|
4658
|
+
} catch (a) {
|
|
4658
4659
|
return console.log(
|
|
4659
|
-
`[MainComponentServices.getNewsDestacadoDiario] Error: ${
|
|
4660
|
+
`[MainComponentServices.getNewsDestacadoDiario] Error: ${a?.message}`
|
|
4660
4661
|
), [];
|
|
4661
4662
|
}
|
|
4662
4663
|
}
|
|
4663
|
-
async getNewsDestacadoDiarioImage(t) {
|
|
4664
|
+
async getNewsDestacadoDiarioImage(t, n) {
|
|
4664
4665
|
try {
|
|
4665
|
-
const [
|
|
4666
|
+
const [a, r] = await Promise.all([
|
|
4666
4667
|
this.getNewsListZoneWrapper(
|
|
4667
4668
|
t,
|
|
4669
|
+
n,
|
|
4668
4670
|
1,
|
|
4669
4671
|
// El 2º corte legado 410x590 era valor muerto (fallback siempre
|
|
4670
4672
|
// sobrescrito por customMainImagesSize; plan §4) → borrado.
|
|
@@ -4672,105 +4674,114 @@ class p1 {
|
|
|
4672
4674
|
),
|
|
4673
4675
|
this.getNewsListZoneWrapper(
|
|
4674
4676
|
t,
|
|
4677
|
+
n,
|
|
4675
4678
|
5,
|
|
4676
4679
|
this.contract.note.featuredDiarioImageThumb
|
|
4677
4680
|
)
|
|
4678
4681
|
]);
|
|
4679
|
-
return !
|
|
4680
|
-
...
|
|
4681
|
-
...
|
|
4682
|
-
],
|
|
4683
|
-
} catch (
|
|
4682
|
+
return !a?.data?.data || !r?.data?.data ? [] : (a.data.data = [
|
|
4683
|
+
...a.data.data,
|
|
4684
|
+
...r.data.data.slice(1)
|
|
4685
|
+
], a);
|
|
4686
|
+
} catch (a) {
|
|
4684
4687
|
return console.log(
|
|
4685
|
-
`[MainComponentServices.getNewsDestacadoDiarioImage] Error: ${
|
|
4688
|
+
`[MainComponentServices.getNewsDestacadoDiarioImage] Error: ${a?.message}`
|
|
4686
4689
|
), [];
|
|
4687
4690
|
}
|
|
4688
4691
|
}
|
|
4689
|
-
async getNewsAltoImpacto(t) {
|
|
4692
|
+
async getNewsAltoImpacto(t, n) {
|
|
4690
4693
|
try {
|
|
4691
4694
|
return await this.getNewsListZoneWrapper(
|
|
4692
4695
|
t,
|
|
4696
|
+
n,
|
|
4693
4697
|
1,
|
|
4694
4698
|
`${this.contract.note.gallery}${this.contract.note.featuredSuperSecondary}`
|
|
4695
4699
|
);
|
|
4696
|
-
} catch (
|
|
4700
|
+
} catch (a) {
|
|
4697
4701
|
console.log(
|
|
4698
|
-
`[MainComponentServices.getNewsAltoImpacto] Error: ${
|
|
4702
|
+
`[MainComponentServices.getNewsAltoImpacto] Error: ${a?.message}`
|
|
4699
4703
|
);
|
|
4700
4704
|
return;
|
|
4701
4705
|
}
|
|
4702
4706
|
}
|
|
4703
|
-
async getNewsDestacadoVertical(t) {
|
|
4707
|
+
async getNewsDestacadoVertical(t, n) {
|
|
4704
4708
|
try {
|
|
4705
|
-
const [
|
|
4709
|
+
const [a, r] = await Promise.all([
|
|
4706
4710
|
this.getNewsListZoneWrapper(
|
|
4707
4711
|
t,
|
|
4712
|
+
n,
|
|
4708
4713
|
1,
|
|
4709
4714
|
`${this.contract.note.featuredVerticalPrimary}${this.contract.video.lg}`
|
|
4710
4715
|
),
|
|
4711
4716
|
this.getNewsListZoneWrapper(
|
|
4712
4717
|
t,
|
|
4718
|
+
n,
|
|
4713
4719
|
3,
|
|
4714
4720
|
`${this.contract.video.lg}${this.contract.note.featuredVerticalSecondary}`
|
|
4715
4721
|
)
|
|
4716
4722
|
]);
|
|
4717
|
-
return !
|
|
4718
|
-
...
|
|
4719
|
-
...
|
|
4720
|
-
],
|
|
4721
|
-
} catch (
|
|
4723
|
+
return !a?.data?.data || !r?.data?.data ? [] : (a.data.data = [
|
|
4724
|
+
...a.data.data,
|
|
4725
|
+
...r.data.data.slice(1)
|
|
4726
|
+
], a);
|
|
4727
|
+
} catch (a) {
|
|
4722
4728
|
return console.log(
|
|
4723
|
-
`[MainComponentServices.getNewsDestacadoVertical] Error: ${
|
|
4729
|
+
`[MainComponentServices.getNewsDestacadoVertical] Error: ${a?.message}`
|
|
4724
4730
|
), [];
|
|
4725
4731
|
}
|
|
4726
4732
|
}
|
|
4727
|
-
async getNewsDestacadoHorizontal(t) {
|
|
4733
|
+
async getNewsDestacadoHorizontal(t, n) {
|
|
4728
4734
|
try {
|
|
4729
|
-
const [
|
|
4735
|
+
const [a, r] = await Promise.all([
|
|
4730
4736
|
this.getNewsListZoneWrapper(
|
|
4731
4737
|
t,
|
|
4738
|
+
n,
|
|
4732
4739
|
1,
|
|
4733
4740
|
`${this.contract.note.featuredHorizontalPrimary}${this.contract.video.lg}`
|
|
4734
4741
|
),
|
|
4735
4742
|
this.getNewsListZoneWrapper(
|
|
4736
4743
|
t,
|
|
4744
|
+
n,
|
|
4737
4745
|
3,
|
|
4738
4746
|
this.contract.note.featuredHorizontalSecondary
|
|
4739
4747
|
)
|
|
4740
4748
|
]);
|
|
4741
|
-
return !
|
|
4742
|
-
...
|
|
4743
|
-
...
|
|
4744
|
-
],
|
|
4745
|
-
} catch (
|
|
4749
|
+
return !a?.data?.data || !r?.data?.data ? [] : (a.data.data = [
|
|
4750
|
+
...a.data.data,
|
|
4751
|
+
...r.data.data.slice(1)
|
|
4752
|
+
], a);
|
|
4753
|
+
} catch (a) {
|
|
4746
4754
|
return console.log(
|
|
4747
|
-
`[MainComponentServices.getNewsDestacadoHorizontal] Error: ${
|
|
4755
|
+
`[MainComponentServices.getNewsDestacadoHorizontal] Error: ${a?.message}`
|
|
4748
4756
|
), [];
|
|
4749
4757
|
}
|
|
4750
4758
|
}
|
|
4751
4759
|
GetByOptions = {
|
|
4752
|
-
Diario: (t) => this.getNewsDestacadoDiario(t),
|
|
4753
|
-
"Diario con imagen": (t) => this.getNewsDestacadoDiarioImage(t),
|
|
4754
|
-
Super: (t) => this.getNewsAltoImpacto(t),
|
|
4755
|
-
"3 notas verticales": (t) => this.getNewsDestacadoVertical(t),
|
|
4756
|
-
"3 notas horizontales": (t) => this.getNewsDestacadoHorizontal(t)
|
|
4760
|
+
Diario: (t, n) => this.getNewsDestacadoDiario(t, n),
|
|
4761
|
+
"Diario con imagen": (t, n) => this.getNewsDestacadoDiarioImage(t, n),
|
|
4762
|
+
Super: (t, n) => this.getNewsAltoImpacto(t, n),
|
|
4763
|
+
"3 notas verticales": (t, n) => this.getNewsDestacadoVertical(t, n),
|
|
4764
|
+
"3 notas horizontales": (t, n) => this.getNewsDestacadoHorizontal(t, n)
|
|
4757
4765
|
};
|
|
4758
|
-
async getMainBlockData(t, n) {
|
|
4766
|
+
async getMainBlockData(t, n, a) {
|
|
4759
4767
|
try {
|
|
4760
|
-
const
|
|
4761
|
-
if (!
|
|
4768
|
+
const o = (await this.getOutstandingBlock(t))?.data?.data?.[0]?.value || "";
|
|
4769
|
+
if (!o || !Object.keys(this.GetByOptions).includes(o))
|
|
4762
4770
|
return {
|
|
4763
|
-
section:
|
|
4771
|
+
section: o,
|
|
4764
4772
|
news: []
|
|
4765
4773
|
};
|
|
4766
|
-
const
|
|
4774
|
+
const i = await this.GetByOptions[o](
|
|
4775
|
+
n,
|
|
4776
|
+
a
|
|
4777
|
+
);
|
|
4767
4778
|
return {
|
|
4768
|
-
section:
|
|
4769
|
-
news:
|
|
4779
|
+
section: o,
|
|
4780
|
+
news: i?.data ?? []
|
|
4770
4781
|
};
|
|
4771
|
-
} catch (
|
|
4782
|
+
} catch (r) {
|
|
4772
4783
|
return console.log(
|
|
4773
|
-
`[MainComponentServices.getMainBlockData] Error: ${
|
|
4784
|
+
`[MainComponentServices.getMainBlockData] Error: ${r?.message}`
|
|
4774
4785
|
), {
|
|
4775
4786
|
section: "",
|
|
4776
4787
|
news: []
|
|
@@ -26,7 +26,7 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|
|
26
26
|
font-display: ${a};
|
|
27
27
|
src: url("${t}") format('${n}');
|
|
28
28
|
unicode-range: ${ad};
|
|
29
|
-
}`,od=e=>{try{return new URL(e).origin}catch{return null}},id=({config:e,fontUrl:t,isS3:a})=>{const n=e.fontDisplay??"swap",r=e.fontFormat??"woff2",o=od(t);return s.jsxs(s.Fragment,{children:[o&&!a&&s.jsx("link",{rel:"preconnect",href:o,crossOrigin:"anonymous"}),s.jsx("link",{rel:"preload",as:"font",href:t,type:`font/${r}`,crossOrigin:"anonymous",fetchPriority:"high"}),s.jsx("style",{dangerouslySetInnerHTML:{__html:rd(e,t,n,r)}})]})},Lr=({config:e})=>{const t=e.fontDisplay??"swap",{url:a,isS3:n}=nd(e);return a?s.jsx(id,{config:e,fontUrl:a,isS3:n}):Ur(e.googleFontFamily)?s.jsxs(s.Fragment,{children:[s.jsx("link",{rel:"preconnect",href:"https://fonts.googleapis.com"}),s.jsx("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),s.jsx("link",{rel:"stylesheet",href:`https://fonts.googleapis.com/css2?${e.googleFontFamily}&display=${t}`})]}):null},ha={404:()=>{},home:()=>({"[author_replace]":"","[section_replace]":"home","[tag_replace]":"","[url_replace]":""}),slug:e=>({"[author_replace]":"","[section_replace]":e.pathname==="/index.html"?"home":e.slug??"","[tag_replace]":"","[url_replace]":""}),news:e=>({"[author_replace]":e.currentNew?.authors[0]?.name??"","[section_replace]":e.currentNew?.info?.section?.slug??"","[tag_replace]":Ys(e.currentNew?.keywords),"[url_replace]":hn(e.internalPath??"")}),seccion:e=>({"[author_replace]":"","[section_replace]":e.pathname?.split("/"+e.config?.paths.seccion+"/")[1]??"","[tag_replace]":"","[url_replace]":""}),tema:e=>({"[author_replace]":"","[section_replace]":e.pathname?.split("/"+e.config?.paths.tema+"/")[1]??"","[tag_replace]":"","[url_replace]":""}),"ultimas-noticias":e=>({"[author_replace]":"","[section_replace]":e.config?.paths["ultimas-noticias"]??"","[tag_replace]":"","[url_replace]":""}),video:e=>({"[author_replace]":"","[section_replace]":e.slug,"[tag_replace]":"","[url_replace]":""}),videos:e=>({"[author_replace]":"","[section_replace]":e.pathname?.split("/videos/")[1]??"","[tag_replace]":"","[url_replace]":""}),pages:e=>({"[author_replace]":"","[section_replace]":e.slug??"","[tag_replace]":"","[url_replace]":""}),auth:e=>({"[author_replace]":"","[section_replace]":e.slug??"","[tag_replace]":"","[url_replace]":""}),contacto:e=>({"[author_replace]":"","[section_replace]":e.config?.paths.contacto??"contacto","[tag_replace]":"","[url_replace]":""}),anuncia:e=>({"[author_replace]":"","[section_replace]":e.config?.paths.anuncia??"anuncia","[tag_replace]":"","[url_replace]":""}),buscar:e=>({"[author_replace]":"","[section_replace]":e.config?.paths.buscar??"","[tag_replace]":"","[url_replace]":""}),autor:e=>({"[author_replace]":"","[section_replace]":e.pathname?.split("/"+e.config?.paths.autor+"/")[1]??"","[tag_replace]":"","[url_replace]":""})},Pr=e=>{if(!e)return e??"";if(e.search("/page/")===-1)return e.replace("/","");const t=e.split("/"),a=t.indexOf("page")-1;return a<0?e:(t[a]??"").replace("/","")},xe=e=>{const a=e.replace(/^\/|\/$/g,"").split("/"),n=a.indexOf("page");return n>0?`${a[n-1]??""}`:`${a[a.length-1]??""}`},Or={404:()=>"404",home:()=>"home",slug:e=>xe(e.pathname),news:e=>un(e.pathname)?.slug,seccion:e=>xe(e.pathname),tema:e=>xe(e.pathname),pages:e=>xe(e.pathname),auth:e=>xe(e.pathname),buscar:e=>xe(e.pathname),"ultimas-noticias":e=>xe(e.pathname),anuncia:e=>xe(e.pathname),contacto:e=>xe(e.pathname),autor:e=>xe(e.pathname),video:e=>xe(e.pathname),videos:e=>xe(e.pathname)},Ct=e=>{const t=e.split("/"),a=t[t.length-1]??"1";return Number(a)>0?Number(a):1},ld=(e,t=2)=>{if(!e||e.length===0)return[];const a=[];for(let n=0;n<t;n++){if(!e[n]||!e[n].preview)continue;const r=e[n].preview?.sizes;r&&(r.length>1?a.push({href:r[0]?.url??"",media:"(min-width: 900px)"},{href:r[1]?.url??"",media:"(max-width: 900px)"}):a.push({href:r[0]?.url??""}))}return a},Br=({gpt:e=!1,googleAds:t=!1,syndication:a=!1,adsense:n=!1})=>s.jsxs(s.Fragment,{children:[e&&s.jsx("link",{rel:"preconnect",href:"https://securepubads.g.doubleclick.net",crossOrigin:"anonymous"}),t&&s.jsx("link",{rel:"preconnect",href:"https://googleads.g.doubleclick.net",crossOrigin:"anonymous"}),a&&s.jsx("link",{rel:"preconnect",href:"https://tpc.googlesyndication.com",crossOrigin:"anonymous"}),n&&s.jsx("link",{rel:"dns-prefetch",href:"https://pagead2.googlesyndication.com"})]}),fa=Symbol("bucket-retry-exhausted");class cd{exclude="keywords,gallery,related,relatedexternal,external,customfields";config={};imgSizes={};configVersion=".config";axiosApi=void 0;customMainImagesSize=void 0;contract;constructor(t,a,n,r,o,i){this.config=t,this.imgSizes=a,this.axiosApi=n,this.customMainImagesSize=o,this.contract=kt(i).contract,t.configVersion&&(this.configVersion=t.configVersion),r&&(this.exclude=r)}async getNewsListZone(t){if(this.axiosApi)return this.axiosApi.get("/news-list-zone",{params:t}).catch(a=>(console.log(`[/news-list-zone] Error: ${a.message}`),console.log(a),Promise.reject(a)))}async getOutstandingBlock(t){if(!this.axiosApi)return;const a=this.axiosApi,n=()=>a.get("/config/blocks",{params:{...t,path:this.config.servicePrefix+`/${this.configVersion}/columna_derecha.html`}}).catch(o=>(console.log(`[/config/blocks] Error: ${o.message}`),console.log(o),Promise.reject(o))),r=U().BUCKET_ORIGIN;if(r?.destacado){const o=U().PUBLIC_IS_OFFLINE==="true",i={data:{data:[]}},l=Fe(r,this.config.servicePrefix,"bloques","destacado",o),c=r.referer??ot,d=`origin:destacado:bucket:${l}`,u=await rt(d,()=>gt(()=>yt(r.proxyUrl??r.url,c).get(l),fa,{label:"bucket:destacado",endpoint:l,params:t}),{shouldCache:f=>f!==fa});return u===fa?(Bt("destacado",l),i):u}return n()}getNewsListZoneWrapper(t,a,n){return this.getNewsListZone({zone:"destacadas",size:a,onmainpage:t?"section":void 0,section:t,newstype:this.config.newsType,exclude:this.exclude,imagesizes:n})}async getNewsDestacadoDiario(t){try{const[a,n]=await Promise.all([this.getNewsListZoneWrapper(t,1,this.customMainImagesSize||`${this.contract.video.xl}${this.contract.video.lg}`),this.getNewsListZoneWrapper(t,5)]);return!a?.data?.data||!n?.data?.data?[]:(a.data.data=[...a.data.data,...n.data.data.slice(1)],a)}catch(a){return console.log(`[MainComponentServices.getNewsDestacadoDiario] Error: ${a?.message}`),[]}}async getNewsDestacadoDiarioImage(t){try{const[a,n]=await Promise.all([this.getNewsListZoneWrapper(t,1,this.customMainImagesSize||this.contract.note.itemsListPrimary),this.getNewsListZoneWrapper(t,5,this.contract.note.featuredDiarioImageThumb)]);return!a?.data?.data||!n?.data?.data?[]:(a.data.data=[...a.data.data,...n.data.data.slice(1)],a)}catch(a){return console.log(`[MainComponentServices.getNewsDestacadoDiarioImage] Error: ${a?.message}`),[]}}async getNewsAltoImpacto(t){try{return await this.getNewsListZoneWrapper(t,1,`${this.contract.note.gallery}${this.contract.note.featuredSuperSecondary}`)}catch(a){console.log(`[MainComponentServices.getNewsAltoImpacto] Error: ${a?.message}`);return}}async getNewsDestacadoVertical(t){try{const[a,n]=await Promise.all([this.getNewsListZoneWrapper(t,1,`${this.contract.note.featuredVerticalPrimary}${this.contract.video.lg}`),this.getNewsListZoneWrapper(t,3,`${this.contract.video.lg}${this.contract.note.featuredVerticalSecondary}`)]);return!a?.data?.data||!n?.data?.data?[]:(a.data.data=[...a.data.data,...n.data.data.slice(1)],a)}catch(a){return console.log(`[MainComponentServices.getNewsDestacadoVertical] Error: ${a?.message}`),[]}}async getNewsDestacadoHorizontal(t){try{const[a,n]=await Promise.all([this.getNewsListZoneWrapper(t,1,`${this.contract.note.featuredHorizontalPrimary}${this.contract.video.lg}`),this.getNewsListZoneWrapper(t,3,this.contract.note.featuredHorizontalSecondary)]);return!a?.data?.data||!n?.data?.data?[]:(a.data.data=[...a.data.data,...n.data.data.slice(1)],a)}catch(a){return console.log(`[MainComponentServices.getNewsDestacadoHorizontal] Error: ${a?.message}`),[]}}GetByOptions={Diario:t=>this.getNewsDestacadoDiario(t),"Diario con imagen":t=>this.getNewsDestacadoDiarioImage(t),Super:t=>this.getNewsAltoImpacto(t),"3 notas verticales":t=>this.getNewsDestacadoVertical(t),"3 notas horizontales":t=>this.getNewsDestacadoHorizontal(t)};async getMainBlockData(t,a){try{const r=(await this.getOutstandingBlock(t))?.data.data[0]?.value||"";if(!r||!Object.keys(this.GetByOptions).includes(r))return{section:r,news:[]};const o=await this.GetByOptions[r](a);return{section:r,news:o.data}}catch(n){return console.log(`[MainComponentServices.getMainBlockData] Error: ${n?.message}`),{section:"",news:[]}}}}const vt=Symbol("bucket-retry-exhausted");class He{constructor(t){this.props=t,this.contract=kt(t?.imageSizes).contract,t?.config?.configVersion&&(this.configVersion=t.config.configVersion),t?.exclude&&(this.exclude=t.exclude)}configVersion=".config";exclude="keywords,gallery,related,relatedexternal,external,customfields";contract;generateTokenOffline=async t=>{const{PUBLIC_IS_OFFLINE:a,PUBLIC_USERNAME_OFFLINE:n,PUBLIC_PASSWORD_OFFLINE:r}=U();if(a==="true")try{return(await this.props?.axiosApi.get("/auth",{params:{username:n,password:r,browserid:t}}).catch(i=>(console.log(`[/auth]Error: ${i.message}`),Promise.reject(i))))?.data.data[0]?.token}catch(o){console.log(`[/auth] Error: ${o.message}`),console.log(o)}};getEntitySection=t=>this.props?.axiosApi.get("/entity-section",{params:t}).catch(a=>(console.log(`[/entity-section] Error: ${a.message}`),Promise.reject(a)));getMainMenu=async t=>{const a=U().BUCKET_ORIGIN,n={data:{data:[]}},r=()=>this.props.axiosApi.get("/config/menu",{params:t}).catch(i=>(console.log(`[/config/menu] Error: ${i.message}`),be.add({service:"CommonServices.getMainMenu",endpoint:"/config/menu",method:"GET",params:t,message:i.message,status:i.response?.status,layer:"axios-service"}),n));if(a?.menu){const i=U().PUBLIC_IS_OFFLINE==="true",l=hs(t.path),c=Fe(a,this.props?.config?.servicePrefix,"menu",l,i),d=a.referer??ot,u=`origin:menu:bucket:${c}`,f=await rt(u,()=>gt(()=>yt(a.proxyUrl??a.url,d).get(c),vt,{label:"bucket:menu",endpoint:c,params:t}),{shouldCache:h=>h!==vt});return f===vt?(Bt("menu",c),n):f}const o=`origin:menu:api:${t.path??""}`;return rt(o,()=>r())};getNewsListZone=t=>this.props?.axiosApi.get("/news-list-zone",{params:t}).catch(a=>(console.log(`[/news-list-zone] Error: ${a.message}`),Promise.reject(a)));getNewsListZoneSection=t=>this.props?.axiosApi.get("/news-list-zone-section",{params:t}).catch(a=>(console.log(`[/news-list-zone-section] Error: ${a.message}`),Promise.reject(a)));getNewsList=t=>this.props?.axiosApi.get("/news-list",{params:t}).catch(a=>(console.log(`[/news-list] Error: ${a.message}`),Promise.reject(a)));getNewsListTag=t=>this.props?.axiosApi.get("/news-list-tag",{params:t}).catch(a=>(console.log(`[/news-list-tag] Error: ${a.message}`),Promise.reject(a)));getNewsListSection=t=>this.props?.axiosApi.get("/news-list-section",{params:t}).catch(a=>(console.log(`[/news-list-section] Error: ${a}`),console.log(`[/news-list-section] Error: ${a.message}`),Promise.reject(a)));getNewsListAvanced=t=>this.props?.axiosApi.get("/news-list-advanced",{params:t}).catch(a=>(console.log(`[/news-list-advanced] Error: ${a.message}`),Promise.reject(a)));getNewsListTags=t=>this.props?.axiosApi.get("/news-list-tag",{params:t}).catch(a=>(console.log(`[/news-list-tag] Error: ${a.message}`),Promise.reject(a)));getNewsListTagEntity=t=>this.props?.axiosApi.get("/news-list-tag-entity",{params:t}).catch(a=>(console.log(`[/news-list-tag-entity] Error: ${a.message}`),Promise.reject(a)));getNewsListTagLite=t=>this.props?.axiosApi.get("/news-list-tag-lite",{params:t}).catch(a=>(console.log(`[/news-list-tag-lite] Error: ${a.message}`),Promise.reject(a)));getNewsListAutor=t=>this.props?.axiosApi.get("/news-list-author",{params:t}).catch(a=>(console.log(`[/news-list-author] Error: ${a.message}`),Promise.reject(a)));getNewsSearch=t=>this.props?.axiosApi.get("/news-list-search",{params:t}).catch(a=>(console.log(`[/news-list-search] Error: ${a.message}`),Promise.reject(a)));getAutorInfo=t=>this.props?.axiosApi.get("/authors",{params:t}).catch(a=>(console.log(`[/authors] Error: ${a.message}`),Promise.reject(a)));getvideoListAdvanced=t=>this.props?.axiosApi.get("/videos-list-advanced",{params:t}).catch(a=>(console.log(`[/videos-list-advanced] Error: ${a.message}`),Promise.reject(a)));getVideos=t=>this.props?.axiosApi.get("/videos",{params:t}).catch(a=>(console.log(`[/videos] Error: ${a.message}`),Promise.reject(a)));getVideosList=t=>this.props?.axiosApi.get("/videos-list",{params:t}).catch(a=>(console.log(`[/videos-list] Error: ${a.message}`),Promise.reject(a)));getBanners=async t=>{const a=U().BUCKET_ORIGIN,n={data:{data:[]}},r=()=>{const c=t.path?t.path:`/${this.configVersion}/banners.html`;return this.props.axiosApi.get("/config/banners",{params:{...t,path:this.props?.config?.servicePrefix+c}}).catch(d=>(console.log(`[/config/banners] Error: ${d.message}`),be.add({service:"CommonServices.getBanners",endpoint:"/config/banners",method:"GET",params:t,message:d.message,status:d.response?.status,layer:"axios-service"}),n))};if(a?.banners){const c=U().PUBLIC_IS_OFFLINE==="true",d=(t.template??"").toLowerCase(),u=Fe(a,this.props?.config?.servicePrefix,"banners",d,c),f=a.referer??ot,h=`origin:banners:bucket:${u}`,g=await rt(h,()=>gt(()=>yt(a.proxyUrl??a.url,f).get(u),vt,{label:"bucket:banners",endpoint:u,params:t}),{shouldCache:m=>m!==vt});return g===vt?(Bt("banners",u),n):g}const o=t.path?t.path:`/${this.configVersion}/banners.html`,l=`origin:banners:api:${`${this.props?.config?.servicePrefix??""}${o}`}:${t.template??""}`;return rt(l,()=>r())};getPages=t=>this.props?.axiosApi.get("/config/pages",{params:t}).catch(a=>(console.log(`[/config/pages] Error: ${a.message}`),Promise.reject(a)));getRankingS3=async(t,a={Referer:ot})=>!t||t===""?{data:[]}:gt(()=>re.get(t,{headers:a}),{data:[]},{label:"bucket:ranking",endpoint:t});getNews=t=>this.props?.axiosApi.get("/news",{params:{...t,exclude:`${t.exclude},pixel`}}).catch(a=>(console.log(`[/news] Error: ${a.message}`),Promise.reject(a)));getNewsMultimedia=t=>this.props?.axiosApi.get("/news-items-multimedia",{params:t}).catch(a=>(console.log(`[/news-items-multimedia] Error: ${a.message}`),Promise.reject(a)));getNewsItemsList=t=>this.props?.axiosApi.get("/news-items-list",{params:t}).catch(a=>(console.log(`[/news-items-list] Error: ${a.message}`),Promise.reject(a)));getNewsListPath=t=>this.props?.axiosApi.get("/news-list-paths",{params:t}).catch(a=>(console.log(`[/news-list-paths] Error: ${a.message}`),Promise.reject(a)));getNewsSchemasImages=t=>this.props?.axiosApi.get("/schemas/news-images",{params:t}).catch(a=>(console.log(`[/schemas/news-images] Error: ${a.message}`),Promise.reject(a)));getNewsItemsRelated=(t,a)=>this.props?.axiosApi.get("/news-items-related",{params:{path:t,imagesizes:this.contract.note.listStandard,exclude:this.exclude,...a}}).catch(n=>(console.log(`[/news-items-related] Error: ${n.message}`),{data:bn()}));sendEmail=t=>this.props?.axiosApi.post("/send/email",t,{headers:{"Content-Type":"application/x-www-form-urlencoded",Cookie:"JSESSIONID=21FDC2B9C2782893562BC53D52981A0B"}}).catch(a=>(console.log(`[/send/email] Error: ${a.message}`),Promise.reject(a)));searchData=async t=>{const a=await this.getNewsSearch(t);return a&&a?.data.data&&a?.data.data.length>0?{search:a}:{lastNews:await this.getNewsList(t)}};commonNewsServices=async(t,a={getNews:`${this.contract.note.detailMain}${this.contract.note.detailSecondary}`,getNewsItemsList:`${this.contract.note.itemsListPrimary}${this.contract.note.detailSecondary}`,getAutorInfo:`${this.contract.author.avatar}`,getNewsItemsRelated:`${this.contract.note.relatedPrimary}${this.contract.note.relatedThumb}`},n={getNewsItemsRelated:"config,keywords,authors,body,related,relatedexternal,social,external,hascontent,customfields,pixel",getAutorInfo:"groups"})=>{const[r,o]=await Promise.allSettled([this.getNews({imagesizes:a.getNews,path:t}),this.getNewsItemsList({path:t,imagesizes:a.getNewsItemsList})]),i=Je(r)?.data,l=i?.[0];let c=[];l?.authors?.length===1&&l?.config?.showauthor&&l.authors[0]?.internaluser&&(c=(await this.getAutorInfo({user:l.authors[0].name,exclude:n.getAutorInfo,imagesizes:a.getAutorInfo}))?.data.data??[]);const d=es(l),f=(Je(o)?.data??[])[0]?.list?.items?.map(b=>es(b)),h=[];f?.forEach(b=>{b&&b.length>0&&b.forEach(C=>{C.forEach(S=>{const v=this.getNews({path:S.replaceAll("|","/"),imagesizes:a.getNewsItemsRelated,exclude:n.getNewsItemsRelated});v&&h.push(v)})})});const m=(await Promise.allSettled([...h])).map(b=>Je(b)?.data),p=await on(d,this.getNews,`${this.contract.note.relatedPrimary}${this.contract.note.relatedThumb}`);let w=[];try{w=(await this.getNewsSchemasImages({path:t}))?.data?.data??[]}catch(b){console.warn("getNewsSchemasImages failed:",b),w=[]}return{news:i??[],autor:c,newsRelatedResponses:p,itemList:Je(o)?.data??[],newsRelatedListResponses:m,schemasImages:w??[]}}}class Mr extends He{MULTIPUBLICATION_FETCHES;PUBLIC_PUBLICATION_ID;IS_MULTIPUBLICATION;constructor(t){super(t);const{MULTIPUBLICATION_FETCHES:a,PUBLIC_PUBLICATION_ID:n}=U();this.MULTIPUBLICATION_FETCHES=a,this.PUBLIC_PUBLICATION_ID=n,this.IS_MULTIPUBLICATION=a!=null&&a!==""||n!=null&&n!==""}getBlockSass=async t=>{const a=await this.props?.axiosApi.get("/config/blocks-saas",{params:{...t,exclude:this.exclude,path:this.props?.config?.servicePrefix+`/${this.configVersion}/columna_derecha.html`}}).catch(n=>(console.log(`[/config/blocks-saas] Error: ${n.message}`),Promise.reject(n)));return this.resolveSlotContent(a?.data?.data)};resolveSlotContent=async t=>{if(!t||t.length===0||!t[0]?.value||!t[0].block||!this.props?.imgSizes[t[0].block])return{blockSass:t};const a=t[0],n=a?.value.split("="),r=n[0]??"",o=n[1]??"",i=a?.block,l={videos:async()=>{const c={size:this.props?.imgSizes[i].size??5,imagesizes:`${this.contract.video.lg}${this.contract.video.md}`,query:"Keywords:("+(o??"videohome")+")"};this.IS_MULTIPUBLICATION&&(c.publication=this.MULTIPUBLICATION_FETCHES??this.PUBLIC_PUBLICATION_ID);try{const d=await this.getvideoListAdvanced(c);return{blockSass:t,content:d?d.data:void 0}}catch(d){return console.log(`[/videos-list-advanced] Error: ${d?.message}`),{blockSass:t,content:void 0}}},tag:async()=>{const{USE_QUOTE_IN_QUERY_TAG_HOME:c}=U(),d={query:c?'claves:("'+o+'")':"claves:("+o+")",size:this.props?.imgSizes[i]?.size??3,newstype:this.props?.config?.newsType,exclude:this.exclude,imagesizes:this.props?.imgSizes[i]?.imageSizes};this.IS_MULTIPUBLICATION&&(d.publication=this.MULTIPUBLICATION_FETCHES??this.PUBLIC_PUBLICATION_ID);try{const u=await this.getNewsListAvanced(d);return{blockSass:t,content:u?u.data:void 0}}catch(u){return console.log(`[/news-list-advanced] Error: ${u?.message}`),{blockSass:t,content:void 0}}},seccion:async()=>{const c={query:`seccion:(${o})`,size:this.props?.imgSizes[i]?.size??3,newstype:this.props?.config?.newsType,exclude:this.exclude,imagesizes:this.props?.imgSizes[i]?.imageSizes};this.IS_MULTIPUBLICATION&&(c.publication=this.MULTIPUBLICATION_FETCHES??this.PUBLIC_PUBLICATION_ID);try{const d=await this.getNewsListAvanced(c);return{blockSass:t,content:d?d.data:void 0}}catch(d){return console.log(`[/news-list-advanced] Error: ${d?.message}`),{blockSass:t,content:void 0}}}};if(r in l){const c=l[r];return await c()}return{blockSass:t}}}class dd{issuuApi="https://api.issuu.com/v2";api=void 0;q="";constructor(t){this.q=t.q,this.api=re.create({baseURL:t.issuuApi?t.issuuApi:this.issuuApi,params:{state:t.state?t.state:"PUBLISHED",size:t.size?t.size:16,q:t.q},headers:{Authorization:`Bearer ${t.token}`}})}async getListIssuuPublications({page:t=1}){try{return await this.api?.get("/publications",{params:{q:this.q,page:t}})}catch(a){throw a}}async getListIssuuPublicationBySlug(t){try{return await this.api?.get(`/publications/${t}/embed`)}catch(a){throw a}}}const ma=Symbol("bucket-retry-exhausted"),ud=async(e,t)=>{const a=U().BUCKET_ORIGIN;if(!a)return{};const n=U().PUBLIC_IS_OFFLINE==="true",r=Fe(a,t.servicePrefix,"bloques","modulos-dinamicos",n),o=a.referer??ot,i=`origin:slots:bucket:${r}`,l=await rt(i,()=>gt(()=>yt(a.proxyUrl??a.url,o).get(r),ma,{label:"bucket:slots",endpoint:r,params:{}}),{shouldCache:u=>u!==ma});if(l===ma)return Bt("slots",r),{};const c=l.data?.data??[],d={};return await Promise.all(c.map(async u=>{u?.key&&(d[u.key]=await e.resolveSlotContent([u]))})),d},hd=async(e,t,a,n,r,o,i)=>{const l=new Mr({config:t,imgSizes:a,imageSizes:n,axiosApi:e,exclude:i}),c=async()=>{const d=[];for(let h=1;h<=r;h++)for(let g=1;g<=o;g++)d.push({func:l.getBlockSass,slot_id:h+"_"+g});const u=await Promise.allSettled([...d.map(h=>h.func({template:"Home_"+h.slot_id}))]),f={};for(let h=0;h<u.length;h++){const g=sn(u[h]),m="Home_"+(Math.floor(h/o)+1)+"_"+(Math.floor(h%o)+1);g&&(f[m]={...g})}return f};return U().BUCKET_ORIGIN?.slots?ud(l,t):c()},fd=e=>{const t=Je(e);return t&&t.data?t.data:t},md=async e=>{const t=await Promise.allSettled(Object.values(e).map(r=>{const o=r.promise??Promise.resolve(void 0);return o.catch(()=>{}),o})),a=Object.keys(e),n={};for(const r in e){const o=e[r];if(!o)continue;const i=o.custom_extractData??fd;n[r]=i(t[a.indexOf(r)])}return n},me=e=>({title:e.title,description:e.description}),_r=(e="")=>e.replace(/-/g," ").replace(/^./,t=>t.toUpperCase()),jt=e=>e.includes("/page/")?e.replace(/\/page\/\d+$/,""):e,pe=e=>{try{const t=de();if(!t)return e;const a=new URL(e),n=a.pathname;return n===t||n.startsWith(`${t}/`)?e:a.origin+t+e.slice(a.origin.length)}catch{return e}},Pe=(e,t,a,n)=>{const r=pe(t),o={...a?{title:a}:{},...n?{description:n}:{}};return{alternates:{...e.alternates,canonical:r},openGraph:{...e.openGraph,url:r,...o},twitter:{...e.twitter,url:r,...o}}},Dr={404:e=>{const{meta:t}=e;return me(t)},home:e=>{const{meta:t,config:a}=e;return{...t,...Pe(t,a.siteUrl,t.title)}},slug:e=>{const{meta:t,config:a,slug:n,pathname:r}=e,o=`${a.name} | ${_r(n)}`;return{...t,title:o,...Pe(t,a.siteUrl+r,o)}},auth:e=>{const{meta:t,config:a,slug:n,pathname:r}=e,o=`${a.name} | ${_r(n)}`;return{...t,title:o,...Pe(t,a.siteUrl+r,o)}},news:e=>{const{meta:t,config:a,currentNew:n,schemasImages:r}=e;if(!n)return me(t);const o=dn(t,n,a,r);return o?{...t,...o}:me(t)},seccion:async e=>{const{meta:t,config:a,pathname:n,slug:r,axiosApi:o,meta_info:i}=e,{CONFIG_sectionMetaInfo:l,PUBLIC_LNG:c}=U(),u=jt(n).split("/"),f=[],h=Ct(n),g=Number(a.newsListLimit)||0,m=c==="en";if(l&&i)return i.next&&f.push({rel:"next",url:Re(a,u,h)}),h>1&&f.push({rel:"prev",url:et(a,u,h)}),{...t,title:i.title,alternates:{...t.alternates,canonical:pe(a.siteUrl+n)},manifest:a.manifest,icons:{...a.icons,other:f},other:{"msapplication-TileImage":a.msapplicationTileImage??""},openGraph:{...t.openGraph,title:i.title,type:"website",url:pe(`${a.siteUrl}${n}`)},twitter:{...t.twitter,card:"summary_large_image",title:i.title,domain:new URL(a.siteUrl).hostname,url:pe(`${a.siteUrl}${n}`)}};const p=new He({config:a,axiosApi:o});try{let w,b;if(Js("seccion")){const A=await pn({fetchFn:x=>p.getNewsListSection(x),baseParams:{section:r,newstype:a.newsType,exclude:"keywords,gallery,related,relatedexternal,external,customfields"},userPage:h,newsListLimit:g});w=A.data,b=A.hasNextPage}else{const A=await p.getNewsListSection({section:r,size:g,newstype:a.newsType,exclude:"keywords,gallery,related,relatedexternal,external,customfields",page:h});if(!A)return me(t);w=A.data.data,b=!(w.length<g)}const C=w[0];b&&f.push({rel:"next",url:Re(a,u,h)}),h>1&&f.push({rel:"prev",url:et(a,u,h)});const S=m?`Latest News from ${C.info.section?.name} | ${a.name}`:`Últimas Noticias de ${C.info.section?.name} | ${a.name}`,v=m?`All the latest news from ${C.info.section?.name} on ${a.name}`:`Todas las últimas noticias de ${C.info.section?.name} en ${a.name}`;return{...t,title:S,description:v,alternates:{...t.alternates,canonical:pe(a.siteUrl+n)},manifest:a.manifest,icons:{...a.icons,other:f},other:{"msapplication-TileImage":a.msapplicationTileImage??""},openGraph:{...t.openGraph,title:S,description:v,type:"website",url:pe(`${a.siteUrl}${n}`),locale:t.openGraph.locale},twitter:{...t.twitter,card:"summary_large_image",title:S,description:v,site:t.twitter.site,domain:new URL(a.siteUrl).hostname,url:pe(`${a.siteUrl}${n}`)}}}catch(w){return console.error(w),me(t)}},tema:async e=>{const{meta:t,config:a,pathname:n,slug:r,axiosApi:o}=e,i=new He({config:a,axiosApi:o}),c=jt(n).split("/"),d=[],u=Ct(n),f=Number(a.newsListLimit)||0,h=/([t][0-9]{4})\w+/.exec(r||""),g=h&&h?.length>0?h[0].replace("t",""):"",{PUBLIC_TAG_TYPE:m,PUBLIC_LNG:p}=U(),w=p==="en";try{const b=await i.getNewsListTags({tagid:g,size:f,tagtype:Number(m),newstype:a.newsType,exclude:"keywords,gallery,related,relatedexternal,external,customfields",page:u});if(!b)return me(t);const C=b.data.entity;if(!C)return me(t);b.data.data?.length<f||d.push({rel:"next",url:Re(a,c,u)}),u>1&&d.push({rel:"prev",url:et(a,c,u)});const S=w?`Latest news about ${C.name} | ${a.name}`:`Últimas noticias de ${C.name} | ${a.name}`,v=w?`The latest news about ${C.name} on ${a.name}`:`Las últimas noticias sobre ${C.name} en ${a.name}`;return{...t,title:S,description:v,alternates:{...t.alternates,canonical:pe(a.siteUrl+n)},manifest:a.manifest,icons:{...a.icons,other:d},other:{"msapplication-TileImage":a.msapplicationTileImage??""},openGraph:{...t.openGraph,title:S,description:v,type:"website",url:pe(`${a.siteUrl}${n}`),locale:t.openGraph.locale},twitter:{...t.twitter,card:"summary_large_image",title:S,description:v,site:t.twitter.site,domain:new URL(a.siteUrl).hostname,url:pe(`${a.siteUrl}${n}`)}}}catch(b){return console.error(b),me(t)}},"ultimas-noticias":async e=>{const{meta:t,config:a,pathname:n,texts:r,axiosApi:o}=e,i=new He({config:a,axiosApi:o}),c=jt(n).split("/"),d=[],u=Ct(n),f=Number(a.newsListLimit)||0,h=`${a.name} | ${r.lastNotesTitle}`,g={...t,title:h,...Pe(t,a.siteUrl+"/"+a.paths["ultimas-noticias"],h)};if(!o)return g;try{const m=await i.getNewsList({size:f,newstype:a.newsType,exclude:"keywords,gallery,related,relatedexternal,external,customfields",page:u});return m?(m.data.data.length<f||d.push({rel:"next",url:Re(a,c,u)}),u>1&&d.push({rel:"prev",url:et(a,c,u)}),{...t,title:h,...Pe(t,a.siteUrl+n,h),manifest:a.manifest,icons:{...a.icons,other:d},other:{"msapplication-TileImage":a.msapplicationTileImage??""}}):g}catch(m){return console.error(m),g}},video:async e=>{const{meta:t,config:a,internalPath:n,axiosApi:r}=e,o=new He({config:a,axiosApi:r});try{const i=await o.getVideos({imagesizes:o.contract.og.social,path:n});return i?.data?.data?.length?{...t,...vn(t,i.data.data[0],a)??{}}:me(t)}catch(i){return console.error("metadata (video) error:",i),me(t)}},videos:async e=>{const{meta:t,config:a,pathname:n,axiosApi:r}=e,o=new He({config:a,axiosApi:r}),l=jt(n).split("/"),c=[],d=Ct(n),u=Number(a.newsListLimit)||0;try{const f=await o.getvideoListAdvanced({size:u,query:"Category:(videohome OR destacadoseccion OR seccion)",page:Number(d)});if(!f)return me(t);f.data.data.length<u||c.push({rel:"next",url:Re(a,l,d)}),d>1&&c.push({rel:"prev",url:et(a,l,d)});const h="Videos | "+a.name;return{...t,title:h,...Pe(t,a.siteUrl+n,h),manifest:a.manifest,icons:{...a.icons,other:c},other:{"msapplication-TileImage":a.msapplicationTileImage??""}}}catch(f){return console.error(f),me(t)}},pages:async(e,t)=>{const{meta:a,config:n,pathname:r,slug:o,axiosApi:i}=e,l=new He({config:n,axiosApi:i});try{const c=await l.getPages({path:t||n.servicePrefix+`/pages/${o}`});if(!c)return me(a);const d=c.data.data[0]?.info.title??"",u=`${n.name} | ${d}`;return{...a,title:u,...Pe(a,n.siteUrl+r,u)}}catch(c){return console.error(c),me(a)}},contacto:e=>{const{meta:t,config:a,pathname:n}=e,r=U().PUBLIC_LNG==="en",o=`${a.name} | ${r?"Contact":"Contacto"}`;return{...t,title:o,...Pe(t,a.siteUrl+n,o)}},anuncia:e=>{const{meta:t,config:a,pathname:n}=e,r=U().PUBLIC_LNG==="en",o=`${a.name} | ${r?"Advertise":"Anuncia"}`;return{...t,title:o,...Pe(t,a.siteUrl+n,o)}},buscar:e=>{const{meta:t,config:a,pathname:n,query:r,texts:o}=e;if(r&&r.trim()!==""){const i=`${a.name} | ${`${o.resultsOfPrefix}'${r}'`}`;return{...t,title:i,alternates:{...t.alternates,canonical:pe(a.siteUrl+n+(r?"?query="+r:""))},openGraph:{...t.openGraph,title:i,type:"website",url:pe(`${a.siteUrl}${n}${r?"?query="+r:""}`)},twitter:{...t.twitter,card:"summary_large_image",title:i,domain:new URL(a.siteUrl).hostname,url:pe(`${a.siteUrl}${n}${r?"?query="+r:""}`)}}}else{const i=`${a.name} | ${o.searchKeyWord}`;return{...t,title:i,alternates:{...t.alternates,canonical:pe(a.siteUrl+n+(r?"?query="+r:""))},openGraph:{...t.openGraph,title:i,type:"website",url:pe(`${a.siteUrl}${n}`)},twitter:{...t.twitter,card:"summary_large_image",title:i,domain:new URL(a.siteUrl).hostname,url:pe(`${a.siteUrl}${n}`)}}}},autor:async e=>{const{meta:t,config:a,pathname:n,slug:r,axiosApi:o}=e,i=new He({config:a,axiosApi:o}),c=jt(n).split("/"),d=[],u=Ct(n),f=U().PUBLIC_LNG==="en",h=Number(a.newsListLimit)||0;try{const g=await i.getAutorInfo({user:r,exclude:"groups",imagesizes:i.contract.author.avatar}),m=await i.getNewsListAutor({size:h,user:r,page:u,newstype:a.newsType,exclude:"keywords,gallery,related,relatedexternal,external,customfields",imagesizes:i.contract.note.listStandard});if(!m)return me(t);m.data.data.length<h||d.push({rel:"next",url:Re(a,c,u)}),u>1&&d.push({rel:"prev",url:et(a,c,u)});const p=g?.data.data[0]?.info.fullname,w=f?`Latest News from ${p} | ${a.name}`:`Últimas Noticias de ${p} | ${a.name}`,b=f?`All the latest news from ${p} on ${a.name}`:`Todas las últimas noticias de ${p} en ${a.name}`;return{...t,title:w,description:b,...Pe(t,a.siteUrl+n,w,b),manifest:a.manifest,icons:{...a.icons,other:d},other:{"msapplication-TileImage":a.msapplicationTileImage??""}}}catch(g){return console.error(g),me(t)}}},pd=e=>e?e.replace(/<[^>]*>/g,"").replace(/ /gi," ").replace(/&/gi,"&").replace(/"/gi,'"').replace(/'/gi,"'").replace(/\s+/g," ").trim():"",gd=({autor:e,listAutor:t,config:a})=>{const n=t?.[0]??null,{DATE_TIMEZONE:r="America/Mexico_City",PUBLIC_ASSETS_URL:o,PUBLIC_LNG:i}=U(),l=i==="en",c=r,d=n?.info?.date?.modified?$e(n.info.date.modified,c):void 0,u=e.addtional?.USER_JOBSTART?$e(e.addtional.USER_JOBSTART,c):void 0,f=o&&o!=="false"?o:"",h=e.addtional,g=h?.USER_USERFB||h?.USER_PAGE_FACEBOOK||h?.USER_FACEBOOK_FAN_PAGE,m=h?.USER_USERTWT||h?.USER_PAGE_TWITTER,p=h?.USER_USERIG||h?.USER_PAGE_INSTAGRAM,w=h?.USER_USERLIN||h?.USER_PAGE_LINKEDIN,b=h?.USER_PAGE_TIKTOK,C=h?.USER_PAGE_YOUTUBE,S=h?.USER_PAGE_PINTEREST,v=l?h?.USER_POSITION_EN||"":h?.USER_JOBTITLE||h?.USER_POSITION||"",A=l?h?.USER_DESCRIPCION_EN||h?.USER_MIBIO_EN||"":h?.USER_DESCRIPCION||h?.USER_MIBIO||"",x=e?.addtional?.USER_SHOWEMAIL===!0||h?.USER_MOSTRAR_MAIL?.toUpperCase()==="TRUE",k=de(),O={"@context":"https://schema.org","@type":"ProfilePage",mainEntity:{"@type":"Person",name:e.info.fullname??e.info.name,alternateName:e.info.nickname?e.info.nickname:e.info.name,identifier:e.info.id,description:pd(A),image:e.info.image?e.info.image.sizes.map((Q,B)=>B===0&&e.info.image.sizes.length!==1?null:f+Q.url).filter(Boolean):[],sameAs:[g,p,w,m,b,C,S].filter(Boolean),jobTitle:v,url:a.siteUrl+k+(a.paths.autor!==""?`/${a.paths.autor}/`:"/")+e.info.name}};return u&&(O.dateCreated=u),d&&(O.dateModified=d),x&&(O.mainEntity.email=e.info.email),s.jsx("script",{type:"application/ld+json",children:JSON.stringify(Le(O))})},wd=`(function(){"use strict";const Me="__html-audit-manifest";function je(e){const t=e.getElementById(Me);if(!t||!t.textContent)return null;try{const n=JSON.parse(t.textContent);return!n||typeof n!="object"||!n.expects?null:n}catch{return null}}function g(e,t,n,o,r){return{id:e,label:t,status:n,detail:o,expected:r}}function w(e,t,n,o,r){return o==null?g(e,t,n?"ok":"info",r,void 0):o?n?g(e,t,"ok",r,!0):g(e,t,"missing",r||"Esperado por config pero AUSENTE",!0):n?g(e,t,"warn",r||"Presente pero no estaba configurado",!1):g(e,t,"info",r||"No configurado",!1)}const ce={ok:0,info:1,warn:2,missing:3};function J(e,t){if(!t||!t.length)return e;e.issues=t;let n=e.status;for(const o of t)ce[o.status]>ce[n]&&(n=o.status);return e.status=n,e}function N(e,t){return!!e.querySelector(t)}function q(e,t){return e.querySelectorAll(t).length}function F(e){const t=[];return e.querySelectorAll('script[type="application/ld+json"]').forEach(o=>{if(o.textContent)try{const r=JSON.parse(o.textContent);Array.isArray(r)?t.push(...r):t.push(r)}catch{}}),t}function U(e,t){return F(e).some(n=>{const o=n?.["@type"];return typeof o=="string"?o===t:Array.isArray(o)?o.includes(t):!1})}function pe(e,t){const n=[],o=r=>{if(!r||typeof r!="object")return;if(Array.isArray(r)){r.forEach(o);return}const s=r,i=s["@type"];(i===t||Array.isArray(i)&&i.includes(t))&&n.push(s),Array.isArray(s["@graph"])&&s["@graph"].forEach(o)};return F(e).forEach(o),n}const qe=600,Ue=6e3;function de(e,t){return e.length>t?e.slice(0,t)+\`
|
|
29
|
+
}`,od=e=>{try{return new URL(e).origin}catch{return null}},id=({config:e,fontUrl:t,isS3:a})=>{const n=e.fontDisplay??"swap",r=e.fontFormat??"woff2",o=od(t);return s.jsxs(s.Fragment,{children:[o&&!a&&s.jsx("link",{rel:"preconnect",href:o,crossOrigin:"anonymous"}),s.jsx("link",{rel:"preload",as:"font",href:t,type:`font/${r}`,crossOrigin:"anonymous",fetchPriority:"high"}),s.jsx("style",{dangerouslySetInnerHTML:{__html:rd(e,t,n,r)}})]})},Lr=({config:e})=>{const t=e.fontDisplay??"swap",{url:a,isS3:n}=nd(e);return a?s.jsx(id,{config:e,fontUrl:a,isS3:n}):Ur(e.googleFontFamily)?s.jsxs(s.Fragment,{children:[s.jsx("link",{rel:"preconnect",href:"https://fonts.googleapis.com"}),s.jsx("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),s.jsx("link",{rel:"stylesheet",href:`https://fonts.googleapis.com/css2?${e.googleFontFamily}&display=${t}`})]}):null},ha={404:()=>{},home:()=>({"[author_replace]":"","[section_replace]":"home","[tag_replace]":"","[url_replace]":""}),slug:e=>({"[author_replace]":"","[section_replace]":e.pathname==="/index.html"?"home":e.slug??"","[tag_replace]":"","[url_replace]":""}),news:e=>({"[author_replace]":e.currentNew?.authors[0]?.name??"","[section_replace]":e.currentNew?.info?.section?.slug??"","[tag_replace]":Ys(e.currentNew?.keywords),"[url_replace]":hn(e.internalPath??"")}),seccion:e=>({"[author_replace]":"","[section_replace]":e.pathname?.split("/"+e.config?.paths.seccion+"/")[1]??"","[tag_replace]":"","[url_replace]":""}),tema:e=>({"[author_replace]":"","[section_replace]":e.pathname?.split("/"+e.config?.paths.tema+"/")[1]??"","[tag_replace]":"","[url_replace]":""}),"ultimas-noticias":e=>({"[author_replace]":"","[section_replace]":e.config?.paths["ultimas-noticias"]??"","[tag_replace]":"","[url_replace]":""}),video:e=>({"[author_replace]":"","[section_replace]":e.slug,"[tag_replace]":"","[url_replace]":""}),videos:e=>({"[author_replace]":"","[section_replace]":e.pathname?.split("/videos/")[1]??"","[tag_replace]":"","[url_replace]":""}),pages:e=>({"[author_replace]":"","[section_replace]":e.slug??"","[tag_replace]":"","[url_replace]":""}),auth:e=>({"[author_replace]":"","[section_replace]":e.slug??"","[tag_replace]":"","[url_replace]":""}),contacto:e=>({"[author_replace]":"","[section_replace]":e.config?.paths.contacto??"contacto","[tag_replace]":"","[url_replace]":""}),anuncia:e=>({"[author_replace]":"","[section_replace]":e.config?.paths.anuncia??"anuncia","[tag_replace]":"","[url_replace]":""}),buscar:e=>({"[author_replace]":"","[section_replace]":e.config?.paths.buscar??"","[tag_replace]":"","[url_replace]":""}),autor:e=>({"[author_replace]":"","[section_replace]":e.pathname?.split("/"+e.config?.paths.autor+"/")[1]??"","[tag_replace]":"","[url_replace]":""})},Pr=e=>{if(!e)return e??"";if(e.search("/page/")===-1)return e.replace("/","");const t=e.split("/"),a=t.indexOf("page")-1;return a<0?e:(t[a]??"").replace("/","")},xe=e=>{const a=e.replace(/^\/|\/$/g,"").split("/"),n=a.indexOf("page");return n>0?`${a[n-1]??""}`:`${a[a.length-1]??""}`},Or={404:()=>"404",home:()=>"home",slug:e=>xe(e.pathname),news:e=>un(e.pathname)?.slug,seccion:e=>xe(e.pathname),tema:e=>xe(e.pathname),pages:e=>xe(e.pathname),auth:e=>xe(e.pathname),buscar:e=>xe(e.pathname),"ultimas-noticias":e=>xe(e.pathname),anuncia:e=>xe(e.pathname),contacto:e=>xe(e.pathname),autor:e=>xe(e.pathname),video:e=>xe(e.pathname),videos:e=>xe(e.pathname)},Ct=e=>{const t=e.split("/"),a=t[t.length-1]??"1";return Number(a)>0?Number(a):1},ld=(e,t=2)=>{if(!e||e.length===0)return[];const a=[];for(let n=0;n<t;n++){if(!e[n]||!e[n].preview)continue;const r=e[n].preview?.sizes;r&&(r.length>1?a.push({href:r[0]?.url??"",media:"(min-width: 900px)"},{href:r[1]?.url??"",media:"(max-width: 900px)"}):a.push({href:r[0]?.url??""}))}return a},Br=({gpt:e=!1,googleAds:t=!1,syndication:a=!1,adsense:n=!1})=>s.jsxs(s.Fragment,{children:[e&&s.jsx("link",{rel:"preconnect",href:"https://securepubads.g.doubleclick.net",crossOrigin:"anonymous"}),t&&s.jsx("link",{rel:"preconnect",href:"https://googleads.g.doubleclick.net",crossOrigin:"anonymous"}),a&&s.jsx("link",{rel:"preconnect",href:"https://tpc.googlesyndication.com",crossOrigin:"anonymous"}),n&&s.jsx("link",{rel:"dns-prefetch",href:"https://pagead2.googlesyndication.com"})]}),fa=Symbol("bucket-retry-exhausted");class cd{exclude="keywords,gallery,related,relatedexternal,external,customfields";config={};imgSizes={};configVersion=".config";axiosApi=void 0;customMainImagesSize=void 0;contract;constructor(t,a,n,r,o,i){this.config=t,this.imgSizes=a,this.axiosApi=n,this.customMainImagesSize=o,this.contract=kt(i).contract,t.configVersion&&(this.configVersion=t.configVersion),r&&(this.exclude=r)}async getNewsListZone(t){if(this.axiosApi)return this.axiosApi.get("/news-list-zone",{params:t}).catch(a=>(console.log(`[/news-list-zone] Error: ${a.message}`),console.log(a),Promise.reject(a)))}async getOutstandingBlock(t){if(!this.axiosApi)return;const a=this.axiosApi,n=()=>a.get("/config/blocks",{params:{...t,path:this.config.servicePrefix+`/${this.configVersion}/columna_derecha.html`}}).catch(o=>(console.log(`[/config/blocks] Error: ${o.message}`),console.log(o),Promise.reject(o))),r=U().BUCKET_ORIGIN;if(r?.destacado){const o=U().PUBLIC_IS_OFFLINE==="true",i={data:{data:[]}},l=Fe(r,this.config.servicePrefix,"bloques","destacado",o),c=r.referer??ot,d=`origin:destacado:bucket:${l}`,u=await rt(d,()=>gt(()=>yt(r.proxyUrl??r.url,c).get(l),fa,{label:"bucket:destacado",endpoint:l,params:t}),{shouldCache:f=>f!==fa});return u===fa?(Bt("destacado",l),i):u}return n()}getNewsListZoneWrapper(t,a,n,r){return this.getNewsListZone({zone:a||"destacadas",size:n,onmainpage:t?"section":void 0,section:t,newstype:this.config.newsType,exclude:this.exclude,imagesizes:r})}async getNewsDestacadoDiario(t,a){try{const[n,r]=await Promise.all([this.getNewsListZoneWrapper(t,a,1,this.customMainImagesSize||`${this.contract.video.xl}${this.contract.video.lg}`),this.getNewsListZoneWrapper(t,a,5)]);return!n?.data?.data||!r?.data?.data?[]:(n.data.data=[...n.data.data,...r.data.data.slice(1)],n)}catch(n){return console.log(`[MainComponentServices.getNewsDestacadoDiario] Error: ${n?.message}`),[]}}async getNewsDestacadoDiarioImage(t,a){try{const[n,r]=await Promise.all([this.getNewsListZoneWrapper(t,a,1,this.customMainImagesSize||this.contract.note.itemsListPrimary),this.getNewsListZoneWrapper(t,a,5,this.contract.note.featuredDiarioImageThumb)]);return!n?.data?.data||!r?.data?.data?[]:(n.data.data=[...n.data.data,...r.data.data.slice(1)],n)}catch(n){return console.log(`[MainComponentServices.getNewsDestacadoDiarioImage] Error: ${n?.message}`),[]}}async getNewsAltoImpacto(t,a){try{return await this.getNewsListZoneWrapper(t,a,1,`${this.contract.note.gallery}${this.contract.note.featuredSuperSecondary}`)}catch(n){console.log(`[MainComponentServices.getNewsAltoImpacto] Error: ${n?.message}`);return}}async getNewsDestacadoVertical(t,a){try{const[n,r]=await Promise.all([this.getNewsListZoneWrapper(t,a,1,`${this.contract.note.featuredVerticalPrimary}${this.contract.video.lg}`),this.getNewsListZoneWrapper(t,a,3,`${this.contract.video.lg}${this.contract.note.featuredVerticalSecondary}`)]);return!n?.data?.data||!r?.data?.data?[]:(n.data.data=[...n.data.data,...r.data.data.slice(1)],n)}catch(n){return console.log(`[MainComponentServices.getNewsDestacadoVertical] Error: ${n?.message}`),[]}}async getNewsDestacadoHorizontal(t,a){try{const[n,r]=await Promise.all([this.getNewsListZoneWrapper(t,a,1,`${this.contract.note.featuredHorizontalPrimary}${this.contract.video.lg}`),this.getNewsListZoneWrapper(t,a,3,this.contract.note.featuredHorizontalSecondary)]);return!n?.data?.data||!r?.data?.data?[]:(n.data.data=[...n.data.data,...r.data.data.slice(1)],n)}catch(n){return console.log(`[MainComponentServices.getNewsDestacadoHorizontal] Error: ${n?.message}`),[]}}GetByOptions={Diario:(t,a)=>this.getNewsDestacadoDiario(t,a),"Diario con imagen":(t,a)=>this.getNewsDestacadoDiarioImage(t,a),Super:(t,a)=>this.getNewsAltoImpacto(t,a),"3 notas verticales":(t,a)=>this.getNewsDestacadoVertical(t,a),"3 notas horizontales":(t,a)=>this.getNewsDestacadoHorizontal(t,a)};async getMainBlockData(t,a,n){try{const o=(await this.getOutstandingBlock(t))?.data?.data?.[0]?.value||"";if(!o||!Object.keys(this.GetByOptions).includes(o))return{section:o,news:[]};const i=await this.GetByOptions[o](a,n);return{section:o,news:i?.data??[]}}catch(r){return console.log(`[MainComponentServices.getMainBlockData] Error: ${r?.message}`),{section:"",news:[]}}}}const vt=Symbol("bucket-retry-exhausted");class He{constructor(t){this.props=t,this.contract=kt(t?.imageSizes).contract,t?.config?.configVersion&&(this.configVersion=t.config.configVersion),t?.exclude&&(this.exclude=t.exclude)}configVersion=".config";exclude="keywords,gallery,related,relatedexternal,external,customfields";contract;generateTokenOffline=async t=>{const{PUBLIC_IS_OFFLINE:a,PUBLIC_USERNAME_OFFLINE:n,PUBLIC_PASSWORD_OFFLINE:r}=U();if(a==="true")try{return(await this.props?.axiosApi.get("/auth",{params:{username:n,password:r,browserid:t}}).catch(i=>(console.log(`[/auth]Error: ${i.message}`),Promise.reject(i))))?.data.data[0]?.token}catch(o){console.log(`[/auth] Error: ${o.message}`),console.log(o)}};getEntitySection=t=>this.props?.axiosApi.get("/entity-section",{params:t}).catch(a=>(console.log(`[/entity-section] Error: ${a.message}`),Promise.reject(a)));getMainMenu=async t=>{const a=U().BUCKET_ORIGIN,n={data:{data:[]}},r=()=>this.props.axiosApi.get("/config/menu",{params:t}).catch(i=>(console.log(`[/config/menu] Error: ${i.message}`),be.add({service:"CommonServices.getMainMenu",endpoint:"/config/menu",method:"GET",params:t,message:i.message,status:i.response?.status,layer:"axios-service"}),n));if(a?.menu){const i=U().PUBLIC_IS_OFFLINE==="true",l=hs(t.path),c=Fe(a,this.props?.config?.servicePrefix,"menu",l,i),d=a.referer??ot,u=`origin:menu:bucket:${c}`,f=await rt(u,()=>gt(()=>yt(a.proxyUrl??a.url,d).get(c),vt,{label:"bucket:menu",endpoint:c,params:t}),{shouldCache:h=>h!==vt});return f===vt?(Bt("menu",c),n):f}const o=`origin:menu:api:${t.path??""}`;return rt(o,()=>r())};getNewsListZone=t=>this.props?.axiosApi.get("/news-list-zone",{params:t}).catch(a=>(console.log(`[/news-list-zone] Error: ${a.message}`),Promise.reject(a)));getNewsListZoneSection=t=>this.props?.axiosApi.get("/news-list-zone-section",{params:t}).catch(a=>(console.log(`[/news-list-zone-section] Error: ${a.message}`),Promise.reject(a)));getNewsList=t=>this.props?.axiosApi.get("/news-list",{params:t}).catch(a=>(console.log(`[/news-list] Error: ${a.message}`),Promise.reject(a)));getNewsListTag=t=>this.props?.axiosApi.get("/news-list-tag",{params:t}).catch(a=>(console.log(`[/news-list-tag] Error: ${a.message}`),Promise.reject(a)));getNewsListSection=t=>this.props?.axiosApi.get("/news-list-section",{params:t}).catch(a=>(console.log(`[/news-list-section] Error: ${a}`),console.log(`[/news-list-section] Error: ${a.message}`),Promise.reject(a)));getNewsListAvanced=t=>this.props?.axiosApi.get("/news-list-advanced",{params:t}).catch(a=>(console.log(`[/news-list-advanced] Error: ${a.message}`),Promise.reject(a)));getNewsListTags=t=>this.props?.axiosApi.get("/news-list-tag",{params:t}).catch(a=>(console.log(`[/news-list-tag] Error: ${a.message}`),Promise.reject(a)));getNewsListTagEntity=t=>this.props?.axiosApi.get("/news-list-tag-entity",{params:t}).catch(a=>(console.log(`[/news-list-tag-entity] Error: ${a.message}`),Promise.reject(a)));getNewsListTagLite=t=>this.props?.axiosApi.get("/news-list-tag-lite",{params:t}).catch(a=>(console.log(`[/news-list-tag-lite] Error: ${a.message}`),Promise.reject(a)));getNewsListAutor=t=>this.props?.axiosApi.get("/news-list-author",{params:t}).catch(a=>(console.log(`[/news-list-author] Error: ${a.message}`),Promise.reject(a)));getNewsSearch=t=>this.props?.axiosApi.get("/news-list-search",{params:t}).catch(a=>(console.log(`[/news-list-search] Error: ${a.message}`),Promise.reject(a)));getAutorInfo=t=>this.props?.axiosApi.get("/authors",{params:t}).catch(a=>(console.log(`[/authors] Error: ${a.message}`),Promise.reject(a)));getvideoListAdvanced=t=>this.props?.axiosApi.get("/videos-list-advanced",{params:t}).catch(a=>(console.log(`[/videos-list-advanced] Error: ${a.message}`),Promise.reject(a)));getVideos=t=>this.props?.axiosApi.get("/videos",{params:t}).catch(a=>(console.log(`[/videos] Error: ${a.message}`),Promise.reject(a)));getVideosList=t=>this.props?.axiosApi.get("/videos-list",{params:t}).catch(a=>(console.log(`[/videos-list] Error: ${a.message}`),Promise.reject(a)));getBanners=async t=>{const a=U().BUCKET_ORIGIN,n={data:{data:[]}},r=()=>{const c=t.path?t.path:`/${this.configVersion}/banners.html`;return this.props.axiosApi.get("/config/banners",{params:{...t,path:this.props?.config?.servicePrefix+c}}).catch(d=>(console.log(`[/config/banners] Error: ${d.message}`),be.add({service:"CommonServices.getBanners",endpoint:"/config/banners",method:"GET",params:t,message:d.message,status:d.response?.status,layer:"axios-service"}),n))};if(a?.banners){const c=U().PUBLIC_IS_OFFLINE==="true",d=(t.template??"").toLowerCase(),u=Fe(a,this.props?.config?.servicePrefix,"banners",d,c),f=a.referer??ot,h=`origin:banners:bucket:${u}`,g=await rt(h,()=>gt(()=>yt(a.proxyUrl??a.url,f).get(u),vt,{label:"bucket:banners",endpoint:u,params:t}),{shouldCache:m=>m!==vt});return g===vt?(Bt("banners",u),n):g}const o=t.path?t.path:`/${this.configVersion}/banners.html`,l=`origin:banners:api:${`${this.props?.config?.servicePrefix??""}${o}`}:${t.template??""}`;return rt(l,()=>r())};getPages=t=>this.props?.axiosApi.get("/config/pages",{params:t}).catch(a=>(console.log(`[/config/pages] Error: ${a.message}`),Promise.reject(a)));getRankingS3=async(t,a={Referer:ot})=>!t||t===""?{data:[]}:gt(()=>re.get(t,{headers:a}),{data:[]},{label:"bucket:ranking",endpoint:t});getNews=t=>this.props?.axiosApi.get("/news",{params:{...t,exclude:`${t.exclude},pixel`}}).catch(a=>(console.log(`[/news] Error: ${a.message}`),Promise.reject(a)));getNewsMultimedia=t=>this.props?.axiosApi.get("/news-items-multimedia",{params:t}).catch(a=>(console.log(`[/news-items-multimedia] Error: ${a.message}`),Promise.reject(a)));getNewsItemsList=t=>this.props?.axiosApi.get("/news-items-list",{params:t}).catch(a=>(console.log(`[/news-items-list] Error: ${a.message}`),Promise.reject(a)));getNewsListPath=t=>this.props?.axiosApi.get("/news-list-paths",{params:t}).catch(a=>(console.log(`[/news-list-paths] Error: ${a.message}`),Promise.reject(a)));getNewsSchemasImages=t=>this.props?.axiosApi.get("/schemas/news-images",{params:t}).catch(a=>(console.log(`[/schemas/news-images] Error: ${a.message}`),Promise.reject(a)));getNewsItemsRelated=(t,a)=>this.props?.axiosApi.get("/news-items-related",{params:{path:t,imagesizes:this.contract.note.listStandard,exclude:this.exclude,...a}}).catch(n=>(console.log(`[/news-items-related] Error: ${n.message}`),{data:bn()}));sendEmail=t=>this.props?.axiosApi.post("/send/email",t,{headers:{"Content-Type":"application/x-www-form-urlencoded",Cookie:"JSESSIONID=21FDC2B9C2782893562BC53D52981A0B"}}).catch(a=>(console.log(`[/send/email] Error: ${a.message}`),Promise.reject(a)));searchData=async t=>{const a=await this.getNewsSearch(t);return a&&a?.data.data&&a?.data.data.length>0?{search:a}:{lastNews:await this.getNewsList(t)}};commonNewsServices=async(t,a={getNews:`${this.contract.note.detailMain}${this.contract.note.detailSecondary}`,getNewsItemsList:`${this.contract.note.itemsListPrimary}${this.contract.note.detailSecondary}`,getAutorInfo:`${this.contract.author.avatar}`,getNewsItemsRelated:`${this.contract.note.relatedPrimary}${this.contract.note.relatedThumb}`},n={getNewsItemsRelated:"config,keywords,authors,body,related,relatedexternal,social,external,hascontent,customfields,pixel",getAutorInfo:"groups"})=>{const[r,o]=await Promise.allSettled([this.getNews({imagesizes:a.getNews,path:t}),this.getNewsItemsList({path:t,imagesizes:a.getNewsItemsList})]),i=Je(r)?.data,l=i?.[0];let c=[];l?.authors?.length===1&&l?.config?.showauthor&&l.authors[0]?.internaluser&&(c=(await this.getAutorInfo({user:l.authors[0].name,exclude:n.getAutorInfo,imagesizes:a.getAutorInfo}))?.data.data??[]);const d=es(l),f=(Je(o)?.data??[])[0]?.list?.items?.map(b=>es(b)),h=[];f?.forEach(b=>{b&&b.length>0&&b.forEach(C=>{C.forEach(S=>{const v=this.getNews({path:S.replaceAll("|","/"),imagesizes:a.getNewsItemsRelated,exclude:n.getNewsItemsRelated});v&&h.push(v)})})});const m=(await Promise.allSettled([...h])).map(b=>Je(b)?.data),p=await on(d,this.getNews,`${this.contract.note.relatedPrimary}${this.contract.note.relatedThumb}`);let w=[];try{w=(await this.getNewsSchemasImages({path:t}))?.data?.data??[]}catch(b){console.warn("getNewsSchemasImages failed:",b),w=[]}return{news:i??[],autor:c,newsRelatedResponses:p,itemList:Je(o)?.data??[],newsRelatedListResponses:m,schemasImages:w??[]}}}class Mr extends He{MULTIPUBLICATION_FETCHES;PUBLIC_PUBLICATION_ID;IS_MULTIPUBLICATION;constructor(t){super(t);const{MULTIPUBLICATION_FETCHES:a,PUBLIC_PUBLICATION_ID:n}=U();this.MULTIPUBLICATION_FETCHES=a,this.PUBLIC_PUBLICATION_ID=n,this.IS_MULTIPUBLICATION=a!=null&&a!==""||n!=null&&n!==""}getBlockSass=async t=>{const a=await this.props?.axiosApi.get("/config/blocks-saas",{params:{...t,exclude:this.exclude,path:this.props?.config?.servicePrefix+`/${this.configVersion}/columna_derecha.html`}}).catch(n=>(console.log(`[/config/blocks-saas] Error: ${n.message}`),Promise.reject(n)));return this.resolveSlotContent(a?.data?.data)};resolveSlotContent=async t=>{if(!t||t.length===0||!t[0]?.value||!t[0].block||!this.props?.imgSizes[t[0].block])return{blockSass:t};const a=t[0],n=a?.value.split("="),r=n[0]??"",o=n[1]??"",i=a?.block,l={videos:async()=>{const c={size:this.props?.imgSizes[i].size??5,imagesizes:`${this.contract.video.lg}${this.contract.video.md}`,query:"Keywords:("+(o??"videohome")+")"};this.IS_MULTIPUBLICATION&&(c.publication=this.MULTIPUBLICATION_FETCHES??this.PUBLIC_PUBLICATION_ID);try{const d=await this.getvideoListAdvanced(c);return{blockSass:t,content:d?d.data:void 0}}catch(d){return console.log(`[/videos-list-advanced] Error: ${d?.message}`),{blockSass:t,content:void 0}}},tag:async()=>{const{USE_QUOTE_IN_QUERY_TAG_HOME:c}=U(),d={query:c?'claves:("'+o+'")':"claves:("+o+")",size:this.props?.imgSizes[i]?.size??3,newstype:this.props?.config?.newsType,exclude:this.exclude,imagesizes:this.props?.imgSizes[i]?.imageSizes};this.IS_MULTIPUBLICATION&&(d.publication=this.MULTIPUBLICATION_FETCHES??this.PUBLIC_PUBLICATION_ID);try{const u=await this.getNewsListAvanced(d);return{blockSass:t,content:u?u.data:void 0}}catch(u){return console.log(`[/news-list-advanced] Error: ${u?.message}`),{blockSass:t,content:void 0}}},seccion:async()=>{const c={query:`seccion:(${o})`,size:this.props?.imgSizes[i]?.size??3,newstype:this.props?.config?.newsType,exclude:this.exclude,imagesizes:this.props?.imgSizes[i]?.imageSizes};this.IS_MULTIPUBLICATION&&(c.publication=this.MULTIPUBLICATION_FETCHES??this.PUBLIC_PUBLICATION_ID);try{const d=await this.getNewsListAvanced(c);return{blockSass:t,content:d?d.data:void 0}}catch(d){return console.log(`[/news-list-advanced] Error: ${d?.message}`),{blockSass:t,content:void 0}}}};if(r in l){const c=l[r];return await c()}return{blockSass:t}}}class dd{issuuApi="https://api.issuu.com/v2";api=void 0;q="";constructor(t){this.q=t.q,this.api=re.create({baseURL:t.issuuApi?t.issuuApi:this.issuuApi,params:{state:t.state?t.state:"PUBLISHED",size:t.size?t.size:16,q:t.q},headers:{Authorization:`Bearer ${t.token}`}})}async getListIssuuPublications({page:t=1}){try{return await this.api?.get("/publications",{params:{q:this.q,page:t}})}catch(a){throw a}}async getListIssuuPublicationBySlug(t){try{return await this.api?.get(`/publications/${t}/embed`)}catch(a){throw a}}}const ma=Symbol("bucket-retry-exhausted"),ud=async(e,t)=>{const a=U().BUCKET_ORIGIN;if(!a)return{};const n=U().PUBLIC_IS_OFFLINE==="true",r=Fe(a,t.servicePrefix,"bloques","modulos-dinamicos",n),o=a.referer??ot,i=`origin:slots:bucket:${r}`,l=await rt(i,()=>gt(()=>yt(a.proxyUrl??a.url,o).get(r),ma,{label:"bucket:slots",endpoint:r,params:{}}),{shouldCache:u=>u!==ma});if(l===ma)return Bt("slots",r),{};const c=l.data?.data??[],d={};return await Promise.all(c.map(async u=>{u?.key&&(d[u.key]=await e.resolveSlotContent([u]))})),d},hd=async(e,t,a,n,r,o,i)=>{const l=new Mr({config:t,imgSizes:a,imageSizes:n,axiosApi:e,exclude:i}),c=async()=>{const d=[];for(let h=1;h<=r;h++)for(let g=1;g<=o;g++)d.push({func:l.getBlockSass,slot_id:h+"_"+g});const u=await Promise.allSettled([...d.map(h=>h.func({template:"Home_"+h.slot_id}))]),f={};for(let h=0;h<u.length;h++){const g=sn(u[h]),m="Home_"+(Math.floor(h/o)+1)+"_"+(Math.floor(h%o)+1);g&&(f[m]={...g})}return f};return U().BUCKET_ORIGIN?.slots?ud(l,t):c()},fd=e=>{const t=Je(e);return t&&t.data?t.data:t},md=async e=>{const t=await Promise.allSettled(Object.values(e).map(r=>{const o=r.promise??Promise.resolve(void 0);return o.catch(()=>{}),o})),a=Object.keys(e),n={};for(const r in e){const o=e[r];if(!o)continue;const i=o.custom_extractData??fd;n[r]=i(t[a.indexOf(r)])}return n},me=e=>({title:e.title,description:e.description}),_r=(e="")=>e.replace(/-/g," ").replace(/^./,t=>t.toUpperCase()),jt=e=>e.includes("/page/")?e.replace(/\/page\/\d+$/,""):e,pe=e=>{try{const t=de();if(!t)return e;const a=new URL(e),n=a.pathname;return n===t||n.startsWith(`${t}/`)?e:a.origin+t+e.slice(a.origin.length)}catch{return e}},Pe=(e,t,a,n)=>{const r=pe(t),o={...a?{title:a}:{},...n?{description:n}:{}};return{alternates:{...e.alternates,canonical:r},openGraph:{...e.openGraph,url:r,...o},twitter:{...e.twitter,url:r,...o}}},Dr={404:e=>{const{meta:t}=e;return me(t)},home:e=>{const{meta:t,config:a}=e;return{...t,...Pe(t,a.siteUrl,t.title)}},slug:e=>{const{meta:t,config:a,slug:n,pathname:r}=e,o=`${a.name} | ${_r(n)}`;return{...t,title:o,...Pe(t,a.siteUrl+r,o)}},auth:e=>{const{meta:t,config:a,slug:n,pathname:r}=e,o=`${a.name} | ${_r(n)}`;return{...t,title:o,...Pe(t,a.siteUrl+r,o)}},news:e=>{const{meta:t,config:a,currentNew:n,schemasImages:r}=e;if(!n)return me(t);const o=dn(t,n,a,r);return o?{...t,...o}:me(t)},seccion:async e=>{const{meta:t,config:a,pathname:n,slug:r,axiosApi:o,meta_info:i}=e,{CONFIG_sectionMetaInfo:l,PUBLIC_LNG:c}=U(),u=jt(n).split("/"),f=[],h=Ct(n),g=Number(a.newsListLimit)||0,m=c==="en";if(l&&i)return i.next&&f.push({rel:"next",url:Re(a,u,h)}),h>1&&f.push({rel:"prev",url:et(a,u,h)}),{...t,title:i.title,alternates:{...t.alternates,canonical:pe(a.siteUrl+n)},manifest:a.manifest,icons:{...a.icons,other:f},other:{"msapplication-TileImage":a.msapplicationTileImage??""},openGraph:{...t.openGraph,title:i.title,type:"website",url:pe(`${a.siteUrl}${n}`)},twitter:{...t.twitter,card:"summary_large_image",title:i.title,domain:new URL(a.siteUrl).hostname,url:pe(`${a.siteUrl}${n}`)}};const p=new He({config:a,axiosApi:o});try{let w,b;if(Js("seccion")){const A=await pn({fetchFn:x=>p.getNewsListSection(x),baseParams:{section:r,newstype:a.newsType,exclude:"keywords,gallery,related,relatedexternal,external,customfields"},userPage:h,newsListLimit:g});w=A.data,b=A.hasNextPage}else{const A=await p.getNewsListSection({section:r,size:g,newstype:a.newsType,exclude:"keywords,gallery,related,relatedexternal,external,customfields",page:h});if(!A)return me(t);w=A.data.data,b=!(w.length<g)}const C=w[0];b&&f.push({rel:"next",url:Re(a,u,h)}),h>1&&f.push({rel:"prev",url:et(a,u,h)});const S=m?`Latest News from ${C.info.section?.name} | ${a.name}`:`Últimas Noticias de ${C.info.section?.name} | ${a.name}`,v=m?`All the latest news from ${C.info.section?.name} on ${a.name}`:`Todas las últimas noticias de ${C.info.section?.name} en ${a.name}`;return{...t,title:S,description:v,alternates:{...t.alternates,canonical:pe(a.siteUrl+n)},manifest:a.manifest,icons:{...a.icons,other:f},other:{"msapplication-TileImage":a.msapplicationTileImage??""},openGraph:{...t.openGraph,title:S,description:v,type:"website",url:pe(`${a.siteUrl}${n}`),locale:t.openGraph.locale},twitter:{...t.twitter,card:"summary_large_image",title:S,description:v,site:t.twitter.site,domain:new URL(a.siteUrl).hostname,url:pe(`${a.siteUrl}${n}`)}}}catch(w){return console.error(w),me(t)}},tema:async e=>{const{meta:t,config:a,pathname:n,slug:r,axiosApi:o}=e,i=new He({config:a,axiosApi:o}),c=jt(n).split("/"),d=[],u=Ct(n),f=Number(a.newsListLimit)||0,h=/([t][0-9]{4})\w+/.exec(r||""),g=h&&h?.length>0?h[0].replace("t",""):"",{PUBLIC_TAG_TYPE:m,PUBLIC_LNG:p}=U(),w=p==="en";try{const b=await i.getNewsListTags({tagid:g,size:f,tagtype:Number(m),newstype:a.newsType,exclude:"keywords,gallery,related,relatedexternal,external,customfields",page:u});if(!b)return me(t);const C=b.data.entity;if(!C)return me(t);b.data.data?.length<f||d.push({rel:"next",url:Re(a,c,u)}),u>1&&d.push({rel:"prev",url:et(a,c,u)});const S=w?`Latest news about ${C.name} | ${a.name}`:`Últimas noticias de ${C.name} | ${a.name}`,v=w?`The latest news about ${C.name} on ${a.name}`:`Las últimas noticias sobre ${C.name} en ${a.name}`;return{...t,title:S,description:v,alternates:{...t.alternates,canonical:pe(a.siteUrl+n)},manifest:a.manifest,icons:{...a.icons,other:d},other:{"msapplication-TileImage":a.msapplicationTileImage??""},openGraph:{...t.openGraph,title:S,description:v,type:"website",url:pe(`${a.siteUrl}${n}`),locale:t.openGraph.locale},twitter:{...t.twitter,card:"summary_large_image",title:S,description:v,site:t.twitter.site,domain:new URL(a.siteUrl).hostname,url:pe(`${a.siteUrl}${n}`)}}}catch(b){return console.error(b),me(t)}},"ultimas-noticias":async e=>{const{meta:t,config:a,pathname:n,texts:r,axiosApi:o}=e,i=new He({config:a,axiosApi:o}),c=jt(n).split("/"),d=[],u=Ct(n),f=Number(a.newsListLimit)||0,h=`${a.name} | ${r.lastNotesTitle}`,g={...t,title:h,...Pe(t,a.siteUrl+"/"+a.paths["ultimas-noticias"],h)};if(!o)return g;try{const m=await i.getNewsList({size:f,newstype:a.newsType,exclude:"keywords,gallery,related,relatedexternal,external,customfields",page:u});return m?(m.data.data.length<f||d.push({rel:"next",url:Re(a,c,u)}),u>1&&d.push({rel:"prev",url:et(a,c,u)}),{...t,title:h,...Pe(t,a.siteUrl+n,h),manifest:a.manifest,icons:{...a.icons,other:d},other:{"msapplication-TileImage":a.msapplicationTileImage??""}}):g}catch(m){return console.error(m),g}},video:async e=>{const{meta:t,config:a,internalPath:n,axiosApi:r}=e,o=new He({config:a,axiosApi:r});try{const i=await o.getVideos({imagesizes:o.contract.og.social,path:n});return i?.data?.data?.length?{...t,...vn(t,i.data.data[0],a)??{}}:me(t)}catch(i){return console.error("metadata (video) error:",i),me(t)}},videos:async e=>{const{meta:t,config:a,pathname:n,axiosApi:r}=e,o=new He({config:a,axiosApi:r}),l=jt(n).split("/"),c=[],d=Ct(n),u=Number(a.newsListLimit)||0;try{const f=await o.getvideoListAdvanced({size:u,query:"Category:(videohome OR destacadoseccion OR seccion)",page:Number(d)});if(!f)return me(t);f.data.data.length<u||c.push({rel:"next",url:Re(a,l,d)}),d>1&&c.push({rel:"prev",url:et(a,l,d)});const h="Videos | "+a.name;return{...t,title:h,...Pe(t,a.siteUrl+n,h),manifest:a.manifest,icons:{...a.icons,other:c},other:{"msapplication-TileImage":a.msapplicationTileImage??""}}}catch(f){return console.error(f),me(t)}},pages:async(e,t)=>{const{meta:a,config:n,pathname:r,slug:o,axiosApi:i}=e,l=new He({config:n,axiosApi:i});try{const c=await l.getPages({path:t||n.servicePrefix+`/pages/${o}`});if(!c)return me(a);const d=c.data.data[0]?.info.title??"",u=`${n.name} | ${d}`;return{...a,title:u,...Pe(a,n.siteUrl+r,u)}}catch(c){return console.error(c),me(a)}},contacto:e=>{const{meta:t,config:a,pathname:n}=e,r=U().PUBLIC_LNG==="en",o=`${a.name} | ${r?"Contact":"Contacto"}`;return{...t,title:o,...Pe(t,a.siteUrl+n,o)}},anuncia:e=>{const{meta:t,config:a,pathname:n}=e,r=U().PUBLIC_LNG==="en",o=`${a.name} | ${r?"Advertise":"Anuncia"}`;return{...t,title:o,...Pe(t,a.siteUrl+n,o)}},buscar:e=>{const{meta:t,config:a,pathname:n,query:r,texts:o}=e;if(r&&r.trim()!==""){const i=`${a.name} | ${`${o.resultsOfPrefix}'${r}'`}`;return{...t,title:i,alternates:{...t.alternates,canonical:pe(a.siteUrl+n+(r?"?query="+r:""))},openGraph:{...t.openGraph,title:i,type:"website",url:pe(`${a.siteUrl}${n}${r?"?query="+r:""}`)},twitter:{...t.twitter,card:"summary_large_image",title:i,domain:new URL(a.siteUrl).hostname,url:pe(`${a.siteUrl}${n}${r?"?query="+r:""}`)}}}else{const i=`${a.name} | ${o.searchKeyWord}`;return{...t,title:i,alternates:{...t.alternates,canonical:pe(a.siteUrl+n+(r?"?query="+r:""))},openGraph:{...t.openGraph,title:i,type:"website",url:pe(`${a.siteUrl}${n}`)},twitter:{...t.twitter,card:"summary_large_image",title:i,domain:new URL(a.siteUrl).hostname,url:pe(`${a.siteUrl}${n}`)}}}},autor:async e=>{const{meta:t,config:a,pathname:n,slug:r,axiosApi:o}=e,i=new He({config:a,axiosApi:o}),c=jt(n).split("/"),d=[],u=Ct(n),f=U().PUBLIC_LNG==="en",h=Number(a.newsListLimit)||0;try{const g=await i.getAutorInfo({user:r,exclude:"groups",imagesizes:i.contract.author.avatar}),m=await i.getNewsListAutor({size:h,user:r,page:u,newstype:a.newsType,exclude:"keywords,gallery,related,relatedexternal,external,customfields",imagesizes:i.contract.note.listStandard});if(!m)return me(t);m.data.data.length<h||d.push({rel:"next",url:Re(a,c,u)}),u>1&&d.push({rel:"prev",url:et(a,c,u)});const p=g?.data.data[0]?.info.fullname,w=f?`Latest News from ${p} | ${a.name}`:`Últimas Noticias de ${p} | ${a.name}`,b=f?`All the latest news from ${p} on ${a.name}`:`Todas las últimas noticias de ${p} en ${a.name}`;return{...t,title:w,description:b,...Pe(t,a.siteUrl+n,w,b),manifest:a.manifest,icons:{...a.icons,other:d},other:{"msapplication-TileImage":a.msapplicationTileImage??""}}}catch(g){return console.error(g),me(t)}}},pd=e=>e?e.replace(/<[^>]*>/g,"").replace(/ /gi," ").replace(/&/gi,"&").replace(/"/gi,'"').replace(/'/gi,"'").replace(/\s+/g," ").trim():"",gd=({autor:e,listAutor:t,config:a})=>{const n=t?.[0]??null,{DATE_TIMEZONE:r="America/Mexico_City",PUBLIC_ASSETS_URL:o,PUBLIC_LNG:i}=U(),l=i==="en",c=r,d=n?.info?.date?.modified?$e(n.info.date.modified,c):void 0,u=e.addtional?.USER_JOBSTART?$e(e.addtional.USER_JOBSTART,c):void 0,f=o&&o!=="false"?o:"",h=e.addtional,g=h?.USER_USERFB||h?.USER_PAGE_FACEBOOK||h?.USER_FACEBOOK_FAN_PAGE,m=h?.USER_USERTWT||h?.USER_PAGE_TWITTER,p=h?.USER_USERIG||h?.USER_PAGE_INSTAGRAM,w=h?.USER_USERLIN||h?.USER_PAGE_LINKEDIN,b=h?.USER_PAGE_TIKTOK,C=h?.USER_PAGE_YOUTUBE,S=h?.USER_PAGE_PINTEREST,v=l?h?.USER_POSITION_EN||"":h?.USER_JOBTITLE||h?.USER_POSITION||"",A=l?h?.USER_DESCRIPCION_EN||h?.USER_MIBIO_EN||"":h?.USER_DESCRIPCION||h?.USER_MIBIO||"",x=e?.addtional?.USER_SHOWEMAIL===!0||h?.USER_MOSTRAR_MAIL?.toUpperCase()==="TRUE",k=de(),O={"@context":"https://schema.org","@type":"ProfilePage",mainEntity:{"@type":"Person",name:e.info.fullname??e.info.name,alternateName:e.info.nickname?e.info.nickname:e.info.name,identifier:e.info.id,description:pd(A),image:e.info.image?e.info.image.sizes.map((Q,B)=>B===0&&e.info.image.sizes.length!==1?null:f+Q.url).filter(Boolean):[],sameAs:[g,p,w,m,b,C,S].filter(Boolean),jobTitle:v,url:a.siteUrl+k+(a.paths.autor!==""?`/${a.paths.autor}/`:"/")+e.info.name}};return u&&(O.dateCreated=u),d&&(O.dateModified=d),x&&(O.mainEntity.email=e.info.email),s.jsx("script",{type:"application/ld+json",children:JSON.stringify(Le(O))})},wd=`(function(){"use strict";const Me="__html-audit-manifest";function je(e){const t=e.getElementById(Me);if(!t||!t.textContent)return null;try{const n=JSON.parse(t.textContent);return!n||typeof n!="object"||!n.expects?null:n}catch{return null}}function g(e,t,n,o,r){return{id:e,label:t,status:n,detail:o,expected:r}}function w(e,t,n,o,r){return o==null?g(e,t,n?"ok":"info",r,void 0):o?n?g(e,t,"ok",r,!0):g(e,t,"missing",r||"Esperado por config pero AUSENTE",!0):n?g(e,t,"warn",r||"Presente pero no estaba configurado",!1):g(e,t,"info",r||"No configurado",!1)}const ce={ok:0,info:1,warn:2,missing:3};function J(e,t){if(!t||!t.length)return e;e.issues=t;let n=e.status;for(const o of t)ce[o.status]>ce[n]&&(n=o.status);return e.status=n,e}function N(e,t){return!!e.querySelector(t)}function q(e,t){return e.querySelectorAll(t).length}function F(e){const t=[];return e.querySelectorAll('script[type="application/ld+json"]').forEach(o=>{if(o.textContent)try{const r=JSON.parse(o.textContent);Array.isArray(r)?t.push(...r):t.push(r)}catch{}}),t}function U(e,t){return F(e).some(n=>{const o=n?.["@type"];return typeof o=="string"?o===t:Array.isArray(o)?o.includes(t):!1})}function pe(e,t){const n=[],o=r=>{if(!r||typeof r!="object")return;if(Array.isArray(r)){r.forEach(o);return}const s=r,i=s["@type"];(i===t||Array.isArray(i)&&i.includes(t))&&n.push(s),Array.isArray(s["@graph"])&&s["@graph"].forEach(o)};return F(e).forEach(o),n}const qe=600,Ue=6e3;function de(e,t){return e.length>t?e.slice(0,t)+\`
|
|
30
30
|
… (recortado)\`:e}function E(e,t=qe){return e?de(e.outerHTML||"",t):""}function h(e,t){return t&&t.length&&(e.evidence=t),e}function O(e,t){return Array.from(e.querySelectorAll(t)).map(n=>({label:n.getAttribute("property")||n.getAttribute("name")||n.getAttribute("rel")||n.getAttribute("type")||n.tagName.toLowerCase(),snippet:E(n)}))}function K(e,t){if(!e||typeof e!="object")return;if(Array.isArray(e)){e.forEach(r=>K(r,t));return}const n=e,o=n["@type"];typeof o=="string"?t.add(o):Array.isArray(o)&&o.forEach(r=>typeof r=="string"&&t.add(r)),Array.isArray(n["@graph"])&&K(n["@graph"],t)}function ue(e){const t=e.querySelectorAll('script[type="application/ld+json"]'),n=[];return t.forEach((o,r)=>{const s=o.textContent||"",i=new Set;let l=s,a=!0;try{const u=JSON.parse(s);K(u,i),l=JSON.stringify(u,null,2)}catch{a=!1}const c=o.id,p=[...i],d=p.length?p.join(", "):c||\`bloque #\${r+1}\`;n.push({types:p,label:a?d:\`\${d} (JSON inválido)\`,snippet:de(l,Ue)})}),n}function _(e,t){return ue(e).filter(n=>n.types.includes(t)).map(n=>({label:n.label,snippet:n.snippet}))}function _e(e){return ue(e).map(t=>({label:t.label,snippet:t.snippet}))}const Ie=(e,t)=>{const n=t?.expects,o=[],r=e.querySelector("meta[charset]");o.push(h(w("htmlAttrs.charset","<meta charset>",!!r,n?n.charset:null,"Falta <meta charset>"),r?[{label:"<meta charset>",snippet:E(r)}]:[]));const s=e.querySelector('meta[name="viewport"]');o.push(h(w("htmlAttrs.viewport","<meta name=viewport>",!!s,n?n.viewport:null,"Falta <meta name=viewport>"),s?[{label:"<meta name=viewport>",snippet:E(s)}]:[]));const i=e.documentElement.getAttribute("lang");o.push(g("htmlAttrs.lang","html[lang]",i?"ok":"info",i?\`lang="\${i}"\`:"No emitido por el paquete (lo agrega el sitio)"));const l=e.documentElement.getAttribute("dir");o.push(g("htmlAttrs.dir","html[dir]",l?"ok":"info",l?\`dir="\${l}"\`:"No emitido por el paquete"));const a=new Map;e.querySelectorAll("[id]").forEach(p=>{const d=p.id;d&&a.set(d,(a.get(d)||0)+1)});const c=[...a.entries()].filter(([,p])=>p>1).map(([p])=>p);return o.push(g("htmlAttrs.duplicateIds","IDs duplicados",c.length?"warn":"ok",c.length?\`Duplicados: \${c.slice(0,10).join(", ")}\`:"Sin IDs duplicados")),{key:"htmlAttrs",title:"HTML attrs",findings:o}},Fe=(e,t)=>{const n=t?.expects,o=[],r=e.querySelector('script[type="speculationrules"]');o.push(h(w("structure.speculationRules","Speculation rules",!!r,n?n.speculationRules:null,"Speculation rules desactivadas"),r?[{label:"speculationrules",snippet:E(r,2e3)}]:[])),t?.speculationType&&o.push(g("structure.speculationType","Speculation type","info",\`Tipo esperado: \${t.speculationType}\`));const s=q(e,"main");o.push(g("structure.main","<main>",s===1?"ok":s===0?"info":"warn",s===1?"1 <main>":s===0?"Sin <main> (lo arma el sitio)":\`\${s} <main> (debería ser 1)\`)),o.push(g("structure.header","<header>",N(e,"header")?"ok":"info",N(e,"header")?"Presente":"Sin <header>")),o.push(g("structure.footer","<footer>",N(e,"footer")?"ok":"info",N(e,"footer")?"Presente":"Sin <footer>"));const i=q(e,"h1");return o.push(g("structure.h1","<h1>",i===1?"ok":"warn",i===0?"Sin <h1>":i===1?"1 <h1>":\`\${i} <h1> (revisar jerarquía)\`)),{key:"structure",title:"Estructura",findings:o}},Pe=["og:title","og:description","og:type","og:url","og:site_name","og:locale","og:image"],He=["twitter:card","twitter:title","twitter:description","twitter:image","twitter:site"];function M(e,t){return{status:e,message:t}}function X(e,t=60){const n=e.trim();return n.length>t?n.slice(0,t)+"…":n}function P(e,t={}){const n=(e||"").trim();if(!n)return[];const o=[],r=t.absolute!==!1,s=t.https!==!1,i=/^[a-z][a-z0-9+.-]*:/i.test(n),l=n.startsWith("//");r&&!i&&!l&&o.push(M("warn",\`URL relativa ("\${X(n)}"); se espera absoluta\`));let a=null;try{a=new URL(n,t.base)}catch{return o.push(M("warn",\`URL malformada: "\${X(n)}"\`)),o}return(a.protocol==="http:"||a.protocol==="https:")&&(s&&a.protocol==="http:"&&o.push(M("warn","Usa http (inseguro); se espera https")),a.pathname.includes("//")&&o.push(M("warn",\`Doble slash en el path: "\${X(a.pathname)}"\`)),t.sameHost&&a.host!==t.sameHost&&o.push(M("warn",\`Host distinto: "\${a.host}" (se espera "\${t.sameHost}")\`))),o}function fe(e,t){const n=(e||"").trim();if(!n)return null;try{return new URL(n,t).href}catch{return null}}const Be={NewsArticle:["@context","headline","datePublished","image","author","publisher"]};function De(e){return e==null?!0:typeof e=="string"?e.trim()==="":Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}function We(e,t){return t.filter(n=>De(e[n])).map(n=>M("warn",\`Falta campo requerido: \${n}\`))}function Ge(e){const t=e.itemListElement;return Array.isArray(t)?t.length:t?1:0}function z(e){return e===void 0||e==="meta"?null:e}function L(e,t,n,o,r,s,i){const l=e.querySelector(o),a=w(t,n,!!l,r,l?he(l):s);return l&&(h(a,[{label:n,snippet:E(l)}]),i&&J(a,i(l))),a}function he(e){const n=(e.getAttribute("content")||e.getAttribute("href")||e.textContent||"").trim();return n.length>80?n.slice(0,80)+"…":n||"presente"}const Ve=(e,t)=>{const n=t?.expects.metadata,o=[],r=e.location?.href,s=e.location?.host,i=e.querySelector('link[rel="canonical"]')?.getAttribute("href")||"",l=e.querySelector("title"),a=!!l&&!!l.textContent?.trim();o.push(h(w("metadata.title","<title>",a,z(n?.title),a?he(l):"Falta <title> o está vacío"),l?[{label:"<title>",snippet:E(l)}]:[])),o.push(L(e,"metadata.description","meta description",'meta[name="description"]',z(n?.description),"Falta <meta name=description>"));const c=e.querySelectorAll('meta[name="keywords"], meta[name="news_keywords"]');o.push(h(g("metadata.keywords","keywords / news_keywords",c.length?"ok":"info",c.length?\`\${c.length} tag(s)\`:"Sin keywords (opcional)"),O(e,'meta[name="keywords"], meta[name="news_keywords"]'))),o.push(L(e,"metadata.robots","meta robots",'meta[name="robots"]',z(n?.robots),"Sin meta robots (esperado solo en news/video)")),o.push(L(e,"metadata.canonical","link canonical",'link[rel="canonical"]',z(n?.canonical),"Falta <link rel=canonical>",m=>P(m.getAttribute("href"),{base:r,https:!0,sameHost:s})));const p=t?.expects.hreflang,d='link[rel="alternate"][hreflang]',u=e.querySelectorAll(d),x=Array.from(u).map(m=>m.getAttribute("hreflang")||""),C=p?.expected?p.langs.filter(m=>!x.includes(m)):[];o.push(h(w("metadata.hreflang","link alternate hreflang",u.length>0&&C.length===0,p?p.expected:null,p?.expected?C.length?\`Faltan hreflang: \${C.join(", ")}\`:\`\${u.length} hreflang (\${x.join(", ")})\`:u.length?\`\${u.length} hreflang (\${x.join(", ")})\`:"Sin hreflang (no esperado en esta ruta)"),O(e,d))),o.push(L(e,"metadata.og.title","og:title",'meta[property="og:title"]',z(n?.openGraph),"Falta og:title")),o.push(L(e,"metadata.og.image","og:image",'meta[property="og:image"]',z(n?.openGraph),"Falta og:image (sin imagen de preview al compartir)",m=>P(m.getAttribute("content"),{base:r,https:!0})));for(const m of Pe){if(m==="og:title"||m==="og:image")continue;const T="metadata."+m.replace(":","."),ae=m==="og:url"?le=>Je(le.getAttribute("content"),i,r):void 0;o.push(L(e,T,m,\`meta[property="\${m}"]\`,null,\`Sin \${m} (opcional)\`,ae))}const $=q(e,'meta[property^="og:"]');o.push(h(g("metadata.og.count","Tags og:* totales",$>0?"ok":"info",\`\${$} tag(s) og:*\`),O(e,'meta[property^="og:"]'))),o.push(L(e,"metadata.twitter.card","twitter:card",'meta[name="twitter:card"]',z(n?.twitter),"Falta twitter:card")),o.push(L(e,"metadata.twitter.image","twitter:image",'meta[name="twitter:image"]',z(n?.twitter),"Falta twitter:image",m=>P(m.getAttribute("content"),{base:r,https:!0})));for(const m of He){if(m==="twitter:card"||m==="twitter:image")continue;const T="metadata."+m.replace(":",".");o.push(L(e,T,m,\`meta[name="\${m}"]\`,null,\`Sin \${m} (opcional)\`))}const R=q(e,'meta[name^="twitter:"]');o.push(h(g("metadata.twitter.count","Tags twitter:* totales",R>0?"ok":"info",\`\${R} tag(s) twitter:*\`),O(e,'meta[name^="twitter:"]')));const j=q(e,'meta[property^="article:"]');o.push(h(w("metadata.article","article:* (published/modified/section/author/tag)",j>0,z(n?.article),j>0?\`\${j} tag(s) article:*\`:"Sin article:* (esperado solo en news)"),O(e,'meta[property^="article:"]'))),o.push(L(e,"metadata.rss","link alternate RSS",'link[rel="alternate"][type="application/rss+xml"]',z(n?.rss),"Sin alternate RSS (esperado solo en news)")),o.push(L(e,"metadata.manifest","link manifest",'link[rel="manifest"]',null,"Sin <link rel=manifest> (opcional)"));const k='link[rel="icon"], link[rel="apple-touch-icon"], link[rel="shortcut icon"], link[rel="mask-icon"]',A=q(e,k);return o.push(h(g("metadata.icons","favicons / icons",A?"ok":"info",A?\`\${A} icono(s)\`:"Sin favicons declarados"),O(e,k))),{key:"metadata",title:"Metadata",findings:o}};function Je(e,t,n){const o=P(e,{base:n,https:!0}),r=fe(e,n),s=fe(t,n);return r&&s&&r!==s&&o.push(M("warn",\`og:url no coincide con canonical (\${s})\`)),o}const Ke=(e,t)=>{const n=t?.expects.schemas,o=[];o.push(h(w("schemas.NewsMediaOrganization","NewsMediaOrganization (OrgList)",N(e,"script#WebsiteOrgListSchema")||U(e,"NewsMediaOrganization"),n?n.NewsMediaOrganization:!0,"Falta NewsMediaOrganization (se emite siempre)"),_(e,"NewsMediaOrganization"))),o.push(h(w("schemas.WebSite","WebSite (WebsiteList)",N(e,"script#WebsiteListSchema")||U(e,"WebSite"),n?n.WebSite:null,"Falta WebSite"),_(e,"WebSite")));{const a=h(w("schemas.NewsArticle","NewsArticle",U(e,"NewsArticle"),n?n.NewsArticle:null,"NewsArticle esperado pero AUSENTE (puede ser API vacía)"),_(e,"NewsArticle"));if(a.status==="ok"){const c=pe(e,"NewsArticle");c.length&&J(a,We(c[0],Be.NewsArticle))}o.push(a)}o.push(h(w("schemas.Videos","VideoObject",U(e,"VideoObject"),n?n.Videos:null,"VideoObject esperado pero AUSENTE"),_(e,"VideoObject"))),o.push(h(w("schemas.Autor","ProfilePage (Autor)",U(e,"ProfilePage"),n?n.Autor:null,"ProfilePage esperado pero AUSENTE"),_(e,"ProfilePage")));{const a=h(w("schemas.ItemList","ItemList",N(e,"script#webSiteItemListSchema")||U(e,"ItemList"),n?n.ItemList:null,"ItemList esperado pero AUSENTE (PuedeVacío)"),_(e,"ItemList"));if(a.status==="ok"){const c=pe(e,"ItemList"),p=c.reduce((d,u)=>d+Ge(u),0);a.detail=\`\${c.length} ItemList; \${p} entr\${p===1?"y":"ies"}\`,c.length&&p===0&&J(a,[M("warn","ItemList sin itemListElement (lista vacía)")])}o.push(a)}o.push(h(w("schemas.SoftwareApplication","SoftwareApplication",N(e,'script[id^="SoftwareApplicationSchema-"]')||U(e,"SoftwareApplication"),n?n.SoftwareApplication:null,"SoftwareApplication esperado pero AUSENTE"),_(e,"SoftwareApplication")));const r=e.querySelectorAll('script[type="application/ld+json"]');let s=0;r.forEach(a=>{if(a.textContent)try{JSON.parse(a.textContent)}catch{s++}});const i=Xe(e),l=i?\`; @graph: \${i} nodo(s)\`:"";return o.push(h(g("schemas.parsed","JSON-LD parseables",s?"warn":"ok",\`\${r.length} bloque(s); \${s} inválido(s)\${l}. Tipos: \${Qe(e)}\`),_e(e))),{key:"schemas",title:"Schemas JSON-LD",findings:o}};function Xe(e){let t=0;const n=o=>{if(!o||typeof o!="object")return;if(Array.isArray(o)){o.forEach(n);return}const r=o;Array.isArray(r["@graph"])&&(t+=r["@graph"].length,r["@graph"].forEach(n))};return F(e).forEach(n),t}function Qe(e){const t=new Set;return F(e).forEach(n=>{const o=n?.["@type"];typeof o=="string"?t.add(o):Array.isArray(o)&&o.forEach(r=>typeof r=="string"&&t.add(r))}),t.size?[...t].join(", "):"—"}const Ye=(e,t)=>{const n=t?.expects,o=e.querySelector('link[rel="amphtml"]');return{key:"amp",title:"AMP",findings:[h(w("amp.amphtml","link rel=amphtml",!!o,n?n.amp:null,o?\`href=\${o.getAttribute("href")||""}\`:"No hay AMP"),o?[{label:"link rel=amphtml",snippet:E(o)}]:[])]}};function H(e){return e.slice(0,8).map(t=>({label:t.getAttribute("src")||"(sin src)",snippet:E(t,300)}))}function me(e,t){const n=(e.getAttribute("src")||"").trim();if(!n||n.startsWith("data:"))return null;try{return new URL(n,t)}catch{return null}}const Ze=(e,t)=>{const n=Array.from(e.querySelectorAll("img")),o=[],r=e.location?.href;let s=null;if(t?.expects.assetsUrl)try{s=new URL(t.expects.assetsUrl).host}catch{s=null}o.push(g("images.count","<img> totales","info",\`\${n.length} imagen(es)\`));const i=n.filter(p=>!p.hasAttribute("alt"));o.push(h(g("images.alt","img sin atributo alt",i.length?"warn":"ok",i.length?\`\${i.length} <img> sin alt: \${Q(i)}\`:"Todas las <img> declaran alt"),H(i)));const l=n.filter(p=>p.getAttribute("loading")==="lazy").length;o.push(g("images.lazy","img loading=lazy","info",\`\${l}/\${n.length} lazy\`));const a=n.filter(p=>{const d=p.getAttribute("src");return d!==null&&d.trim()===""});o.push(h(g("images.emptySrc","img con src vacío",a.length?"warn":"ok",a.length?\`\${a.length} <img> con src=""\`:"Sin src vacíos"),H(a)));const c=n.filter(p=>me(p,r)?.protocol==="http:");if(o.push(h(g("images.insecure","img con src http (inseguro)",c.length?"warn":"ok",c.length?\`\${c.length} <img> en http: \${Q(c)}\`:"Sin imágenes http (mixed content)"),H(c))),s){const p=n.filter(d=>{const u=me(d,r);return!!u&&(u.protocol==="http:"||u.protocol==="https:")&&u.host!==s});o.push(h(g("images.offAssets",\`img fuera del dominio de assets (\${s})\`,"info",p.length?\`\${p.length} <img> en otro host: \${Q(p)}\`:"Todas las <img> absolutas vienen del dominio de assets"),H(p)))}return{key:"images",title:"Imágenes",findings:o}};function Q(e){return e.slice(0,5).map(t=>t.getAttribute("src")||"(sin src)").join(", ")}function Y(e,t){for(const n of t){const o=e.querySelector(n);if(o)return o}return null}function B(e,t){return e?[{label:t,snippet:E(e)}]:[]}const et=[Ie,Fe,Ve,Ke,Ye,(e,t)=>{const n=t?.expects,o=[],r=n?.assetsUrl;let s;r?s=Array.from(e.querySelectorAll('link[rel="preconnect"]')).some(c=>(c.getAttribute("href")||"").indexOf(r)===0):s=!!e.querySelector('link[rel="preconnect"]'),o.push(h(w("css.preconnectAssets","preconnect assets",s,n?n.preconnectAssets:null,"Falta <link rel=preconnect> a PUBLIC_ASSETS_URL"),O(e,'link[rel="preconnect"], link[rel="dns-prefetch"]'))),o.push(h(w("css.preloadImages","preload de imágenes",!!e.querySelector('link[rel="preload"][as="image"]'),n?n.preloadImages:null,"No hay preload de imágenes (preloadImages)"),O(e,'link[rel="preload"][as="image"]')));const i=!!e.querySelector('link[rel="preload"][as="font"]'),l=!!e.querySelector('link[href*="fonts.googleapis"], link[href*="fonts.gstatic"]'),a=n?.font;return a==="selfHosted"?o.push(w("css.font","Font self-hosted",i,!0,"Font self-hosted esperada pero sin <link as=font>")):a==="google"?o.push(w("css.font","Google Fonts",l,!0,"Google Fonts esperada pero ausente")):o.push(g("css.font","Fonts","info",i?"Font self-hosted presente":l?"Google Fonts presente":"Sin fuente configurada por el paquete")),o.push(h(g("css.stylesheets","<link rel=stylesheet> totales","info",\`\${q(e,'link[rel="stylesheet"]')} stylesheet(s) (los agrega el sitio)\`),O(e,'link[rel="stylesheet"]'))),{key:"cssImports",title:"CSS / preconnect / fonts",findings:o}},Ze,(e,t)=>{const n=t?.expects.analytics,o=[],r=Y(e,["script#googleanalytics",'script[src*="gtag/js"]']);o.push(h(w("content.ga4","GA4",!!r,n?n.ga4:null,"GA4 no configurado"),B(r,"GA4")));const s=Y(e,["script#GTM",'script[src*="googletagmanager.com/gtm.js"]','iframe[src*="googletagmanager.com/ns.html"]']);o.push(h(w("content.gtm","Google Tag Manager",!!s,n?n.gtm:null,"GTM no configurado"),B(s,"GTM")));const i=Y(e,["script#comscore",'script[src*="scorecardresearch"]']);o.push(h(w("content.comscore","Comscore",!!i,n?n.comscore:null,"Comscore no configurado"),B(i,"Comscore")));const l=e.querySelector('script[src*="marfeel"]')||Array.from(e.querySelectorAll("script")).find(u=>(u.textContent||"").includes("marfeel"))||null;o.push(h(w("content.marfeel","Marfeel",!!l,n?n.marfeel:null,"Marfeel no configurado"),B(l,"Marfeel")));const c=Array.from(e.querySelectorAll("h1,h2,h3,h4,h5,h6")).filter(u=>!(u.textContent||"").trim());o.push(h(g("content.emptyHeadings","Headings vacíos",c.length?"warn":"ok",c.length?\`\${c.length} heading(s) sin texto\`:"Sin headings vacíos"),c.slice(0,8).map(u=>({label:u.tagName.toLowerCase(),snippet:E(u,200)}))));const p=Array.from(e.querySelectorAll("a")),d=p.filter(u=>{const x=u.getAttribute("href");return x===null||x.trim()===""||x.trim()==="#"});return o.push(h(g("content.links","Links sin destino",d.length?"warn":"ok",\`\${p.length} link(s); \${d.length} sin href válido\`),d.slice(0,8).map(u=>({label:(u.textContent||"").trim().slice(0,40)||"(sin texto)",snippet:E(u,200)})))),{key:"content",title:"Contenido",findings:o}}];function ge(e,t){const n=et.map(r=>r(e,t)),o={ok:0,missing:0,warn:0,info:0};for(const r of n)for(const s of r.findings)o[s.status]++;return{route:t?t.route:null,hasManifest:!!t,totals:o,categories:n,blindSpots:t?t.blindSpots||[]:[]}}const tt=\`
|
|
31
31
|
/* all: initial corta toda herencia del host; los resets explícitos de abajo pinean la
|
|
32
32
|
base tipográfica para no depender del font-size/zoom de la página contenedora. */
|