module.exports=[71029,(a,b,c)=>{"use strict";c._=function(a){return a&&a.__esModule?a:{default:a}}},93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},43619,a=>{a.n(a.i(79962))},13718,a=>{a.n(a.i(85523))},18198,a=>{a.n(a.i(45518))},62212,a=>{a.n(a.i(66114))},84649,a=>{a.n(a.i(65507))},39336,a=>{"use strict";let b=`
  query GetNoticias($locale: Locale!) {
    noticias(
      first: 20
      locales: [$locale]
      orderBy: publishedAt_DESC
    ) {
      id
      slug
      titulo
      resumen
    }
  }
`,c=`
  query GetNoticiasAssets {
    noticias(first: 20, orderBy: publishedAt_DESC) {
      id
      slug
      anio
      pais
      imagenPrincipal {
        url
      }
      publishedAt
    }
  }
`,d=`
  query GetNoticiaSlugs($locale: Locale!) {
    noticias(locales: [$locale]) {
      slug
    }
  }
`,e=`
  query GetNoticia($slug: String!, $locale: Locale!) {
    noticia(where: { slug: $slug }, locales: [$locale]) {
      id
      slug
      titulo
      resumen
      parrafo1
      parrafo2
    }
  }
`,f=`
  query GetNoticia($slug: String!) {
    noticia(where: { slug: $slug }) {
      id
      slug
      anio
      pais
      imagenPrincipal {
        url
      }
      imagen2 {
        url
      }
      imagen3 {
        url
      }
      publishedAt
    }
  }
`,g=process.env.HYGRAPH_URL||"https://us-west-2.cdn.hygraph.com/content/cmi5gi52y05zj07w3cimib12h/master",h=process.env.HYGRAPH_TOKEN;async function i(a,b={}){try{let c,d=await fetch(g,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${h}`},body:JSON.stringify({query:a,variables:b})}),e=await d.text();try{c=JSON.parse(e)}catch(a){return console.error("❌ JSON Parse Error:",e),null}let{data:f,errors:i}=c;if(i)return console.error("GraphQL errors:",i),null;return f}catch(a){return console.error("Hygraph fetch error:",a),null}}async function j(a){if(!a)return console.error("❌ getNoticias: Locale is undefined"),[];let d=a.toLowerCase();console.log("✅ getNoticias: Fetching for locale:",d);let e=await i(b,{locale:d}),f=await i(c);if(!e?.noticias||!f?.noticias)return console.error("❌ getNoticias: No data returned from Hygraph"),[];console.log(`✅ getNoticias: Found ${e.noticias.length} localized noticias`);let g=e.noticias.map(a=>{let b=f.noticias.find(b=>b.id===a.id);return{...a,...b}});return console.log(`✅ getNoticias: Combined ${g.length} noticias with assets`),g}async function k(a){if(!a)return console.error("❌ getNoticiaSlugs: Locale is undefined"),[];let b=a.toLowerCase();console.log("✅ getNoticiaSlugs: Fetching for locale:",b);let c=await i(d,{locale:b});return c?.noticias?(console.log(`✅ getNoticiaSlugs: Found ${c.noticias.length} slugs`),c.noticias||[]):(console.error("❌ getNoticiaSlugs: No slugs found"),[])}async function l(a,b){if(!b||!a)return console.error("❌ getNoticia: Missing locale or slug",{slug:a,locale:b}),null;let c=b.toLowerCase();console.log("✅ getNoticia: Fetching",{slug:a,locale:c});let d=await i(e,{slug:a,locale:c});if(!d?.noticia)return console.error("❌ getNoticia: Localized data not found",a),null;console.log("✅ getNoticia: Localized data loaded");let g=await i(f,{slug:a});if(!g?.noticia)return console.error("❌ getNoticia: Assets data not found",a),null;console.log("✅ getNoticia: Assets data loaded");let h={...d.noticia,...g.noticia};return console.log("✅ getNoticia: Combined successfully"),h}a.s(["getNoticia",()=>l,"getNoticiaSlugs",()=>k,"getNoticias",()=>j],39336)},47401,a=>{"use strict";let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/src/components/noticias/noticiasDetalle.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/noticias/noticiasDetalle.tsx <module evaluation>","default");a.s(["default",0,b])},37513,a=>{"use strict";let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/src/components/noticias/noticiasDetalle.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/noticias/noticiasDetalle.tsx","default");a.s(["default",0,b])},36206,a=>{"use strict";a.i(47401);var b=a.i(37513);a.n(b)},47487,a=>{"use strict";var b=a.i(7997),c=a.i(33527),d=a.i(49528),e=a.i(36206),f=a.i(39336),g=a.i(85221);async function h(){let a=g.routing.locales,b=[];for(let c of(console.log("✅ generateStaticParams: Starting with locales:",a),a)){console.log(`✅ generateStaticParams: Processing locale: ${c}`);try{let a=await (0,f.getNoticiaSlugs)(c);console.log(`✅ generateStaticParams: Found ${a.length} slugs for ${c}`);let d=a.map(a=>({locale:c,slug:a.slug}));b.push(...d),console.log(`✅ generateStaticParams: Added ${d.length} params for ${c}`)}catch(a){console.error(`❌ generateStaticParams error for ${c}:`,a)}}return console.log("✅ generateStaticParams: Total params generated:",b.length),console.log("✅ generateStaticParams: All params:",b),b}async function i({params:a}){let{slug:b,locale:c}=await a;if(console.log(`✅ generateMetadata: Processing ${c}/${b}`),!b||!c)return{title:"Noticia no encontrada"};let d=await (0,f.getNoticia)(b,c);return d?{title:d.titulo,description:d.resumen}:{title:"Noticia no encontrada"}}async function j({params:a}){let{slug:g,locale:h}=await a;if(console.log(`✅ NoticiasDetailPage: Rendering ${h}/${g}`),!g||!h)return(0,b.jsxs)("div",{children:[(0,b.jsx)(d.default,{}),(0,b.jsx)("div",{className:"min-h-screen flex items-center justify-center",children:(0,b.jsx)("p",{className:"text-2xl text-gray-600",children:"Error: parámetros inválidos"})}),(0,b.jsx)(c.default,{})]});let i=await (0,f.getNoticia)(g,h);return i?(0,b.jsxs)("div",{children:[(0,b.jsx)(d.default,{}),(0,b.jsx)(e.default,{noticia:i,locale:h}),(0,b.jsx)(c.default,{})]}):(0,b.jsxs)("div",{children:[(0,b.jsx)(d.default,{}),(0,b.jsx)("div",{className:"min-h-screen flex items-center justify-center",children:(0,b.jsx)("p",{className:"text-2xl text-gray-600",children:"Noticia no encontrada"})}),(0,b.jsx)(c.default,{})]})}a.s(["default",()=>j,"generateMetadata",()=>i,"generateStaticParams",()=>h,"revalidate",0,86400])}];

//# sourceMappingURL=%5Broot-of-the-server%5D__5e469d49._.js.map