sass-template-common 0.10.30 → 0.10.32

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.
@@ -5384,9 +5384,9 @@ const Qn = Symbol("bucket-retry-exhausted"), Uc = async (e, t) => {
5384
5384
  a[r] = i(t[n.indexOf(r)]);
5385
5385
  }
5386
5386
  return a;
5387
- }, pe = (e) => ({
5388
- title: e.title,
5389
- description: e.description
5387
+ }, pe = (e, t, n = 404) => ({
5388
+ title: t?.name ? `Error ${n} | ${t.name}` : `Error ${n}`
5389
+ // description: meta.description,
5390
5390
  // robots: 'noindex',
5391
5391
  }), ya = (e = "") => e.replace(/-/g, " ").replace(/^./, (t) => t.toUpperCase()), It = (e) => e.includes("/page/") ? e.replace(/\/page\/\d+$/, "") : e, ge = (e) => {
5392
5392
  try {
@@ -5409,8 +5409,8 @@ const Qn = Symbol("bucket-retry-exhausted"), Uc = async (e, t) => {
5409
5409
  };
5410
5410
  }, Pc = {
5411
5411
  404: (e) => {
5412
- const { meta: t } = e;
5413
- return pe(t);
5412
+ const { meta: t, config: n, statusCode: a = 404 } = e;
5413
+ return pe(t, n, a === 500 ? 500 : 404);
5414
5414
  },
5415
5415
  home: (e) => {
5416
5416
  const { meta: t, config: n } = e;
@@ -5437,9 +5437,9 @@ const Qn = Symbol("bucket-retry-exhausted"), Uc = async (e, t) => {
5437
5437
  },
5438
5438
  news: (e) => {
5439
5439
  const { meta: t, config: n, currentNew: a, schemasImages: r } = e;
5440
- if (!a) return pe(t);
5440
+ if (!a) return pe(t, n);
5441
5441
  const o = Ho(t, a, n, r);
5442
- return o ? { ...t, ...o } : pe(t);
5442
+ return o ? { ...t, ...o } : pe(t, n);
5443
5443
  },
5444
5444
  seccion: async (e) => {
5445
5445
  const { meta: t, config: n, pathname: a, slug: r, axiosApi: o, meta_info: i } = e, { CONFIG_sectionMetaInfo: l, PUBLIC_LNG: c } = I(), u = It(a).split("/"), h = [], m = kt(a), p = Number(n.newsListLimit) || 0, f = c === "en";
@@ -5493,10 +5493,10 @@ const Qn = Symbol("bucket-retry-exhausted"), Uc = async (e, t) => {
5493
5493
  exclude: "keywords,gallery,related,relatedexternal,external,customfields",
5494
5494
  page: m
5495
5495
  });
5496
- if (!C) return pe(t);
5496
+ if (!C) return pe(t, n);
5497
5497
  b = C.data.data, y = !(b.length < p);
5498
5498
  }
5499
- if (!b?.length) return pe(t);
5499
+ if (!b?.length) return pe(t, n);
5500
5500
  const A = b[0];
5501
5501
  y && h.push({ rel: "next", url: ut(n, u, m) }), m > 1 && h.push({ rel: "prev", url: mt(n, u, m) });
5502
5502
  const N = f ? `Latest News from ${A.info.section?.name} | ${n.name}` : `Últimas Noticias de ${A.info.section?.name} | ${n.name}`, v = f ? `All the latest news from ${A.info.section?.name} on ${n.name}` : `Todas las últimas noticias de ${A.info.section?.name} en ${n.name}`;
@@ -5535,7 +5535,7 @@ const Qn = Symbol("bucket-retry-exhausted"), Uc = async (e, t) => {
5535
5535
  }
5536
5536
  };
5537
5537
  } catch (b) {
5538
- return console.error(b), pe(t);
5538
+ return console.error(b), pe(t, n, 500);
5539
5539
  }
5540
5540
  },
5541
5541
  tema: async (e) => {
@@ -5549,9 +5549,9 @@ const Qn = Symbol("bucket-retry-exhausted"), Uc = async (e, t) => {
5549
5549
  exclude: "keywords,gallery,related,relatedexternal,external,customfields",
5550
5550
  page: u
5551
5551
  });
5552
- if (!y) return pe(t);
5552
+ if (!y) return pe(t, n);
5553
5553
  const A = y.data.entity;
5554
- if (!A) return pe(t);
5554
+ if (!A) return pe(t, n);
5555
5555
  y.data.data?.length < h || d.push({
5556
5556
  rel: "next",
5557
5557
  url: ut(n, c, u)
@@ -5595,7 +5595,7 @@ const Qn = Symbol("bucket-retry-exhausted"), Uc = async (e, t) => {
5595
5595
  }
5596
5596
  };
5597
5597
  } catch (y) {
5598
- return console.error(y), pe(t);
5598
+ return console.error(y), pe(t, n, 500);
5599
5599
  }
5600
5600
  },
5601
5601
  "ultimas-noticias": async (e) => {
@@ -5647,9 +5647,9 @@ const Qn = Symbol("bucket-retry-exhausted"), Uc = async (e, t) => {
5647
5647
  i.data.data[0],
5648
5648
  n
5649
5649
  ) ?? {}
5650
- } : pe(t);
5650
+ } : pe(t, n);
5651
5651
  } catch (i) {
5652
- return console.error("metadata (video) error:", i), pe(t);
5652
+ return console.error("metadata (video) error:", i), pe(t, n, 500);
5653
5653
  }
5654
5654
  },
5655
5655
  videos: async (e) => {
@@ -5660,7 +5660,7 @@ const Qn = Symbol("bucket-retry-exhausted"), Uc = async (e, t) => {
5660
5660
  query: "Category:(videohome OR destacadoseccion OR seccion)",
5661
5661
  page: Number(d)
5662
5662
  });
5663
- if (!h) return pe(t);
5663
+ if (!h) return pe(t, n);
5664
5664
  h.data.data.length < u || c.push({
5665
5665
  rel: "next",
5666
5666
  url: ut(n, l, d)
@@ -5683,7 +5683,7 @@ const Qn = Symbol("bucket-retry-exhausted"), Uc = async (e, t) => {
5683
5683
  }
5684
5684
  };
5685
5685
  } catch (h) {
5686
- return console.error(h), pe(t);
5686
+ return console.error(h), pe(t, n, 500);
5687
5687
  }
5688
5688
  },
5689
5689
  pages: async (e, t) => {
@@ -5692,7 +5692,7 @@ const Qn = Symbol("bucket-retry-exhausted"), Uc = async (e, t) => {
5692
5692
  const c = await l.getPages({
5693
5693
  path: t || a.servicePrefix + `/pages/${o}`
5694
5694
  });
5695
- if (!c) return pe(n);
5695
+ if (!c) return pe(n, a);
5696
5696
  const d = c.data.data[0]?.info.title ?? "", u = `${a.name} | ${d}`;
5697
5697
  return {
5698
5698
  ...n,
@@ -5700,7 +5700,7 @@ const Qn = Symbol("bucket-retry-exhausted"), Uc = async (e, t) => {
5700
5700
  ...Oe(n, a.siteUrl + r, u)
5701
5701
  };
5702
5702
  } catch (c) {
5703
- return console.error(c), pe(n);
5703
+ return console.error(c), pe(n, a, 500);
5704
5704
  }
5705
5705
  },
5706
5706
  contacto: (e) => {
@@ -5792,7 +5792,7 @@ const Qn = Symbol("bucket-retry-exhausted"), Uc = async (e, t) => {
5792
5792
  exclude: "keywords,gallery,related,relatedexternal,external,customfields",
5793
5793
  imagesizes: i.contract.note.listStandard
5794
5794
  });
5795
- if (!f) return pe(t);
5795
+ if (!f) return pe(t, n);
5796
5796
  f.data.data.length < m || d.push({
5797
5797
  rel: "next",
5798
5798
  url: ut(n, c, u)
@@ -5821,7 +5821,7 @@ const Qn = Symbol("bucket-retry-exhausted"), Uc = async (e, t) => {
5821
5821
  }
5822
5822
  };
5823
5823
  } catch (p) {
5824
- return console.error(p), pe(t);
5824
+ return console.error(p), pe(t, n, 500);
5825
5825
  }
5826
5826
  }
5827
5827
  }, Rc = (e) => e ? e.replace(/<[^>]*>/g, "").replace(/&nbsp;/gi, " ").replace(/&amp;/gi, "&").replace(/&quot;/gi, '"').replace(/&#39;/gi, "'").replace(/\s+/g, " ").trim() : "", Oc = ({
@@ -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: ${ud};
29
- }`,md=e=>{try{return new URL(e).origin}catch{return null}},pd=({config:e,fontUrl:t,isS3:a})=>{const n=e.fontDisplay??"swap",r=e.fontFormat??"woff2",o=md(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:fd(e,t,n,r)}})]})},qr=({config:e})=>{const t=e.fontDisplay??"swap",{url:a,isS3:n}=hd(e);return a?s.jsx(pd,{config:e,fontUrl:a,isS3:n}):Dr(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},pa={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]":Js(e.currentNew?.keywords),"[url_replace]":wn(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]":""})},Gr=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("/","")},Ne=e=>{const a=e.replace(/^\/|\/$/g,"").split("/"),n=a.indexOf("page");return n>0?`${a[n-1]??""}`:`${a[a.length-1]??""}`},jr={404:()=>"404",home:()=>"home",slug:e=>Ne(e.pathname),news:e=>gn(e.pathname)?.slug,seccion:e=>Ne(e.pathname),tema:e=>Ne(e.pathname),pages:e=>Ne(e.pathname),auth:e=>Ne(e.pathname),buscar:e=>Ne(e.pathname),"ultimas-noticias":e=>Ne(e.pathname),anuncia:e=>Ne(e.pathname),contacto:e=>Ne(e.pathname),autor:e=>Ne(e.pathname),video:e=>Ne(e.pathname),videos:e=>Ne(e.pathname)},Nt=e=>{const t=e.split("/"),a=t[t.length-1]??"1";return Number(a)>0?Number(a):1},gd=(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},Fr=({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"})]}),ga=Symbol("bucket-retry-exhausted");class wd{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=Lt(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=Ve(r,this.config.servicePrefix,"bloques","destacado",o),c=r.referer??it,d=`origin:destacado:bucket:${l}`,u=await Je(d,()=>At(()=>St(r.proxyUrl??r.url,c).get(l),ga,{label:"bucket:destacado",endpoint:l,params:t}),{shouldCache:f=>f!==ga});return u===ga?(Dt("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 xt=Symbol("bucket-retry-exhausted");function Oe(e,t,a,n){return Je(n,()=>e.get(t,{params:a,timeout:fr}).catch(r=>(console.log(`[${t}] Error: ${r.message}`),Promise.reject(r))),{staleOnError:!0})}class ze{constructor(t){this.props=t,this.contract=Lt(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,timeout:fa}).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"}),Promise.reject(i)));if(a?.menu){const i=U().PUBLIC_IS_OFFLINE==="true",l=ms(t.path),c=Ve(a,this.props?.config?.servicePrefix,"menu",l,i),d=a.referer??it,u=`origin:menu:bucket:${c}`,f=await Je(u,()=>At(()=>St(a.proxyUrl??a.url,d).get(c),xt,{label:"bucket:menu",endpoint:c,params:t}),{shouldCache:h=>h!==xt,staleOnError:!0});return f===xt?(Dt("menu",c),n):f}const o=`origin:menu:api:${t.path??""}`;return Je(o,()=>r(),{staleOnError:!0}).catch(()=>n)};getNewsListZone=t=>{const a=`list:zone:api:${t.zone??""}:${t.onmainpage??""}:${t.page??1}:${t.size??""}:${t.newstype??""}`;return Oe(this.props.axiosApi,"/news-list-zone",t,a)};getNewsListZoneSection=t=>{const a=`list:zone-section:api:${t.section??""}:${t.zone??""}:${t.page??1}:${t.size??""}:${t.newstype??""}`;return Oe(this.props.axiosApi,"/news-list-zone-section",t,a)};getNewsList=t=>{const a=`list:news:api:${t.page??1}:${t.size??""}:${t.newstype??""}:${t.query??""}`;return Oe(this.props.axiosApi,"/news-list",t,a)};getNewsListTag=t=>{const a=`list:tag:api:${t.tagid??""}:${t.tagtype??""}:${t.page??1}:${t.size??""}:${t.newstype??""}`;return Oe(this.props.axiosApi,"/news-list-tag",t,a)};getNewsListSection=t=>{const a=`list:section:api:${t.section??""}:${t.page??1}:${t.size??""}:${t.newstype??""}`;return Oe(this.props.axiosApi,"/news-list-section",t,a)};getNewsListAvanced=t=>{const a=`list:advanced:api:${t.query??""}:${t.page??1}:${t.size??""}:${t.newstype??""}`;return Oe(this.props.axiosApi,"/news-list-advanced",t,a)};getNewsListTags=t=>{const a=`list:tags:api:${t.tagid??""}:${t.tagtype??""}:${t.page??1}:${t.size??""}:${t.newstype??""}`;return Oe(this.props.axiosApi,"/news-list-tag",t,a)};getNewsListTagEntity=t=>{const a=`list:tag-entity:api:${t.tagid??""}:${t.page??1}:${t.size??""}:${t.newstype??""}`;return Oe(this.props.axiosApi,"/news-list-tag-entity",t,a)};getNewsListTagLite=t=>{const a=`list:tag-lite:api:${t.tagid??""}:${t.page??1}:${t.size??""}:${t.newstype??""}`;return Oe(this.props.axiosApi,"/news-list-tag-lite",t,a)};getNewsListAutor=t=>{const a=`list:autor:api:${t.user??""}:${t.page??1}:${t.size??""}:${t.newstype??""}`;return Oe(this.props.axiosApi,"/news-list-author",t,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},timeout:fa}).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"}),Promise.reject(d)))};if(a?.banners){const c=U().PUBLIC_IS_OFFLINE==="true",d=(t.template??"").toLowerCase(),u=Ve(a,this.props?.config?.servicePrefix,"banners",d,c),f=a.referer??it,h=`origin:banners:bucket:${u}`,p=await Je(h,()=>At(()=>St(a.proxyUrl??a.url,f).get(u),xt,{label:"bucket:banners",endpoint:u,params:t}),{shouldCache:m=>m!==xt,staleOnError:!0});return p===xt?(Dt("banners",u),n):p}const o=t.path?t.path:`/${this.configVersion}/banners.html`,l=`origin:banners:api:${`${this.props?.config?.servicePrefix??""}${o}`}:${t.template??""}`;return Je(l,()=>r(),{staleOnError:!0}).catch(()=>n)};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:it})=>!t||t===""?{data:[]}:At(()=>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:Sn()}));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=Re(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=ss(l),f=(Re(o)?.data??[])[0]?.list?.items?.map(A=>ss(A)),h=[];f?.forEach(A=>{A&&A.length>0&&A.forEach(b=>{b.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(A=>Re(A)?.data),g=await hn(d,this.getNews,`${this.contract.note.relatedPrimary}${this.contract.note.relatedThumb}`);let w=[];try{w=(await this.getNewsSchemasImages({path:t}))?.data?.data??[]}catch(A){console.warn("getNewsSchemasImages failed:",A),w=[]}return{news:i??[],autor:c,newsRelatedResponses:g,itemList:Re(o)?.data??[],newsRelatedListResponses:m,schemasImages:w??[]}}}class Hr extends ze{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 bd{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 wa=Symbol("bucket-retry-exhausted"),Ad=async(e,t)=>{const a=U().BUCKET_ORIGIN;if(!a)return{};const n=U().PUBLIC_IS_OFFLINE==="true",r=Ve(a,t.servicePrefix,"bloques","modulos-dinamicos",n),o=a.referer??it,i=`origin:slots:bucket:${r}`,l=await Je(i,()=>At(()=>St(a.proxyUrl??a.url,o).get(r),wa,{label:"bucket:slots",endpoint:r,params:{}}),{shouldCache:u=>u!==wa});if(l===wa)return Dt("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},yd=async(e,t,a,n,r,o,i)=>{const l=new Hr({config:t,imgSizes:a,imageSizes:n,axiosApi:e,exclude:i}),c=async()=>{const d=[];for(let h=1;h<=r;h++)for(let p=1;p<=o;p++)d.push({func:l.getBlockSass,slot_id:h+"_"+p});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 p=ln(u[h]),m="Home_"+(Math.floor(h/o)+1)+"_"+(Math.floor(h%o)+1);p&&(f[m]={...p})}return f};return U().BUCKET_ORIGIN?.slots?Ad(l,t):c()},Cd=e=>{const t=Re(e);return t&&t.data?t.data:t},vd=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??Cd;n[r]=i(t[a.indexOf(r)])}return n},he=e=>({title:e.title,description:e.description}),Vr=(e="")=>e.replace(/-/g," ").replace(/^./,t=>t.toUpperCase()),Ft=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}},Be=(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}}},zr={404:e=>{const{meta:t}=e;return he(t)},home:e=>{const{meta:t,config:a}=e;return{...t,...Be(t,a.siteUrl,t.title)}},slug:e=>{const{meta:t,config:a,slug:n,pathname:r}=e,o=`${a.name} | ${Vr(n)}`;return{...t,title:o,...Be(t,a.siteUrl+r,o)}},auth:e=>{const{meta:t,config:a,slug:n,pathname:r}=e,o=`${a.name} | ${Vr(n)}`;return{...t,title:o,...Be(t,a.siteUrl+r,o)}},news:e=>{const{meta:t,config:a,currentNew:n,schemasImages:r}=e;if(!n)return he(t);const o=pn(t,n,a,r);return o?{...t,...o}:he(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=Ft(n).split("/"),f=[],h=Nt(n),p=Number(a.newsListLimit)||0,m=c==="en";if(l&&i)return i.next&&f.push({rel:"next",url:st(a,u,h)}),h>1&&f.push({rel:"prev",url:at(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 g=new ze({config:a,axiosApi:o});try{let w,A;if(Xs("seccion")){const y=await yn({fetchFn:x=>g.getNewsListSection(x),baseParams:{section:r,newstype:a.newsType,exclude:"keywords,gallery,related,relatedexternal,external,customfields"},userPage:h,newsListLimit:p});w=y.data,A=y.hasNextPage}else{const y=await g.getNewsListSection({section:r,size:p,newstype:a.newsType,exclude:"keywords,gallery,related,relatedexternal,external,customfields",page:h});if(!y)return he(t);w=y.data.data,A=!(w.length<p)}if(!w?.length)return he(t);const b=w[0];A&&f.push({rel:"next",url:st(a,u,h)}),h>1&&f.push({rel:"prev",url:at(a,u,h)});const S=m?`Latest News from ${b.info.section?.name} | ${a.name}`:`Últimas Noticias de ${b.info.section?.name} | ${a.name}`,v=m?`All the latest news from ${b.info.section?.name} on ${a.name}`:`Todas las últimas noticias de ${b.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),he(t)}},tema:async e=>{const{meta:t,config:a,pathname:n,slug:r,axiosApi:o}=e,i=new ze({config:a,axiosApi:o}),c=Ft(n).split("/"),d=[],u=Nt(n),f=Number(a.newsListLimit)||0,h=/([t][0-9]{4})\w+/.exec(r||""),p=h&&h?.length>0?h[0].replace("t",""):"",{PUBLIC_TAG_TYPE:m,PUBLIC_LNG:g}=U(),w=g==="en";try{const A=await i.getNewsListTags({tagid:p,size:f,tagtype:Number(m),newstype:a.newsType,exclude:"keywords,gallery,related,relatedexternal,external,customfields",page:u});if(!A)return he(t);const b=A.data.entity;if(!b)return he(t);A.data.data?.length<f||d.push({rel:"next",url:st(a,c,u)}),u>1&&d.push({rel:"prev",url:at(a,c,u)});const S=w?`Latest news about ${b.name} | ${a.name}`:`Últimas noticias de ${b.name} | ${a.name}`,v=w?`The latest news about ${b.name} on ${a.name}`:`Las últimas noticias sobre ${b.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(A){return console.error(A),he(t)}},"ultimas-noticias":async e=>{const{meta:t,config:a,pathname:n,texts:r,axiosApi:o}=e,i=new ze({config:a,axiosApi:o}),c=Ft(n).split("/"),d=[],u=Nt(n),f=Number(a.newsListLimit)||0,h=`${a.name} | ${r.lastNotesTitle}`,p={...t,title:h,...Be(t,a.siteUrl+"/"+a.paths["ultimas-noticias"],h)};if(!o)return p;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:st(a,c,u)}),u>1&&d.push({rel:"prev",url:at(a,c,u)}),{...t,title:h,...Be(t,a.siteUrl+n,h),manifest:a.manifest,icons:{...a.icons,other:d},other:{"msapplication-TileImage":a.msapplicationTileImage??""}}):p}catch(m){return console.error(m),p}},video:async e=>{const{meta:t,config:a,internalPath:n,axiosApi:r}=e,o=new ze({config:a,axiosApi:r});try{const i=await o.getVideos({imagesizes:o.contract.og.social,path:n});return i?.data?.data?.length?{...t,...Tn(t,i.data.data[0],a)??{}}:he(t)}catch(i){return console.error("metadata (video) error:",i),he(t)}},videos:async e=>{const{meta:t,config:a,pathname:n,axiosApi:r}=e,o=new ze({config:a,axiosApi:r}),l=Ft(n).split("/"),c=[],d=Nt(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 he(t);f.data.data.length<u||c.push({rel:"next",url:st(a,l,d)}),d>1&&c.push({rel:"prev",url:at(a,l,d)});const h="Videos | "+a.name;return{...t,title:h,...Be(t,a.siteUrl+n,h),manifest:a.manifest,icons:{...a.icons,other:c},other:{"msapplication-TileImage":a.msapplicationTileImage??""}}}catch(f){return console.error(f),he(t)}},pages:async(e,t)=>{const{meta:a,config:n,pathname:r,slug:o,axiosApi:i}=e,l=new ze({config:n,axiosApi:i});try{const c=await l.getPages({path:t||n.servicePrefix+`/pages/${o}`});if(!c)return he(a);const d=c.data.data[0]?.info.title??"",u=`${n.name} | ${d}`;return{...a,title:u,...Be(a,n.siteUrl+r,u)}}catch(c){return console.error(c),he(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,...Be(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,...Be(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 ze({config:a,axiosApi:o}),c=Ft(n).split("/"),d=[],u=Nt(n),f=U().PUBLIC_LNG==="en",h=Number(a.newsListLimit)||0;try{const p=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 he(t);m.data.data.length<h||d.push({rel:"next",url:st(a,c,u)}),u>1&&d.push({rel:"prev",url:at(a,c,u)});const g=p?.data.data[0]?.info.fullname,w=f?`Latest News from ${g} | ${a.name}`:`Últimas Noticias de ${g} | ${a.name}`,A=f?`All the latest news from ${g} on ${a.name}`:`Todas las últimas noticias de ${g} en ${a.name}`;return{...t,title:w,description:A,...Be(t,a.siteUrl+n,w,A),manifest:a.manifest,icons:{...a.icons,other:d},other:{"msapplication-TileImage":a.msapplicationTileImage??""}}}catch(p){return console.error(p),he(t)}}},Sd=e=>e?e.replace(/<[^>]*>/g,"").replace(/&nbsp;/gi," ").replace(/&amp;/gi,"&").replace(/&quot;/gi,'"').replace(/&#39;/gi,"'").replace(/\s+/g," ").trim():"",Nd=({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?Ye(n.info.date.modified,c):void 0,u=e.addtional?.USER_JOBSTART?Ye(e.addtional.USER_JOBSTART,c):void 0,f=o&&o!=="false"?o:"",h=e.addtional,p=h?.USER_USERFB||h?.USER_PAGE_FACEBOOK||h?.USER_FACEBOOK_FAN_PAGE,m=h?.USER_USERTWT||h?.USER_PAGE_TWITTER,g=h?.USER_USERIG||h?.USER_PAGE_INSTAGRAM,w=h?.USER_USERLIN||h?.USER_PAGE_LINKEDIN,A=h?.USER_PAGE_TIKTOK,b=h?.USER_PAGE_YOUTUBE,S=h?.USER_PAGE_PINTEREST,v=l?h?.USER_POSITION_EN||"":h?.USER_JOBTITLE||h?.USER_POSITION||"",y=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:Sd(y),image:e.info.image?e.info.image.sizes.map(($,M)=>M===0&&e.info.image.sizes.length!==1?null:f+$.url).filter(Boolean):[],sameAs:[p,g,w,m,A,b,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(Pe(O))})},xd=`(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
+ }`,md=e=>{try{return new URL(e).origin}catch{return null}},pd=({config:e,fontUrl:t,isS3:a})=>{const n=e.fontDisplay??"swap",r=e.fontFormat??"woff2",o=md(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:fd(e,t,n,r)}})]})},qr=({config:e})=>{const t=e.fontDisplay??"swap",{url:a,isS3:n}=hd(e);return a?s.jsx(pd,{config:e,fontUrl:a,isS3:n}):Dr(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},pa={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]":Js(e.currentNew?.keywords),"[url_replace]":wn(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]":""})},Gr=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("/","")},Ne=e=>{const a=e.replace(/^\/|\/$/g,"").split("/"),n=a.indexOf("page");return n>0?`${a[n-1]??""}`:`${a[a.length-1]??""}`},jr={404:()=>"404",home:()=>"home",slug:e=>Ne(e.pathname),news:e=>gn(e.pathname)?.slug,seccion:e=>Ne(e.pathname),tema:e=>Ne(e.pathname),pages:e=>Ne(e.pathname),auth:e=>Ne(e.pathname),buscar:e=>Ne(e.pathname),"ultimas-noticias":e=>Ne(e.pathname),anuncia:e=>Ne(e.pathname),contacto:e=>Ne(e.pathname),autor:e=>Ne(e.pathname),video:e=>Ne(e.pathname),videos:e=>Ne(e.pathname)},Nt=e=>{const t=e.split("/"),a=t[t.length-1]??"1";return Number(a)>0?Number(a):1},gd=(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},Fr=({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"})]}),ga=Symbol("bucket-retry-exhausted");class wd{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=Lt(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=Ve(r,this.config.servicePrefix,"bloques","destacado",o),c=r.referer??it,d=`origin:destacado:bucket:${l}`,u=await Je(d,()=>At(()=>St(r.proxyUrl??r.url,c).get(l),ga,{label:"bucket:destacado",endpoint:l,params:t}),{shouldCache:f=>f!==ga});return u===ga?(Dt("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 xt=Symbol("bucket-retry-exhausted");function Oe(e,t,a,n){return Je(n,()=>e.get(t,{params:a,timeout:fr}).catch(r=>(console.log(`[${t}] Error: ${r.message}`),Promise.reject(r))),{staleOnError:!0})}class ze{constructor(t){this.props=t,this.contract=Lt(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,timeout:fa}).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"}),Promise.reject(i)));if(a?.menu){const i=U().PUBLIC_IS_OFFLINE==="true",l=ms(t.path),c=Ve(a,this.props?.config?.servicePrefix,"menu",l,i),d=a.referer??it,u=`origin:menu:bucket:${c}`,f=await Je(u,()=>At(()=>St(a.proxyUrl??a.url,d).get(c),xt,{label:"bucket:menu",endpoint:c,params:t}),{shouldCache:h=>h!==xt,staleOnError:!0});return f===xt?(Dt("menu",c),n):f}const o=`origin:menu:api:${t.path??""}`;return Je(o,()=>r(),{staleOnError:!0}).catch(()=>n)};getNewsListZone=t=>{const a=`list:zone:api:${t.zone??""}:${t.onmainpage??""}:${t.page??1}:${t.size??""}:${t.newstype??""}`;return Oe(this.props.axiosApi,"/news-list-zone",t,a)};getNewsListZoneSection=t=>{const a=`list:zone-section:api:${t.section??""}:${t.zone??""}:${t.page??1}:${t.size??""}:${t.newstype??""}`;return Oe(this.props.axiosApi,"/news-list-zone-section",t,a)};getNewsList=t=>{const a=`list:news:api:${t.page??1}:${t.size??""}:${t.newstype??""}:${t.query??""}`;return Oe(this.props.axiosApi,"/news-list",t,a)};getNewsListTag=t=>{const a=`list:tag:api:${t.tagid??""}:${t.tagtype??""}:${t.page??1}:${t.size??""}:${t.newstype??""}`;return Oe(this.props.axiosApi,"/news-list-tag",t,a)};getNewsListSection=t=>{const a=`list:section:api:${t.section??""}:${t.page??1}:${t.size??""}:${t.newstype??""}`;return Oe(this.props.axiosApi,"/news-list-section",t,a)};getNewsListAvanced=t=>{const a=`list:advanced:api:${t.query??""}:${t.page??1}:${t.size??""}:${t.newstype??""}`;return Oe(this.props.axiosApi,"/news-list-advanced",t,a)};getNewsListTags=t=>{const a=`list:tags:api:${t.tagid??""}:${t.tagtype??""}:${t.page??1}:${t.size??""}:${t.newstype??""}`;return Oe(this.props.axiosApi,"/news-list-tag",t,a)};getNewsListTagEntity=t=>{const a=`list:tag-entity:api:${t.tagid??""}:${t.page??1}:${t.size??""}:${t.newstype??""}`;return Oe(this.props.axiosApi,"/news-list-tag-entity",t,a)};getNewsListTagLite=t=>{const a=`list:tag-lite:api:${t.tagid??""}:${t.page??1}:${t.size??""}:${t.newstype??""}`;return Oe(this.props.axiosApi,"/news-list-tag-lite",t,a)};getNewsListAutor=t=>{const a=`list:autor:api:${t.user??""}:${t.page??1}:${t.size??""}:${t.newstype??""}`;return Oe(this.props.axiosApi,"/news-list-author",t,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},timeout:fa}).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"}),Promise.reject(d)))};if(a?.banners){const c=U().PUBLIC_IS_OFFLINE==="true",d=(t.template??"").toLowerCase(),u=Ve(a,this.props?.config?.servicePrefix,"banners",d,c),f=a.referer??it,h=`origin:banners:bucket:${u}`,p=await Je(h,()=>At(()=>St(a.proxyUrl??a.url,f).get(u),xt,{label:"bucket:banners",endpoint:u,params:t}),{shouldCache:m=>m!==xt,staleOnError:!0});return p===xt?(Dt("banners",u),n):p}const o=t.path?t.path:`/${this.configVersion}/banners.html`,l=`origin:banners:api:${`${this.props?.config?.servicePrefix??""}${o}`}:${t.template??""}`;return Je(l,()=>r(),{staleOnError:!0}).catch(()=>n)};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:it})=>!t||t===""?{data:[]}:At(()=>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:Sn()}));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=Re(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=ss(l),f=(Re(o)?.data??[])[0]?.list?.items?.map(A=>ss(A)),h=[];f?.forEach(A=>{A&&A.length>0&&A.forEach(b=>{b.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(A=>Re(A)?.data),g=await hn(d,this.getNews,`${this.contract.note.relatedPrimary}${this.contract.note.relatedThumb}`);let w=[];try{w=(await this.getNewsSchemasImages({path:t}))?.data?.data??[]}catch(A){console.warn("getNewsSchemasImages failed:",A),w=[]}return{news:i??[],autor:c,newsRelatedResponses:g,itemList:Re(o)?.data??[],newsRelatedListResponses:m,schemasImages:w??[]}}}class Hr extends ze{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 bd{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 wa=Symbol("bucket-retry-exhausted"),Ad=async(e,t)=>{const a=U().BUCKET_ORIGIN;if(!a)return{};const n=U().PUBLIC_IS_OFFLINE==="true",r=Ve(a,t.servicePrefix,"bloques","modulos-dinamicos",n),o=a.referer??it,i=`origin:slots:bucket:${r}`,l=await Je(i,()=>At(()=>St(a.proxyUrl??a.url,o).get(r),wa,{label:"bucket:slots",endpoint:r,params:{}}),{shouldCache:u=>u!==wa});if(l===wa)return Dt("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},yd=async(e,t,a,n,r,o,i)=>{const l=new Hr({config:t,imgSizes:a,imageSizes:n,axiosApi:e,exclude:i}),c=async()=>{const d=[];for(let h=1;h<=r;h++)for(let p=1;p<=o;p++)d.push({func:l.getBlockSass,slot_id:h+"_"+p});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 p=ln(u[h]),m="Home_"+(Math.floor(h/o)+1)+"_"+(Math.floor(h%o)+1);p&&(f[m]={...p})}return f};return U().BUCKET_ORIGIN?.slots?Ad(l,t):c()},Cd=e=>{const t=Re(e);return t&&t.data?t.data:t},vd=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??Cd;n[r]=i(t[a.indexOf(r)])}return n},he=(e,t,a=404)=>({title:t?.name?`Error ${a} | ${t.name}`:`Error ${a}`}),Vr=(e="")=>e.replace(/-/g," ").replace(/^./,t=>t.toUpperCase()),Ft=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}},Be=(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}}},zr={404:e=>{const{meta:t,config:a,statusCode:n=404}=e;return he(t,a,n===500?500:404)},home:e=>{const{meta:t,config:a}=e;return{...t,...Be(t,a.siteUrl,t.title)}},slug:e=>{const{meta:t,config:a,slug:n,pathname:r}=e,o=`${a.name} | ${Vr(n)}`;return{...t,title:o,...Be(t,a.siteUrl+r,o)}},auth:e=>{const{meta:t,config:a,slug:n,pathname:r}=e,o=`${a.name} | ${Vr(n)}`;return{...t,title:o,...Be(t,a.siteUrl+r,o)}},news:e=>{const{meta:t,config:a,currentNew:n,schemasImages:r}=e;if(!n)return he(t,a);const o=pn(t,n,a,r);return o?{...t,...o}:he(t,a)},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=Ft(n).split("/"),f=[],h=Nt(n),p=Number(a.newsListLimit)||0,m=c==="en";if(l&&i)return i.next&&f.push({rel:"next",url:st(a,u,h)}),h>1&&f.push({rel:"prev",url:at(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 g=new ze({config:a,axiosApi:o});try{let w,A;if(Xs("seccion")){const y=await yn({fetchFn:x=>g.getNewsListSection(x),baseParams:{section:r,newstype:a.newsType,exclude:"keywords,gallery,related,relatedexternal,external,customfields"},userPage:h,newsListLimit:p});w=y.data,A=y.hasNextPage}else{const y=await g.getNewsListSection({section:r,size:p,newstype:a.newsType,exclude:"keywords,gallery,related,relatedexternal,external,customfields",page:h});if(!y)return he(t,a);w=y.data.data,A=!(w.length<p)}if(!w?.length)return he(t,a);const b=w[0];A&&f.push({rel:"next",url:st(a,u,h)}),h>1&&f.push({rel:"prev",url:at(a,u,h)});const S=m?`Latest News from ${b.info.section?.name} | ${a.name}`:`Últimas Noticias de ${b.info.section?.name} | ${a.name}`,v=m?`All the latest news from ${b.info.section?.name} on ${a.name}`:`Todas las últimas noticias de ${b.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),he(t,a,500)}},tema:async e=>{const{meta:t,config:a,pathname:n,slug:r,axiosApi:o}=e,i=new ze({config:a,axiosApi:o}),c=Ft(n).split("/"),d=[],u=Nt(n),f=Number(a.newsListLimit)||0,h=/([t][0-9]{4})\w+/.exec(r||""),p=h&&h?.length>0?h[0].replace("t",""):"",{PUBLIC_TAG_TYPE:m,PUBLIC_LNG:g}=U(),w=g==="en";try{const A=await i.getNewsListTags({tagid:p,size:f,tagtype:Number(m),newstype:a.newsType,exclude:"keywords,gallery,related,relatedexternal,external,customfields",page:u});if(!A)return he(t,a);const b=A.data.entity;if(!b)return he(t,a);A.data.data?.length<f||d.push({rel:"next",url:st(a,c,u)}),u>1&&d.push({rel:"prev",url:at(a,c,u)});const S=w?`Latest news about ${b.name} | ${a.name}`:`Últimas noticias de ${b.name} | ${a.name}`,v=w?`The latest news about ${b.name} on ${a.name}`:`Las últimas noticias sobre ${b.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(A){return console.error(A),he(t,a,500)}},"ultimas-noticias":async e=>{const{meta:t,config:a,pathname:n,texts:r,axiosApi:o}=e,i=new ze({config:a,axiosApi:o}),c=Ft(n).split("/"),d=[],u=Nt(n),f=Number(a.newsListLimit)||0,h=`${a.name} | ${r.lastNotesTitle}`,p={...t,title:h,...Be(t,a.siteUrl+"/"+a.paths["ultimas-noticias"],h)};if(!o)return p;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:st(a,c,u)}),u>1&&d.push({rel:"prev",url:at(a,c,u)}),{...t,title:h,...Be(t,a.siteUrl+n,h),manifest:a.manifest,icons:{...a.icons,other:d},other:{"msapplication-TileImage":a.msapplicationTileImage??""}}):p}catch(m){return console.error(m),p}},video:async e=>{const{meta:t,config:a,internalPath:n,axiosApi:r}=e,o=new ze({config:a,axiosApi:r});try{const i=await o.getVideos({imagesizes:o.contract.og.social,path:n});return i?.data?.data?.length?{...t,...Tn(t,i.data.data[0],a)??{}}:he(t,a)}catch(i){return console.error("metadata (video) error:",i),he(t,a,500)}},videos:async e=>{const{meta:t,config:a,pathname:n,axiosApi:r}=e,o=new ze({config:a,axiosApi:r}),l=Ft(n).split("/"),c=[],d=Nt(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 he(t,a);f.data.data.length<u||c.push({rel:"next",url:st(a,l,d)}),d>1&&c.push({rel:"prev",url:at(a,l,d)});const h="Videos | "+a.name;return{...t,title:h,...Be(t,a.siteUrl+n,h),manifest:a.manifest,icons:{...a.icons,other:c},other:{"msapplication-TileImage":a.msapplicationTileImage??""}}}catch(f){return console.error(f),he(t,a,500)}},pages:async(e,t)=>{const{meta:a,config:n,pathname:r,slug:o,axiosApi:i}=e,l=new ze({config:n,axiosApi:i});try{const c=await l.getPages({path:t||n.servicePrefix+`/pages/${o}`});if(!c)return he(a,n);const d=c.data.data[0]?.info.title??"",u=`${n.name} | ${d}`;return{...a,title:u,...Be(a,n.siteUrl+r,u)}}catch(c){return console.error(c),he(a,n,500)}},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,...Be(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,...Be(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 ze({config:a,axiosApi:o}),c=Ft(n).split("/"),d=[],u=Nt(n),f=U().PUBLIC_LNG==="en",h=Number(a.newsListLimit)||0;try{const p=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 he(t,a);m.data.data.length<h||d.push({rel:"next",url:st(a,c,u)}),u>1&&d.push({rel:"prev",url:at(a,c,u)});const g=p?.data.data[0]?.info.fullname,w=f?`Latest News from ${g} | ${a.name}`:`Últimas Noticias de ${g} | ${a.name}`,A=f?`All the latest news from ${g} on ${a.name}`:`Todas las últimas noticias de ${g} en ${a.name}`;return{...t,title:w,description:A,...Be(t,a.siteUrl+n,w,A),manifest:a.manifest,icons:{...a.icons,other:d},other:{"msapplication-TileImage":a.msapplicationTileImage??""}}}catch(p){return console.error(p),he(t,a,500)}}},Sd=e=>e?e.replace(/<[^>]*>/g,"").replace(/&nbsp;/gi," ").replace(/&amp;/gi,"&").replace(/&quot;/gi,'"').replace(/&#39;/gi,"'").replace(/\s+/g," ").trim():"",Nd=({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?Ye(n.info.date.modified,c):void 0,u=e.addtional?.USER_JOBSTART?Ye(e.addtional.USER_JOBSTART,c):void 0,f=o&&o!=="false"?o:"",h=e.addtional,p=h?.USER_USERFB||h?.USER_PAGE_FACEBOOK||h?.USER_FACEBOOK_FAN_PAGE,m=h?.USER_USERTWT||h?.USER_PAGE_TWITTER,g=h?.USER_USERIG||h?.USER_PAGE_INSTAGRAM,w=h?.USER_USERLIN||h?.USER_PAGE_LINKEDIN,A=h?.USER_PAGE_TIKTOK,b=h?.USER_PAGE_YOUTUBE,S=h?.USER_PAGE_PINTEREST,v=l?h?.USER_POSITION_EN||"":h?.USER_JOBTITLE||h?.USER_POSITION||"",y=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:Sd(y),image:e.info.image?e.info.image.sizes.map(($,M)=>M===0&&e.info.image.sizes.length!==1?null:f+$.url).filter(Boolean):[],sameAs:[p,g,w,m,A,b,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(Pe(O))})},xd=`(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. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sass-template-common",
3
- "version": "0.10.30",
3
+ "version": "0.10.32",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"