1import{_ as te}from"./CZO5EA2X.js";import{d as j,b as o,c as u,k as s,e as v,_ as T,i as I,p as c,n as ae,g,f as t,F as oe,t as h,h as i,r as ne,x as se,y as ie,z as le,A as re,H as ce}from"./CWSKIJXM.js";import{_ as ue}from"./_LWeoKWA.js";import{_ as de}from"./D-78m9Q6.js";import{u as pe}from"./D7QNfPYs.js";import{u as me}from"./D4jI6p4Y.js";import{u as ve,C as ge}from"./C7JeOJIq.js";import{u as he}from"./Bv7_yVyx.js";import{u as fe}from"./D9FrViGf.js";import{C as be,f as _e,p as L,d as ye}from"./DaJGzqsT.js";import{C as xe}from"./_MTuL_GN.js";import{S as we}from"./BeiWb_vd.js";import{_ as ke}from"./Bjp-XtNu.js";import{C as Ce}from"./DpBm7eKB.js";import{C as Se}from"./CeKGgKtM.js";import{u as $e}from"./DaEa4syk.js";import{u as Pe}from"./zcuK743i.js";import{u as Fe}from"./CwNN9whY.js";import{_ as Ne}from"./DlAUqK2U.js";/* empty css */import"./BuROrtK1.js";import"./89irubrF.js";import"./ncdfoETf.js";import"./BuvGtv6-.js";import"./Dj5P7oYM.js";const Be={class:"flex flex-wrap items-center justify-between gap-4 bg-slate-50 p-4 rounded-lg mb-8 border border-slate-200/40 no-print"},Ae={class:"flex flex-wrap items-center gap-2"},De=["title"],Ie={class:"flex flex-wrap items-center gap-2"},Le="inline-flex items-center justify-center h-9 w-9 text-slate-500 hover:text-brand-seventh bg-white border border-slate-200 rounded-lg transition-colors shrink-0",je=j({__name:"ContentDetailToolbar",props:{isSpeaking:{type:Boolean},isPaused:{type:Boolean},isFavorite:{type:Boolean},favoriteLoading:{type:Boolean},listenLabel:{},requireAuthForShare:{type:Boolean},isAuthenticated:{type:Boolean},sharePrefix:{},shareUrl:{}},emits:["speak","pause","stop","print","favorite"],setup(l){return(r,n)=>{const d=T,b=ke;return o(),u("div",Be,[s("div",Ae,[l.isSpeaking?(o(),u("button",{key:1,type:"button",class:"flex items-center gap-1.5 bg-slate-600 hover:bg-slate-700 text-white text-xs font-bold px-4 py-2 rounded-lg transition-colors shadow-xs",title:"Pausar",onClick:n[1]||(n[1]=p=>r.$emit("pause"))},[v(d,{name:"heroicons:pause",size:"24",class:"text-brand-seventh"}),n[6]||(n[6]=I(" Pausar ",-1))])):(o(),u("button",{key:0,type:"button",class:"flex items-center gap-1.5 bg-brand-second hover:bg-brand-first text-white text-xs font-bold px-4 py-2 rounded-lg transition-colors shadow-xs",title:`Escuchar ${l.listenLabel??"contenido"}`,onClick:n[0]||(n[0]=p=>r.$emit("speak"))},[v(d,{name:"heroicons:speaker-wave",size:"24",class:"text-brand-seventh"}),n[5]||(n[5]=I(" Escuchar ",-1))],8,De)),l.isSpeaking||l.isPaused?(o(),u("button",{key:2,type:"button",class:"inline-flex items-center justify-center h-9 w-9 text-slate-500 hover:text-red-500 bg-white border border-slate-200 rounded-lg hover:border-red-200 transition-colors shrink-0",title:"Detener lectura","aria-label":"Detener lectura",onClick:n[2]||(n[2]=p=>r.$emit("stop"))},[v(d,{name:"heroicons:stop-solid",class:"w-5 h-5 text-slate-600"})])):c("",!0),v(b,{"is-favorite":l.isFavorite,loading:l.favoriteLoading,"icon-only":!0,onClick:n[3]||(n[3]=p=>r.$emit("favorite"))},null,8,["is-favorite","loading"])]),s("div",Ie,[s("button",{type:"button",class:ae(Le),title:"Imprimir","aria-label":"Imprimir",onClick:n[4]||(n[4]=p=>r.$emit("print"))},[v(d,{name:"heroicons:printer",class:"w-5 h-5"})]),!l.requireAuthForShare||l.isAuthenticated?(o(),g(Ce,{key:0,"share-prefix":l.sharePrefix,"share-url":l.shareUrl},null,8,["share-prefix","share-url"])):c("",!0)])])}}}),Te=Object.assign(je,{__name:"FeaturesCommonContentDetailToolbar"}),Ue={class:"print-grid grid grid-cols-1 items-start gap-8 lg:grid-cols-12"},ze={class:"print-content rounded-lg border border-slate-200/80 bg-white p-4 shadow-sm lg:col-span-8"},Ee={class:"mb-4 flex items-center justify-between border-b border-slate-100 pb-3"},Re={class:"bg-brand-first rounded-lg px-2.5 py-1 text-xs font-bold text-white"},Ve={class:"flex items-center gap-1.5 text-sm font-medium text-slate-400"},He={class:"ap-title-4 text-brand-first mb-4 leading-tight"}
1,Oe={class:"border-brand-seventh mb-6 rounded-r-lg border-l-2 bg-slate-50/50 py-3 pl-4 pr-3 text-sm font-medium italic leading-relaxed text-slate-500"},qe={key:0,class:"mb-6"},Me={class:"overflow-hidden rounded-lg bg-slate-100"},Je={key:0,class:"mt-2 px-1 text-xs text-slate-400"},Ye={class:"contenido-premium"},Ge={key:2,class:"shadow-xs mt-8 aspect-video overflow-hidden rounded-lg border border-slate-200/50 bg-slate-100"},Ke=["src"],Qe={key:3,class:"mt-8 flex justify-end"},We={class:"rounded-lg border border-slate-100 bg-slate-50 px-3 py-1.5 text-xs italic text-slate-400"},Xe=j({__name:"[plan]",setup(l){const r=se(),n=ie(),d=pe(),b=i(()=>r.params.alias),p=i(()=>r.params.id),$=i(()=>r.params.plan),{data:f}=Fe({module:"NO",item:p}),{data:y,pending:x,error:U,refresh:Ze}=d.getNoticiaDetail(()=>p.value,()=>$.value.toLowerCase()==="pro"?2:1),e=i(()=>y.value?.body?.data||y.value?.body||{}),{authStore:P,planId:F,canViewContent:w,showPaywall:N}=me({planParam:$,data:y,content:e}),{data:B}=d.getNoticias({resultados_por_pagina:15}),z=i(()=>(B.value?.body?.todas?.data||B.value?.body?.data||[]).filter(a=>a.id!=p.value).map(a=>({id:a.id,titulo:a.titulo||"",fecha_publicacion:a.fecha_publicacion,imagen_medium:a.imagen_medium,imagen:a.imagen,to:`/noticias/${a.alias}/${a.id}/${L(a.plan_id)}`}))),E=i(()=>!!e.value?.titulo&&!x.value),{isFavorite:R,favoriteLoading:V,handleFavoriteToggle:H}=fe({content:e,toggleFavorite:m=>d.toggleFavorite(m),onNeedAuth:()=>n.push(`/login?from=${encodeURIComponent(r.fullPath)}`),isAuthenticated:i(()=>!!P.auth)}),k=ne(!1),O=async m=>{try{k.value=!0;const a=await d.getAttachmentBlob(m.id);ye(a,m.nombre_archivo||"documento.pdf")}catch(a){console.error("Failed to download file",a)}finally{k.value=!1}},{isSpeaking:q,isPaused:M,speakContent:J,pauseSpeaking:Y,stopSpeaking:G}=ve(()=>e.value?.contenido||""),{handlePrint:K}=he(),C=i(()=>f.value?.image||e.value?.imagen||e.value?.imagen_medium||le()),A=i(()=>f.value?.description||e.value?.resumen||e.value?.titulo||""),S=i(()=>{if(e.value?.id)return`/noticias/${b.value}/${p.value}/${L(e.value.plan_id)}`}),Q=i(()=>({tags:e.value?.tags})),D=Pe({module:"NO",slug:b,metaInfo:f,categoryHints:Q}),W=i(()=>{if(!e.value?.titulo)return null;const m=f.value?.title||e.value.titulo,a=e.value.resumen||A.value,_=D.value||(S.value?`https://actualidadempresarial.pe${S.value}`:void 0);return re({name:m,description:a,image:C.value,canonicalUrl:_,extra:ce({type:"NewsArticle",headline:m,description:a,articleBody:e.value.contenido||e.value.resumen,image:C.value,datePublished:e.value.fecha_publicacion,dateModified:e.value.fecha_publicacion,articleSection:e.value.indole==="N"?"Nacional":"Internacional",canonicalUrl:_,isAccessibleForFree:F.value!==2,showPaywall:N.value})})});return $e({title:()=>f.value?.title||"",description:A,path:S,canonicalHref:D,type:"article",image:C,jsonLd:W,titleTemplate:"%s"}),(m,a)=>{const _=te,X=T,Z=ue,ee=de;return o(),u("div",Ue,[s("div",ze,[t(x)&&!e.value.titulo?(o(),g(_,{key:0,type:"article"})):t(U)&&!e.value.titulo?(o(),g(be,{key:1,title:"Error al cargar la noticia"})):(o(),u(oe,{key:2},[s("div",Ee,[s("span",Re,h(e.value.indole==="N"?"Nacional":"Internacional"),1),s("div",Ve,[v(X,{name:"heroicons:calendar",class:"h-4 w-4"}),s("span",null,h(t(_e)(e.value.fecha_publicacion,"long")),1)])]),s("h1",He,h(e.value.titulo),1),s("p",Oe,h(e.value.resumen),1),v(Te,{"is-speaking":t(q),"is-paused":t
1(M),"is-favorite":t(R),"favorite-loading":t(V),"listen-label":"noticia","is-authenticated":!!t(P).auth,onSpeak:t(J),onPause:t(Y),onStop:t(G),onPrint:t(K),onFavorite:t(H)},null,8,["is-speaking","is-paused","is-favorite","favorite-loading","is-authenticated","onSpeak","onPause","onStop","onPrint","onFavorite"]),e.value.imagen?(o(),u("div",qe,[s("div",Me,[v(Z,{src:e.value.imagen,alt:e.value.descripcion_imagen||e.value.titulo,width:"800",height:"450",format:"webp",quality:"75",sizes:"sm:100vw lg:760px",loading:"eager",fetchpriority:"high",decoding:"async",class:"h-full w-full object-cover"},null,8,["src","alt"])]),e.value.descripcion_imagen?(o(),u("p",Je,h(e.value.descripcion_imagen),1)):c("",!0)])):c("",!0),s("div",Ye,[t(w)?(o(),g(ee,{key:0,content:e.value.contenido??"",decode:!1,size:"article"},null,8,["content"])):c("",!0),t(N)?(o(),g(we,{key:1,description:"Para leer el artÃculo de noticias completo necesitas iniciar sesión con tu código de suscriptor."})):c("",!0)]),t(w)&&e.value.adjuntos?.length?(o(),g(Se,{key:1,attachments:e.value.adjuntos,loading:t(k),onDownload:O},null,8,["attachments","loading"])):c("",!0),e.value.code_youtube?(o(),u("div",Ge,[s("iframe",{width:"100%",height:"100%",src:e.value.code_youtube,title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:""},null,8,Ke)])):c("",!0),e.value.fuente?(o(),u("div",Qe,[s("span",We," Fuente: "+h(e.value.fuente.titulo),1)])):c("",!0),t(w)&&e.value.id?(o(),g(xe,{key:4,"section-class":"mt-12 pt-8 border-t border-slate-200 no-print",title:"Comentarios",id:e.value.id,modulo:"NO",plan:t(F),titulo:e.value.titulo??""},null,8,["id","plan","titulo"])):c("",!0)],64))]),v(ge,{title:"Ãltimas noticias",items:z.value,"show-sidebar":E.value,pending:t
1(x),"fab-icon":"heroicons:newspaper-solid","fab-title":"Ãltimas noticias","empty-message":"No hay más noticias disponibles en este momento."},null,8,["items","show-sidebar","pending"])])}}}),St=Ne(Xe,[["__scopeId","data-v-c1ec8575"]]);export{St as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.