sass-template-common 0.3.138 → 0.3.139

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.
@@ -1755,6 +1755,7 @@ declare type Props_12 = {
1755
1755
  [key: string]: string;
1756
1756
  };
1757
1757
  paths: RoutePathConfig;
1758
+ socialIconsFilled?: boolean;
1758
1759
  };
1759
1760
 
1760
1761
  declare type Props_13 = {
@@ -11525,8 +11525,9 @@ const Rs = {
11525
11525
  ranking: c,
11526
11526
  currentPage: u,
11527
11527
  slug: l,
11528
- texts: d = {}
11529
- } = e, h = [5, 10, 15], { SUB_PUBLICATION_PREFIX_IN_ROUTES: m } = W(), p = {
11528
+ texts: d = {},
11529
+ socialIconsFilled: h = !1
11530
+ } = e, m = [5, 10, 15], { SUB_PUBLICATION_PREFIX_IN_ROUTES: p } = W(), g = {
11530
11531
  5: 1,
11531
11532
  10: 2,
11532
11533
  15: 3
@@ -11534,7 +11535,7 @@ const Rs = {
11534
11535
  switch (n) {
11535
11536
  case "op1":
11536
11537
  return /* @__PURE__ */ a(Z, { children: /* @__PURE__ */ f(Cs, { children: [
11537
- /* @__PURE__ */ a(yu, { autor: s[0], autorIcon: e.autorIcon }),
11538
+ /* @__PURE__ */ a(yu, { autor: s[0], autorIcon: e.autorIcon, socialIconsFilled: h }),
11538
11539
  /* @__PURE__ */ a(
11539
11540
  Bo,
11540
11541
  {
@@ -11552,7 +11553,7 @@ const Rs = {
11552
11553
  paginatorComponent: /* @__PURE__ */ a(
11553
11554
  Sn,
11554
11555
  {
11555
- block_subPublication: m?.autor,
11556
+ block_subPublication: p?.autor,
11556
11557
  texts: d,
11557
11558
  pathname: i,
11558
11559
  query: "",
@@ -11561,8 +11562,8 @@ const Rs = {
11561
11562
  showNext: !(t.length < e.newsListLimit)
11562
11563
  }
11563
11564
  ),
11564
- children: Array.isArray(t) && t?.map((g, A) => /* @__PURE__ */ f(Cn, { children: [
11565
- h.includes(A + 1) && /* @__PURE__ */ a(
11565
+ children: Array.isArray(t) && t?.map((A, w) => /* @__PURE__ */ f(Cn, { children: [
11566
+ m.includes(w + 1) && /* @__PURE__ */ a(
11566
11567
  "div",
11567
11568
  {
11568
11569
  className: ta.itemContent + " banner-context",
@@ -11570,7 +11571,7 @@ const Rs = {
11570
11571
  ye,
11571
11572
  {
11572
11573
  banners: r ?? [],
11573
- name: `block_2_${p[A + 1]}`
11574
+ name: `block_2_${g[w + 1]}`
11574
11575
  }
11575
11576
  )
11576
11577
  }
@@ -11579,13 +11580,13 @@ const Rs = {
11579
11580
  pa,
11580
11581
  {
11581
11582
  autorIcon: e.autorIcon,
11582
- item: g,
11583
+ item: A,
11583
11584
  option: l,
11584
11585
  paths: e.paths
11585
11586
  },
11586
- A
11587
+ w
11587
11588
  )
11588
- ] }, A))
11589
+ ] }, w))
11589
11590
  }
11590
11591
  ) : /* @__PURE__ */ a(
11591
11592
  "div",
@@ -11634,7 +11635,7 @@ const Rs = {
11634
11635
  /* @__PURE__ */ a(
11635
11636
  Sn,
11636
11637
  {
11637
- block_subPublication: m?.autor,
11638
+ block_subPublication: p?.autor,
11638
11639
  texts: d,
11639
11640
  query: "",
11640
11641
  pathname: i,
@@ -157,5 +157,5 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
157
157
  ${I}
158
158
  <figcaption>${M}</figcaption>
159
159
  </figure>
160
- `}}catch(w){console.error("insertVideos error for",g,w),A=""}else A=f;o=u,a+=A,s.lastIndex=u}return a+=e.slice(o),a=qd(a),a}async function $d(e){const{news:n,banners:a,newsRelatedResponses:o,newsRelatedListResponses:s,slug:r,itemList:i,socials:c,getVideos:h,commonServices:l}=e;let d=n?.body?.rendered??"";d=d.replace(/<script[^>]*src=["']https:\/\/platform\.twitter\.com\/widgets\.js["'][^>]*><\/script>/gi,""),d=d.replace(/&nbsp;/g,""),d=Od(d,a),d=Dd(d),d=await Pd(d),d=await Md(d,e.texts,o),d=await jd(d,h),d=Ld(d),d=Bd(d);const u=n.main.sources??[],{NEWS_JOURNALIST_COMPONENT:f}=W(),g=n.config.articlepreview===gt.fotoGaleria&&n.hascontent?.hasgalleryimages;return t.jsxs("div",{className:On.content,children:[r!=="liveblogs"&&e.showHeaderImage?g?t.jsx(ir,{commonServices:l,newsformated:n,internal:n.info.link.internal}):t.jsx(Bs,{preview:n.preview}):null,t.jsx(pe,{banners:a,name:"block_1"}),t.jsx("div",{className:On.journalistArticleContent,children:f==="op1"?t.jsx(yd,{autorIcon:e.autorIcon,socials:c,news:n,texts:e.texts,noteShare:e.noteShare,paths:e.paths}):t.jsx(Ud,{autorIcon:e.autorIcon,socials:c,news:n,texts:e.texts,noteShare:e.noteShare,paths:e.paths})}),t.jsx(bd,{summary:n.main.summary}),t.jsx("main",{className:On.contentNews,suppressHydrationWarning:!0,id:"content-news-section",dangerouslySetInnerHTML:{__html:d}}),t.jsx(pd,{texts:e.texts,itemList:i,banners:a,slug:r,getVideos:h,newsRelatedListResponses:s??[]}),u.length>0&&t.jsxs("div",{className:On.noteSource,children:[t.jsx(vd,{}),t.jsx("p",{children:e.texts.noteSource+(u.length===1?"":"s")+": "+u.map(m=>m.name).join(", ")})]}),n&&n.hascontent&&n.hascontent.hasembeddedtwitter&&t.jsx("script",{async:!0,defer:!0,src:"https://platform.twitter.com/widgets.js"})]})}const Gd=e=>{const{content:n,title:a,slot_id:o}=e,s=e.slot_id&&e.slot_id!=="Nota_1";return n&&n.length!==0&&t.jsx(fe,{title:a,titleUrl:e.titleUrl,children:t.jsx(ht,{slot_id:o,cardWidth:200,children:n.map((r,i)=>{const c={...r,main:{...r.main,title:{...r.main.title,section:s?r.main.title.home:r.main.title.section}}};return t.jsx(Qt,{...c,titleGradient:!0,paths:e.paths},i)})})})},Qd=e=>{const{content:n,title:a,slot_id:o}=e,s=e.slot_id&&e.slot_id!=="Nota_1";return n&&n.length!==0&&t.jsx(fe,{title:a,titleUrl:e.titleUrl,children:t.jsx(ht,{slot_id:o,cardWidth:343,cardGap:32,visibleItems:3,children:n.map((r,i)=>{const c={...r,main:{...r.main,title:{...r.main.title,section:s?r.main.title.home:r.main.title.section}}};return t.jsx(Qt,{...c,titleGradient:!0,paths:e.paths},i)})})})},Hd=e=>{const{content:n,title:a,slot_id:o}=e,s=e.slot_id&&e.slot_id!=="Nota_1";return n&&n.length!==0&&t.jsx(fe,{title:a,titleUrl:e.titleUrl,children:t.jsx(ht,{slot_id:o,fullPageWidth:!0,visibleItems:1,pagination:!0,cardGap:0,children:n.map((r,i)=>{const c={...r,main:{...r.main,title:{...r.main.title,section:s?r.main.title.home:r.main.title.section}}};return E.createElement(Qt,{...c,key:i,titleGradient:!0,paths:e.paths})})})})},Dn=e=>{const n={};for(const a in e)a.startsWith("--")&&(n[a]=e[a]);return n},pt={headerSection:"_headerSection_1c69w_1",title:"_title_1c69w_11",subtitle:"_subtitle_1c69w_23",newsContent:"_newsContent_1c69w_36",containerCards:"_containerCards_1c69w_44",image:"_image_1c69w_50",blockHeadContainer:"_blockHeadContainer_1c69w_56"},Fd=e=>{const{content:n,title:a,isVideo:o}=e;if(!n||n.length===0)return;const s=n[0],r=n.slice(1),i=e.slot_id&&e.slot_id!=="Nota_1";return s&&r&&t.jsxs(fe,{title:a,titleUrl:e.titleUrl,children:[t.jsx("div",{className:pt.headerSection,children:t.jsxs("a",{style:{"--heightImageOverwriteMobile":"200%"},className:pt.image,href:s?.info?.link?.url,target:s?.info?.link?.target,children:[t.jsxs("div",{className:pt.blockHeadContainer,children:[t.jsx("p",{className:pt.title,children:s?.main?.title.home}),s?.main?.subtitle?.rendered&&t.jsx("p",{className:pt.subtitle,children:s?.main?.subtitle?.striped})]}),t.jsx(Ne,{preview:s.preview})]})}),t.jsxs("div",{className:pt.containerCards,children:[t.jsx("div",{className:"banner-context",style:{order:1},children:e.banner}),t.jsx("div",{className:pt.newsContent,children:Array.isArray(r)&&r.map((c,h)=>{const l={...c,main:{...c.main,title:{...c.main.title,section:i?c.main.title.home:c.main.title.section}}};return t.jsx("div",{style:{order:h},children:t.jsx($e,{...l,isVideo:o,paths:e.paths})},h)})})]})]})},zd=({printEdition:e,title:n})=>e&&t.jsx(fe,{title:n,children:t.jsx("div",{className:"iframe-container",dangerouslySetInnerHTML:{__html:e||""}})}),ur={banner:e=>t.jsx(pe,{...e,name:e.slot_id.replace("Home","block")}),readest:e=>t.jsx(bn,{...e}),"Modulo 1x3":e=>t.jsx(Ia,{...e}),"Modulo 1x4":e=>t.jsx(Xs,{...e}),"Modulo 1x5":e=>t.jsx(Rs,{...e}),"Destacado noticias":e=>t.jsx(Ys,{...e}),"Destacado full width":e=>t.jsx(Fd,{...e}),"Destacado videos":e=>t.jsx(er,{...e}),"Carrusel card":e=>t.jsx(ar,{...e}),"Carrusel story":e=>t.jsx(Gd,{...e}),"Carrusel owl":e=>t.jsx(Qd,{...e}),"Modulo fotogaleria":e=>t.jsx(Hd,{...e}),"Carrusel opinion":e=>t.jsx(or,{...e}),"Modulo 1x3 card":e=>t.jsx(nr,{...e}),"Modulo iframe":e=>t.jsx(zd,{...e})};function Kt({component:e,slot_id:n,data:a,banners:o}){if(o)return ur[e]&&t.jsx("div",{className:"home-slot",style:Dn(a),children:ur[e]({...a,banners:o,slot_id:n})})}function Vd({children:e,stylesConfigEntry:n}){return t.jsx("div",{className:"home-slot",style:Dn(n),children:e})}const fr={Diario:e=>{if(!e?.data||e.data.length===0)return;const n=e.data.slice(1);return t.jsx(zs,{...e.data[0],itemReverseOrder:!0,isLarge:!0,block:n,banners:e.banners,showSuper:e.showSuper,rightOnlyBanner:e.rightOnlyBanner,customSectionCardStyles:e.customSectionCardStyles,customNewsDescriptionStyles:e.customNewsDescriptionStyles,paths:e.paths})},"Diario con imagen":e=>{if(!e?.data||e.data.length===0)return;const n=e.data.slice(1);return t.jsx(zs,{...e.data[0],itemReverseOrder:!0,isLarge:!0,showSuper:e.showSuper,block:n,banners:e.banners,customSectionCardStyles:e.customSectionCardStyles,customNewsDescriptionStyles:e.customNewsDescriptionStyles,paths:e.paths})},Super:e=>t.jsx(Tt,{...e.data[0],paths:e.paths}),"3 notas verticales":e=>t.jsx(Yl,{content:e.data,customLargeSection:e.customLargeSection,customSlimSection:e.customSlimSection,paths:e.paths}),"3 notas horizontales":e=>t.jsx(Wl,{content:e.data,customLargeSection:e.customLargeSection,customSmallSection:e.customSmallSection,paths:e.paths})},Mn=({component:e,data:n,banners:a,rightOnlyBanner:o})=>t.jsx("div",{style:Dn(n),children:fr[e]&&fr[e]({...n,rightOnlyBanner:o,banners:a})}),Wd=({slots:e,DYNAMIC_SLOT_SUBINDEXES:n,stylesConfig:a,AutorIcon:o,config:s,banners:r,showTagBySection:i})=>{const c=[],l=n,d=Object.keys(e).length/l;for(let u=1;u<=d;u++)for(let f=1;f<=l;f++){const g="Home_"+u+"_"+f;!e[g]||!e[g].blockSass||!e[g].blockSass[0]||!e[g].blockSass[0].value||!e[g].blockSass[0].block||e[g].blockSass[0].block==="No Mostrar"||(e[g].blockSass[0]?.block==="Modulo iframe"?c.push(t.jsxs(ha,{id:e[g].blockSass[0].key,show:!!e[g].blockSass[0].value,order:(u-1)*l+(f-1),children:[t.jsx(Kt,{component:e[g].blockSass[0].block,banners:r,slot_id:g,data:{printEdition:e[g]?.blockSass[0].value,title:e[g]?.blockSass[0].title??"",titleUrl:e[g].blockSass[0].link??void 0}}),t.jsx(He,{children:t.jsx(je,{banners:r,index:"dynamic_"+u+"_"+f})})]},u+"_"+f)):c.push(t.jsxs(ha,{id:e[g].blockSass[0].key,show:!!e[g].content?.data,order:(u-1)*l+(f-1),children:[t.jsx(Kt,{component:e[g].blockSass[0].block,banners:r,slot_id:g,data:{...e[g].blockSass[0].block?a[e[g].blockSass[0].block]:[],content:e[g].content?.data??[],title:e[g].blockSass[0].title??void 0,titleUrl:e[g].blockSass[0].link??void 0,autorIcon:t.jsx(o,{}),paths:s.paths,showTagBySection:i}}),t.jsx(He,{children:t.jsx(je,{banners:r,index:"dynamic_"+u+"_"+f})})]},u+"_"+f)))}return c},Yd=({mainBlock:e,StylesConfigMain:n,config:a,banners:o})=>{const{PUBLIC_ENV:s}=W();if(s!=="local")return null;const r=e?.news?.data||[],i=(c,h)=>({...e?.news,...n[c],data:r.slice(0,h),paths:a.paths});return t.jsxs(t.Fragment,{children:[t.jsx(Mn,{component:"Super",data:i("Super",1),banners:o}),t.jsx(He,{children:t.jsx(je,{banners:o,index:1})}),t.jsx(Mn,{component:"3 notas verticales",data:i("3 notas verticales",3),banners:o}),t.jsx(He,{children:t.jsx(je,{banners:o,index:1})}),t.jsx(Mn,{component:"3 notas horizontales",data:i("3 notas horizontales",3),banners:o}),t.jsx(He,{children:t.jsx(je,{banners:o,index:1})})]})},Kd=e=>{const{config:n}=e,a=n.articlepreview;return!![gt.videoEmbedded,gt.videoYouTube,gt.iframe].includes(a)},Jd=async e=>{const{custom_complement:n,ranking:a=[],banners:o,autor:s=[],news:r=[],newsRelatedResponses:i=[],newsRelatedListResponses:c=[],itemList:h=[],socials:l,getVideos:d}=e,u=e.slug==="liveblogs",{SHOW_NEWS_MORE_NEWS:f,SHOW_NEWS_RELATED_NEWS:g,MORE_NEWS_SSR:m}=W();if(!(!r||!r[0]))return t.jsx(t.Fragment,{children:t.jsxs(sd,{className:Wt.contentLayout2,children:[t.jsx(id,{option:e.slug,news:r,paths:e.paths,headerSectionStyles:e.headerSectionStyles}),t.jsx(je,{banners:o,index:1}),!u&&e.commonServices&&t.jsx(Ed,{news:r[0],commonServices:e.commonServices}),t.jsx(rd,{texts:e.texts,paths:e.paths,slug:e.slug,itemList:h,ranking:a,readestCustomStyles:e.readestCustomStyles,bannerTop:t.jsx(pe,{banners:o??[],name:"right_1"}),banner:t.jsx(pe,{banners:o??[],name:"right_2"}),complement:t.jsxs("div",{id:"comentarios",className:Wt.complementContent,suppressHydrationWarning:!0,children:[s.length>0&&t.jsx(Hs,{texts:e.texts,autorIcon:e.autorIcon,autor:s[0],paths:e.paths}),r[0].authors.length>1&&t.jsx(Fs,{news:r[0],autorIcon:e.autorIcon,paths:e.paths,texts:e.texts}),r[0]?.keywords?.tags&&r[0]?.keywords?.tags?.length>0&&t.jsx("div",{className:`${Wt.tagContent} sass-note-tags-content`,children:t.jsx(Qs,{tags:r[0]?.keywords?.tags,paths:e.paths})}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"2rem"},suppressHydrationWarning:!0,children:[e.showComments&&t.jsx("div",{className:Wt.commentsSeparator,suppressHydrationWarning:!0,"data-hydrate":"LazyLoader","data-props":encodeURIComponent(JSON.stringify({render:"comment",internalPath:e.internalPath,API_ENV:e.API_ENV}))}),t.jsx(He,{children:t.jsx(je,{banners:o,index:2})}),g&&t.jsxs(t.Fragment,{children:[t.jsx(Kt,{component:"Carrusel card",banners:[],slot_id:"Nota_1",data:{...e.stylesConfig["Carrusel card"],content:e.relatedNewsList??[],title:e.texts.relatedNewsTitle,titleUrl:void 0,paths:e.paths}}),t.jsx(He,{children:t.jsx(je,{banners:o,index:3})})]}),f&&t.jsxs(t.Fragment,{children:[m?t.jsx(Kt,{component:"Modulo 1x3",banners:[],slot_id:"Nota_2",data:{...e.stylesConfig?e.stylesConfig["Modulo 1x3 Client"]?e.stylesConfig["Modulo 1x3 Client"]:e.stylesConfig["Modulo 1x3"]:{},content:e.moreNewsSSR??[],title:e.texts.moreNewsTitle,paths:e.paths,titleUrl:void 0}}):t.jsx(fe,{title:e.texts.moreNewsTitle,children:t.jsx("div",{suppressHydrationWarning:!0,"data-hydrate":"LazyLoader","data-props":encodeURIComponent(JSON.stringify({render:"more",stylesConfig:e.stylesConfig,section:r[0].info.section?.slug??"",internalPath:e.internalPath,paths:e.paths,API_ENV:e.API_ENV,fetchConfig:e.fetchConfig}))})}),t.jsx(He,{children:t.jsx(je,{banners:o,index:4})})]}),n&&n()]})]}),children:t.jsxs("section",{style:{"--avatar-content-align-items-desk":e.slug==="liveblogs"?"flex-start":"center"},children:[t.jsx($d,{texts:e.texts,autorIcon:e.autorIcon,socials:l,news:r[0],banners:o,newsRelatedResponses:i,newsRelatedListResponses:c,itemList:h,slug:e.slug,getVideos:d,noteShare:e.noteShare,paths:e.paths,showHeaderImage:!Kd(r[0]),commonServices:e.commonServices}),t.jsx(pe,{banners:o??[],name:"block_3"})]})})]})})},Jt={content:"_content_1046n_1",buttonStyled:"_buttonStyled_1046n_9",searchStyled:"_searchStyled_1046n_20",inputStyled:"_inputStyled_1046n_36",inputStyledTest:"_inputStyledTest_1046n_55"},Zd=e=>t.jsx("svg",{width:"68",height:"68",viewBox:"0 0 68 68",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:t.jsx("g",{children:t.jsx("path",{d:"M47.8043 46.6003L47.6635 46.7758L47.8232 46.9342L56.4762 55.5171C56.4768 55.5177 56.4774 55.5184 56.478 55.519C56.8524 55.9072 57.0616 56.4256 57.0616 56.965C57.0616 57.5048 56.8521 58.0234 56.4774 58.4117C56.2839 58.6065 56.0539 58.7611 55.8005 58.8667C55.5466 58.9724 55.2743 59.0269 54.9993 59.0269C54.7243 59.0269 54.452 58.9724 54.1981 58.8667C53.9442 58.7609 53.7138 58.6059 53.5201 58.4106L53.5194 58.4099L44.9327 49.8232L44.7743 49.6648L44.5995 49.805C40.4597 53.1252 35.2051 54.7331 29.9162 54.2981C24.6272 53.863 19.706 51.4181 16.1643 47.4661C12.6227 43.514 10.7298 38.3552 10.875 33.0503C11.0201 27.7455 13.1923 22.6979 16.9447 18.9455C20.6972 15.193 25.7448 13.0209 31.0496 12.8757C36.3544 12.7305 41.5133 14.6234 45.4653 18.165C49.4174 21.7067 51.8623 26.6279 52.2974 31.9169C52.7324 37.2058 51.1245 42.4604 47.8043 46.6003ZM22.4528 47.4552C25.1799 49.2774 28.3861 50.25 31.666 50.25C36.0641 50.25 40.2822 48.5029 43.3921 45.3929C46.5021 42.2829 48.2493 38.0649 48.2493 33.6667C48.2493 30.3868 47.2767 27.1806 45.4545 24.4535C43.6323 21.7264 41.0423 19.6008 38.0121 18.3457C34.9819 17.0905 31.6476 16.7621 28.4307 17.402C25.2139 18.0419 22.259 19.6213 19.9398 21.9405C17.6205 24.2597 16.0411 27.2146 15.4013 30.4314C14.7614 33.6483 15.0898 36.9827 16.345 40.0129C17.6001 43.0431 19.7256 45.633 22.4528 47.4552Z",fill:"white",stroke:"white",strokeWidth:"0.5"})})}),Xd=e=>t.jsx("form",{className:Jt.content,children:t.jsxs("div",{className:`${Jt.inputStyled} sass-buscar-form`,children:[t.jsx("input",{className:Jt.inputStyledTest,defaultValue:e.query,name:"query",placeholder:e.texts.searchKeyWord+"..."}),t.jsx("button",{className:Jt.buttonStyled,type:"submit",children:t.jsx(Zd,{className:Jt.searchStyled})})]})}),La={content:"_content_io3tv_1",newsContentSection:"_newsContentSection_io3tv_5",itemContent:"_itemContent_io3tv_10"},Rd=e=>{const{data:n,option:a,autor:o,page:s,banners:r,pathname:i,ranking:c,currentPage:h,slug:l,texts:d={}}=e,u=[5,10,15],{SUB_PUBLICATION_PREFIX_IN_ROUTES:f}=W(),g={5:1,10:2,15:3};switch(a){case"op1":return t.jsx(t.Fragment,{children:t.jsxs(ya,{children:[t.jsx(Os,{autor:o[0],autorIcon:e.autorIcon}),t.jsx(ba,{paths:e.paths,ranking:c,readestTitle:d.readestTitle??"",bannerTop:t.jsx(pe,{banners:r??[],name:"right_1"}),banner:t.jsx(pe,{banners:r??[],name:"right_2"}),children:t.jsx("section",{className:La.content,children:n.length>0?t.jsx(In,{className:[La.newsContentSection,"padding-0"].join(" "),paginatorComponent:t.jsx($t,{block_subPublication:f?.autor,texts:d,pathname:i,query:"",currentPage:h,maxPages:e.paginationLimit,showNext:!(n.length<e.newsListLimit)}),children:Array.isArray(n)&&n?.map((m,p)=>t.jsxs(E.Fragment,{children:[u.includes(p+1)&&t.jsx("div",{className:La.itemContent+" banner-context",children:t.jsx(pe,{banners:r??[],name:`block_2_${g[p+1]}`})}),t.jsx(Pn,{autorIcon:e.autorIcon,item:m,option:l,paths:e.paths},p)]},p))}):t.jsx("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",gap:"2rem"},children:t.jsx("p",{style:{fontWeight:"var(--fw)",width:"100%",fontSize:"18px",lineHeight:"26px",textAlign:"center"},children:d.autorNotResultMessage})})})})]})});case"op2":return t.jsx(t.Fragment,{children:t.jsxs(ya,{children:[t.jsx(Ds,{autor:o[0],autorIcon:e.autorIcon}),Array.isArray(n)?t.jsxs(t.Fragment,{children:[t.jsx(Ia,{content:n,title:"",hasLines:!0,banners:e.banners,bannerPositionIndex:[1,6,12],paths:e.paths,slot_id:"block_2"}),t.jsx($t,{block_subPublication:f?.autor,texts:d,query:"",pathname:i,maxPages:Number(e.paginationLimit),currentPage:Number(s),showNext:!((n.length??0)<Number(e.newsListLimit))})]}):t.jsx("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",gap:"2rem"},children:t.jsx("p",{style:{fontWeight:"var(--fw)",width:"100%",fontSize:"18px",lineHeight:"26px",textAlign:"center"},children:d.autorNotResultMessage})})]})});default:return t.jsx(t.Fragment,{})}},mr={content:"_content_pq89v_1",videoContent:"_videoContent_pq89v_9"},Zt={container:"_container_1xr2t_1",playStyled:"_playStyled_1xr2t_6",imageStyled:"_imageStyled_1xr2t_13",longer:"_longer_1xr2t_26",contentNews:"_contentNews_1xr2t_31",tagContent:"_tagContent_1xr2t_51",tag:"_tag_1xr2t_51",titular:"_titular_1xr2t_68",small:"_small_1xr2t_81",figure:"_figure_1xr2t_87",backDrop:"_backDrop_1xr2t_92",backDropAux:"_backDropAux_1xr2t_100"},gr=async e=>{const{size:n="longer",video:a}=e,o=a.main.image.sizes[0]?.url??"";return t.jsx("figure",{className:Zt.figure,children:t.jsxs("span",{className:Zt.backdrop,children:[t.jsx("span",{className:Zt.backDropAux}),t.jsx(B,{href:a.info.link.url,target:a.info.link.target,children:t.jsxs("div",{children:[a.main.image.sizes.map(async(s,r)=>s.width>=580?t.jsx("source",{media:"(width >=900px)",srcSet:await he(s.url)},r):t.jsx("source",{media:"(width <900px)",srcSet:await he(s.url)},r)),t.jsx("img",{fetchPriority:"low",loading:"lazy",className:[Zt.imageStyled,Zt[n]].join(" "),alt:"",src:o?await he(o):""})]})})]})})},e1=e=>{const{videos:n}=e;return t.jsx("div",{className:mr.content,children:t.jsx(St,{children:t.jsx(fe,{title:"Videos",isTitle:!0,children:t.jsxs("div",{className:mr.videoContent,children:[t.jsx(gr,{video:n[0]}),t.jsx("div",{style:{display:"flex",flexDirection:"column"},children:n.slice(1).map((a,o)=>t.jsx(gr,{size:"small",video:a},`video-small-${o}`))})]})})})})},At={content:"_content_ruy5q_1",videoContent:"_videoContent_ruy5q_9",articleSection:"_articleSection_ruy5q_21",contentLatout:"_contentLatout_ruy5q_31",title:"_title_ruy5q_36",article:"_article_ruy5q_21",correspondent:"_correspondent_ruy5q_64"},pr={container:"_container_1rq2h_1",playStyled:"_playStyled_1rq2h_9"},t1=e=>{const{video:n}=e,a=Cn();return t.jsx(B,{href:n.info.link.url?n.info.link.url:void 0,target:n.info.link.target,children:t.jsxs("section",{className:pr.container,children:[t.jsx(Ne,{isLarge:!0,preview:{sizes:n.main.image.sizes,description:n.main.description}}),t.jsx(a,{className:pr.playStyled})]})})},n1=e=>{const n=()=>e?.video.main.author?`${e?.video.main.author} - ${Le(e.video.info.date.created)}`:e?.video.main.author;return t.jsx("div",{className:At.content,children:t.jsx(St,{className:At.contentLatout,children:t.jsx(fe,{title:"Videos",isTitle:!0,children:t.jsxs("div",{className:At.videoContent,children:[t.jsx(t1,{video:e.video}),t.jsxs("div",{className:At.articleSection,children:[t.jsx(B,{className:At.title,href:e.video.info.link.url,target:e.video.info.link.target,children:e.video.main.title}),t.jsx("p",{className:At.article,children:Be(e.video.main.description)}),t.jsx("p",{className:At.correspondent,children:n()})]})]})})})})},a1=e=>{switch(e.option){case"op1":return t.jsx(e1,{videos:e.data});case"op2":return t.jsx(n1,{video:e.data[0]});default:return t.jsx(t.Fragment,{})}};function o1({containerId:e,containerId2:n}){return E.useEffect(()=>{try{let a=function(){const d=window.twttr;d?.widgets?d.widgets.load(o):l<10?(l++,requestAnimationFrame(a)):console.warn("No se pudo cargar widgets de Twitter")};const o=document.getElementById(e),s=document.getElementById(n);if(!o&&!s)return;const r=o?.querySelectorAll("script[src]")??[],i=s?.querySelectorAll("script[src]")??[];[...r,...i].forEach(d=>{const u=document.createElement("script");Array.from(d.attributes).forEach(f=>{u.setAttribute(f.name,f.value)}),d.replaceWith(u)});const h=document.querySelectorAll('script[src*="platform.twitter.com/widgets.js"]');if(h)for(let d=0;d<h.length;d++)h[d]?.remove();let l=0;if(document.querySelector('script[src*="platform.twitter.com/widgets.js"]'))a();else{const d=document.createElement("script");d.src="https://platform.twitter.com/widgets.js",d.async=!0,d.onload=a,document.body.appendChild(d)}}catch(a){console.warn("Error al procesar embeds de Twitter",a)}},[e]),null}const s1=e=>{const{isVideo:n=!1,isLarge:a=!1,hasShadow:o=!1,BackDropAuxHeigthMobile:s}=e,r=ga(),i=E.useMemo(()=>{const f=e?.preview?.sizes;if(f&&Array.isArray(f)&&f.length>0)return f;const g=e?.preview?.original;return g?.url?[{url:g.url,width:g.width||0,height:g.height||0}]:[]},[e?.preview?.sizes,e?.preview?.original]);if(!i.length||!i[0]?.url||i[0]?.url==="")return t.jsx("div",{className:se.imagePlaceholder});const{PUBLIC_API_HOST:c="",PUBLIC_ASSETS_URL:h}=e.API_ENV,l=i[0]?.url,d=h&&h!=="false"?h:c,u=l?.startsWith("http")||l?.includes(d)?l:d+l;return t.jsx("figure",{className:se.figure,children:t.jsxs("span",{className:se.backdrop,children:[t.jsx("span",{className:se.backdropAux,style:{height:s||"56.25%"}}),t.jsxs("picture",{children:[t.jsx("img",{fetchPriority:"low",loading:"lazy",className:se.imageStyled,alt:e.preview?.description||"",src:u,style:{boxShadow:o?"0px 4px 8px 0px #00000033":"0px"}}),n&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:se.boxPlayIcon,style:{height:a?"40%":"72px"}}),t.jsx(r,{className:se.playStyled,style:{width:a?"3rem":"27px",height:a?"3rem":"27px",marginBottom:a?"18px":".5rem",marginLeft:a?"30px":".5rem"}})]})]})]})})},r1=e=>t.jsx("svg",{width:"41",height:"33",viewBox:"0 0 41 33",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:t.jsx("path",{d:"M17.9576 21.2985C16.8233 21.2985 15.9277 22.194 15.9277 23.3283C15.9277 24.4627 16.8233 25.3582 17.9576 25.3582C19.0919 25.3582 19.9874 24.4627 19.9874 23.3283C19.9874 22.194 19.0919 21.2985 17.9576 21.2985ZM17.9576 19.2686C19.0919 19.2686 19.9874 18.3731 19.9874 17.2388C19.9874 16.1045 19.0919 15.2089 17.9576 15.2089C16.8233 15.2089 15.9277 16.1045 15.9277 17.2388C15.9277 18.3731 16.8233 19.2686 17.9576 19.2686ZM17.9576 13.1791C19.0919 13.1791 19.9874 12.2836 19.9874 11.1492C19.9874 10.0149 19.0919 9.11938 17.9576 9.11938C16.8233 9.11938 15.9277 10.0149 15.9277 11.1492C15.9277 12.2836 16.8233 13.1791 17.9576 13.1791Z",fill:"#7B888A"})}),Ar={info:{section:{name:"",slug:"",url:""},link:{url:"/",target:"",canonical:!1,internal:""},date:{date:"",created:0,modified:0,firstpublish:0,lastpublish:0}},config:{zonehome:void 0,priorityhome:"",zonesection:"",prioritysection:"",homepreview:"",showcomments:!0,showtime:!0,showauthor:!0,showuppertitle:!0,showsubtitle:!0,showads:!0},main:{title:{home:"",section:"",article:""},subtitle:{rendered:"",striped:""},tags:[]},authors:[{firstname:"",lastname:"",fullname:"",image:void 0,name:"",internaluser:!1}],preview:void 0},i1=({section:e,internalPath:n,banner:a,isVisible:o=!1,stylesConfig:s,API_ENV:r,fetchConfig:i,paths:c})=>{const h=r.FETCH_SIZE_MORE_NEWS??6,[l,d]=E.useState({data:Array.from({length:h},()=>Ar)}),[u,f]=E.useState(!1),g=E.useCallback(async()=>{if(!n)return;const A=new URLSearchParams({section:e,currentNewsLink:n}),w=await fetch(`/api/get-more-news?${A}`);if(!w.ok)throw new Error(`HTTP error! status: ${w.status}`);return await w.json()},[e,n]),m=E.useCallback(async()=>{const{PUBLIC_API_FRONT:A,PUBLIC_X_SECURITY_TOKEN:w,PUBLIC_API_PATH_VERSION:S,PUBLIC_PUBLICATION_ID:_}=r;if(!A||!w||!_||!S)throw new Error("Missing required environment variables");const I=await oe.get(`${A}${S}/news-list-section`,{params:{size:h+1,newstype:i.newsType,section:e,imagesizes:i.imgSizes,publication:parseInt(_)},headers:{"x-api-token":w,"Content-Type":"application/json"}});return{...I.data,data:I.data.data.filter(C=>C.info.link.internal!==n)}},[e,n,r]),p=E.useCallback(async()=>{if(!(u||!n)){f(!0);try{let A;r.PUBLIC_ENV!=="prod"?A=await g():A=await m(),d({...A,data:A.data.slice(0,h)})}catch(A){console.error("[/api/get-more-news] Error:",A.message),d(void 0)}}},[u,n,r.PUBLIC_ENV,g,m]);return E.useEffect(()=>{o&&p()},[o,p]),!l?.data||l.data.length===0?null:t.jsx(c1,{news:l.data,title:"Más Noticias",...s["Modulo 1x3 Client"]??s["Modulo 1x3"],hasLines:!0,showSubtitle:!0,rounded:!0,banner:a,API_ENV:r,paths:c,isVisible:o})},c1=e=>{const{news:n,hasLines:a=!1,API_ENV:o}=e,s=r=>a&&(r+1)%3!==0?ka.contentSeparator:"";return t.jsx("div",{className:ka.newsContent,style:{gap:a?"30px":"20px","--gridTemplateModlule":a?"repeat(auto-fit, 343px);":"repeat(auto-fit, 380px);"},children:n.map((r,i)=>{const{main:c,authors:h,info:l,preview:d,isVideo:u=!1,config:f,overImage:g="default",isTitle:m=!1,isLarge:p=!1,keywords:A}=r;return t.jsx("div",{className:s(i),style:{order:i},children:t.jsxs("section",{className:Gt.content,children:[t.jsx(B,{title:c?.title?.section,href:l?.link?.url??"invalidUrl","aria-label":c?.title?.section??"nota",target:l?.link?.target,children:t.jsx(s1,{isVisible:e.isVisible,preview:d,rounded:e.rounded,isVideo:u,isLarge:p,API_ENV:e.API_ENV,getImageUrl:e.getImageUrl})}),t.jsx("div",{className:Gt.newsDescription,children:t.jsx(l1,{main:c,SHOW_TAG_BY_SECTION:o.SHOW_TAG_BY_SECTION,authors:h,info:l,preview:d,share:e.share,config:f,overImage:g,isTitle:m,paths:e.paths,isVisible:e.isVisible,DATE_CONFIG:e.API_ENV,keywords:A})})]})},i)})})},l1=e=>{const{share:n=!1,cutSubtitle:a=!0,SHOW_TAG_BY_SECTION:o,keywords:s,info:r}=e,c=(()=>{if(!e?.authors||e.authors.length===0)return"";const d=e.authors[0],u=Le(e.info?.date?.modified,e.DATE_CONFIG);return d&&e?.config?.showtime&&e.config?.showauthor?`${d.fullname} - ${u}`:d&&e.config?.showauthor?d.fullname:e?.config?.showtime?u:""})(),h=()=>e.main.uppertitle?t.jsx("p",{className:te.uppertitle,title:e.main.uppertitle,children:e.main.uppertitle}):null,l=()=>{if(o&&s?.tags?.length&&s.tags.length>0){const d=s.tags[0],u=d.name;return t.jsxs("h3",{className:te.sectionDescriptionContainer,children:[d.approved?t.jsx(B,{"aria-label":u,block_subPublication:e.DATE_CONFIG?.SUB_PUBLICATION_PREFIX_IN_ROUTES?.tema,className:te.sectionDescription,href:et(d,e.paths),children:u}):t.jsx("div",{className:te.sectionDescription,children:u}),h()]})}else if(r?.section?.url){const d=r.section.name;return t.jsxs("h3",{className:te.sectionDescriptionContainer,children:[t.jsx(B,{"aria-label":d,className:te.sectionDescription,href:r.section.url,children:d}),h()]})}return null};return t.jsxs("div",{className:te.boxInformation,children:[n&&t.jsx(r1,{className:te.dotStyles}),t.jsx(l,{}),t.jsx("h2",{className:te.articule,children:t.jsx(B,{className:te.linkStyled,style:{"--isLink":e?.info?.link?.url?"underline":"none"},"aria-label":e.main?.title?.section??"nota",href:e?.info?.link?.url,target:e?.info?.link?.target,children:e.main?.title?.section})}),e.config?.showsubtitle&&e.main?.subtitle?.striped&&t.jsx("p",{className:te.description,style:{"--fontSizeSubTitle":e.fontSizeSubTitle,"--lineHeightSubTitle":e.lineHeightSubTitle,"--colorSubTitle":e.colorSubTitle},children:a?Be(e.main.subtitle.striped):e.main.subtitle.striped}),(e?.config?.showtime||e.config?.showauthor)&&c&&t.jsx(t.Fragment,{children:e.authors?.[0]?.internaluser?t.jsx(B,{block_subPublication:e.DATE_CONFIG?.SUB_PUBLICATION_PREFIX_IN_ROUTES?.autor,className:te.correspondentLink,href:`/${e.paths.autor}/${e.authors[0].name}`,children:c}):t.jsx("div",{className:te.correspondent,children:c})})]})},d1=({user:e,handleLogout:n,message:a})=>{const o=()=>{const r=document.querySelector(".user-actions-options");r&&r.classList.toggle("show")},s=e.firstname??"Usuario";return t.jsx("div",{className:"comment-item",children:t.jsxs("div",{style:{display:"flex",gap:"14px"},children:[e&&e.picture&&e.picture!==""?t.jsx("img",{className:"comment-avatar-img",src:e.picture,alt:e.username}):t.jsx("div",{className:"comment-avatar",children:s.charAt(0).toUpperCase()}),t.jsxs("div",{style:{flex:1},children:[t.jsxs("div",{className:"comment-header",children:[t.jsxs("span",{className:"comment-username user-welcome",children:["Hola ",s,"!"]}),t.jsx("div",{className:"user-actions-options",children:t.jsx("button",{onClick:()=>{n()},children:"Cerrar Sesion"})}),t.jsx("button",{className:"user-actions-span",onClick:o,children:t.jsx(xn,{width:13,height:13,fill:"black"})})]}),t.jsx("p",{className:"comment-text",children:a})]})]})})},ge={overlay:"_overlay_qj491_3",popup:"_popup_qj491_17",title:"_title_qj491_40",optionsContainer:"_optionsContainer_qj491_52",option:"_option_qj491_52",radioInput:"_radioInput_qj491_66",radioCustom:"_radioCustom_qj491_70",optionLabel:"_optionLabel_qj491_97",buttons:"_buttons_qj491_110",cancelButton:"_cancelButton_qj491_117",closeButton:"_closeButton_qj491_118",buttonAlone:"_buttonAlone_qj491_137",reportButton:"_reportButton_qj491_143",successContainer:"_successContainer_qj491_163",thumbsUp:"_thumbsUp_qj491_171",successMessage:"_successMessage_qj491_177",errorMessage:"_errorMessage_qj491_218",loadingContainer:"_loadingContainer_qj491_231"},wr=async(e,n)=>{if(!e)return!1;const{CAPTCHA_PROJECT:a,CAPTCHA_KEY_V2:o,COMMENTS_CAPTCHA_API_KEY:s}=n;try{const r=a,i=o,l=await(await fetch(`https://recaptchaenterprise.googleapis.com/v1/projects/${r}/assessments?key=${s}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event:{token:e,siteKey:i}})})).json();return console.log("reCAPTCHA Enterprise verification result:",l),l.tokenProperties?.valid===!0}catch(r){return console.error("Error verificando reCAPTCHA Enterprise:",r),!1}};async function h1({publication:e,username:n,id:a,type:o,baseUrl:s,captchaToken:r,apiToken:i,securityToken:c,COMMENTS_VARS:h}){if(!e||!n||!a||!o||!r)throw new Error("Faltan parámetros requeridos: publication, username, id, type, captchaToken");if(typeof e!="string"||typeof n!="string"||typeof a!="string"||typeof o!="string"||typeof r!="string")throw new Error("Todos los parámetros deben ser strings");if(!await wr(r,h))throw new Error("Token de captcha inválido");if(!i)throw new Error("Falta el token de API del CMS");const l=`${s}/system/modules/com.tfsla.diario.base/templates/hit/5.0/1/newcomments/report`,d=encodeURIComponent(o),u=new URLSearchParams({publication:e,username:n??!1,id:a,type:d}),f=`${l}?${u.toString()}`;try{console.log("Reporting comment:",{publication:e,username:n,id:a,type:o,encodedType:d,url:f});const g=await oe.get(f,{headers:{"User-Agent":"blu3st@ck-react","x-security-token":c,"x-api-token":i,"Content-Type":"application/json"}});if(console.log("Report response:",g.data),g.status===200||g.status===201)return{type:"success",message:"Comentario reportado exitosamente",status:g.status,data:g.data};throw new Error(`Respuesta inesperada del servidor: ${g.status}`)}catch(g){if(console.error("Error reporting comment:",g),oe.isAxiosError(g)){const m=g.response?.status,p=g.response?.data;throw m===400?new Error("Datos inválidos para el reporte"):m===401?new Error("Token de API inválido"):m===403?new Error("Acceso denegado para reportar comentario"):m===404?new Error("Comentario no encontrado"):m===409?new Error("El comentario ya fue reportado por este usuario"):m===500?new Error("Error interno del servidor CMS"):new Error(p?.error||p?.message||`Error HTTP ${m}: No se pudo reportar el comentario`)}throw g}}const Qe={spam:"Es spam o contenido comercial no deseado",inappropriate:"Lenguaje inadecuado",hate:"Discurso o símbolos de odio",misinformation:"Información falsa o fraude",terrorism:"Promueve el terrorismo",intellectual:"Violación de propiedad intelectual",bullying:"Bullying o acoso"};function u1(e){return Qe[e]}const wt=300,Xe={username:"anonimo",firstname:"Usuario",lastname:"Anonimo"};function f1(e){const n=e.split(" ");if(n.length!==3)return e;const[a,o,s]=n,r=o.charAt(0).toUpperCase()+o.slice(1).toLowerCase();return`${a} ${r} ${s}`}const Ba=(e,n,a)=>{if(!e||!e.current)return{boolean:!1,text:""};const o=e.current?.value||"",s=o.length>wt,{PUBLIC_ENV:r}=a,i=r==="local",c=o.trim()!==""&&(i||n!=="")&&!s,h=s?`No debes exceder el limite de ${wt} caracteres.`:"Debes completar todos los campos para comentar.";return{boolean:c,text:h}},yr=e=>{const n=e.cookie.split("; ").find(a=>a.startsWith("reported="));if(!n)return[];try{return JSON.parse(decodeURIComponent(n.split("=")[1]??""))}catch{return[]}},m1=(e,n)=>{const a=yr(e);a.includes(n)||(a.push(n),e.cookie=`reported=${encodeURIComponent(JSON.stringify(a))}; path=/; max-age=${3600*24*1}`)};function g1(e){const[n,a]=e.split("@");if(!n||!a)return e;let o="";n.length<=2?o=n[0]+"*":o=n[0]+"*".repeat(n.length-2)+n[n.length-1];const s=a.lastIndexOf(".");if(s===-1)return`${o}@${a}`;const r=a.slice(0,s),i=a.slice(s);let c="";return r.length<=2?c=r[0]+"*":c=r[0]+"*".repeat(r.length-2)+r[r.length-1],`${o}@${c}${i}`}var jn={exports:{}},$n={exports:{}},ne={};var Cr;function p1(){if(Cr)return ne;Cr=1;var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,a=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,r=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,h=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,A=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function _(C){if(typeof C=="object"&&C!==null){var T=C.$$typeof;switch(T){case n:switch(C=C.type,C){case h:case l:case o:case r:case s:case u:return C;default:switch(C=C&&C.$$typeof,C){case c:case d:case m:case g:case i:return C;default:return T}}case a:return T}}}function I(C){return _(C)===l}return ne.AsyncMode=h,ne.ConcurrentMode=l,ne.ContextConsumer=c,ne.ContextProvider=i,ne.Element=n,ne.ForwardRef=d,ne.Fragment=o,ne.Lazy=m,ne.Memo=g,ne.Portal=a,ne.Profiler=r,ne.StrictMode=s,ne.Suspense=u,ne.isAsyncMode=function(C){return I(C)||_(C)===h},ne.isConcurrentMode=I,ne.isContextConsumer=function(C){return _(C)===c},ne.isContextProvider=function(C){return _(C)===i},ne.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===n},ne.isForwardRef=function(C){return _(C)===d},ne.isFragment=function(C){return _(C)===o},ne.isLazy=function(C){return _(C)===m},ne.isMemo=function(C){return _(C)===g},ne.isPortal=function(C){return _(C)===a},ne.isProfiler=function(C){return _(C)===r},ne.isStrictMode=function(C){return _(C)===s},ne.isSuspense=function(C){return _(C)===u},ne.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===o||C===l||C===r||C===s||C===u||C===f||typeof C=="object"&&C!==null&&(C.$$typeof===m||C.$$typeof===g||C.$$typeof===i||C.$$typeof===c||C.$$typeof===d||C.$$typeof===A||C.$$typeof===w||C.$$typeof===S||C.$$typeof===p)},ne.typeOf=_,ne}var ae={};var br;function A1(){return br||(br=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,a=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,r=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,h=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,A=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function _(P){return typeof P=="string"||typeof P=="function"||P===o||P===l||P===r||P===s||P===u||P===f||typeof P=="object"&&P!==null&&(P.$$typeof===m||P.$$typeof===g||P.$$typeof===i||P.$$typeof===c||P.$$typeof===d||P.$$typeof===A||P.$$typeof===w||P.$$typeof===S||P.$$typeof===p)}function I(P){if(typeof P=="object"&&P!==null){var ye=P.$$typeof;switch(ye){case n:var Vn=P.type;switch(Vn){case h:case l:case o:case r:case s:case u:return Vn;default:var Qr=Vn&&Vn.$$typeof;switch(Qr){case c:case d:case m:case g:case i:return Qr;default:return ye}}case a:return ye}}}var C=h,T=l,M=c,Q=i,K=n,H=d,O=o,ee=m,le=g,$=a,L=r,k=s,j=u,x=!1;function z(P){return x||(x=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),y(P)||I(P)===h}function y(P){return I(P)===l}function N(P){return I(P)===c}function q(P){return I(P)===i}function G(P){return typeof P=="object"&&P!==null&&P.$$typeof===n}function D(P){return I(P)===d}function F(P){return I(P)===o}function V(P){return I(P)===m}function Y(P){return I(P)===g}function X(P){return I(P)===a}function R(P){return I(P)===r}function J(P){return I(P)===s}function ce(P){return I(P)===u}ae.AsyncMode=C,ae.ConcurrentMode=T,ae.ContextConsumer=M,ae.ContextProvider=Q,ae.Element=K,ae.ForwardRef=H,ae.Fragment=O,ae.Lazy=ee,ae.Memo=le,ae.Portal=$,ae.Profiler=L,ae.StrictMode=k,ae.Suspense=j,ae.isAsyncMode=z,ae.isConcurrentMode=y,ae.isContextConsumer=N,ae.isContextProvider=q,ae.isElement=G,ae.isForwardRef=D,ae.isFragment=F,ae.isLazy=V,ae.isMemo=Y,ae.isPortal=X,ae.isProfiler=R,ae.isStrictMode=J,ae.isSuspense=ce,ae.isValidElementType=_,ae.typeOf=I})()),ae}var _r;function qa(){return _r||(_r=1,process.env.NODE_ENV==="production"?$n.exports=p1():$n.exports=A1()),$n.exports}var Pa,vr;function w1(){if(vr)return Pa;vr=1;var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(r){if(r==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}function s(){try{if(!Object.assign)return!1;var r=new String("abc");if(r[5]="de",Object.getOwnPropertyNames(r)[0]==="5")return!1;for(var i={},c=0;c<10;c++)i["_"+String.fromCharCode(c)]=c;var h=Object.getOwnPropertyNames(i).map(function(d){return i[d]});if(h.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(d){l[d]=d}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Pa=s()?Object.assign:function(r,i){for(var c,h=o(r),l,d=1;d<arguments.length;d++){c=Object(arguments[d]);for(var u in c)n.call(c,u)&&(h[u]=c[u]);if(e){l=e(c);for(var f=0;f<l.length;f++)a.call(c,l[f])&&(h[l[f]]=c[l[f]])}}return h},Pa}var Oa,Sr;function Da(){if(Sr)return Oa;Sr=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Oa=e,Oa}var Ma,Nr;function Ir(){return Nr||(Nr=1,Ma=Function.call.bind(Object.prototype.hasOwnProperty)),Ma}var ja,Er;function y1(){if(Er)return ja;Er=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var n=Da(),a={},o=Ir();e=function(r){var i="Warning: "+r;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function s(r,i,c,h,l){if(process.env.NODE_ENV!=="production"){for(var d in r)if(o(r,d)){var u;try{if(typeof r[d]!="function"){var f=Error((h||"React class")+": "+c+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}u=r[d](i,d,h,c,null,n)}catch(m){u=m}if(u&&!(u instanceof Error)&&e((h||"React class")+": type specification of "+c+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in a)){a[u.message]=!0;var g=l?l():"";e("Failed "+c+" type: "+u.message+(g??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(a={})},ja=s,ja}var $a,Tr;function C1(){if(Tr)return $a;Tr=1;var e=qa(),n=w1(),a=Da(),o=Ir(),s=y1(),r=function(){};process.env.NODE_ENV!=="production"&&(r=function(c){var h="Warning: "+c;typeof console<"u"&&console.error(h);try{throw new Error(h)}catch{}});function i(){return null}return $a=function(c,h){var l=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function u(y){var N=y&&(l&&y[l]||y[d]);if(typeof N=="function")return N}var f="<<anonymous>>",g={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:S(),arrayOf:_,element:I(),elementType:C(),instanceOf:T,node:H(),objectOf:Q,oneOf:M,oneOfType:K,shape:ee,exact:le};function m(y,N){return y===N?y!==0||1/y===1/N:y!==y&&N!==N}function p(y,N){this.message=y,this.data=N&&typeof N=="object"?N:{},this.stack=""}p.prototype=Error.prototype;function A(y){if(process.env.NODE_ENV!=="production")var N={},q=0;function G(F,V,Y,X,R,J,ce){if(X=X||f,J=J||Y,ce!==a){if(h){var P=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw P.name="Invariant Violation",P}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ye=X+":"+Y;!N[ye]&&q<3&&(r("You are manually calling a React.PropTypes validation function for the `"+J+"` prop on `"+X+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),N[ye]=!0,q++)}}return V[Y]==null?F?V[Y]===null?new p("The "+R+" `"+J+"` is marked as required "+("in `"+X+"`, but its value is `null`.")):new p("The "+R+" `"+J+"` is marked as required in "+("`"+X+"`, but its value is `undefined`.")):null:y(V,Y,X,R,J)}var D=G.bind(null,!1);return D.isRequired=G.bind(null,!0),D}function w(y){function N(q,G,D,F,V,Y){var X=q[G],R=k(X);if(R!==y){var J=j(X);return new p("Invalid "+F+" `"+V+"` of type "+("`"+J+"` supplied to `"+D+"`, expected ")+("`"+y+"`."),{expectedType:y})}return null}return A(N)}function S(){return A(i)}function _(y){function N(q,G,D,F,V){if(typeof y!="function")return new p("Property `"+V+"` of component `"+D+"` has invalid PropType notation inside arrayOf.");var Y=q[G];if(!Array.isArray(Y)){var X=k(Y);return new p("Invalid "+F+" `"+V+"` of type "+("`"+X+"` supplied to `"+D+"`, expected an array."))}for(var R=0;R<Y.length;R++){var J=y(Y,R,D,F,V+"["+R+"]",a);if(J instanceof Error)return J}return null}return A(N)}function I(){function y(N,q,G,D,F){var V=N[q];if(!c(V)){var Y=k(V);return new p("Invalid "+D+" `"+F+"` of type "+("`"+Y+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return A(y)}function C(){function y(N,q,G,D,F){var V=N[q];if(!e.isValidElementType(V)){var Y=k(V);return new p("Invalid "+D+" `"+F+"` of type "+("`"+Y+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return A(y)}function T(y){function N(q,G,D,F,V){if(!(q[G]instanceof y)){var Y=y.name||f,X=z(q[G]);return new p("Invalid "+F+" `"+V+"` of type "+("`"+X+"` supplied to `"+D+"`, expected ")+("instance of `"+Y+"`."))}return null}return A(N)}function M(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&(arguments.length>1?r("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):r("Invalid argument supplied to oneOf, expected an array.")),i;function N(q,G,D,F,V){for(var Y=q[G],X=0;X<y.length;X++)if(m(Y,y[X]))return null;var R=JSON.stringify(y,function(ce,P){var ye=j(P);return ye==="symbol"?String(P):P});return new p("Invalid "+F+" `"+V+"` of value `"+String(Y)+"` "+("supplied to `"+D+"`, expected one of "+R+"."))}return A(N)}function Q(y){function N(q,G,D,F,V){if(typeof y!="function")return new p("Property `"+V+"` of component `"+D+"` has invalid PropType notation inside objectOf.");var Y=q[G],X=k(Y);if(X!=="object")return new p("Invalid "+F+" `"+V+"` of type "+("`"+X+"` supplied to `"+D+"`, expected an object."));for(var R in Y)if(o(Y,R)){var J=y(Y,R,D,F,V+"."+R,a);if(J instanceof Error)return J}return null}return A(N)}function K(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&r("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var N=0;N<y.length;N++){var q=y[N];if(typeof q!="function")return r("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+x(q)+" at index "+N+"."),i}function G(D,F,V,Y,X){for(var R=[],J=0;J<y.length;J++){var ce=y[J],P=ce(D,F,V,Y,X,a);if(P==null)return null;P.data&&o(P.data,"expectedType")&&R.push(P.data.expectedType)}var ye=R.length>0?", expected one of type ["+R.join(", ")+"]":"";return new p("Invalid "+Y+" `"+X+"` supplied to "+("`"+V+"`"+ye+"."))}return A(G)}function H(){function y(N,q,G,D,F){return $(N[q])?null:new p("Invalid "+D+" `"+F+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return A(y)}function O(y,N,q,G,D){return new p((y||"React class")+": "+N+" type `"+q+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+D+"`.")}function ee(y){function N(q,G,D,F,V){var Y=q[G],X=k(Y);if(X!=="object")return new p("Invalid "+F+" `"+V+"` of type `"+X+"` "+("supplied to `"+D+"`, expected `object`."));for(var R in y){var J=y[R];if(typeof J!="function")return O(D,F,V,R,j(J));var ce=J(Y,R,D,F,V+"."+R,a);if(ce)return ce}return null}return A(N)}function le(y){function N(q,G,D,F,V){var Y=q[G],X=k(Y);if(X!=="object")return new p("Invalid "+F+" `"+V+"` of type `"+X+"` "+("supplied to `"+D+"`, expected `object`."));var R=n({},q[G],y);for(var J in R){var ce=y[J];if(o(y,J)&&typeof ce!="function")return O(D,F,V,J,j(ce));if(!ce)return new p("Invalid "+F+" `"+V+"` key `"+J+"` supplied to `"+D+"`.\nBad object: "+JSON.stringify(q[G],null," ")+`
160
+ `}}catch(w){console.error("insertVideos error for",g,w),A=""}else A=f;o=u,a+=A,s.lastIndex=u}return a+=e.slice(o),a=qd(a),a}async function $d(e){const{news:n,banners:a,newsRelatedResponses:o,newsRelatedListResponses:s,slug:r,itemList:i,socials:c,getVideos:h,commonServices:l}=e;let d=n?.body?.rendered??"";d=d.replace(/<script[^>]*src=["']https:\/\/platform\.twitter\.com\/widgets\.js["'][^>]*><\/script>/gi,""),d=d.replace(/&nbsp;/g,""),d=Od(d,a),d=Dd(d),d=await Pd(d),d=await Md(d,e.texts,o),d=await jd(d,h),d=Ld(d),d=Bd(d);const u=n.main.sources??[],{NEWS_JOURNALIST_COMPONENT:f}=W(),g=n.config.articlepreview===gt.fotoGaleria&&n.hascontent?.hasgalleryimages;return t.jsxs("div",{className:On.content,children:[r!=="liveblogs"&&e.showHeaderImage?g?t.jsx(ir,{commonServices:l,newsformated:n,internal:n.info.link.internal}):t.jsx(Bs,{preview:n.preview}):null,t.jsx(pe,{banners:a,name:"block_1"}),t.jsx("div",{className:On.journalistArticleContent,children:f==="op1"?t.jsx(yd,{autorIcon:e.autorIcon,socials:c,news:n,texts:e.texts,noteShare:e.noteShare,paths:e.paths}):t.jsx(Ud,{autorIcon:e.autorIcon,socials:c,news:n,texts:e.texts,noteShare:e.noteShare,paths:e.paths})}),t.jsx(bd,{summary:n.main.summary}),t.jsx("main",{className:On.contentNews,suppressHydrationWarning:!0,id:"content-news-section",dangerouslySetInnerHTML:{__html:d}}),t.jsx(pd,{texts:e.texts,itemList:i,banners:a,slug:r,getVideos:h,newsRelatedListResponses:s??[]}),u.length>0&&t.jsxs("div",{className:On.noteSource,children:[t.jsx(vd,{}),t.jsx("p",{children:e.texts.noteSource+(u.length===1?"":"s")+": "+u.map(m=>m.name).join(", ")})]}),n&&n.hascontent&&n.hascontent.hasembeddedtwitter&&t.jsx("script",{async:!0,defer:!0,src:"https://platform.twitter.com/widgets.js"})]})}const Gd=e=>{const{content:n,title:a,slot_id:o}=e,s=e.slot_id&&e.slot_id!=="Nota_1";return n&&n.length!==0&&t.jsx(fe,{title:a,titleUrl:e.titleUrl,children:t.jsx(ht,{slot_id:o,cardWidth:200,children:n.map((r,i)=>{const c={...r,main:{...r.main,title:{...r.main.title,section:s?r.main.title.home:r.main.title.section}}};return t.jsx(Qt,{...c,titleGradient:!0,paths:e.paths},i)})})})},Qd=e=>{const{content:n,title:a,slot_id:o}=e,s=e.slot_id&&e.slot_id!=="Nota_1";return n&&n.length!==0&&t.jsx(fe,{title:a,titleUrl:e.titleUrl,children:t.jsx(ht,{slot_id:o,cardWidth:343,cardGap:32,visibleItems:3,children:n.map((r,i)=>{const c={...r,main:{...r.main,title:{...r.main.title,section:s?r.main.title.home:r.main.title.section}}};return t.jsx(Qt,{...c,titleGradient:!0,paths:e.paths},i)})})})},Hd=e=>{const{content:n,title:a,slot_id:o}=e,s=e.slot_id&&e.slot_id!=="Nota_1";return n&&n.length!==0&&t.jsx(fe,{title:a,titleUrl:e.titleUrl,children:t.jsx(ht,{slot_id:o,fullPageWidth:!0,visibleItems:1,pagination:!0,cardGap:0,children:n.map((r,i)=>{const c={...r,main:{...r.main,title:{...r.main.title,section:s?r.main.title.home:r.main.title.section}}};return E.createElement(Qt,{...c,key:i,titleGradient:!0,paths:e.paths})})})})},Dn=e=>{const n={};for(const a in e)a.startsWith("--")&&(n[a]=e[a]);return n},pt={headerSection:"_headerSection_1c69w_1",title:"_title_1c69w_11",subtitle:"_subtitle_1c69w_23",newsContent:"_newsContent_1c69w_36",containerCards:"_containerCards_1c69w_44",image:"_image_1c69w_50",blockHeadContainer:"_blockHeadContainer_1c69w_56"},Fd=e=>{const{content:n,title:a,isVideo:o}=e;if(!n||n.length===0)return;const s=n[0],r=n.slice(1),i=e.slot_id&&e.slot_id!=="Nota_1";return s&&r&&t.jsxs(fe,{title:a,titleUrl:e.titleUrl,children:[t.jsx("div",{className:pt.headerSection,children:t.jsxs("a",{style:{"--heightImageOverwriteMobile":"200%"},className:pt.image,href:s?.info?.link?.url,target:s?.info?.link?.target,children:[t.jsxs("div",{className:pt.blockHeadContainer,children:[t.jsx("p",{className:pt.title,children:s?.main?.title.home}),s?.main?.subtitle?.rendered&&t.jsx("p",{className:pt.subtitle,children:s?.main?.subtitle?.striped})]}),t.jsx(Ne,{preview:s.preview})]})}),t.jsxs("div",{className:pt.containerCards,children:[t.jsx("div",{className:"banner-context",style:{order:1},children:e.banner}),t.jsx("div",{className:pt.newsContent,children:Array.isArray(r)&&r.map((c,h)=>{const l={...c,main:{...c.main,title:{...c.main.title,section:i?c.main.title.home:c.main.title.section}}};return t.jsx("div",{style:{order:h},children:t.jsx($e,{...l,isVideo:o,paths:e.paths})},h)})})]})]})},zd=({printEdition:e,title:n})=>e&&t.jsx(fe,{title:n,children:t.jsx("div",{className:"iframe-container",dangerouslySetInnerHTML:{__html:e||""}})}),ur={banner:e=>t.jsx(pe,{...e,name:e.slot_id.replace("Home","block")}),readest:e=>t.jsx(bn,{...e}),"Modulo 1x3":e=>t.jsx(Ia,{...e}),"Modulo 1x4":e=>t.jsx(Xs,{...e}),"Modulo 1x5":e=>t.jsx(Rs,{...e}),"Destacado noticias":e=>t.jsx(Ys,{...e}),"Destacado full width":e=>t.jsx(Fd,{...e}),"Destacado videos":e=>t.jsx(er,{...e}),"Carrusel card":e=>t.jsx(ar,{...e}),"Carrusel story":e=>t.jsx(Gd,{...e}),"Carrusel owl":e=>t.jsx(Qd,{...e}),"Modulo fotogaleria":e=>t.jsx(Hd,{...e}),"Carrusel opinion":e=>t.jsx(or,{...e}),"Modulo 1x3 card":e=>t.jsx(nr,{...e}),"Modulo iframe":e=>t.jsx(zd,{...e})};function Kt({component:e,slot_id:n,data:a,banners:o}){if(o)return ur[e]&&t.jsx("div",{className:"home-slot",style:Dn(a),children:ur[e]({...a,banners:o,slot_id:n})})}function Vd({children:e,stylesConfigEntry:n}){return t.jsx("div",{className:"home-slot",style:Dn(n),children:e})}const fr={Diario:e=>{if(!e?.data||e.data.length===0)return;const n=e.data.slice(1);return t.jsx(zs,{...e.data[0],itemReverseOrder:!0,isLarge:!0,block:n,banners:e.banners,showSuper:e.showSuper,rightOnlyBanner:e.rightOnlyBanner,customSectionCardStyles:e.customSectionCardStyles,customNewsDescriptionStyles:e.customNewsDescriptionStyles,paths:e.paths})},"Diario con imagen":e=>{if(!e?.data||e.data.length===0)return;const n=e.data.slice(1);return t.jsx(zs,{...e.data[0],itemReverseOrder:!0,isLarge:!0,showSuper:e.showSuper,block:n,banners:e.banners,customSectionCardStyles:e.customSectionCardStyles,customNewsDescriptionStyles:e.customNewsDescriptionStyles,paths:e.paths})},Super:e=>t.jsx(Tt,{...e.data[0],paths:e.paths}),"3 notas verticales":e=>t.jsx(Yl,{content:e.data,customLargeSection:e.customLargeSection,customSlimSection:e.customSlimSection,paths:e.paths}),"3 notas horizontales":e=>t.jsx(Wl,{content:e.data,customLargeSection:e.customLargeSection,customSmallSection:e.customSmallSection,paths:e.paths})},Mn=({component:e,data:n,banners:a,rightOnlyBanner:o})=>t.jsx("div",{style:Dn(n),children:fr[e]&&fr[e]({...n,rightOnlyBanner:o,banners:a})}),Wd=({slots:e,DYNAMIC_SLOT_SUBINDEXES:n,stylesConfig:a,AutorIcon:o,config:s,banners:r,showTagBySection:i})=>{const c=[],l=n,d=Object.keys(e).length/l;for(let u=1;u<=d;u++)for(let f=1;f<=l;f++){const g="Home_"+u+"_"+f;!e[g]||!e[g].blockSass||!e[g].blockSass[0]||!e[g].blockSass[0].value||!e[g].blockSass[0].block||e[g].blockSass[0].block==="No Mostrar"||(e[g].blockSass[0]?.block==="Modulo iframe"?c.push(t.jsxs(ha,{id:e[g].blockSass[0].key,show:!!e[g].blockSass[0].value,order:(u-1)*l+(f-1),children:[t.jsx(Kt,{component:e[g].blockSass[0].block,banners:r,slot_id:g,data:{printEdition:e[g]?.blockSass[0].value,title:e[g]?.blockSass[0].title??"",titleUrl:e[g].blockSass[0].link??void 0}}),t.jsx(He,{children:t.jsx(je,{banners:r,index:"dynamic_"+u+"_"+f})})]},u+"_"+f)):c.push(t.jsxs(ha,{id:e[g].blockSass[0].key,show:!!e[g].content?.data,order:(u-1)*l+(f-1),children:[t.jsx(Kt,{component:e[g].blockSass[0].block,banners:r,slot_id:g,data:{...e[g].blockSass[0].block?a[e[g].blockSass[0].block]:[],content:e[g].content?.data??[],title:e[g].blockSass[0].title??void 0,titleUrl:e[g].blockSass[0].link??void 0,autorIcon:t.jsx(o,{}),paths:s.paths,showTagBySection:i}}),t.jsx(He,{children:t.jsx(je,{banners:r,index:"dynamic_"+u+"_"+f})})]},u+"_"+f)))}return c},Yd=({mainBlock:e,StylesConfigMain:n,config:a,banners:o})=>{const{PUBLIC_ENV:s}=W();if(s!=="local")return null;const r=e?.news?.data||[],i=(c,h)=>({...e?.news,...n[c],data:r.slice(0,h),paths:a.paths});return t.jsxs(t.Fragment,{children:[t.jsx(Mn,{component:"Super",data:i("Super",1),banners:o}),t.jsx(He,{children:t.jsx(je,{banners:o,index:1})}),t.jsx(Mn,{component:"3 notas verticales",data:i("3 notas verticales",3),banners:o}),t.jsx(He,{children:t.jsx(je,{banners:o,index:1})}),t.jsx(Mn,{component:"3 notas horizontales",data:i("3 notas horizontales",3),banners:o}),t.jsx(He,{children:t.jsx(je,{banners:o,index:1})})]})},Kd=e=>{const{config:n}=e,a=n.articlepreview;return!![gt.videoEmbedded,gt.videoYouTube,gt.iframe].includes(a)},Jd=async e=>{const{custom_complement:n,ranking:a=[],banners:o,autor:s=[],news:r=[],newsRelatedResponses:i=[],newsRelatedListResponses:c=[],itemList:h=[],socials:l,getVideos:d}=e,u=e.slug==="liveblogs",{SHOW_NEWS_MORE_NEWS:f,SHOW_NEWS_RELATED_NEWS:g,MORE_NEWS_SSR:m}=W();if(!(!r||!r[0]))return t.jsx(t.Fragment,{children:t.jsxs(sd,{className:Wt.contentLayout2,children:[t.jsx(id,{option:e.slug,news:r,paths:e.paths,headerSectionStyles:e.headerSectionStyles}),t.jsx(je,{banners:o,index:1}),!u&&e.commonServices&&t.jsx(Ed,{news:r[0],commonServices:e.commonServices}),t.jsx(rd,{texts:e.texts,paths:e.paths,slug:e.slug,itemList:h,ranking:a,readestCustomStyles:e.readestCustomStyles,bannerTop:t.jsx(pe,{banners:o??[],name:"right_1"}),banner:t.jsx(pe,{banners:o??[],name:"right_2"}),complement:t.jsxs("div",{id:"comentarios",className:Wt.complementContent,suppressHydrationWarning:!0,children:[s.length>0&&t.jsx(Hs,{texts:e.texts,autorIcon:e.autorIcon,autor:s[0],paths:e.paths}),r[0].authors.length>1&&t.jsx(Fs,{news:r[0],autorIcon:e.autorIcon,paths:e.paths,texts:e.texts}),r[0]?.keywords?.tags&&r[0]?.keywords?.tags?.length>0&&t.jsx("div",{className:`${Wt.tagContent} sass-note-tags-content`,children:t.jsx(Qs,{tags:r[0]?.keywords?.tags,paths:e.paths})}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"2rem"},suppressHydrationWarning:!0,children:[e.showComments&&t.jsx("div",{className:Wt.commentsSeparator,suppressHydrationWarning:!0,"data-hydrate":"LazyLoader","data-props":encodeURIComponent(JSON.stringify({render:"comment",internalPath:e.internalPath,API_ENV:e.API_ENV}))}),t.jsx(He,{children:t.jsx(je,{banners:o,index:2})}),g&&t.jsxs(t.Fragment,{children:[t.jsx(Kt,{component:"Carrusel card",banners:[],slot_id:"Nota_1",data:{...e.stylesConfig["Carrusel card"],content:e.relatedNewsList??[],title:e.texts.relatedNewsTitle,titleUrl:void 0,paths:e.paths}}),t.jsx(He,{children:t.jsx(je,{banners:o,index:3})})]}),f&&t.jsxs(t.Fragment,{children:[m?t.jsx(Kt,{component:"Modulo 1x3",banners:[],slot_id:"Nota_2",data:{...e.stylesConfig?e.stylesConfig["Modulo 1x3 Client"]?e.stylesConfig["Modulo 1x3 Client"]:e.stylesConfig["Modulo 1x3"]:{},content:e.moreNewsSSR??[],title:e.texts.moreNewsTitle,paths:e.paths,titleUrl:void 0}}):t.jsx(fe,{title:e.texts.moreNewsTitle,children:t.jsx("div",{suppressHydrationWarning:!0,"data-hydrate":"LazyLoader","data-props":encodeURIComponent(JSON.stringify({render:"more",stylesConfig:e.stylesConfig,section:r[0].info.section?.slug??"",internalPath:e.internalPath,paths:e.paths,API_ENV:e.API_ENV,fetchConfig:e.fetchConfig}))})}),t.jsx(He,{children:t.jsx(je,{banners:o,index:4})})]}),n&&n()]})]}),children:t.jsxs("section",{style:{"--avatar-content-align-items-desk":e.slug==="liveblogs"?"flex-start":"center"},children:[t.jsx($d,{texts:e.texts,autorIcon:e.autorIcon,socials:l,news:r[0],banners:o,newsRelatedResponses:i,newsRelatedListResponses:c,itemList:h,slug:e.slug,getVideos:d,noteShare:e.noteShare,paths:e.paths,showHeaderImage:!Kd(r[0]),commonServices:e.commonServices}),t.jsx(pe,{banners:o??[],name:"block_3"})]})})]})})},Jt={content:"_content_1046n_1",buttonStyled:"_buttonStyled_1046n_9",searchStyled:"_searchStyled_1046n_20",inputStyled:"_inputStyled_1046n_36",inputStyledTest:"_inputStyledTest_1046n_55"},Zd=e=>t.jsx("svg",{width:"68",height:"68",viewBox:"0 0 68 68",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:t.jsx("g",{children:t.jsx("path",{d:"M47.8043 46.6003L47.6635 46.7758L47.8232 46.9342L56.4762 55.5171C56.4768 55.5177 56.4774 55.5184 56.478 55.519C56.8524 55.9072 57.0616 56.4256 57.0616 56.965C57.0616 57.5048 56.8521 58.0234 56.4774 58.4117C56.2839 58.6065 56.0539 58.7611 55.8005 58.8667C55.5466 58.9724 55.2743 59.0269 54.9993 59.0269C54.7243 59.0269 54.452 58.9724 54.1981 58.8667C53.9442 58.7609 53.7138 58.6059 53.5201 58.4106L53.5194 58.4099L44.9327 49.8232L44.7743 49.6648L44.5995 49.805C40.4597 53.1252 35.2051 54.7331 29.9162 54.2981C24.6272 53.863 19.706 51.4181 16.1643 47.4661C12.6227 43.514 10.7298 38.3552 10.875 33.0503C11.0201 27.7455 13.1923 22.6979 16.9447 18.9455C20.6972 15.193 25.7448 13.0209 31.0496 12.8757C36.3544 12.7305 41.5133 14.6234 45.4653 18.165C49.4174 21.7067 51.8623 26.6279 52.2974 31.9169C52.7324 37.2058 51.1245 42.4604 47.8043 46.6003ZM22.4528 47.4552C25.1799 49.2774 28.3861 50.25 31.666 50.25C36.0641 50.25 40.2822 48.5029 43.3921 45.3929C46.5021 42.2829 48.2493 38.0649 48.2493 33.6667C48.2493 30.3868 47.2767 27.1806 45.4545 24.4535C43.6323 21.7264 41.0423 19.6008 38.0121 18.3457C34.9819 17.0905 31.6476 16.7621 28.4307 17.402C25.2139 18.0419 22.259 19.6213 19.9398 21.9405C17.6205 24.2597 16.0411 27.2146 15.4013 30.4314C14.7614 33.6483 15.0898 36.9827 16.345 40.0129C17.6001 43.0431 19.7256 45.633 22.4528 47.4552Z",fill:"white",stroke:"white",strokeWidth:"0.5"})})}),Xd=e=>t.jsx("form",{className:Jt.content,children:t.jsxs("div",{className:`${Jt.inputStyled} sass-buscar-form`,children:[t.jsx("input",{className:Jt.inputStyledTest,defaultValue:e.query,name:"query",placeholder:e.texts.searchKeyWord+"..."}),t.jsx("button",{className:Jt.buttonStyled,type:"submit",children:t.jsx(Zd,{className:Jt.searchStyled})})]})}),La={content:"_content_io3tv_1",newsContentSection:"_newsContentSection_io3tv_5",itemContent:"_itemContent_io3tv_10"},Rd=e=>{const{data:n,option:a,autor:o,page:s,banners:r,pathname:i,ranking:c,currentPage:h,slug:l,texts:d={},socialIconsFilled:u=!1}=e,f=[5,10,15],{SUB_PUBLICATION_PREFIX_IN_ROUTES:g}=W(),m={5:1,10:2,15:3};switch(a){case"op1":return t.jsx(t.Fragment,{children:t.jsxs(ya,{children:[t.jsx(Os,{autor:o[0],autorIcon:e.autorIcon,socialIconsFilled:u}),t.jsx(ba,{paths:e.paths,ranking:c,readestTitle:d.readestTitle??"",bannerTop:t.jsx(pe,{banners:r??[],name:"right_1"}),banner:t.jsx(pe,{banners:r??[],name:"right_2"}),children:t.jsx("section",{className:La.content,children:n.length>0?t.jsx(In,{className:[La.newsContentSection,"padding-0"].join(" "),paginatorComponent:t.jsx($t,{block_subPublication:g?.autor,texts:d,pathname:i,query:"",currentPage:h,maxPages:e.paginationLimit,showNext:!(n.length<e.newsListLimit)}),children:Array.isArray(n)&&n?.map((p,A)=>t.jsxs(E.Fragment,{children:[f.includes(A+1)&&t.jsx("div",{className:La.itemContent+" banner-context",children:t.jsx(pe,{banners:r??[],name:`block_2_${m[A+1]}`})}),t.jsx(Pn,{autorIcon:e.autorIcon,item:p,option:l,paths:e.paths},A)]},A))}):t.jsx("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",gap:"2rem"},children:t.jsx("p",{style:{fontWeight:"var(--fw)",width:"100%",fontSize:"18px",lineHeight:"26px",textAlign:"center"},children:d.autorNotResultMessage})})})})]})});case"op2":return t.jsx(t.Fragment,{children:t.jsxs(ya,{children:[t.jsx(Ds,{autor:o[0],autorIcon:e.autorIcon}),Array.isArray(n)?t.jsxs(t.Fragment,{children:[t.jsx(Ia,{content:n,title:"",hasLines:!0,banners:e.banners,bannerPositionIndex:[1,6,12],paths:e.paths,slot_id:"block_2"}),t.jsx($t,{block_subPublication:g?.autor,texts:d,query:"",pathname:i,maxPages:Number(e.paginationLimit),currentPage:Number(s),showNext:!((n.length??0)<Number(e.newsListLimit))})]}):t.jsx("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",gap:"2rem"},children:t.jsx("p",{style:{fontWeight:"var(--fw)",width:"100%",fontSize:"18px",lineHeight:"26px",textAlign:"center"},children:d.autorNotResultMessage})})]})});default:return t.jsx(t.Fragment,{})}},mr={content:"_content_pq89v_1",videoContent:"_videoContent_pq89v_9"},Zt={container:"_container_1xr2t_1",playStyled:"_playStyled_1xr2t_6",imageStyled:"_imageStyled_1xr2t_13",longer:"_longer_1xr2t_26",contentNews:"_contentNews_1xr2t_31",tagContent:"_tagContent_1xr2t_51",tag:"_tag_1xr2t_51",titular:"_titular_1xr2t_68",small:"_small_1xr2t_81",figure:"_figure_1xr2t_87",backDrop:"_backDrop_1xr2t_92",backDropAux:"_backDropAux_1xr2t_100"},gr=async e=>{const{size:n="longer",video:a}=e,o=a.main.image.sizes[0]?.url??"";return t.jsx("figure",{className:Zt.figure,children:t.jsxs("span",{className:Zt.backdrop,children:[t.jsx("span",{className:Zt.backDropAux}),t.jsx(B,{href:a.info.link.url,target:a.info.link.target,children:t.jsxs("div",{children:[a.main.image.sizes.map(async(s,r)=>s.width>=580?t.jsx("source",{media:"(width >=900px)",srcSet:await he(s.url)},r):t.jsx("source",{media:"(width <900px)",srcSet:await he(s.url)},r)),t.jsx("img",{fetchPriority:"low",loading:"lazy",className:[Zt.imageStyled,Zt[n]].join(" "),alt:"",src:o?await he(o):""})]})})]})})},e1=e=>{const{videos:n}=e;return t.jsx("div",{className:mr.content,children:t.jsx(St,{children:t.jsx(fe,{title:"Videos",isTitle:!0,children:t.jsxs("div",{className:mr.videoContent,children:[t.jsx(gr,{video:n[0]}),t.jsx("div",{style:{display:"flex",flexDirection:"column"},children:n.slice(1).map((a,o)=>t.jsx(gr,{size:"small",video:a},`video-small-${o}`))})]})})})})},At={content:"_content_ruy5q_1",videoContent:"_videoContent_ruy5q_9",articleSection:"_articleSection_ruy5q_21",contentLatout:"_contentLatout_ruy5q_31",title:"_title_ruy5q_36",article:"_article_ruy5q_21",correspondent:"_correspondent_ruy5q_64"},pr={container:"_container_1rq2h_1",playStyled:"_playStyled_1rq2h_9"},t1=e=>{const{video:n}=e,a=Cn();return t.jsx(B,{href:n.info.link.url?n.info.link.url:void 0,target:n.info.link.target,children:t.jsxs("section",{className:pr.container,children:[t.jsx(Ne,{isLarge:!0,preview:{sizes:n.main.image.sizes,description:n.main.description}}),t.jsx(a,{className:pr.playStyled})]})})},n1=e=>{const n=()=>e?.video.main.author?`${e?.video.main.author} - ${Le(e.video.info.date.created)}`:e?.video.main.author;return t.jsx("div",{className:At.content,children:t.jsx(St,{className:At.contentLatout,children:t.jsx(fe,{title:"Videos",isTitle:!0,children:t.jsxs("div",{className:At.videoContent,children:[t.jsx(t1,{video:e.video}),t.jsxs("div",{className:At.articleSection,children:[t.jsx(B,{className:At.title,href:e.video.info.link.url,target:e.video.info.link.target,children:e.video.main.title}),t.jsx("p",{className:At.article,children:Be(e.video.main.description)}),t.jsx("p",{className:At.correspondent,children:n()})]})]})})})})},a1=e=>{switch(e.option){case"op1":return t.jsx(e1,{videos:e.data});case"op2":return t.jsx(n1,{video:e.data[0]});default:return t.jsx(t.Fragment,{})}};function o1({containerId:e,containerId2:n}){return E.useEffect(()=>{try{let a=function(){const d=window.twttr;d?.widgets?d.widgets.load(o):l<10?(l++,requestAnimationFrame(a)):console.warn("No se pudo cargar widgets de Twitter")};const o=document.getElementById(e),s=document.getElementById(n);if(!o&&!s)return;const r=o?.querySelectorAll("script[src]")??[],i=s?.querySelectorAll("script[src]")??[];[...r,...i].forEach(d=>{const u=document.createElement("script");Array.from(d.attributes).forEach(f=>{u.setAttribute(f.name,f.value)}),d.replaceWith(u)});const h=document.querySelectorAll('script[src*="platform.twitter.com/widgets.js"]');if(h)for(let d=0;d<h.length;d++)h[d]?.remove();let l=0;if(document.querySelector('script[src*="platform.twitter.com/widgets.js"]'))a();else{const d=document.createElement("script");d.src="https://platform.twitter.com/widgets.js",d.async=!0,d.onload=a,document.body.appendChild(d)}}catch(a){console.warn("Error al procesar embeds de Twitter",a)}},[e]),null}const s1=e=>{const{isVideo:n=!1,isLarge:a=!1,hasShadow:o=!1,BackDropAuxHeigthMobile:s}=e,r=ga(),i=E.useMemo(()=>{const f=e?.preview?.sizes;if(f&&Array.isArray(f)&&f.length>0)return f;const g=e?.preview?.original;return g?.url?[{url:g.url,width:g.width||0,height:g.height||0}]:[]},[e?.preview?.sizes,e?.preview?.original]);if(!i.length||!i[0]?.url||i[0]?.url==="")return t.jsx("div",{className:se.imagePlaceholder});const{PUBLIC_API_HOST:c="",PUBLIC_ASSETS_URL:h}=e.API_ENV,l=i[0]?.url,d=h&&h!=="false"?h:c,u=l?.startsWith("http")||l?.includes(d)?l:d+l;return t.jsx("figure",{className:se.figure,children:t.jsxs("span",{className:se.backdrop,children:[t.jsx("span",{className:se.backdropAux,style:{height:s||"56.25%"}}),t.jsxs("picture",{children:[t.jsx("img",{fetchPriority:"low",loading:"lazy",className:se.imageStyled,alt:e.preview?.description||"",src:u,style:{boxShadow:o?"0px 4px 8px 0px #00000033":"0px"}}),n&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:se.boxPlayIcon,style:{height:a?"40%":"72px"}}),t.jsx(r,{className:se.playStyled,style:{width:a?"3rem":"27px",height:a?"3rem":"27px",marginBottom:a?"18px":".5rem",marginLeft:a?"30px":".5rem"}})]})]})]})})},r1=e=>t.jsx("svg",{width:"41",height:"33",viewBox:"0 0 41 33",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:t.jsx("path",{d:"M17.9576 21.2985C16.8233 21.2985 15.9277 22.194 15.9277 23.3283C15.9277 24.4627 16.8233 25.3582 17.9576 25.3582C19.0919 25.3582 19.9874 24.4627 19.9874 23.3283C19.9874 22.194 19.0919 21.2985 17.9576 21.2985ZM17.9576 19.2686C19.0919 19.2686 19.9874 18.3731 19.9874 17.2388C19.9874 16.1045 19.0919 15.2089 17.9576 15.2089C16.8233 15.2089 15.9277 16.1045 15.9277 17.2388C15.9277 18.3731 16.8233 19.2686 17.9576 19.2686ZM17.9576 13.1791C19.0919 13.1791 19.9874 12.2836 19.9874 11.1492C19.9874 10.0149 19.0919 9.11938 17.9576 9.11938C16.8233 9.11938 15.9277 10.0149 15.9277 11.1492C15.9277 12.2836 16.8233 13.1791 17.9576 13.1791Z",fill:"#7B888A"})}),Ar={info:{section:{name:"",slug:"",url:""},link:{url:"/",target:"",canonical:!1,internal:""},date:{date:"",created:0,modified:0,firstpublish:0,lastpublish:0}},config:{zonehome:void 0,priorityhome:"",zonesection:"",prioritysection:"",homepreview:"",showcomments:!0,showtime:!0,showauthor:!0,showuppertitle:!0,showsubtitle:!0,showads:!0},main:{title:{home:"",section:"",article:""},subtitle:{rendered:"",striped:""},tags:[]},authors:[{firstname:"",lastname:"",fullname:"",image:void 0,name:"",internaluser:!1}],preview:void 0},i1=({section:e,internalPath:n,banner:a,isVisible:o=!1,stylesConfig:s,API_ENV:r,fetchConfig:i,paths:c})=>{const h=r.FETCH_SIZE_MORE_NEWS??6,[l,d]=E.useState({data:Array.from({length:h},()=>Ar)}),[u,f]=E.useState(!1),g=E.useCallback(async()=>{if(!n)return;const A=new URLSearchParams({section:e,currentNewsLink:n}),w=await fetch(`/api/get-more-news?${A}`);if(!w.ok)throw new Error(`HTTP error! status: ${w.status}`);return await w.json()},[e,n]),m=E.useCallback(async()=>{const{PUBLIC_API_FRONT:A,PUBLIC_X_SECURITY_TOKEN:w,PUBLIC_API_PATH_VERSION:S,PUBLIC_PUBLICATION_ID:_}=r;if(!A||!w||!_||!S)throw new Error("Missing required environment variables");const I=await oe.get(`${A}${S}/news-list-section`,{params:{size:h+1,newstype:i.newsType,section:e,imagesizes:i.imgSizes,publication:parseInt(_)},headers:{"x-api-token":w,"Content-Type":"application/json"}});return{...I.data,data:I.data.data.filter(C=>C.info.link.internal!==n)}},[e,n,r]),p=E.useCallback(async()=>{if(!(u||!n)){f(!0);try{let A;r.PUBLIC_ENV!=="prod"?A=await g():A=await m(),d({...A,data:A.data.slice(0,h)})}catch(A){console.error("[/api/get-more-news] Error:",A.message),d(void 0)}}},[u,n,r.PUBLIC_ENV,g,m]);return E.useEffect(()=>{o&&p()},[o,p]),!l?.data||l.data.length===0?null:t.jsx(c1,{news:l.data,title:"Más Noticias",...s["Modulo 1x3 Client"]??s["Modulo 1x3"],hasLines:!0,showSubtitle:!0,rounded:!0,banner:a,API_ENV:r,paths:c,isVisible:o})},c1=e=>{const{news:n,hasLines:a=!1,API_ENV:o}=e,s=r=>a&&(r+1)%3!==0?ka.contentSeparator:"";return t.jsx("div",{className:ka.newsContent,style:{gap:a?"30px":"20px","--gridTemplateModlule":a?"repeat(auto-fit, 343px);":"repeat(auto-fit, 380px);"},children:n.map((r,i)=>{const{main:c,authors:h,info:l,preview:d,isVideo:u=!1,config:f,overImage:g="default",isTitle:m=!1,isLarge:p=!1,keywords:A}=r;return t.jsx("div",{className:s(i),style:{order:i},children:t.jsxs("section",{className:Gt.content,children:[t.jsx(B,{title:c?.title?.section,href:l?.link?.url??"invalidUrl","aria-label":c?.title?.section??"nota",target:l?.link?.target,children:t.jsx(s1,{isVisible:e.isVisible,preview:d,rounded:e.rounded,isVideo:u,isLarge:p,API_ENV:e.API_ENV,getImageUrl:e.getImageUrl})}),t.jsx("div",{className:Gt.newsDescription,children:t.jsx(l1,{main:c,SHOW_TAG_BY_SECTION:o.SHOW_TAG_BY_SECTION,authors:h,info:l,preview:d,share:e.share,config:f,overImage:g,isTitle:m,paths:e.paths,isVisible:e.isVisible,DATE_CONFIG:e.API_ENV,keywords:A})})]})},i)})})},l1=e=>{const{share:n=!1,cutSubtitle:a=!0,SHOW_TAG_BY_SECTION:o,keywords:s,info:r}=e,c=(()=>{if(!e?.authors||e.authors.length===0)return"";const d=e.authors[0],u=Le(e.info?.date?.modified,e.DATE_CONFIG);return d&&e?.config?.showtime&&e.config?.showauthor?`${d.fullname} - ${u}`:d&&e.config?.showauthor?d.fullname:e?.config?.showtime?u:""})(),h=()=>e.main.uppertitle?t.jsx("p",{className:te.uppertitle,title:e.main.uppertitle,children:e.main.uppertitle}):null,l=()=>{if(o&&s?.tags?.length&&s.tags.length>0){const d=s.tags[0],u=d.name;return t.jsxs("h3",{className:te.sectionDescriptionContainer,children:[d.approved?t.jsx(B,{"aria-label":u,block_subPublication:e.DATE_CONFIG?.SUB_PUBLICATION_PREFIX_IN_ROUTES?.tema,className:te.sectionDescription,href:et(d,e.paths),children:u}):t.jsx("div",{className:te.sectionDescription,children:u}),h()]})}else if(r?.section?.url){const d=r.section.name;return t.jsxs("h3",{className:te.sectionDescriptionContainer,children:[t.jsx(B,{"aria-label":d,className:te.sectionDescription,href:r.section.url,children:d}),h()]})}return null};return t.jsxs("div",{className:te.boxInformation,children:[n&&t.jsx(r1,{className:te.dotStyles}),t.jsx(l,{}),t.jsx("h2",{className:te.articule,children:t.jsx(B,{className:te.linkStyled,style:{"--isLink":e?.info?.link?.url?"underline":"none"},"aria-label":e.main?.title?.section??"nota",href:e?.info?.link?.url,target:e?.info?.link?.target,children:e.main?.title?.section})}),e.config?.showsubtitle&&e.main?.subtitle?.striped&&t.jsx("p",{className:te.description,style:{"--fontSizeSubTitle":e.fontSizeSubTitle,"--lineHeightSubTitle":e.lineHeightSubTitle,"--colorSubTitle":e.colorSubTitle},children:a?Be(e.main.subtitle.striped):e.main.subtitle.striped}),(e?.config?.showtime||e.config?.showauthor)&&c&&t.jsx(t.Fragment,{children:e.authors?.[0]?.internaluser?t.jsx(B,{block_subPublication:e.DATE_CONFIG?.SUB_PUBLICATION_PREFIX_IN_ROUTES?.autor,className:te.correspondentLink,href:`/${e.paths.autor}/${e.authors[0].name}`,children:c}):t.jsx("div",{className:te.correspondent,children:c})})]})},d1=({user:e,handleLogout:n,message:a})=>{const o=()=>{const r=document.querySelector(".user-actions-options");r&&r.classList.toggle("show")},s=e.firstname??"Usuario";return t.jsx("div",{className:"comment-item",children:t.jsxs("div",{style:{display:"flex",gap:"14px"},children:[e&&e.picture&&e.picture!==""?t.jsx("img",{className:"comment-avatar-img",src:e.picture,alt:e.username}):t.jsx("div",{className:"comment-avatar",children:s.charAt(0).toUpperCase()}),t.jsxs("div",{style:{flex:1},children:[t.jsxs("div",{className:"comment-header",children:[t.jsxs("span",{className:"comment-username user-welcome",children:["Hola ",s,"!"]}),t.jsx("div",{className:"user-actions-options",children:t.jsx("button",{onClick:()=>{n()},children:"Cerrar Sesion"})}),t.jsx("button",{className:"user-actions-span",onClick:o,children:t.jsx(xn,{width:13,height:13,fill:"black"})})]}),t.jsx("p",{className:"comment-text",children:a})]})]})})},ge={overlay:"_overlay_qj491_3",popup:"_popup_qj491_17",title:"_title_qj491_40",optionsContainer:"_optionsContainer_qj491_52",option:"_option_qj491_52",radioInput:"_radioInput_qj491_66",radioCustom:"_radioCustom_qj491_70",optionLabel:"_optionLabel_qj491_97",buttons:"_buttons_qj491_110",cancelButton:"_cancelButton_qj491_117",closeButton:"_closeButton_qj491_118",buttonAlone:"_buttonAlone_qj491_137",reportButton:"_reportButton_qj491_143",successContainer:"_successContainer_qj491_163",thumbsUp:"_thumbsUp_qj491_171",successMessage:"_successMessage_qj491_177",errorMessage:"_errorMessage_qj491_218",loadingContainer:"_loadingContainer_qj491_231"},wr=async(e,n)=>{if(!e)return!1;const{CAPTCHA_PROJECT:a,CAPTCHA_KEY_V2:o,COMMENTS_CAPTCHA_API_KEY:s}=n;try{const r=a,i=o,l=await(await fetch(`https://recaptchaenterprise.googleapis.com/v1/projects/${r}/assessments?key=${s}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event:{token:e,siteKey:i}})})).json();return console.log("reCAPTCHA Enterprise verification result:",l),l.tokenProperties?.valid===!0}catch(r){return console.error("Error verificando reCAPTCHA Enterprise:",r),!1}};async function h1({publication:e,username:n,id:a,type:o,baseUrl:s,captchaToken:r,apiToken:i,securityToken:c,COMMENTS_VARS:h}){if(!e||!n||!a||!o||!r)throw new Error("Faltan parámetros requeridos: publication, username, id, type, captchaToken");if(typeof e!="string"||typeof n!="string"||typeof a!="string"||typeof o!="string"||typeof r!="string")throw new Error("Todos los parámetros deben ser strings");if(!await wr(r,h))throw new Error("Token de captcha inválido");if(!i)throw new Error("Falta el token de API del CMS");const l=`${s}/system/modules/com.tfsla.diario.base/templates/hit/5.0/1/newcomments/report`,d=encodeURIComponent(o),u=new URLSearchParams({publication:e,username:n??!1,id:a,type:d}),f=`${l}?${u.toString()}`;try{console.log("Reporting comment:",{publication:e,username:n,id:a,type:o,encodedType:d,url:f});const g=await oe.get(f,{headers:{"User-Agent":"blu3st@ck-react","x-security-token":c,"x-api-token":i,"Content-Type":"application/json"}});if(console.log("Report response:",g.data),g.status===200||g.status===201)return{type:"success",message:"Comentario reportado exitosamente",status:g.status,data:g.data};throw new Error(`Respuesta inesperada del servidor: ${g.status}`)}catch(g){if(console.error("Error reporting comment:",g),oe.isAxiosError(g)){const m=g.response?.status,p=g.response?.data;throw m===400?new Error("Datos inválidos para el reporte"):m===401?new Error("Token de API inválido"):m===403?new Error("Acceso denegado para reportar comentario"):m===404?new Error("Comentario no encontrado"):m===409?new Error("El comentario ya fue reportado por este usuario"):m===500?new Error("Error interno del servidor CMS"):new Error(p?.error||p?.message||`Error HTTP ${m}: No se pudo reportar el comentario`)}throw g}}const Qe={spam:"Es spam o contenido comercial no deseado",inappropriate:"Lenguaje inadecuado",hate:"Discurso o símbolos de odio",misinformation:"Información falsa o fraude",terrorism:"Promueve el terrorismo",intellectual:"Violación de propiedad intelectual",bullying:"Bullying o acoso"};function u1(e){return Qe[e]}const wt=300,Xe={username:"anonimo",firstname:"Usuario",lastname:"Anonimo"};function f1(e){const n=e.split(" ");if(n.length!==3)return e;const[a,o,s]=n,r=o.charAt(0).toUpperCase()+o.slice(1).toLowerCase();return`${a} ${r} ${s}`}const Ba=(e,n,a)=>{if(!e||!e.current)return{boolean:!1,text:""};const o=e.current?.value||"",s=o.length>wt,{PUBLIC_ENV:r}=a,i=r==="local",c=o.trim()!==""&&(i||n!=="")&&!s,h=s?`No debes exceder el limite de ${wt} caracteres.`:"Debes completar todos los campos para comentar.";return{boolean:c,text:h}},yr=e=>{const n=e.cookie.split("; ").find(a=>a.startsWith("reported="));if(!n)return[];try{return JSON.parse(decodeURIComponent(n.split("=")[1]??""))}catch{return[]}},m1=(e,n)=>{const a=yr(e);a.includes(n)||(a.push(n),e.cookie=`reported=${encodeURIComponent(JSON.stringify(a))}; path=/; max-age=${3600*24*1}`)};function g1(e){const[n,a]=e.split("@");if(!n||!a)return e;let o="";n.length<=2?o=n[0]+"*":o=n[0]+"*".repeat(n.length-2)+n[n.length-1];const s=a.lastIndexOf(".");if(s===-1)return`${o}@${a}`;const r=a.slice(0,s),i=a.slice(s);let c="";return r.length<=2?c=r[0]+"*":c=r[0]+"*".repeat(r.length-2)+r[r.length-1],`${o}@${c}${i}`}var jn={exports:{}},$n={exports:{}},ne={};var Cr;function p1(){if(Cr)return ne;Cr=1;var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,a=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,r=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,h=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,A=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function _(C){if(typeof C=="object"&&C!==null){var T=C.$$typeof;switch(T){case n:switch(C=C.type,C){case h:case l:case o:case r:case s:case u:return C;default:switch(C=C&&C.$$typeof,C){case c:case d:case m:case g:case i:return C;default:return T}}case a:return T}}}function I(C){return _(C)===l}return ne.AsyncMode=h,ne.ConcurrentMode=l,ne.ContextConsumer=c,ne.ContextProvider=i,ne.Element=n,ne.ForwardRef=d,ne.Fragment=o,ne.Lazy=m,ne.Memo=g,ne.Portal=a,ne.Profiler=r,ne.StrictMode=s,ne.Suspense=u,ne.isAsyncMode=function(C){return I(C)||_(C)===h},ne.isConcurrentMode=I,ne.isContextConsumer=function(C){return _(C)===c},ne.isContextProvider=function(C){return _(C)===i},ne.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===n},ne.isForwardRef=function(C){return _(C)===d},ne.isFragment=function(C){return _(C)===o},ne.isLazy=function(C){return _(C)===m},ne.isMemo=function(C){return _(C)===g},ne.isPortal=function(C){return _(C)===a},ne.isProfiler=function(C){return _(C)===r},ne.isStrictMode=function(C){return _(C)===s},ne.isSuspense=function(C){return _(C)===u},ne.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===o||C===l||C===r||C===s||C===u||C===f||typeof C=="object"&&C!==null&&(C.$$typeof===m||C.$$typeof===g||C.$$typeof===i||C.$$typeof===c||C.$$typeof===d||C.$$typeof===A||C.$$typeof===w||C.$$typeof===S||C.$$typeof===p)},ne.typeOf=_,ne}var ae={};var br;function A1(){return br||(br=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,a=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,r=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,h=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,A=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function _(P){return typeof P=="string"||typeof P=="function"||P===o||P===l||P===r||P===s||P===u||P===f||typeof P=="object"&&P!==null&&(P.$$typeof===m||P.$$typeof===g||P.$$typeof===i||P.$$typeof===c||P.$$typeof===d||P.$$typeof===A||P.$$typeof===w||P.$$typeof===S||P.$$typeof===p)}function I(P){if(typeof P=="object"&&P!==null){var ye=P.$$typeof;switch(ye){case n:var Vn=P.type;switch(Vn){case h:case l:case o:case r:case s:case u:return Vn;default:var Qr=Vn&&Vn.$$typeof;switch(Qr){case c:case d:case m:case g:case i:return Qr;default:return ye}}case a:return ye}}}var C=h,T=l,M=c,Q=i,K=n,H=d,O=o,ee=m,le=g,$=a,L=r,k=s,j=u,x=!1;function z(P){return x||(x=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),y(P)||I(P)===h}function y(P){return I(P)===l}function N(P){return I(P)===c}function q(P){return I(P)===i}function G(P){return typeof P=="object"&&P!==null&&P.$$typeof===n}function D(P){return I(P)===d}function F(P){return I(P)===o}function V(P){return I(P)===m}function Y(P){return I(P)===g}function X(P){return I(P)===a}function R(P){return I(P)===r}function J(P){return I(P)===s}function ce(P){return I(P)===u}ae.AsyncMode=C,ae.ConcurrentMode=T,ae.ContextConsumer=M,ae.ContextProvider=Q,ae.Element=K,ae.ForwardRef=H,ae.Fragment=O,ae.Lazy=ee,ae.Memo=le,ae.Portal=$,ae.Profiler=L,ae.StrictMode=k,ae.Suspense=j,ae.isAsyncMode=z,ae.isConcurrentMode=y,ae.isContextConsumer=N,ae.isContextProvider=q,ae.isElement=G,ae.isForwardRef=D,ae.isFragment=F,ae.isLazy=V,ae.isMemo=Y,ae.isPortal=X,ae.isProfiler=R,ae.isStrictMode=J,ae.isSuspense=ce,ae.isValidElementType=_,ae.typeOf=I})()),ae}var _r;function qa(){return _r||(_r=1,process.env.NODE_ENV==="production"?$n.exports=p1():$n.exports=A1()),$n.exports}var Pa,vr;function w1(){if(vr)return Pa;vr=1;var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(r){if(r==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}function s(){try{if(!Object.assign)return!1;var r=new String("abc");if(r[5]="de",Object.getOwnPropertyNames(r)[0]==="5")return!1;for(var i={},c=0;c<10;c++)i["_"+String.fromCharCode(c)]=c;var h=Object.getOwnPropertyNames(i).map(function(d){return i[d]});if(h.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(d){l[d]=d}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Pa=s()?Object.assign:function(r,i){for(var c,h=o(r),l,d=1;d<arguments.length;d++){c=Object(arguments[d]);for(var u in c)n.call(c,u)&&(h[u]=c[u]);if(e){l=e(c);for(var f=0;f<l.length;f++)a.call(c,l[f])&&(h[l[f]]=c[l[f]])}}return h},Pa}var Oa,Sr;function Da(){if(Sr)return Oa;Sr=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Oa=e,Oa}var Ma,Nr;function Ir(){return Nr||(Nr=1,Ma=Function.call.bind(Object.prototype.hasOwnProperty)),Ma}var ja,Er;function y1(){if(Er)return ja;Er=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var n=Da(),a={},o=Ir();e=function(r){var i="Warning: "+r;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function s(r,i,c,h,l){if(process.env.NODE_ENV!=="production"){for(var d in r)if(o(r,d)){var u;try{if(typeof r[d]!="function"){var f=Error((h||"React class")+": "+c+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}u=r[d](i,d,h,c,null,n)}catch(m){u=m}if(u&&!(u instanceof Error)&&e((h||"React class")+": type specification of "+c+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in a)){a[u.message]=!0;var g=l?l():"";e("Failed "+c+" type: "+u.message+(g??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(a={})},ja=s,ja}var $a,Tr;function C1(){if(Tr)return $a;Tr=1;var e=qa(),n=w1(),a=Da(),o=Ir(),s=y1(),r=function(){};process.env.NODE_ENV!=="production"&&(r=function(c){var h="Warning: "+c;typeof console<"u"&&console.error(h);try{throw new Error(h)}catch{}});function i(){return null}return $a=function(c,h){var l=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function u(y){var N=y&&(l&&y[l]||y[d]);if(typeof N=="function")return N}var f="<<anonymous>>",g={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:S(),arrayOf:_,element:I(),elementType:C(),instanceOf:T,node:H(),objectOf:Q,oneOf:M,oneOfType:K,shape:ee,exact:le};function m(y,N){return y===N?y!==0||1/y===1/N:y!==y&&N!==N}function p(y,N){this.message=y,this.data=N&&typeof N=="object"?N:{},this.stack=""}p.prototype=Error.prototype;function A(y){if(process.env.NODE_ENV!=="production")var N={},q=0;function G(F,V,Y,X,R,J,ce){if(X=X||f,J=J||Y,ce!==a){if(h){var P=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw P.name="Invariant Violation",P}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ye=X+":"+Y;!N[ye]&&q<3&&(r("You are manually calling a React.PropTypes validation function for the `"+J+"` prop on `"+X+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),N[ye]=!0,q++)}}return V[Y]==null?F?V[Y]===null?new p("The "+R+" `"+J+"` is marked as required "+("in `"+X+"`, but its value is `null`.")):new p("The "+R+" `"+J+"` is marked as required in "+("`"+X+"`, but its value is `undefined`.")):null:y(V,Y,X,R,J)}var D=G.bind(null,!1);return D.isRequired=G.bind(null,!0),D}function w(y){function N(q,G,D,F,V,Y){var X=q[G],R=k(X);if(R!==y){var J=j(X);return new p("Invalid "+F+" `"+V+"` of type "+("`"+J+"` supplied to `"+D+"`, expected ")+("`"+y+"`."),{expectedType:y})}return null}return A(N)}function S(){return A(i)}function _(y){function N(q,G,D,F,V){if(typeof y!="function")return new p("Property `"+V+"` of component `"+D+"` has invalid PropType notation inside arrayOf.");var Y=q[G];if(!Array.isArray(Y)){var X=k(Y);return new p("Invalid "+F+" `"+V+"` of type "+("`"+X+"` supplied to `"+D+"`, expected an array."))}for(var R=0;R<Y.length;R++){var J=y(Y,R,D,F,V+"["+R+"]",a);if(J instanceof Error)return J}return null}return A(N)}function I(){function y(N,q,G,D,F){var V=N[q];if(!c(V)){var Y=k(V);return new p("Invalid "+D+" `"+F+"` of type "+("`"+Y+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return A(y)}function C(){function y(N,q,G,D,F){var V=N[q];if(!e.isValidElementType(V)){var Y=k(V);return new p("Invalid "+D+" `"+F+"` of type "+("`"+Y+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return A(y)}function T(y){function N(q,G,D,F,V){if(!(q[G]instanceof y)){var Y=y.name||f,X=z(q[G]);return new p("Invalid "+F+" `"+V+"` of type "+("`"+X+"` supplied to `"+D+"`, expected ")+("instance of `"+Y+"`."))}return null}return A(N)}function M(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&(arguments.length>1?r("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):r("Invalid argument supplied to oneOf, expected an array.")),i;function N(q,G,D,F,V){for(var Y=q[G],X=0;X<y.length;X++)if(m(Y,y[X]))return null;var R=JSON.stringify(y,function(ce,P){var ye=j(P);return ye==="symbol"?String(P):P});return new p("Invalid "+F+" `"+V+"` of value `"+String(Y)+"` "+("supplied to `"+D+"`, expected one of "+R+"."))}return A(N)}function Q(y){function N(q,G,D,F,V){if(typeof y!="function")return new p("Property `"+V+"` of component `"+D+"` has invalid PropType notation inside objectOf.");var Y=q[G],X=k(Y);if(X!=="object")return new p("Invalid "+F+" `"+V+"` of type "+("`"+X+"` supplied to `"+D+"`, expected an object."));for(var R in Y)if(o(Y,R)){var J=y(Y,R,D,F,V+"."+R,a);if(J instanceof Error)return J}return null}return A(N)}function K(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&r("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var N=0;N<y.length;N++){var q=y[N];if(typeof q!="function")return r("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+x(q)+" at index "+N+"."),i}function G(D,F,V,Y,X){for(var R=[],J=0;J<y.length;J++){var ce=y[J],P=ce(D,F,V,Y,X,a);if(P==null)return null;P.data&&o(P.data,"expectedType")&&R.push(P.data.expectedType)}var ye=R.length>0?", expected one of type ["+R.join(", ")+"]":"";return new p("Invalid "+Y+" `"+X+"` supplied to "+("`"+V+"`"+ye+"."))}return A(G)}function H(){function y(N,q,G,D,F){return $(N[q])?null:new p("Invalid "+D+" `"+F+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return A(y)}function O(y,N,q,G,D){return new p((y||"React class")+": "+N+" type `"+q+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+D+"`.")}function ee(y){function N(q,G,D,F,V){var Y=q[G],X=k(Y);if(X!=="object")return new p("Invalid "+F+" `"+V+"` of type `"+X+"` "+("supplied to `"+D+"`, expected `object`."));for(var R in y){var J=y[R];if(typeof J!="function")return O(D,F,V,R,j(J));var ce=J(Y,R,D,F,V+"."+R,a);if(ce)return ce}return null}return A(N)}function le(y){function N(q,G,D,F,V){var Y=q[G],X=k(Y);if(X!=="object")return new p("Invalid "+F+" `"+V+"` of type `"+X+"` "+("supplied to `"+D+"`, expected `object`."));var R=n({},q[G],y);for(var J in R){var ce=y[J];if(o(y,J)&&typeof ce!="function")return O(D,F,V,J,j(ce));if(!ce)return new p("Invalid "+F+" `"+V+"` key `"+J+"` supplied to `"+D+"`.\nBad object: "+JSON.stringify(q[G],null," ")+`
161
161
  Valid keys: `+JSON.stringify(Object.keys(y),null," "));var P=ce(Y,J,D,F,V+"."+J,a);if(P)return P}return null}return A(N)}function $(y){switch(typeof y){case"number":case"string":case"undefined":return!0;case"boolean":return!y;case"object":if(Array.isArray(y))return y.every($);if(y===null||c(y))return!0;var N=u(y);if(N){var q=N.call(y),G;if(N!==y.entries){for(;!(G=q.next()).done;)if(!$(G.value))return!1}else for(;!(G=q.next()).done;){var D=G.value;if(D&&!$(D[1]))return!1}}else return!1;return!0;default:return!1}}function L(y,N){return y==="symbol"?!0:N?N["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&N instanceof Symbol:!1}function k(y){var N=typeof y;return Array.isArray(y)?"array":y instanceof RegExp?"object":L(N,y)?"symbol":N}function j(y){if(typeof y>"u"||y===null)return""+y;var N=k(y);if(N==="object"){if(y instanceof Date)return"date";if(y instanceof RegExp)return"regexp"}return N}function x(y){var N=j(y);switch(N){case"array":case"object":return"an "+N;case"boolean":case"date":case"regexp":return"a "+N;default:return N}}function z(y){return!y.constructor||!y.constructor.name?f:y.constructor.name}return g.checkPropTypes=s,g.resetWarningCache=s.resetWarningCache,g.PropTypes=g,g},$a}var Ga,kr;function b1(){if(kr)return Ga;kr=1;var e=Da();function n(){}function a(){}return a.resetWarningCache=n,Ga=function(){function o(i,c,h,l,d,u){if(u!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}o.isRequired=o;function s(){return o}var r={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:s,element:o,elementType:o,instanceOf:s,node:o,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:a,resetWarningCache:n};return r.PropTypes=r,r},Ga}var Ur;function _1(){if(Ur)return jn.exports;if(Ur=1,process.env.NODE_ENV!=="production"){var e=qa(),n=!0;jn.exports=C1()(e.isElement,n)}else jn.exports=b1()();return jn.exports}var v1=_1();const ve=yt(v1);var S1=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function Qa(){return Qa=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var a=arguments[n];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(e[o]=a[o])}return e},Qa.apply(this,arguments)}function N1(e,n){if(e==null)return{};var a={},o=Object.keys(e),s,r;for(r=0;r<o.length;r++)s=o[r],!(n.indexOf(s)>=0)&&(a[s]=e[s]);return a}function Gn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function I1(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,Ha(e,n)}function Ha(e,n){return Ha=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,s){return o.__proto__=s,o},Ha(e,n)}var Qn=(function(e){I1(n,e);function n(){var o;return o=e.call(this)||this,o.handleExpired=o.handleExpired.bind(Gn(o)),o.handleErrored=o.handleErrored.bind(Gn(o)),o.handleChange=o.handleChange.bind(Gn(o)),o.handleRecaptchaRef=o.handleRecaptchaRef.bind(Gn(o)),o}var a=n.prototype;return a.getCaptchaFunction=function(s){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[s]:this.props.grecaptcha[s]:null},a.getValue=function(){var s=this.getCaptchaFunction("getResponse");return s&&this._widgetId!==void 0?s(this._widgetId):null},a.getWidgetId=function(){return this.props.grecaptcha&&this._widgetId!==void 0?this._widgetId:null},a.execute=function(){var s=this.getCaptchaFunction("execute");if(s&&this._widgetId!==void 0)return s(this._widgetId);this._executeRequested=!0},a.executeAsync=function(){var s=this;return new Promise(function(r,i){s.executionResolve=r,s.executionReject=i,s.execute()})},a.reset=function(){var s=this.getCaptchaFunction("reset");s&&this._widgetId!==void 0&&s(this._widgetId)},a.forceReset=function(){var s=this.getCaptchaFunction("reset");s&&s()},a.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},a.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},a.handleChange=function(s){this.props.onChange&&this.props.onChange(s),this.executionResolve&&(this.executionResolve(s),delete this.executionReject,delete this.executionResolve)},a.explicitRender=function(){var s=this.getCaptchaFunction("render");if(s&&this._widgetId===void 0){var r=document.createElement("div");this._widgetId=s(r,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge,isolated:this.props.isolated}),this.captcha.appendChild(r)}this._executeRequested&&this.props.grecaptcha&&this._widgetId!==void 0&&(this._executeRequested=!1,this.execute())},a.componentDidMount=function(){this.explicitRender()},a.componentDidUpdate=function(){this.explicitRender()},a.handleRecaptchaRef=function(s){this.captcha=s},a.render=function(){var s=this.props;s.sitekey,s.onChange,s.theme,s.type,s.tabindex,s.onExpired,s.onErrored,s.size,s.stoken,s.grecaptcha,s.badge,s.hl,s.isolated;var r=N1(s,S1);return Ka.createElement("div",Qa({},r,{ref:this.handleRecaptchaRef}))},n})(Ka.Component);Qn.displayName="ReCAPTCHA",Qn.propTypes={sitekey:ve.string.isRequired,onChange:ve.func,grecaptcha:ve.object,theme:ve.oneOf(["dark","light"]),type:ve.oneOf(["image","audio"]),tabindex:ve.number,onExpired:ve.func,onErrored:ve.func,size:ve.oneOf(["compact","normal","invisible"]),stoken:ve.string,hl:ve.string,badge:ve.oneOf(["bottomright","bottomleft","inline"]),isolated:ve.bool},Qn.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var Fa,xr;function E1(){if(xr)return Fa;xr=1;var e=qa(),n={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},r={};r[e.ForwardRef]=o,r[e.Memo]=s;function i(m){return e.isMemo(m)?s:r[m.$$typeof]||n}var c=Object.defineProperty,h=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,f=Object.prototype;function g(m,p,A){if(typeof p!="string"){if(f){var w=u(p);w&&w!==f&&g(m,w,A)}var S=h(p);l&&(S=S.concat(l(p)));for(var _=i(m),I=i(p),C=0;C<S.length;++C){var T=S[C];if(!a[T]&&!(A&&A[T])&&!(I&&I[T])&&!(_&&_[T])){var M=d(p,T);try{c(m,T,M)}catch{}}}}return m}return Fa=g,Fa}var T1=E1();const k1=yt(T1);function za(){return za=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var a=arguments[n];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(e[o]=a[o])}return e},za.apply(this,arguments)}function U1(e,n){if(e==null)return{};var a={},o=Object.keys(e),s,r;for(r=0;r<o.length;r++)s=o[r],!(n.indexOf(s)>=0)&&(a[s]=e[s]);return a}function x1(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n}var De={},L1=0;function B1(e,n){return n=n||{},function(o){var s=o.displayName||o.name||"Component",r=(function(c){x1(h,c);function h(d,u){var f;return f=c.call(this,d,u)||this,f.state={},f.__scriptURL="",f}var l=h.prototype;return l.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+L1++),this.__scriptLoaderID},l.setupScriptURL=function(){return this.__scriptURL=typeof e=="function"?e():e,this.__scriptURL},l.asyncScriptLoaderHandleLoad=function(u){var f=this;this.setState(u,function(){return f.props.asyncScriptOnLoad&&f.props.asyncScriptOnLoad(f.state)})},l.asyncScriptLoaderTriggerOnScriptLoaded=function(){var u=De[this.__scriptURL];if(!u||!u.loaded)throw new Error("Script is not loaded.");for(var f in u.observers)u.observers[f](u);delete window[n.callbackName]},l.componentDidMount=function(){var u=this,f=this.setupScriptURL(),g=this.asyncScriptLoaderGetScriptLoaderID(),m=n,p=m.globalName,A=m.callbackName,w=m.scriptId;if(p&&typeof window[p]<"u"&&(De[f]={loaded:!0,observers:{}}),De[f]){var S=De[f];if(S&&(S.loaded||S.errored)){this.asyncScriptLoaderHandleLoad(S);return}S.observers[g]=function(M){return u.asyncScriptLoaderHandleLoad(M)};return}var _={};_[g]=function(M){return u.asyncScriptLoaderHandleLoad(M)},De[f]={loaded:!1,observers:_};var I=document.createElement("script");I.src=f,I.async=!0;for(var C in n.attributes)I.setAttribute(C,n.attributes[C]);w&&(I.id=w);var T=function(Q){if(De[f]){var K=De[f],H=K.observers;for(var O in H)Q(H[O])&&delete H[O]}};A&&typeof window<"u"&&(window[A]=function(){return u.asyncScriptLoaderTriggerOnScriptLoaded()}),I.onload=function(){var M=De[f];M&&(M.loaded=!0,T(function(Q){return A?!1:(Q(M),!0)}))},I.onerror=function(){var M=De[f];M&&(M.errored=!0,T(function(Q){return Q(M),!0}))},document.body.appendChild(I)},l.componentWillUnmount=function(){var u=this.__scriptURL;if(n.removeOnUnmount===!0)for(var f=document.getElementsByTagName("script"),g=0;g<f.length;g+=1)f[g].src.indexOf(u)>-1&&f[g].parentNode&&f[g].parentNode.removeChild(f[g]);var m=De[u];m&&(delete m.observers[this.asyncScriptLoaderGetScriptLoaderID()],n.removeOnUnmount===!0&&delete De[u])},l.render=function(){var u=n.globalName,f=this.props;f.asyncScriptOnLoad;var g=f.forwardedRef,m=U1(f,["asyncScriptOnLoad","forwardedRef"]);return u&&typeof window<"u"&&(m[u]=typeof window[u]<"u"?window[u]:void 0),m.ref=g,E.createElement(o,m)},h})(E.Component),i=E.forwardRef(function(c,h){return E.createElement(r,za({},c,{forwardedRef:h}))});return i.displayName="AsyncScriptLoader("+s+")",i.propTypes={asyncScriptOnLoad:ve.func},k1(i,o)}}var Va="onloadcallback",q1="grecaptcha";function Wa(){return typeof window<"u"&&window.recaptchaOptions||{}}function P1(){var e=Wa(),n=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+n+"/recaptcha/enterprise.js?onload="+Va+"&render=explicit":"https://"+n+"/recaptcha/api.js?onload="+Va+"&render=explicit"}const Lr=B1(P1,{callbackName:Va,globalName:q1,attributes:Wa().nonce?{nonce:Wa().nonce}:{}})(Qn),U={overlay:"_overlay_18ksj_1",header:"_header_18ksj_18",logo:"_logo_18ksj_25",card:"_card_18ksj_32",close:"_close_18ksj_47",form:"_form_18ksj_71",formUl:"_formUl_18ksj_80",field:"_field_18ksj_92",label:"_label_18ksj_99",input:"_input_18ksj_108",error:"_error_18ksj_126",primary:"_primary_18ksj_132",divider:"_divider_18ksj_170",google:"_google_18ksj_196",googleIcon:"_googleIcon_18ksj_226",spin:"_spin_18ksj_259",checkboxRow:"_checkboxRow_18ksj_281",switch:"_switch_18ksj_310",terms:"_terms_18ksj_318",message:"_message_18ksj_349",passwordChecker:"_passwordChecker_18ksj_354",valid:"_valid_18ksj_373",invalid:"_invalid_18ksj_377",forgotPassword:"_forgotPassword_18ksj_381",successContainer:"_successContainer_18ksj_400",thumbsUp:"_thumbsUp_18ksj_408",successMessage:"_successMessage_18ksj_414"},Re=()=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",width:"24",height:"24",viewBox:"0 0 32 32",className:U.spin,children:t.jsx("path",{d:"M18,4.181v2.021c4.559,0.929,8,4.97,8,9.798c0,5.514-4.486,10-10,10S6,21.514,6,16c0-4.829,3.441-8.869,8-9.798V4.181 C8.334,5.137,4,10.066,4,16c0,6.617,5.383,12,12,12s12-5.383,12-12C28,10.066,23.666,5.137,18,4.181z"})}),O1=({isOpen:e,onClose:n,commentId:a,publication:o,username:s,CAPTCHA_KEY_V2:r})=>{const[i,c]=E.useState("form"),[h,l]=E.useState(""),[d,u]=E.useState(""),[f,g]=E.useState(""),m=[{id:"spam",label:Qe.spam},{id:"inappropriate",label:Qe.inappropriate},{id:"hate",label:Qe.hate},{id:"misinformation",label:Qe.misinformation},{id:"terrorism",label:Qe.terrorism},{id:"intellectual",label:Qe.intellectual},{id:"bullying",label:Qe.bullying}],p=async()=>{if(!(!h||!a)){if(yr(document).includes(a)){u("Ya has reportado este comentario.");return}c("loading"),u("");try{const S=await(await fetch("/api/comments-report",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({publication:o,username:s,id:a,captchaToken:f,type:Qe[h]})})).json();if(S.type==="success")m1(document,a),c("success"),setTimeout(()=>{A()},3e3);else throw new Error(S.message||"Error al reportar comentario")}catch(w){console.error("Error reporting comment:",w),u(w.message||"Error al reportar comentario"),c("form")}}},A=()=>{c("form"),l(""),u(""),n()};return!e||!a||!s?null:t.jsx("div",{className:ge.overlay,children:t.jsxs("div",{className:ge.popup,children:[t.jsx("button",{className:"close-reply-form",onClick:A,children:t.jsx(Nt,{})}),t.jsx("h2",{className:ge.title,children:"Reportar Abuso"}),i==="loading"&&t.jsx("div",{className:ge.loadingContainer,children:t.jsx(Re,{})}),i==="form"||i==="loading"?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:ge.optionsContainer,children:m.map(w=>t.jsxs("label",{className:ge.option,children:[t.jsx("input",{type:"radio",name:"reportReason",value:w.id,checked:h===w.id,onChange:S=>l(S.target.value),className:ge.radioInput}),t.jsx("span",{className:ge.radioCustom}),t.jsx("span",{className:ge.optionLabel,children:w.label})]},w.id))}),d&&t.jsx("div",{className:ge.errorMessage,children:d}),t.jsx(Lr,{sitekey:r,theme:"light",size:"normal",onChange:w=>g(w??""),onExpired:()=>g("")}),t.jsxs("div",{className:ge.buttons,children:[t.jsx("button",{onClick:A,className:ge.cancelButton,children:"Cancelar"}),t.jsx("button",{onClick:p,disabled:!h,className:ge.reportButton,children:"Reportar"})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:ge.successContainer,children:[t.jsx("div",{className:ge.thumbsUp,children:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:132,height:120,fill:"none",children:t.jsx("path",{fill:"#0073BE",d:"M119.249 42.357H81.915l5.621-27.039.177-1.893a8.906 8.906 0 0 0-2.603-6.272L78.838.941 39.907 39.93c-2.19 2.13-3.491 5.089-3.491 8.343v59.167c0 6.508 5.325 11.833 11.833 11.833h53.25c4.911 0 9.112-2.958 10.887-7.218l17.868-41.713c.533-1.36.829-2.78.829-4.32V54.192c0-6.509-5.325-11.834-11.834-11.834Zm0 23.667-17.75 41.417h-53.25V48.274l25.679-25.678L67.36 54.19h51.889v11.833ZM.916 48.274h23.667v71H.916v-71Z"})})}),t.jsx("p",{className:ge.successMessage,children:"¡Gracias por reportar!"})]}),t.jsx("div",{className:ge.buttons,children:t.jsx("button",{onClick:A,className:[ge.closeButton,ge.buttonAlone].join(" "),children:"Cerrar"})})]})]})})};function D1(e){const n=/^\[\[([^\]]+)\]\]/,a=e.match(n);return a?{user:{username:a[1],firstname:a[1],lastname:""},text:e.replace("[["+a[1]+"]]","")}:{user:!1,text:e}}function Hn(e){const n=e.comments.map(a=>{if(a.user)return{...a,user:a.user,text:a.text,reply:a.reply?Hn({comments:a.reply}).comments:a.reply};const{user:o,text:s}=D1(a.text);return{...a,user:o||!1,text:s,reply:a.reply?Hn({comments:a.reply}).comments:a.reply}});return{...e,comments:n}}async function Fn({publication:e,path:n,size:a=5,sizereply:o=2,id:s,lastid:r,state:i="5,6",apiToken:c,API_ENV:h}){const{PUBLIC_ENV:l}=h;if(l==="prod"){const d=await Br({publication:e,path:n,size:a,sizereply:o,id:s,lastid:r,state:i,apiToken:c,API_ENV:h});return Hn(d[0])}else{const d=await fetch(`/api/comments-get?publication=${e}&path=${n}&size=${a}&sizereply=${o}&lastid=${r}`);if(!d.ok)throw new Error(`Error al obtener comentarios: ${d.status}`);const u=await d.json();return Hn(u.data[0])}}async function Br({publication:e,path:n,size:a=5,sizereply:o=2,id:s,lastid:r,state:i="5,6",apiToken:c,API_ENV:h}){if(!e||!n)throw new Error("Missing required parameters: publication and path");if(typeof e!="string"||typeof n!="string")throw new Error("Invalid input types for publication or path");if(!c)throw new Error("Missing CMS API token");const{PUBLIC_ENV:l,PUBLIC_API_HOST:d,PUBLIC_API_PATH:u,PUBLIC_API_PATH_VERSION:f}=h,g=parseInt(String(a),10),m=parseInt(String(o),10);if(isNaN(g)||g<=0)throw new Error("Invalid size parameter");if(isNaN(m)||m<0)throw new Error("Invalid sizereply parameter");const p=l!=="prod"?`${d}${u}`:"",A=new URLSearchParams({publication:e,path:n,size:g.toString(),sizereply:m.toString(),state:i});s&&A.append("id",s),r&&A.append("lastid",r);const w=`${p}${f}/newcomments/get?${A.toString()}`;try{console.log("Fetching comments from:",w);const{data:S}=await oe.get(w,{headers:{"x-api-token":c,"Cache-Control":"max-age=0, no-cache, no-store, must-revalidate",Pragma:"no-cache",Expires:"0"}});if(!S)throw new Error("No comments data received");return S.data||S||[]}catch(S){if(console.error("Error fetching comments:",S),oe.isAxiosError(S)){const _=S.response?.status,I=S.response?.data;throw _===404?new Error("Comments not found"):_===403?new Error("Access forbidden - check API token"):_===401?new Error("Unauthorized - invalid API token"):_===500?new Error("Internal server error from CMS"):new Error(I?.error||I?.message||`HTTP ${_}: Failed to fetch comments`)}throw S}}const M1=(e,n)=>{const[a,o]=E.useState(void 0),{PUBLIC_PUBLICATION_ID:s}=n,r=s;return E.useEffect(()=>{if(a)return;(async()=>{const{PUBLIC_X_SECURITY_TOKEN:c}=n;try{const h=await Fn({publication:r,path:e??"",size:5,sizereply:2,id:void 0,lastid:void 0,state:"5,6",apiToken:c,API_ENV:n});o(h??[])}catch(h){console.error(h),o({comments:[],morecomment:!1})}})()},[a]),{comments:a,setComments:o}},qr=({username:e,date:n,DATE_CONFIG:a})=>t.jsxs("div",{className:"comment-header",children:[t.jsx("span",{className:"comment-username",children:e}),t.jsx("span",{className:"comment-header-dot",children:"•"}),t.jsx("span",{className:"comment-date",children:f1(Le(Number(n),a))})]}),Pr=({user:e})=>t.jsx("div",{className:"comment-avatar",children:e.picture?t.jsx("img",{className:"comment-avatar-img",src:e.picture,alt:e.username}):e.firstname.charAt(0).toUpperCase()}),Or=({isReply:e=!1,onReply:n,onFlag:a})=>t.jsxs("div",{className:"comment-actions",children:[!e&&n&&t.jsx("button",{onClick:n,className:"comment-action-btn",children:t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",children:[t.jsx("g",{clipPath:"url(#a)",children:t.jsx("path",{fill:"#4D4E4E",d:"M9.976 9V5l-6.983 7 6.983 7v-4.1c4.988 0 8.48 1.6 10.973 5.1-.997-5-3.99-10-10.973-11Z"})}),t.jsx("defs",{children:t.jsx("clipPath",{id:"a",children:t.jsx("path",{fill:"#fff",d:"M0 0h23.942v24H0z"})})})]})}),t.jsx("button",{onClick:a,className:"comment-action-btn",children:t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:25,height:24,fill:"none",children:[t.jsx("g",{clipPath:"url(#a)",children:t.jsx("path",{fill:"#4D4E4E",d:"M20.133 2h-16c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2Zm0 14H5.303l-1.17 1.17V4h16v12Zm-9-11h2v6h-2V5Zm0 8h2v2h-2v-2Z"})}),t.jsx("defs",{children:t.jsx("clipPath",{id:"a",children:t.jsx("path",{fill:"#fff",d:"M.133 0h24v24h-24z"})})})]})})]}),Dr=({commentRef:e,captchaToken:n="",setIsDisabled:a,API_ENV:o})=>(E.useEffect(()=>{const s=e.current;if(!s)return;const r=()=>{const c=s.value.length;s.parentElement&&(s.parentElement.dataset.text=`${c}/${wt}`),s.classList.toggle("over-limit",c>wt),a(!Ba(e,n,o).boolean)};return s.addEventListener("input",r),r(),()=>s.removeEventListener("input",r)},[e,n,a]),t.jsxs("div",{children:[t.jsx("label",{className:"comment-input-label",children:"Comentario"}),t.jsx("textarea",{ref:e,name:"comment",placeholder:"Ingresa un comentario",rows:2})]})),Mr=({commentRef:e,captchaToken:n="",setCaptchaToken:a,children:o,API_ENV:s})=>{const r=Ba(e,n,s);return t.jsxs("div",{className:"form-actions",children:[t.jsx(Lr,{sitekey:s.CAPTCHA_KEY_V2??"",theme:"light",size:"normal",onChange:i=>a(i??""),onExpired:()=>a("")}),t.jsxs("div",{className:"submit-zone",children:[o,!r.boolean&&t.jsx("p",{className:"submit-warning",children:r.text})]})]})},jr=({onClick:e,isDisabled:n,API_ENV:a})=>{const[o,s]=E.useState(!1),{S3_ID_DIR:r="",PUBLIC_ENV:i,PUBLIC_API_HOST:c,PUBLIC_ASSETS_URL:h}=a;E.useEffect(()=>{let d=null;return o&&(d=setTimeout(()=>{s(!1)},2400)),()=>{d&&clearTimeout(d)}},[o]);const l=i=="local"?c:h&&h!=="false"?h:"";return o?t.jsx("div",{className:"success-gif-container",children:t.jsx("img",{className:"success-gif",src:l+"/arte/"+r+"/Success.gif"})}):t.jsxs("button",{type:"button",onClick:async d=>{await e(d)&&s(!0)},id:"comment-button",className:`submit-btn ${n?"disabled":"active"}`,children:["Enviar Comentario",t.jsx("svg",{style:{minWidth:16},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M1.39258 8.99997H12.5626L7.68258 13.88C7.29258 14.27 7.29258 14.91 7.68258 15.3C8.07258 15.69 8.70258 15.69 9.09258 15.3L15.6826 8.70997C16.0726 8.31997 16.0726 7.68997 15.6826 7.29997L9.10258 0.699971C8.71258 0.309971 8.08258 0.309971 7.69258 0.699971C7.30258 1.08997 7.30258 1.71997 7.69258 2.10997L12.5626 6.99997H1.39258C0.842578 6.99997 0.392578 7.44997 0.392578 7.99997C0.392578 8.54997 0.842578 8.99997 1.39258 8.99997Z",fill:"currentColor"})})]})},$r=async({path:e,ref:n,captchaToken:a,button:o,user:s,id:r,addComment:i,API_ENV:c})=>{const h=n.current?.value||"",{PUBLIC_PUBLICATION_ID:l}=c,d=l;if(!Ba(n,a,c).boolean||!s){const u=o.nextElementSibling;return u&&(u.style.display="block"),!1}try{const u=Date.now(),f=await fetch("/api/comments-add",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({publication:d,path:e,id:r,username:s.username,comment:h,recaptchaResponse:a})});let g=null;try{g=await f.json()}catch(w){console.error("Error parsing JSON response:",w)}if(!f.ok)throw new Error(`Error al enviar comentario: ${g?.message} status: ${f.status}`);const m=Date.now(),p=Math.max(0,2400+Math.abs(m-u)),A={username:s.username,firstname:s.firstname,...s.lastname&&{lastname:s.lastname},...s.picture&&{picture:s.picture}};return i({id:m.toString(),text:h,user:A,date:{time:Date.now()},reply:[]}),n.current&&(n.current.value=""),p}catch(u){return console.error("Error enviando comentario:",u),alert(u.message||"Error al enviar el comentario."),!1}},j1=({replyingTo:e,commentRef:n,user:a,path:o,addReply:s,closeForm:r,API_ENV:i})=>{const[c,h]=E.useState(!0),[l,d]=E.useState(""),u=()=>{n.current?.parentElement&&(n.current.parentElement.dataset.text=`0/${wt}`),h(!0),r()};return t.jsxs("div",{className:"comment-form reply-form",children:[t.jsx("button",{className:"close-reply-form",onClick:u,children:t.jsx(Nt,{})}),t.jsx(Dr,{commentRef:n,captchaToken:l,setIsDisabled:h,API_ENV:i}),t.jsx(Mr,{commentRef:n,captchaToken:l,setCaptchaToken:d,API_ENV:i,children:t.jsx(jr,{onClick:async f=>{if(c)return;const g=await $r({path:o,ref:n,captchaToken:l,button:f.currentTarget,user:a,id:e,addComment:s,API_ENV:i});return g&&typeof g=="number"?(setTimeout(()=>{u()},g),!0):!1},isDisabled:c,API_ENV:i})})]})},$1=({reply:e,replyingTo:n,user:a,onFlag:o,DATE_CONFIG:s})=>{const r=e.text;let i=`${Xe.firstname} ${Xe.lastname??""}`,c=Xe.username;return e.user&&(i=`${e.user.firstname} ${e.user.lastname??""}`,c=e.user.username),t.jsx("div",{className:"comment-item reply",children:t.jsxs("div",{className:"comment-header-container",children:[t.jsx(Pr,{user:e.user?e.user:Xe}),t.jsxs("div",{style:{flex:1},children:[t.jsx(qr,{username:i,date:e.date.time,DATE_CONFIG:s}),t.jsxs("div",{className:"comment-reply-to",children:["Respondiendo a ",t.jsx("strong",{children:n})]}),t.jsx("p",{className:"comment-text",children:r}),a?.username.toLowerCase()!==c.toLowerCase()&&t.jsx(Or,{isReply:!0,onFlag:()=>o(e.id)})]})]})})},G1=({comment:e,replyingTo:n,path:a,user:o,handleReplyingTo:s,onFlag:r,API_ENV:i})=>{const c={morereply:e.morereply??!1,reply:e.reply?e.reply:[]},[h,l]=E.useState(c),[d,u]=E.useState(!1),{PUBLIC_PUBLICATION_ID:f,PUBLIC_X_SECURITY_TOKEN:g}=i,m=e.text,p=E.useRef(null);let A=`${Xe.firstname} ${Xe.lastname??""}`,w=Xe.username;e.user&&(A=`${e.user.firstname} ${e.user.lastname??""}`,w=e.user.username);const S=_=>{l({morereply:h.morereply,reply:[_,...h.reply]})};return t.jsx("div",{className:"comment-item",children:t.jsxs("div",{className:"comment-header-container","data-hasreplies":h.reply.length>0?"true":"false",children:[t.jsx(Pr,{user:e.user?e.user:Xe}),t.jsxs("div",{style:{flex:1},children:[t.jsx(qr,{username:A,date:e.date.time,DATE_CONFIG:i}),t.jsx("p",{className:"comment-text",children:m}),o?.username.toLowerCase()!==w.toLowerCase()&&t.jsx(Or,{onReply:()=>s(e.id),onFlag:()=>r(e.id)}),n===e.id&&o&&t.jsx(j1,{replyingTo:n,commentRef:p,addReply:S,user:o,path:a,API_ENV:i,closeForm:()=>s("")}),h.reply.length>0&&t.jsxs("div",{className:"comment-replies",children:[h.reply.map(_=>t.jsx($1,{user:o,reply:_,replyingTo:A,onFlag:r,DATE_CONFIG:i},_.id)),d?t.jsx("div",{style:{marginLeft:"4rem",position:"relative"},children:t.jsx(Re,{})}):h.morereply&&t.jsx("button",{className:"comment-replies-button reply-button",onClick:async()=>{const _=h.reply[h.reply.length-1]?.id;u(!0);try{const C=await Fn({publication:f??"",path:a??"",size:2,sizereply:2,id:e.id,lastid:_,state:"5,6",apiToken:g??"",API_ENV:i});u(!1),l({morereply:C.morecomment,reply:[...h.reply,...C.comments]})}catch(I){throw u(!1),new Error(`Error al obtener comentarios: ${I}`)}},children:"Más Respuestas"})]})]})]})})},Q1=({commentRef:e,user:n,path:a,addComment:o,API_ENV:s})=>{const[r,i]=E.useState(!0),[c,h]=E.useState("");return t.jsxs("div",{className:"comment-form",children:[t.jsx(Dr,{commentRef:e,captchaToken:c,setIsDisabled:i,API_ENV:s}),t.jsx(Mr,{API_ENV:s,commentRef:e,captchaToken:c,setCaptchaToken:h,children:t.jsx(jr,{onClick:async l=>{if(r)return;const d=await $r({path:a,ref:e,captchaToken:c,button:l.currentTarget,user:n,addComment:o,API_ENV:s});return d&&typeof d=="number"?(e.current?.parentElement&&(e.current.parentElement.dataset.text=`0/${wt}`),i(!0),setTimeout(()=>{e.current?.parentElement&&(e.current.parentElement.dataset.text=`0/${wt}`),i(!0)},d),!0):!1},isDisabled:r,API_ENV:s})})]})},H1=({isAuthenticated:e,path:n,user:a,handleLogout:o,API_ENV:s})=>{const{PUBLIC_PUBLICATION_ID:r,PUBLIC_X_SECURITY_TOKEN:i}=s,c=r??"",h=n.replaceAll("/","|"),[l,d]=E.useState(void 0),[u,f]=E.useState(""),{comments:g,setComments:m}=M1(h,s),[p,A]=E.useState(!1),w=E.useRef(null),S=K=>{f(u===K?"":K)},_=K=>{m(g?{...g,comments:[K,...g.comments??[]]}:void 0)},I=K=>{d(K)},C=async()=>{if(!g||!g.morecomment||g.comments.length===0)return;const K=g.comments[g.comments.length-1];if(!K)return;A(!0);const H=K.id;try{const O=await Fn({publication:c,path:h??"",size:5,sizereply:2,id:void 0,lastid:H,state:"5,6",apiToken:i,API_ENV:s});m({morecomment:O.morecomment??!1,comments:[...g.comments,...O.comments]}),A(!1)}catch(O){throw A(!1),new Error(`Error al obtener comentarios: ${O}`)}},T=g?.comments&&g.comments.length>0,M=T?"Comparte tu opinión de este artículo.":"Se el primero en compartir tu opinión de este artículo.",Q=t.jsx("div",{style:{display:"flex",width:"100%",justifyContent:"center"},children:t.jsx(Re,{})});return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"comments-container",children:t.jsx(fe,{title:T||e?"COMENTARIOS":!1,children:t.jsxs(t.Fragment,{children:[e&&a&&t.jsxs("div",{className:"comments-header",children:[t.jsx(d1,{user:a,handleLogout:o,message:M}),t.jsx(Q1,{commentRef:w,user:a,addComment:_,path:h,API_ENV:s})]}),g?g.comments&&g.comments.length>0?t.jsxs("div",{className:"comments-list","data-isauthenticated":`${e}`,children:[g.comments.map(K=>t.jsx(G1,{comment:K,replyingTo:u,handleReplyingTo:S,onFlag:I,user:a??Xe,path:h,API_ENV:s},K.id)),p&&Q]}):null:Q,g?.morecomment&&!p&&t.jsx("button",{className:"comment-replies-button",onClick:C,children:"Más"})]})})}),t.jsx(O1,{username:a?.username??void 0,publication:c,commentId:l,isOpen:l!==void 0,onClose:()=>d(void 0),CAPTCHA_KEY_V2:s.CAPTCHA_KEY_V2??""})]})},Ya=async(e,n)=>{if(!e)throw new Error("No action provided");if(!n)throw new Error("No site key provided");const a=window.grecaptcha;if(!a?.enterprise)throw new Error("grecaptcha not loaded");return new Promise((o,s)=>{a.enterprise.ready(async()=>{try{const r=await a.enterprise.execute(n,{action:e});if(!r)throw new Error("Captcha token no generado");o(r)}catch(r){s(r)}})})},Gr={email:{label:"Email",required:!0},given_name:{label:"Nombre",required:!0},family_name:{label:"Apellido",required:!0},password:{label:"Contraseña",required:!0},confirmPassword:{label:"Confirmar contraseña",required:!0}},zn=[{label:"La contraseña debe tener al menos 8 caracteres",test:e=>e.length>=8},{label:"Usa un número",test:e=>/\d/.test(e)},{label:"Usa una letra minúscula",test:e=>/[a-z]/.test(e)},{label:"Usa una letra mayúscula",test:e=>/[A-Z]/.test(e)},{label:"Usa un símbolo",test:e=>/[^A-Za-z0-9]/.test(e)}];function F1({goToLogin:e,handleGoogleLogin:n,API_ENV:a}){const[o,s]=E.useState({}),[r,i]=E.useState(!1),[c,h]=E.useState(!1),[l,d]=E.useState(null),[u,f]=E.useState("register"),g=(w,S)=>{s(_=>({..._,[w]:S}))},m=async w=>{w.preventDefault(),d(null),h(!0);try{const S=Object.keys(Gr).filter(Q=>!["username","password","confirmPassword"].includes(Q)).map(Q=>({Name:Q,Value:o[Q]}));if(S.some(Q=>{if(!Q.Value||Q.Value.trim()==="")return!0}))return h(!1),d("Complete todos los campos");if(o.password!==o.confirmPassword){d("Las contraseñas no coinciden");return}const _=o.password||"";if(zn.some(Q=>!Q.test(_))){d("La contraseña no es válida");return}const C=Math.floor(Date.now()/1e3);S.push({Name:"updated_at",Value:String(C)});const T=a.PUBLIC_ENV==="local"?"token":await Ya("comment_register",a.CAPTCHA_KEY??"");if(!T)throw new Error("Captcha token no generado");const M=await fetch("/api/auth/create-user",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:o.email,password:o.password,userAttributes:S,token:T})});if(!M.ok){const Q=await M.json().catch(()=>({}));if(Q.code==="UsernameExistsException"){await fetch("/api/auth/resend-code",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:o.email})}),f("confirm");return}throw new Error(Q?.error||"Error al crear usuario")}f("confirm")}catch(S){console.log(S),d(S?.message||S?.error||"Error inesperado")}finally{h(!1)}},p=async w=>{if(w.preventDefault(),!o.confirmationCode){d("Debes ingresar el código de verificación");return}d(null),h(!0);try{const S=await fetch("/api/auth/confirm-user",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:o.email,code:o.confirmationCode})});if(!S.ok){const _=await S.json().catch(()=>({}));throw new Error(_?.error||"Error al confirmar usuario")}f("success")}catch(S){d(S?.message||"Error inesperado")}finally{h(!1)}},A=o.password||"";return t.jsxs(t.Fragment,{children:[u==="register"&&t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:n,className:U.google,children:[t.jsx("img",{src:"https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/google.svg",alt:"",className:U.googleIcon}),t.jsx("span",{children:"Continuar con Google"})]}),t.jsx("div",{className:U.divider,children:t.jsx("span",{children:"o"})}),t.jsxs("form",{onSubmit:m,className:U.form,"data-error":l?"true":"false",children:[t.jsx("ul",{className:U.formUl,children:Object.entries(Gr).map(([w,{label:S}])=>t.jsxs("div",{className:U.field,children:[t.jsx("label",{className:U.label,children:S}),t.jsx("input",{type:w.toLowerCase().includes("password")?r?"text":"password":w==="birthdate"?"date":w==="email"?"email":w==="phone_number"?"tel":"text",name:w,value:o[w]||"",onChange:_=>g(w,_.target.value),className:U.input,placeholder:""}),w==="password"&&t.jsx("div",{className:U.passwordChecker,children:zn.map((_,I)=>{const C=_.test(A);return t.jsxs("div",{className:C?U.valid:U.invalid,children:[t.jsx("div",{children:C?"✔":"○"}),t.jsx("div",{children:_.label})]},I)})}),w==="confirmPassword"&&t.jsxs("div",{className:U.checkboxRow,children:[t.jsx("input",{id:"showPasswordRegister",type:"checkbox",checked:r,onChange:_=>i(_.target.checked)}),t.jsx("label",{htmlFor:"showPasswordRegister",className:U.checkboxLabel,children:"Mostrar contraseñas"})]})]},w))}),l&&t.jsx("p",{className:U.error,children:l}),t.jsxs("p",{className:U.terms,children:["Al continuar, confirmo que he leído y aceptado los",t.jsx("a",{href:"/pages/politicas-de-privacidad.html",target:"_blank",children:"Términos y Condiciones"}),"de nuestra comunidad"]}),t.jsx("button",{type:"submit",className:U.primary,disabled:c,children:c?t.jsx(Re,{}):"Crear cuenta"})]})]}),u==="confirm"&&t.jsxs("form",{onSubmit:p,className:U.form,"data-error":l?"true":"false",children:[t.jsxs("div",{className:U.field,children:[t.jsx("label",{className:U.label,children:"Código de verificación"}),t.jsx("input",{type:"text",name:"confirmationCode",value:o.confirmationCode||"",onChange:w=>g("confirmationCode",w.target.value),className:U.input,required:!0})]}),l&&t.jsx("p",{className:U.error,children:l}),t.jsx("button",{type:"submit",className:U.primary,disabled:c,children:c?t.jsx(Re,{}):"Confirmar cuenta"}),t.jsxs("p",{className:U.switch,children:["¿Ya confirmaste antes?",t.jsx("button",{type:"button",onClick:e,children:"Iniciar sesión"})]})]}),u==="success"&&t.jsxs("form",{className:U.form,children:[t.jsxs("div",{className:U.successContainer,children:[t.jsx("div",{className:U.thumbsUp,children:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:132,height:120,fill:"none",children:t.jsx("path",{fill:"#0073BE",d:"M119.249 42.357H81.915l5.621-27.039.177-1.893a8.906 8.906 0 0 0-2.603-6.272L78.838.941 39.907 39.93c-2.19 2.13-3.491 5.089-3.491 8.343v59.167c0 6.508 5.325 11.833 11.833 11.833h53.25c4.911 0 9.112-2.958 10.887-7.218l17.868-41.713c.533-1.36.829-2.78.829-4.32V54.192c0-6.509-5.325-11.834-11.834-11.834Zm0 23.667-17.75 41.417h-53.25V48.274l25.679-25.678L67.36 54.19h51.889v11.833ZM.916 48.274h23.667v71H.916v-71Z"})})}),t.jsxs("div",{className:U.successMessage,children:[t.jsx("p",{children:"Confirmación completa."}),t.jsx("p",{children:"Ya eres parte de la comunidad!"})]})]}),t.jsx("button",{onClick:e,className:U.primary,children:"Iniciar sesión"})]}),u==="register"&&t.jsxs("p",{className:U.switch,children:["¿Ya tenés cuenta?",t.jsx("button",{type:"button",onClick:e,children:"Iniciar sesión"})]})]})}function z1({onClose:e,checkAuth:n,goToRegister:a,handleGoogleLogin:o,API_ENV:s}){const[r,i]=E.useState("login"),[c,h]=E.useState(""),[l,d]=E.useState(""),[u,f]=E.useState(""),[g,m]=E.useState(""),[p,A]=E.useState(""),[w,S]=E.useState(!1),[_,I]=E.useState(!1),[C,T]=E.useState(null),M=async H=>{if(!_){H.preventDefault(),T(null),I(!0);try{const O=s.PUBLIC_ENV==="local"?"token":await Ya("comment_login",s.CAPTCHA_KEY||"");if(!O)throw new Error("Captcha token no generado");const ee=await fetch("/api/auth/login-password",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({email:c,password:l,token:O})});if(!ee.ok){const le=await ee.json().catch(()=>({}));throw new Error(le?.error||"Ha ocurrido un error")}e(),await n()}catch(O){T(O?.message||"Error inesperado")}finally{I(!1)}}},Q=async H=>{if(!_){H.preventDefault(),T(null),I(!0);try{const O=await fetch("/api/auth/forgot-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:c})});if(!O.ok){const ee=await O.json().catch(()=>({}));throw new Error(ee?.error||"Error al enviar código")}d(""),i("changePassword")}catch(O){T(O?.message||"Error inesperado")}finally{I(!1)}}},K=async H=>{if(_)return;if(H.preventDefault(),g!==p){T("Las contraseñas no coinciden");return}if(zn.some(ee=>!ee.test(g))){T("La contraseña no cumple con los requisitos");return}T(null),I(!0);try{const ee=await fetch("/api/auth/confirm-forgot-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:c,code:u,newPassword:g})});if(!ee.ok){const le=await ee.json().catch(()=>({}));throw new Error(le?.error||"Error al cambiar contraseña")}i("feedback")}catch(ee){T(ee?.message||"Error inesperado")}finally{I(!1)}};return t.jsxs(t.Fragment,{children:[r==="login"&&t.jsx(V1,{email:c,password:l,showPassword:w,loading:_,error:C,setEmail:h,setPassword:d,setShowPassword:S,onSubmit:M,onForgot:()=>{T(null),i("forgot")},onRegister:a,handleGoogleLogin:o}),r==="forgot"&&t.jsx(W1,{email:c,setEmail:h,loading:_,error:C,onSubmit:Q,onBack:()=>{T(null),i("login")}}),r==="changePassword"&&t.jsx(Y1,{email:c,confirmationCode:u,newPassword:g,confirmNewPassword:p,showPassword:w,loading:_,error:C,setConfirmationCode:f,setNewPassword:m,setConfirmNewPassword:A,setShowPassword:S,onSubmit:K,onBack:()=>{T(null),i("forgot")}}),r==="feedback"&&t.jsx(K1,{onBackToLogin:()=>{T(null),i("login")}})]})}function V1({email:e,password:n,showPassword:a,loading:o,error:s,setEmail:r,setPassword:i,setShowPassword:c,onSubmit:h,onForgot:l,onRegister:d,handleGoogleLogin:u}){return t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:u,className:U.google,children:[t.jsx("img",{src:"https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/google.svg",alt:"",className:U.googleIcon}),t.jsx("span",{children:"Continuar con Google"})]}),t.jsx("div",{className:U.divider,children:t.jsx("span",{children:"o"})}),t.jsxs("form",{onSubmit:h,className:U.form,"data-error":s?"true":"false",children:[t.jsxs("div",{className:U.field,children:[t.jsx("label",{className:U.label,children:"Email"}),t.jsx("input",{type:"email",value:e,onChange:f=>r(f.target.value),className:U.input,placeholder:""})]}),t.jsxs("div",{className:U.field,children:[t.jsx("label",{className:U.label,children:"Contraseña"}),t.jsx("input",{type:a?"text":"password",value:n,onChange:f=>i(f.target.value),className:U.input,placeholder:""}),t.jsxs("div",{className:U.checkboxRow,children:[t.jsx("input",{id:"showPasswordLogin",type:"checkbox",checked:a,onChange:f=>c(f.target.checked)}),t.jsx("label",{htmlFor:"showPasswordLogin",className:U.checkboxLabel,children:"Mostrar contraseña"})]})]}),s&&t.jsx("p",{className:U.error,children:s}),t.jsx("button",{type:"submit",className:U.primary,disabled:o,children:o?t.jsx(Re,{}):"Iniciar Sesión"})]}),t.jsxs("p",{className:U.switch,children:["¿No tenés cuenta?",t.jsx("button",{type:"button",onClick:d,children:"Registrate"})]}),t.jsx("button",{type:"button",className:U.forgotPassword,onClick:l,children:"Olvidé mi contraseña"})]})}function W1({email:e,setEmail:n,loading:a,error:o,onSubmit:s,onBack:r}){return t.jsxs("form",{onSubmit:s,className:U.form,"data-error":o?"true":"false",children:[t.jsx("p",{className:U.message,children:"Ingrese su dirección de correo electrónico. Le enviaremos un mensaje con un código para restablecer la contraseña."}),t.jsxs("div",{className:U.field,children:[t.jsx("label",{className:U.label,children:"Email"}),t.jsx("input",{type:"email",value:e,name:"email",onChange:i=>n(i.target.value),className:U.input,placeholder:""})]}),o&&t.jsx("p",{className:U.error,children:o}),t.jsx("button",{type:"submit",className:U.primary,disabled:a,children:a?t.jsx(Re,{}):"Enviar código"}),t.jsx("p",{className:U.switch,children:t.jsx("button",{type:"button",onClick:r,children:"Volver"})})]})}function Y1({email:e,confirmationCode:n,newPassword:a,confirmNewPassword:o,showPassword:s,loading:r,error:i,setConfirmationCode:c,setNewPassword:h,setConfirmNewPassword:l,setShowPassword:d,onSubmit:u,onBack:f}){return t.jsxs("form",{onSubmit:u,className:U.form,"data-error":i?"true":"false",children:[t.jsxs("p",{className:U.message,children:["Hemos enviado un código de restablecimiento de contraseña en un mensaje de Correo electrónico a ",g1(e),". Ingrese el código y la contraseña nueva."]}),t.jsxs("ul",{className:U.formUl,children:[t.jsxs("div",{className:U.field,children:[t.jsx("label",{className:U.label,children:"Código de verificación"}),t.jsx("input",{type:"text",value:n,onChange:g=>c(g.target.value),className:U.input,placeholder:""})]}),t.jsxs("div",{className:U.field,children:[t.jsx("label",{className:U.label,children:"Nueva contraseña"}),t.jsx("input",{type:s?"text":"password",value:a,onChange:g=>h(g.target.value),className:U.input,placeholder:"",name:"password"}),t.jsx("div",{className:U.passwordChecker,children:zn.map((g,m)=>{const p=g.test(a);return t.jsxs("div",{className:p?U.valid:U.invalid,children:[t.jsx("div",{children:p?"✔":"○"}),t.jsx("div",{children:g.label})]},m)})})]}),t.jsxs("div",{className:U.field,children:[t.jsx("label",{className:U.label,children:"Confirmar contraseña"}),t.jsx("input",{type:s?"text":"password",value:o,onChange:g=>l(g.target.value),className:U.input,placeholder:""}),t.jsxs("div",{className:U.checkboxRow,children:[t.jsx("input",{id:"showPasswordForgot",type:"checkbox",checked:s,onChange:g=>d(g.target.checked)}),t.jsx("label",{htmlFor:"showPasswordForgot",className:U.checkboxLabel,children:"Mostrar contraseñas"})]})]})]}),i&&t.jsx("p",{className:U.error,children:i}),t.jsx("button",{type:"submit",className:U.primary,style:{maxWidth:r?"revert-layer":"fit-content"},disabled:r,children:r?t.jsx(Re,{}):"Cambiar contraseña"}),t.jsx("p",{className:U.switch,children:t.jsx("button",{type:"button",onClick:f,children:"Volver"})})]})}function K1({onBackToLogin:e}){return t.jsxs("div",{className:U.form,children:[t.jsx("p",{className:U.success,children:"La contraseña fue cambiada con éxito"}),t.jsx("button",{type:"button",className:U.primary,onClick:e,children:"Iniciar Sesión"})]})}function J1({loginUrl:e,onClose:n,checkAuth:a,icon:o,API_ENV:s}){const[r,i]=E.useState("login"),c=async()=>{if(s.PUBLIC_ENV==="local"){await fetch("/api/auth/debug-login",{method:"GET",credentials:"include"}),localStorage.setItem("cognito-login","success:"+Date.now()),n(),a();return}if(!e)return;const h=encodeURIComponent(window.location.pathname);window.location.href=`/api/auth/login?redirect=${h}`};return t.jsx("div",{className:U.overlay,role:"dialog","aria-modal":"true",id:"pop-overlay",onClick:h=>{const l=h.target;l&&l.id==="pop-overlay"&&n()},children:t.jsxs("div",{className:U.card,children:[t.jsxs("header",{className:U.header,children:[t.jsx("div",{className:U.logo,children:o?o():null}),t.jsx("button",{onClick:n,className:U.close,"aria-label":"Cerrar",children:t.jsx(Nt,{})})]}),r==="login"&&t.jsx(z1,{onClose:n,checkAuth:a,handleGoogleLogin:c,goToRegister:()=>i("register"),API_ENV:s}),r==="register"&&t.jsx(F1,{handleGoogleLogin:c,goToLogin:()=>i("login"),API_ENV:s})]})})}function Z1({isAuthenticated:e,setIsAuthenticated:n,loginUrl:a,user:o,path:s,checkAuth:r,icon:i,API_ENV:c,commentLabel:h}){const[l,d]=E.useState(!1),u=async()=>{if(c.PUBLIC_ENV==="local")await fetch("/api/auth/logout",{method:"GET",credentials:"include"}),n(!1);else{const g=window.location.pathname;window.location.href=`${window.location.origin}/api/auth/logout?redirect=${encodeURIComponent(g)}`}},f=async g=>{g.preventDefault(),a&&d(!0)};return t.jsxs(t.Fragment,{children:[l&&t.jsx(J1,{loginUrl:a,icon:i,checkAuth:r,API_ENV:c,onClose:()=>{d(!1)}}),!e&&t.jsxs("div",{className:"auth-container",children:[t.jsx("p",{children:"Súmate a la comunidad para dejar tu comentario"}),t.jsx("a",{href:a,onClick:f,className:"login-button",children:h||"Iniciar Sesión"})]}),t.jsx(H1,{isAuthenticated:e,handleLogout:u,path:s,user:e?o:void 0,API_ENV:c})]})}function X1({isVisible:e,path:n,icon:a,API_ENV:o,commentLabel:s}){const[r,i]=E.useState(null),[c,h]=E.useState(null),l=o?.COGNITO_AUTH_PREFIX??"ASTRO_",d=E.useCallback(async()=>{if(e){if(document.cookie.search(l+"IS_AUTH=true")===-1){i(!1),h(null);return}try{const m=await(await fetch("/api/auth/user",{credentials:"include"})).json();i(m.isAuthenticated??!1),h(m.user??null)}catch(g){console.error("Error checking auth:",g),i(!1),h(null)}}},[e,l]);E.useEffect(()=>{d()},[d,e]),E.useEffect(()=>{if(!c||!e||typeof window>"u")return;const g=window;if(typeof g!="function"){console.warn("gtag no está disponible todavía");return}g.gtag("set",{user_id:c.username}),console.log("username setted successfully")},[c,e]);const u="/api/auth/login",f=t.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:310,position:"relative"},children:t.jsx(Re,{})});return r===null?f:e?t.jsx(Z1,{icon:a,isAuthenticated:r,setIsAuthenticated:i,loginUrl:u,user:c??void 0,checkAuth:d,path:n,API_ENV:o,commentLabel:s}):f}const R1=({render:e,internalPath:n,section:a,stylesConfig:o,icon:s,isVisibleDefault:r=!1,paths:i,API_ENV:c,fetchConfig:h,commentLabel:l})=>{const d=E.useRef(null),[u,f]=E.useState(r);E.useEffect(()=>{if(r||u)return;const m=new IntersectionObserver(([p])=>{p?.isIntersecting&&(f(!0),m.disconnect())},{rootMargin:"0px",threshold:.1});return d.current&&m.observe(d.current),()=>m.disconnect()},[]);const g={comment:t.jsx(X1,{path:n,icon:s,isVisible:u,API_ENV:c,commentLabel:l}),more:t.jsx(i1,{section:a,internalPath:n,stylesConfig:o,isVisible:u,paths:i,fetchConfig:h,API_ENV:c})};return t.jsx("div",{ref:d,suppressHydrationWarning:!0,style:{...o?o["Modulo 1x3 Client"]?o["Modulo 1x3 Client"]:o["Modulo 1x3"]:{}},children:g[e]})};async function eh({publication:e,path:n,username:a,comment:o,id:s,recaptchaResponse:r,baseUrl:i,apiToken:c,securityToken:h,COMMENTS_VARS:l}){if(console.log("Adding comment with data:",{publication:e,path:n,username:a,comment:o,id:s,recaptchaResponse:r}),!e||!n||!o||!a)return{type:"error",message:"Faltan campos obligatorios. Por favor, completa todos los campos.",status:400};if([e,n,o,a].some(m=>typeof m!="string"))return{type:"error",message:"Datos inválidos. Intenta de nuevo.",status:400};if(!a.trim())return{type:"error",message:"El nombre no puede estar vacío.",status:400};if(!o.trim())return{type:"error",message:"El comentario no puede estar vacío.",status:400};const d=await wr(r,l);if(console.log("Verifying captcha token...",d),!d)return{type:"error",message:"Captcha inválido. Intenta nuevamente.",status:403};const u=`${i}/system/modules/com.tfsla.diario.base/templates/hit/5.0/1/newcomments/add`,f={publication:e,path:n.replace(/\|/gi,"/"),username:a??!1,text:o.trim()};s&&(f.id=s);const g=new URLSearchParams(f);try{const{data:m}=await oe.get(`${u}?${g.toString()}`,{headers:{"Content-Type":"application/json","x-security-token":h,"x-api-token":c,"User-Agent":"amplifyapp-comments-saas"}});return!m||m.error?(console.error("CMS error response:",m),{type:"error",message:"No se pudo guardar el comentario. Intenta nuevamente en unos minutos.",status:502}):(console.log("Comentario enviado con éxito",m),{type:"success",message:"Comentario enviado con éxito.",status:200})}catch(m){if(console.error("Error enviando comentario:",m),oe.isAxiosError(m)){const p=m.response?.status??500,A=m.response?.data;return p===400?{type:"error",message:A?.message||"Solicitud inválida. Verifica que los campos sean correctos.",status:400}:p===403?{type:"error",message:"Captcha inválido o acceso prohibido.",status:403}:p===500?{type:"error",message:"Error interno del servidor del CMS.",status:500}:{type:"error",message:A?.message||"No se pudo enviar el comentario.",status:p}}return{type:"error",message:"Error inesperado. Intenta nuevamente.",status:500}}}const th=async({token:e,projectId:n,captchaKey:a,apiKey:o,captchaAction:s})=>{if(!e)throw new Error("No token provided");if(!n||!a||!o)throw new Error("Missing project ID or site key");if(!s)throw new Error("No action provided");try{const i=await(await fetch(`https://recaptchaenterprise.googleapis.com/v1/projects/${n}/assessments?key=${o}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event:{token:e,siteKey:a,expectedAction:s}})})).json();if(!i?.tokenProperties?.valid)throw new Error(`The token was: ${i?.tokenProperties?.invalidReason}`);if(i.tokenProperties.action!==s)throw new Error("The action attribute in your reCAPTCHA tag does not match the action you are expecting to score");return i?.riskAnalysis?.score??0}catch(r){throw console.error("Recaptcha verification failed",r),new Error(String(r))}};b.AssetsPreconnect=po,b.AutorComponent=Rd,b.AutorHeader1=Os,b.AutorHeader2=Ds,b.BannerAdvertising=pe,b.BannerAdvertisingMiddle=je,b.CarrouselCSR=dl,b.CarrouselIRS=ht,b.CarruselCard=ar,b.CarruselOpinion=or,b.CommonServices=tt,b.Comscore=Ja,b.ContactInfoServer=ad,b.ContactInput=ql,b.ContactSelect=Pl,b.ContactTextarea=Ol,b.ContentLayout1=St,b.ContentLayoutTema=ya,b.DEBUG_MainSlots=Yd,b.DestacadoNoticias=Ys,b.DestacadoVideos=er,b.DynamicBlockServices=ms,b.DynamicComponents=Wd,b.DynamicMainSlot=Mn,b.DynamicSlot=Kt,b.EditorialBlock=Zl,b.ErrorComponent=Bl,b.Font=Io,b.Footer=Ul,b.FormatAfterScripts=go,b.FormatScripts=Jn,b.GA4=Za,b.GTM=Xa,b.GalleryHeader=ir,b.GenerateBody=sl,b.GenerateHead=ol,b.Header=zl,b.IframeHeader=hr,b.ImageOffline=bs,b.ImageOnline=Ne,b.ImageOnlineClient=Cs,b.IssuuServices=Zc,b.ItemListSchema=bo,b.JournalistArticule2=Hs,b.JournalistGroup=Fs,b.LayoutNewsComponent=ba,b.LazyLoader=R1,b.LinkComponent=B,b.LiveBlogHeader=qs,b.Location=cl,b.MainComponentServices=Ei,b.Marfeel=Ra,b.MiddleSection=He,b.Modulo1x3=Ia,b.Modulo1x3Card=nr,b.Modulo1x4=Xs,b.Modulo1x5=Rs,b.Modulo2Columnas=Xl,b.Modulo3Columnas=Js,b.ModuloNewsletter=Rl,b.ModuloOpinion=Jl,b.NewListResponseDataPH=Ar,b.NewsArticle=_o,b.NewsComponent=Jd,b.NewsContent=In,b.NewsDescriptionComponent=ut,b.NextPrev=$t,b.OrgList=vo,b.PreloadImages=Xn,b.REPORT_REASONS=Qe,b.Readest=bn,b.ScriptHydrator=o1,b.SearchSection=Xd,b.Section=fe,b.SectionCard=$e,b.SectionCard2=Qt,b.SectionCardServerComponent=Pn,b.SectionServerComponent=nd,b.ShowSection=ha,b.SocialNetworks=Ua,b.SpeculationRules=Co,b.StaticSlotWrapper=Vd,b.SubscribeColumn=Ns,b.SubscribeRow=Is,b.SubscribeWhatsAppColumn=bl,b.TagHeader=Vl,b.TagSection=Qs,b.TimeLine=Ps,b.TrimPathname=pi,b.VideoBlock3=Ll,b.VideoBlock4=$l,b.VideoEmbeddedHeader=lr,b.VideoSection=a1,b.VideoYoutubeHeader=dr,b.VideosSchemas=No,b.WebsiteList=So,b.addComment=eh,b.bannersReplace=sn,b.becomeVideoObject=Ct,b.buildTagUrl=et,b.coloringByStrokeSVGs=kl,b.compileStyleProps=Dn,b.createAssessment=vi,b.cutString=Be,b.extractMainSlug=Ue,b.extractRealtedNews=Yn,b.formatDate=Le,b.formatDateEdiciones=li,b.formatDateJournalistArticule=on,b.formatDateTimeline=ro,b.formatNewsMeta=ho,b.formatVideoData=Ao,b.generalGetData=el,b.getCaptchaToken=Ya,b.getComments=Br,b.getConfig=W,b.getDynamicSlots=Xc,b.getEnvironmentUrl=xt,b.getEnvironmentUrlFront=fi,b.getHydratorPath=Ci,b.getImageUrl=he,b.getNextMeta=Lt,b.getPage=qt,b.getPlayIcon=Cn,b.getPreloadImages=Ii,b.getPrevMeta=Bt,b.getRelatedNewsCarrousel=bi,b.getReportReasonLabel=u1,b.getResponse=it,b.getResponsePromise=io,b.getSchemas=rn,b.getScriptReplaces=Rn,b.getSlugs=To,b.getTypeOfNews=wi,b.getVideoRealPath=yi,b.handleGetComments=Fn,b.initLibrary=zr,b.metadataToJSX=mo,b.metadata_defaults=gs,b.parseTags=Kn,b.pathnameSplit=uo,b.processExtractedRelatedNews=co,b.removePages=Eo,b.reportComment=h1,b.shareButtons=xs,b.socialIcons=Sn,b.speculationRules=yo,b.speculationRulesHome=wo,b.urlReplaces=fo,b.usePlayIcon=ga,b.verifyCaptchaTokenEnterprise=th,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sass-template-common",
3
- "version": "0.3.138",
3
+ "version": "0.3.139",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"