1import{_ as pt}from"./20260923_30-Dj7_Ig09.js";import{_ as vt,a as ht,b as yt}from"./20260923_30-DX9K2m5w.js";import{_ as et}from"./20260923_30-DUkuKl76.js";import $e from"./20260923_30-DhnvkOQK.js";import{_ as tt}from"./20260923_30-CY7mrgYg.js";import{_ as J}from"./20260923_30-ZPojt6zx.js";import{_ as Ce}from"./20260923_30-C9BGtTLe.js";import{u as Fe}from"./20260923_30-CBodG7K0.js";import{u as st}from"./20260923_30-g4BFpNNI.js";import{d as s,e as a,p as n,q as u,i as r,n as F,F as Y,m as X,g as D,_ as e,j as l,y as de,c as v,r as H,a4 as ot,b as Re,b7 as bt,k as A,a0 as ae,a5 as Oe,aK as Se,ai as Ee,aV as gt,an as _e,o as fe,M as Ue,U as xt,l as te,aa as Le,aI as wt,u as xe,H as Ge,aH as kt,a7 as Te,bp as $t,bm as nt,ac as Ve,ad as Ct,ae as Ye,f as St,Q as Et,ak as we,w as me,a9 as Tt,bq as Vt,br as Dt,h as It,bs as je,t as ze,X as qe,bt as Xe,Y as Mt,aj as At,al as Pe,au as Bt,b6 as Lt,am as Pt,aq as Nt,bu as Ke,aS as Rt,ap as jt}from"./20260923_30-BoOx6aVR.js";import{_ as Ft}from"./20260923_30-CfODBUhL.js";import{u as Ot}from"./20260923_30-BsSFLw5K.js";import{u as at}from"./20260923_30-DgpKfy0h.js";import{_ as De}from"./20260923_30-zyhc9A_k.js";import{_ as pe}from"./20260923_30-UUsF5HPx.js";import{P as Ut}from"./20260923_30-C7zdzdGE.js";import{_ as We}from"./20260923_30-B4MljK53.js";import{A as zt}from"./20260923_30-DpgHkSdA.js";import{_ as qt,u as Wt,a as Ht,b as Gt}from"./20260923_30-DX-lxShP.js";import{u as Yt,_ as Xt}from"./20260923_30-C2GlCEbx.js";import{h as be,s as ge,e as Ne,n as Qe,q as Kt,i as Qt,t as rt,r as Ze}from"./20260923_30-BSbKw8hS.js";import{u as lt,a as Zt}from"./20260923_30-DQj7vCjr.js";import{_ as Jt}from"./20260923_30-D626W13y.js";import es from"./20260923_30-DlE-Aerk.js";import{_ as it}from"./20260923_30-Cpm_f2Em.js";import{_ as ts}from"./20260923_30-CsNb6gRf.js";import{l as ke,a as ss,b as He}from"./20260923_30-Br9Onojv.js";import{u as os}from"./20260923_30-Cxd0vKdX.js";/* empty css */import{k as ns}from"./20260923_30-BX4gNfyL.js";import{u as as}from"./20260923_30-BqAr0ZHM.js";import rs from"./20260923_30-t8h4uOYi.js";import{u as ls}from"./20260923_30-B7U2Li7q.js";import{u as is}from"./20260923_30-CJbP9n2I.js";import{u as cs}from"./20260923_30-DlPjKDVS.js";import"./20260923_30-DW8gTng7.js";import"./20260923_30-CAVp16D1.js";import"./20260923_30--CGhVotL.js";/* empty css */import"./20260923_30-DVg5e7cc.js";import"./20260923_30-BXW5YF-n.js";import"./20260923_30-CdBd5foE.js";import"./20260923_30-pjSx3fLE.js";import"./20260923_30-BFYG6KER.js";import"./20260923_30-1qWebv9S.js";import"./20260923_30-n9q1SU3n.js";import"./20260923_30-sJt8crZ1.js";const us={class:"w-full z-10"},ds={key:0,class:"bg-blue rounded-t-md"},ms={class:"text-white text-[16px] font-ubuntu px-2 pt-2 pb-3 font-medium"},_s={key:0},fs={key:0,class:"flex align-middle content-center mb-1"},ps={class:"pt-calendarSession__content"},vs=["onClick"],hs={key:0,class:"text-gray"},ys={class:"text-sm font-semibold"},bs={key:1},gs={__name:"WidgetsCalendarSessions",props:{list:{type:Array,default:()=>[]},titleBanner:{type:String,default:""},serieName:{type:String,default:""},dense:{type:Boolean,default:!1},theme:{type:String,default:"light",validator:t=>["dark","light","transparent"].includes(t)},type:{type:String,default:"sessionList",validator:t=>["sessionList","noDate"].includes(t)}},setup(t){const o=t,{scrollBlockDetailEvents:i}=st(),d=H(!1),y=Fe(),h=v(()=>d.value?o.list:o.list.slice(0,3)),m=v(()=>o.list.map(b=>{const C=b.lectures;if(Array.isArray(C)&&C.length>0){const f=C[0].event_time,N=C[C.length-1].event_time;return f==null||N==null?null:`${f?.slice(0,5)} - ${N?.slice(0,5)}`}return null})),k=()=>{d.value=!d.value},_=b=>{y.setTabSectionIndex(b.tab),i(b)};return(b,C)=>{const f=tt,N=J,p=Ce;return s(),a("div",us,[t.serieName?(s(),a("div",ds,[n("p",ms,u(b.$t("formation.courses.serie")+t.serieName),1)])):r("",!0),n("div",{class:F({" rounded -mt-1 ":t.serieName})},[n("article",{class:F(["pt-calendarSession",`pt-calendarSession-${t.theme} pt-calendarSession__${t.type}`])},[t.type==="sessionList"?(s(),a("div",_s,[n("ul",null,[(s(!0),a(Y,null,X(e(h),(T,I)=>(s(),a("li",{key:T.slug,class:F({"pt-calendar__dense":t.dense})},[T.lectures?(s(),a("div",fs,[T.date?(s(),D(f,{key:0,class:"shadow",dense:"",date:T.date,event:!0},null,8,["date"])):r("",!0)])):r("",!0),n("div",ps,[n("h2",{class:F(["pt-calendarSession__description",`pt-calendarSession-${t.theme}__description`]),onClick:c=>_({scroll:"blockSection",tab:I})}
1,u(T.title),11,vs),e(m)[I]?(s(),a("span",hs,[l(N,{name:"pt-clock"}),n("span",ys,u(e(m)[I])+" h ",1)])):r("",!0)])],2))),128))]),t.list.length>3?(s(),a("button",{key:0,class:"my-2 link",type:"button",onClick:k},[de(u(e(d)?b.$t("ui.label.seeLess"):b.$t("ui.label.seeMore"))+" ",1),l(N,{name:e(d)?"pt-arrow-up":"pt-arrow-down",class:"text-xl ml-0 text-blue"},null,8,["name"])])):r("",!0)])):t.type==="noDate"?(s(),a("ul",bs,[n("li",{class:F({"pt-calendarSession__dense":t.dense})},[l(p,{"label-type":"text-gray",items:b.$t("formation.detail.session_onlinecourse_duration")},null,8,["items"])],2)])):r("",!0)],2)],2)])}}},xs={name:"PtVideoCarousel",components:{VideoCard:et,VideoPlayer:$e},props:{title:{type:String,default:""},videos:{type:Array,default:()=>[]}},data(){const{windowWidth:t}=Ot(),{lg:o,md:i}=at();return{RETRIEVE_INDEXES:bt,numbersVideos:{max:3,min:0,left:!1,right:!0},lg:o,md:i,windowWidth:t}},computed:{numbersVideosStep(){return this.windowWidth>=1280?3:this.windowWidth>=768?2:1}},watch:{windowWidth(){this.numbersVideos.max=this.numbersVideosStep,this.numbersVideos.min=0}},methods:{setterItems(t){return t.slice(this.numbersVideos.min+this.numbersVideosStep,this.numbersVideos.max+this.numbersVideosStep).length?this.numbersVideos.right=!0:this.numbersVideos.right=!1,this.numbersVideos.min?this.numbersVideos.left=!0:this.numbersVideos.left=!1,t},changeVideos(t){t==="-"&&this.numbersVideos.left?(this.numbersVideos.max-=this.numbersVideosStep,this.numbersVideos.min-=this.numbersVideosStep):t==="+"&&this.numbersVideos.right&&(this.numbersVideos.max+=this.numbersVideosStep,this.numbersVideos.min+=this.numbersVideosStep)},onShowVideo(t){this.$nextTick(()=>this.$refs.videoPlayer.openPlayer(t))}}},ws={class:"pt-video-carousel"},ks=["textContent"],$s={class:"pt-video-carousel__wrapper"},Cs=["textContent"],Ss={key:0,class:"pt-video-carousel__icon"};function Es(t,o,i,d,y,h){const m=Re("VideoCard"),k=J,_=Re("VideoPlayer");return s(),a("div",ws,[i.title?(s(),a("span",{key:0,class:"pt-video-carousel__title",textContent:u(i.title)},null,8,ks)):r("",!0),n("div",$s,[n("div",{class:F(["pt-video-carousel__container",i.videos.length<3?"pt-video-carousel__container--responsive":"pt-video-carousel__container--grid"])},[(s(!0),a(Y,null,X(h.setterItems(i.videos),(b,C)=>(s(),a("div",{key:C,class:F(["pt-video-carousel__video",{[`${C?`hidden${C>1?" lg:block":" md:block"}`:""}`]:!y.windowWidth},C<y.numbersVideos.max&&C>=y.numbersVideos.min?"activated":"disabled"])},[l(m,{class:"pt-video-carousel__video-media",size:"xs",dir:"row",url:b.url,media:b.media,onShowVideo:h.onShowVideo},null,8,["url","media","onShowVideo"]),n("span",{class:"pt-video-carousel__video-title",textContent:u(b.title)},null,8,Cs)],2))),128))],2),i.videos.length>3||!y.lg&&!y.md?(s(),a("div",Ss,[l(k,{class:F({disabled:!y.numbersVideos.left}),name:"pt-angle-left-b",onClick:o[0]||(o[0]=b=>h.changeVideos("-"))},null,8,["class"]),l(k,{class:F({disabled:!y.numbersVideos.right}),name:"pt-angle-right-b",onClick:o[1]||(o[1]=b=>h.changeVideos("+"))},null,8,["class"])])):r("",!0)]),l(_,{ref:"videoPlayer","id-player":"carousel-video"},null,512)])}const Ts=Object.assign(ot(xs,[["render",Es]]),{__name:"VideoLibraryCarousel"}),Vs={class:"pt-subscribe__action-container"},Ds={class:"text-base font-bold mb-4"},Is={class:"text-base text-gray block mb-10"},Ms={class:"p-5"},As={__name:"SummaryCoursePastEvent",props:{course:{type:Object,default:()=>({})}},setup(t){const{openMailto:o,openModal:i,editUser:d}=Yt();return(y,h)=>{const m=Xt,k=De,_=pe;return s(),a("div",Vs,[n("p",Ds,u(y.$t("formation.courses.material.getCertificate")),1),n("span",Is,u(y.$t("formation.courses.inscription.requestCertificateText")),1),n("button",{class:"btn btn__outline--blue w-full text-sm justify-center",type:"button",onClick:h[0]||(h[0]=b=>t.course.event_features.content_request_certificate?e(i)("","infoCertificate"):e(i)(t.course.title))},u(y.$t("formation.courses.inscription.requestCertificate")),1),l(k,{name:"formUser",width:"500",height:"270px"},{default:A(()=>[n("div",null,[l(m,{"user-model":e(d),onSavedDni:h[1]||(h[1]=b=>e(o)(t.course.title))},null,8,["user-model"])])]),_:1}),l(k,{name:"infoCertificate",width:"500"},{default:A(()=>[n("div",Ms,[l(_,{class:"mb-5",content:t.course.event_features.content_request_certificate},null,8,["content"]),n("button",{class:"btn btn__outline--blue w-full block mx-auto text-sm",type:"button",onClick:h[2]||(h[2]=b=>e(o)(t.course.title))},u(y.$t("formation.courses.inscription.requestCertificate")),1)])]),_:1})])}}},Bs={class:"pt-subscribe"},Ls={key:0,class:"pt-subscribe__message text-green"},Ps={class:"text-base font-semibold font-ubuntu mb-1"},Ns={key:2,class:"text-base font-semibold font-ubuntu mb-1"},Rs={key:4},js={key:1,class:"text-center"},Fs={class:"mb-5"},Os=["disabled"],Us={class:"text-sm text-gray mt-1"},zs={key:0,class:"mt-4 -mb-1 -mx-1"},qs={class:"pt-form-radio mr-8",for:"checkbox-communications-consent-yes"},Ws={class:"ml-2"},Hs={class:"pt-form-radio",for:"checkbox-communications-consent-no"},Gs={class:"ml-2"},Ys={key:0,class:"pt-subscribe__end"},Xs={key:0},Ks={key:0,class:"flex flex-wrap"},Qs={class:"font-bold text-gray ml-1"}
1,Zs={key:1,class:"flex flex-wrap text-blue"},Js={key:2,class:"flex text-red"},eo=["textContent"],to="events",so={__name:"SummaryCourseSubscribe",props:{price:{type:Number,default:0},discount:{type:Number,default:0},currency:{type:String,default:""},auth:{type:Boolean,default:!1},enrolled:{type:Boolean,default:!1},courseFormat:{type:String,default:""},dateEnrolled:{type:String,default:","},course:{type:Object,default:()=>({})},limitDate:{type:[String,Boolean],default:""},validateCourseClassLife:{type:Boolean,default:!1}},setup(t){const o=t,{t:i}=ae(),d=Oe(),y=Se(),h=Ee(),m=gt(),{$modal:k,$msal:_}=_e(),{sm:b}=at(),{subscribeEvent:C,courseAvailability:f,showModalSubscribe:N}=lt(),{eventDataModel:p,generateEvent:T}=Wt(),I=H(new Date),c=H(""),O=H(!1),B=H(!1),S=H(null),M=H({}),$=H(null),E=H(null),L=v(()=>y.urlCourseClasslife),G=v(()=>y.urlCourseWebinar),x=v(()=>y.enrollIn),U=v(()=>y.eventDuration||{}),P=v(()=>h.loggedIn),j=v(()=>o.course?.event_features?.register_external),q=v(()=>!!o.course?.event_features?.onsite_registration_closed),V=v(()=>S.value===null||I.value<S.value),g=v(()=>{const R=new Date(o.course.external_form_integrations?.registration_datetime_from);return I.value>R}),z=v(()=>o.course.finish_date?Ne(new Date,o.course.finish_date):!1),Q=v(()=>{const R=o.course.list_of_sessions;if(!R?.length)return!1;const w=R[R.length-1],W=w.lectures?.[0]?.event_time;if(!w.date||!W||!w.total_duration)return!1;const K=Qe(ge(w.date,W),w.total_duration,"minutes");return be()<K}),se=v(()=>be()<ge(o.course.list_of_sessions?.[0]?.date,o.course.list_of_sessions?.[0]?.lectures?.[0]?.event_time)),ee=v(()=>{const R=nt(U.value)?o.course.event_features?.event_duration:U.value;return be()<Qe(x.value,R,"days")}),re=v(()=>{const w={onsite:"formation.detail.classroomCourse",webinar:"strapiDataMap.webinar",hybrid:"formation.detail.hybridCourse"}[o.courseFormat];return w?o.courseFormat==="webinar"?Le(i(w)):i(w):""}),le=v(()=>j.value?i("formation.courses.inscription.signUpHere"):P.value?i("formation.courses.inscription.signUpNowLoggedIn"):i("formation.courses.inscription.signUpNow")),ie=v(()=>o.courseFormat==="webinar"?i("ui.button.accessToWebinar"):i("ui.button.accessToCourse")),oe=v(()=>o.enrolled&&["webinar","hybrid"].includes(o.courseFormat)&&(L.value||G.value)&&(o.courseFormat==="webinar"||o.courseFormat==="hybrid"?Q.value:ee.value)),Ie=v(()=>V.value&&g.value&&!o.enrolled),ve=v(()=>B.value),Me=v(()=>(o.enrolled?se.value:V.value)&&g.value),he=v(()=>{if(!o.course.list_of_sessions?.length||!o.enrolled)return z.value?i("ui.label.courseFinished"):i("ui.label.expiredInscription");const R=w=>{const W=w.lectures?.[w.lectures.length-1];return(W?.event_time?new Date(`${w.date} ${W.event_time}`.replace(/-/g,"/")):new Date(w.date.replace(/-/g,"/")))<be()};return o.course.list_of_sessions.every(R)?i("ui.label.courseFinished"):o.course.list_of_sessions.map((w,W)=>R(w)?`La ${W+1}ª sesión ha finalizado`:null).filter(Boolean).join(` 2`)}),ce=v(()=>{const R=new Date,w=ge(o.course?.list_of_sessions?.at(-1)?.date,o.course?.list_of_sessions?.at(-1)?.lectures?.at(-1)?.event_time),W=Ne(w,R),K=Ne(o.course?.external_form_integrations?.registration_datetime_limit,o.dateEnrolled);return o.course?.event_features?.show_request_certificate&&o.enrolled&&!W&&K}),Ae=()=>{M.value=E.value},ne=async(R=void 0)=>{if($.value=R,!P.value){const w={postLogin:"subscribe",modality:R};await m.replace({query:{...d.query,...w}}),await _.signIn(d.params.slug);return}if(j.value){window.location.href=j.value;return}o.course.dynamic_form||o.course.list_of_sessions?.length>1?m.push({path:$t,query:{to:d.params.slug,modality:R}}):k.open("confirm-subscription")},ye=async(R,w=null,W=null)=>{O.value=!0;try{if(j.value){window.location.href=j.value;return}await C(to,R,$.value??w,!0,null,null,W),await f()}catch(K){console.error(K)}finally{O.value=!1}},Be=()=>{["webinar","hybrid"].includes(o.courseFormat)&&window.open(G.value)};return fe(async()=>{if(T(!1,o.course),S.value=o.course.external_form_integrations?.registration_datetime_limit?new Date(o.course.external_form_integrations.registration_datetime_limit):null,B.value=!0,!!o.auth){if(o.enrolled)N(o.course?.slug);else if(d.query.postLogin==="subscribe"&&P.value){const R=d.query.modality;m.replace({...d,query:{}}),await Ue(),ne(R)}}}),xt(()=>{S.value=o.course.external_form_integrations?.registration_datetime_limit?new Date(o.course.external_form_integrations.registration_datetime_limit):null}),(R,w)=>{const W=J,K=De,dt=pe,mt=kt,_t=wt,ft=Te;return s(),a("div",Bs,[l(ft,null,{default:A(()=>[t.enrolled?(s(),a("h4",Ls,[de(u(e(i)("formation.courses.inscription.successEnrollment"))+" ",1),l(W,{name:"pt-check-circle",class:"font-semibold ml-1 text-xl"}
2)])):r("",!0),n("div",Ps,u(e(re)),1),t.enrolled?r("",!0):(s(),D(e(Ut),{key:1,class:"mb-2",icon:"",price:t.price,discount:t.discount,currency:t.currency,"text-xl":""},null,8,["price","discount","currency"])),e(P)&&!t.enrolled&&t.courseFormat==="hybrid"?(s(),a("span",Ns,u(e(i)("formation.courses.inscription.signUpNowLoggedIn")),1)):r("",!0),e(oe)?(s(),a("button",{key:3,type:"button",class:"btn h-10 w-full bg-green text-white justify-center",onClick:te(Be,["stop","prevent"])},u(e(ie)),1)):e(Ie)?(s(),a("div",Rs,[t.courseFormat!=="hybrid"?(s(),a("button",{key:0,class:F(["btn h-10 w-full text-white justify-center",e(P)?"bg-blue":"bg-orange"]),type:"button",onClick:w[0]||(w[0]=te(Z=>ne(),["stop","prevent"]))},[de(u(e(le))+" ",1),e(j)?(s(),D(W,{key:0,name:"pt-external-link-alt",class:"m-1.5 text-xl","aria-hidden":"true"})):r("",!0)],2)):(s(),a("div",js,[n("div",Fs,[n("button",{class:F(["btn h-10 w-full justify-center",e(q)?"bg-gray-very-light text-gray-light cursor-not-allowed":e(P)?"bg-blue text-white":"bg-orange text-white"]),type:"button",disabled:e(q),onClick:w[1]||(w[1]=te(Z=>ne("onsite"),["stop","prevent"]))},u(e(Le)(e(i)("strapiDataMap.onsite"))),11,Os),n("p",{class:F(["text-sm mt-1",e(q)?"text-gray-light":"text-gray"])},u(e(q)?e(i)("formation.courses.inscription.onsiteRegistrationClosed"):e(i)("formation.courses.inscription.onsiteHelp")),3)]),n("div",null,[n("button",{class:F(["btn h-10 w-full text-white justify-center",e(P)?"bg-blue":"bg-orange"]),type:"button",onClick:w[2]||(w[2]=te(Z=>ne("webinar"),["stop","prevent"]))},u(e(Le)(e(i)("strapiDataMap.webinar"))),3),n("p",Us,u(e(i)("formation.courses.inscription.webinarHelp")),1)])]))])):r("",!0),l(K,{name:"course-subscribe"},{default:A(()=>[l(e(qt),{course:t.course,"zoom-url":e(G),ics:e(c),"url-class-life":e(L)},null,8,["course","zoom-url","ics","url-class-life"])]),_:1}),l(K,{"hide-close-button":"",width:e(b)?"50%":"100%",name:"confirm-subscription"},{default:A(()=>[t.course.dynamic_form?r("",!0):(s(),D(e(zt),{key:0,message:e(i)("formation.courses.inscription.confirm"),"name-modal":"confirm-subscription",loading:e(O),feder:t.course.event_features.course_partner,onConfirm:w[6]||(w[6]=Z=>ye())},{default:A(()=>[t.course.legal_consent?(s(),a("div",zs,[l(dt,{class:"m-1 mr-3",content:t.course.legal_consent},null,8,["content"]),l(_t,{modelValue:e(p).communicationsConsent,"onUpdate:modelValue":w[5]||(w[5]=Z=>e(p).communicationsConsent=Z),name:"legalCommunications",rules:"requiredGenericRadio"},{default:A(()=>[n("label",qs,[xe(n("input",{id:"checkbox-communications-consent-yes","onUpdate:modelValue":w[3]||(w[3]=Z=>e(p).communicationsConsent=Z),class:"no-focus",value:!0,type:"radio",name:"radio"},null,512),[[Ge,e(p).communicationsConsent]]),n("span",Ws,u(e(i)("forms.label.yes")),1)]),n("label",Hs,[xe(n("input",{id:"checkbox-communications-consent-no","onUpdate:modelValue":w[4]||(w[4]=Z=>e(p).communicationsConsent=Z),class:"no-focus",value:!1,type:"radio",name:"radio"},null,512),[[Ge,e(p).communicationsConsent]]),n("span",Gs,u(e(i)("forms.label.no")),1)]),n("div",null,[l(mt,{class:"pt-form-info-error",name:"legalCommunications"})])]),_:1},8,["modelValue"])])):r("",!0)]),_:1},8,["message","loading","feder"]))]),_:1},8,["width"]),l(K,{name:"enrolledError",onBeforeOpen:Ae},{default:A(()=>[l(e(We),{message:e(M)},null,8,["message"])]),_:1})]),_:1}),e(ve)?(s(),a("div",Ys,[e(Me)?(s(),a("span",Xs,[t.limitDate?(s(),a("span",Ks,[l(W,{name:"pt-clock",class:"flex items-center mr-2"}),n("span",null,u(t.enrolled?e(i)("ui.label.theCourseStartsIn"):e(i)("ui.label.subscribeEnd")),1),n("span",Qs,u(t.limitDate),1)])):r("",!0)])):e(g)?(s(),a("span",Js,[l(W,{name:"pt-clock-eight",class:"mt-1 mr-2"}),n("span",{class:"whitespace-pre-line",textContent:u(e(he))},null,8,eo)])):(s(),a("span",Zs,[l(W,{name:"pt-clock-three",class:"flex items-center mr-2"}),n("span",null,u(e(i)("formation.courses.inscription.inscriptionNoOpen")),1)]))])):r("",!0),e(B)&&e(ce)?(s(),D(e(As),{key:1,course:t.course,onEnrollEvent:ye},{default:A(()=>[e(O)?(s(),D(W,{key:0,name:"spinner",class:"animate-spin mr-2"})):r("",!0)]),_:1},8,["course"])):r("",!0)])}}},oo={class:"col-span-12 sm:col-span-6 md:col-span-4"},no={class:"pt-course-serie"},ao={class:"sr-only"},ro={class:"pt-course-serie__overlay"},lo={class:"pt-course-serie__wrapper"},io={key:0},co={class:"p-4"},uo={__name:"CardsCourseSerie",props:{serie:{type:Object,default:()=>({})}},setup(t){const o=t,i=()=>o.serie.list_of_sessions.filter(d=>Qt(d.date));return(d,y)=>{const h=Ve,m=Ce,k=J,_=it;return s(),a("div",oo,[n("div",no,[l(_,{to:`${e(Ye)}/${t.serie.slug}`},{default:A(()=>
2[n("span",ao,u(t.serie.meta_title),1),n("div",ro,[n("div",lo,[t.serie.main_image?(s(),D(h,{key:t.serie.id,alt:t.serie.main_image.alternativeText?t.serie.main_image.alternativeText:"",title:t.serie.meta_title,src:t.serie.main_image.url,loading:"lazy"},null,8,["alt","title","src"])):r("",!0)]),t.serie.event_features.event_format!=="online"?(s(),a("div",io,[(s(),a(Y,null,X(i,(b,C)=>l(m,{key:C,"label-type":"white",items:e(Ct)(e(Kt)(b.date)),class:"absolute top-0 p-4"},null,8,["items"])),64))])):r("",!0),t.serie.icons&&t.serie.icons.pt_icons.length?(s(),D(k,{key:1,class:"absolute top-0 right-0 m-4",name:"pt-sustainability-wheel"})):r("",!0)])]),_:1},8,["to"]),n("div",null,[n("h2",co,[l(_,{to:`${e(Ye)}/${t.serie.slug}`},{default:A(()=>[de(u(t.serie.meta_title),1)]),_:1},8,["to"])])])])])}}},mo={name:"PrSerieEvents",components:{Labels:Ce,SerieCard:uo},props:{serieName:{type:String,default:""},series:{type:Array,default:()=>[]}}},_o={class:"text-base mb-8"},fo={class:"border-4 border-blue rounded mt-1"};function po(t,o,i,d,y,h){const m=Ce,k=Re("SerieCard");return s(),a("div",null,[o[0]||(o[0]=n("hr",{class:"my-8 border-gray-very-light"},null,-1)),n("h2",_o,u(t.$t("formation.courses.eventsSerie")),1),i.serieName?(s(),D(m,{key:0,"label-type":"blue",items:i.serieName},null,8,["items"])):r("",!0),n("div",fo,[(s(!0),a(Y,null,X(i.series,_=>(s(),a("div",{key:_.slug,class:"bg-blue-very-light px-1 py-2 last:pb-1 first:pt-1"},[l(k,{class:"pb-3 last:pb-0",serie:_},null,8,["serie"])]))),128))])])}const vo=Object.assign(ot(mo,[["render",po]]),{__name:"SerieEvents"}),ho={class:"flex justify-center items-center bg-blue-very-light px-4 py-6 md:py-0 lg:h-32 rounded"},yo={class:"flex justify-center text-center"},bo={class:"block self-center ml-2 md:ml-12 md:w-2/3"},go={class:"font-bold text-gray-dark mb-2"},xo={class:"text-gray-dark"},wo={__name:"BannersPrivateContentMaterial",props:{icon:{type:String,default:""},title:{type:String,default:""},text:{type:String,default:""}},setup(t){return(o,i)=>(s(),a("div",ho,[n("div",yo,[l(e(t.icon),{name:t.icon,class:"text-5xl lg:text-6xl text-blue self-center"},null,8,["name"]),n("div",bo,[n("p",go,u(t.title),1),n("p",xo,u(t.text),1),St(o.$slots,"default")])])]))}},ct=(t="errorFileDownload")=>{const{$modal:o,$msal:i}=_e(),{t:d}
2=ae(),y=Oe(),h=Se(),m=Et("courseEventName",H("")),{trackEventMaterialDownloaded:k,trackEventMaterialVideoPlayed:_}=os(),b=H(null),C=H({}),f=H({}),N=we("videoPlayer"),p=we("videoPlayerMaterial"),T=v(()=>h.enrolled),I=v(()=>h.events||{}),c=v(()=>h.dynamicForm),O=(x,U,P=!1,j="")=>{f.value={isFile:!0,url:x,index:U,materialTitle:j},T.value||P?S(x,U,j):G(),ke("material")},B=x=>{const U=x?.status??x?.statusCode??x?.response?.status,P=x?.data?.error_code;return d(P==="NOT_ENROLLED"||U===403?"formation.courses.material.errorRestricted":P==="UNAUTHENTICATED"||U===401?"formation.courses.material.errorUnauthenticated":"message.error.errorFile")},S=async(x,U,P="")=>{b.value=U;const j=y.params.slug;let q;try{q=await h.fileDownload("getCourseMaterialFile",`${j}/${x}`)}catch(V){console.error(V),C.value={text:B(V),type:"error"},b.value=null,await o.open(t);return}try{await h.checkFileExist(q),Dt(q),k(P,m.value,x)}catch(V){console.error(V),C.value={text:d("message.error.errorFile"),type:"error"},await o.open(t)}finally{b.value=null}},M=(x,U,P=!1,j="")=>{f.value={isFile:!1,url:x,index:U,materialTitle:j},T.value||P?$(x):G(),ke("material")},$=x=>{const U=f.value.url?.includes("youtube")||x?.includes("youtube");let P=f.value.url;if(x&&/[?#&]t=/.test(x)){const j=U?f.value.url.replace("youtube","youtube-nocookie"):f.value.url;let q;/[?]/.test(f.value.url)?q="&":U?q="?":q="#";const V=x.match(/[?#&]t=(\d+)/),g=V?V[1]:null;g&&(P=`${j}${q}start=${g}`)}_(f.value.materialTitle||"",m.value,P||x),f.value.isFile?N.value?.openPlayer(x):p.value?.openPlayer(P)},E=(x,U,P=!1,j="")=>{ss("material",{type:P,url:x,index:U,materialTitle:j}),i.signIn()},L=async()=>{try{if(c.value?.length)Tt({path:Vt,query:{type:"event",step:4,slug:y.params.slug}});else if(I.value?.event_features?.course_partner==="feder")o.open("confirm-subscription");else if(!T.value){const x=He("enrollEvent");return await h.subscribeEvent(y.params.slug,{additionalInfo:x?.additionalInfo,modality:x?.modality,isFree:!1})}}catch(x){console.error(x)}},G=async()=>{try{await L()}catch(x){console.error(x),C.value={text:d("message.error.errorFile"),type:"error"},await o.open(t)}finally{b.value=!1}};return me(T,x=>{x&&f.value?.url&&(f.value?.isFile?S(f.value?.url,f.value?.index,f.value?.materialTitle):$(f.value?.url))}),{loading:b,message:C,course:I,enrolled:T,playVideo:$,onClickPdf:O,videoPlayer:N,dataReproduce:f,redirectLogin:E,dynamicForm:c,enrollEventPlay:G,onClickMultimedia:M,videoPlayerMaterial:p}},ko={class:"bg-orange-pastel p-4 rounded-lg"},$o={key:0},Co={class:"flex mb-2"},So=["aria-disabled","onClick"],Eo={class:"md:hidden text-sm ml-3 w-3/4 font-semibold text-gray-dark"},To=["aria-disabled","onClick"],Vo={class:"md:ml-2 w-full md:w-3/4"},Do={class:"mb-4 hidden md:block text-base font-semibold text-gray-dark"},Io=["aria-disabled","onClick"],Mo={class:"text-xs"},Ao=["aria-disabled","onClick"],Bo={key:1,class:"mt-2"},Lo={class:"font-ubuntu font-bold mb-4 mt-6 lg:mt-0"},Po=["aria-disabled","onClick"],ue="errorFileDownload-material-card",No={__name:"CardsMaterialCard",props:{img:{type:String,default:""},files:{type:Array,default:()=>[]},videos:{type:Array,default:()=>[]},showAlways:{type:Boolean,default:!1},restricted:{type:Boolean,default:!1}},setup(t){const{message:o,onClickPdf:i,onClickMultimedia:d,redirectLogin:y}=ct(ue),h=Ee(),{t:m}=ae(),{$modal:k}=_e(),_=t,b=(f,N)=>{if(_.restricted&&h.loggedIn){o.value={text:m("formation.courses.material.errorRestricted"),type:"error"},k.open(ue);return}h.loggedIn||_.showAlways?i(f.filename,N,_.showAlways,f.name):y(f.filename,N,!0,f.name)},C=f=>{if(_.restricted&&h.loggedIn){o.value={text:m("formation.courses.material.errorRestricted"),type:"error"},k.open(ue);return}d(f.video.url,null,_.showAlways,f.video.title)};return fe(()=>{setTimeout(async()=>{const f=He("material");if(f){if(_.restricted){ke("material"),o.value={text:m("formation.courses.material.errorRestricted"),type:"error"},k.open(ue);return}f.type?await i(f.url,f.index,!1,f.materialTitle):await d(f.url,f.index,!1,f.materialTitle)}},2e3)}),(f,N)=>{const p=Ve,T=J,I=$e,c=We,O=De,B=Te;return s(),a("div",ko,[t.videos.length>0?(s(),a("div",$o,[(s(!0),a(Y,null,X(t.videos,(S,M)=>(s(),a("div",{key:M,class:"md:flex mb-6 last:mb-0"},[n("div",Co,[n("a",{href:"#",class:F(t.restricted?"opacity-50 cursor-not-allowed":""),"aria-disabled":t.restricted||void 0,onClick:te($=>C(S),["stop","prevent"])},[(s(),D(p,{key:S.video.media.url,alt:S.video.media.alternativeText,src:S.video.media.url,class:"w-full rounded-md md:w-36",loading:"lazy"},null,8,["alt","src"]))],10,So),n("h3",Eo,[n("a",{href:"#",class:F(t.restricted?"opacity-50 cursor-not-allowed":""),"aria-disabled":t.restricted||void 0,onClick:te($=>C(S),["stop","prevent"])},u(S.video.title),11,To)])]),n("div",Vo,[n("h3",Do,[n("a",{href:"#",class:F(t.restricted?"opacity-50 cursor-not-allowed":""),"aria-disabled":t.restricted||void 0,onClick:te($=>C(S),["stop","prevent"])},u(S.video.title),11,Io)]),n("p",Mo,[n("a",{href:"#",class:F(t.restricted?"opacity-50 cursor-not-allowed":""),"aria-disabled":t.restricted||void 0,onClick:te($=>C(S),["stop","prevent"])},u(S.video.abstract),11,Ao)])])]))),128))])):r("",!0),t.files.length?(s(),a("div",Bo,[n("p",Lo,u(e(m)("formation.courses.material.materialDownload")),1),(s(!0),a(Y,null,X(t.files,(S,M)=>(s(),a("div",{key:M,class:"flex items-center mb-4"},[l(T,{name:"pt-document-pdf",class:"text-xl text-red mr-3 font-bold"}),n("button",{class:F(["text-sm lg:text-base underline text-left font-semibold text-gray-dark",t.restricted?"opacity-50 cursor-not-allowed":""]),type:"button","aria-disabled":t.restricted||void 0,onClick:$=>b(S,M)},u(e(m)("ui.button.download")+": "+S.name),11,Po)]))),128))])):r("",!0),l(I,{ref:"videoPlayer","id-player":"material-card"},null,512),l(B,null,{default:A(()=>[l(O,{name:ue,width:"700"},{default:A(()=>[l(c,{message:e(o)},null,8,["message"])]),_:1})]),_:1})])}}},Ro={__name:"DownloadMaterial",props:{resources:{type:Object,default:()=>({})},showAlways:{type:Boolean,default:!1},restricted:{type:Boolean,default:!1}},setup(t){return(o,i)=>{const d=No;return s(),a("article",null,[l(d,{videos:t.resources?.videos,files:t.resources?.files,"show-always":t.showAlways,restricted:t.restricted},null,8,["videos","files","show-always","restricted"])])}}},jo={class:"pt-authors-event"},Fo={class:"grid grid-cols-1 lg:grid-cols-2 gap-6"},Oo={class:"pt-authors-event__events"}
2,Uo={class:"img-authors",style:{"min-width":"50px"}},zo={key:1},qo={class:"pt-authors-event__profile"},Wo={key:0,class:"text-gray"},ut={__name:"AuthorsEvents",props:{list:{type:[Array,Object],default:()=>[]},title:{type:String,default:""},section:{type:String,default:"autor"}},setup(t){const o=t,i=it,d=v(()=>Array.isArray(o.list)?o.list:typeof o.list=="object"&&o.list!==null?[o.list]:[]);return(y,h)=>{const m=Ve,k=J;return s(),a("div",jo,[n("ul",Fo,[(s(!0),a(Y,null,X(e(d),(_,b)=>(s(),a("li",{key:b},[n("figure",Oo,[n("div",Uo,[_.image&&_.image.url?(s(),D(m,{key:_.image.url,class:"pt-authors-event__image",style:{width:"2.3rem",height:"2.3rem"},title:_.image.alternativeText||_.name,src:_.image.url,alt:_.image.alternativeText?_.image.alternativeText:"autor",loading:"lazy"},null,8,["title","src","alt"])):(s(),a("div",zo,[l(k,{name:"pt-user",style:{"font-size":"1.9rem"},class:"pt-authors-event__image pt-authors-event__image--empty"})]))]),n("figcaption",qo,[(s(),D(It(_.vip?e(i):"div"),{to:_.vip?`/${t.section}/`+_.slug:void 0,class:"pt-authors-event__authorLink"},{default:A(()=>[_.name?(s(),a("span",{key:0,class:F(["font-bold",_.vip?"text-blue hover:underline":"text-gray"])},u(_.name),3)):r("",!0)]),_:2},1032,["to"])),_.job?(s(),a("span",Wo,u(_.job),1)):r("",!0)])])]))),128))])])}}},Ho={key:0},Go={class:"w-3/4"},Yo={class:"flex items-center"},Xo={key:0,class:"flex"},Ko={class:"font-bold text-sm lg:text-base text-gray-dark"},Qo={class:"mt-1"},Zo={key:0},Jo={class:"text-sm"},en={class:"pt-ponientes"},tn={key:1},sn={key:0,class:"text-sm"},on={class:"pt-ponientes"},nn=["aria-disabled","onClick"],an={class:"text-gray hover:underline mx-2 lg:mx-3.5 text-base"},rn=["aria-disabled","onClick"],ln={class:"text-gray hover:underline text-base mx-2 lg:mx-3.5"},cn={__name:"SessionsMaterial",props:{presentations:{type:Array,default:()=>[]},video:{type:Object,default:()=>({})},material:{type:Boolean,default:!1},restricted:{type:Boolean,default:!1},idPlayer:{type:String,default:""}},setup(t){const{t:o}=ae(),{loggedIn:i}=je(Ee()),d=t,y=`errorFileDownload-${d.idPlayer}`,{message:h,loading:m,onClickPdf:k,onClickMultimedia:_,redirectLogin:b}=ct(y),{$modal:C}=_e(),f=(p,T)=>{if(d.restricted&&i.value){h.value={text:o("formation.courses.material.errorRestricted"),type:"error"},C.open(y);return}i.value||d.material?k(p.file,T,d.material,p.title):b(p.file,T,!0,p.title)},N=(p,T)=>{if(d.restricted&&i.value){h.value={text:o("formation.courses.material.errorRestricted"),type:"error"},C.open(y);return}i.value||d.material?_(p.start_video_at,T,d.material,p.title):b(p.start_video_at,T,!1,p.title)};return fe(()=>{setTimeout(()=>{const p=He("material");if(p){if(d.restricted){ke("material"),h.value={text:o("formation.courses.material.errorRestricted"),type:"error"},C.open(y);return}p.type?k(p.url,p.index,d.material,p.materialTitle):_(p.url,p.index,d.material,p.materialTitle)}},2e3)}),(p,T)=>{const I=J,c=ut,O=pe,B=Ve,S=De,M=Te;return t.presentations.length?(s(),a("div",Ho,[(s(!0),a(Y,null,X(t.presentations,($,E)=>(s(),a("div",{key:E,class:"lg:flex lg:justify-between pt-2 pb-6 last:border-b-0"},[n("div",Go,[n("div",Yo,[$.event_time?(s(),a("span",Xo,[l(I,{name:"pt-clock-three",class:"text-xl text-blue mr-3.5 mt-0.5"}),n("span",Ko,u(`${e(rt)($.event_time)} - ${$.title}`),1)])):r("",!0)]),n("div",Qo,[n("div",null,[$.moderator?(s(),a("div",Zo,[n("span",Jo,u(e(o)("author.moderator")),1),n("div",en,[l(c,{list:$.moderator,section:"autor"},null,8,["list"])])])):r("",!0),$.speakers?.length?(s(),a("div",tn,[$.moderator?(s(),a("span",sn,u(e(o)("author.participan")),1)):r("",!0),n("div",on,[(s(!0),a(Y,null,X($.speakers,L=>(s(),a("div",{key:L.slug},[l(c,{list:L,section:"autor"},null,8,["list"])]))),128))])])):r("",!0)]),$.content?(s(),D(O,{key:0,content:$.content,class:"pt-collapsible mt-0"},null,8,["content"])):r("",!0)])]),n("div",{class:F(["flex lg:flex-col lg:items-start mt-4 lg:mt-0",e(m)===E?"lg:w-[175px]":"lg:w-[150px]"])},[$.file?(s(),a("button",{key:0,class:F(["flex items-center text-2xl lg:mb-2.5",t.restricted?"opacity-50 cursor-not-allowed":""]),type:"button","aria-disabled":t.restricted||void 0,onClick:L=>f($,E)},[l(I,{name:"pt-file-download"}),n("span",an,u(e(o)("formation.courses.material.downloadPdf")),1),e(m)===E?(s(),D(I,{key:0,name:"spinner",class:"animate-spin"})):r("",!0)],10,nn)):r("",!0),$.start_video_at?(s(),a("button",{key:1,class:F(["flex items-center ml-1.5 lg:m-0",t.restricted?"opacity-50 cursor-not-allowed":""]),type:"button","aria-disabled":t.restricted||void 0,onClick:L=>N($,E)},[t.video?.url?(s(),D(B,{key:t.video.source_id,class:"aspect-video h-8 rounded",title:t.video.title,src:t.video.thumbnail_url,alt:t.video?.title??"video",loading:"lazy"},null,8,["title","src","alt"])):r("",!0),n("span",ln,u(e(o)("formation.courses.material.seeVideo")),1),e(m)===E?(s(),D(I,{key:1,name:"spinner",class:"animate-spin"})):r("",!0)],10,rn)):r("",!0)],2)]))),128)),l(M,null,{default:A(()=>[l(S,{name:y,width:"700"},{default:A(()=>[l(e(We),{message:e(h)},null,8,["message"])]),_:1})]),_:1}),l(e($e),{ref:"videoPlayerMaterial","id-player":`sessions-material-${t.idPlayer}`},null,8,["id-player"])])):r("",!0)}}},un={class:"pt-collapsible box",role:"presentation"},dn=["textContent"],mn=["textContent"],_n=["group-id"],fn={class:"pt-collapsible__title"},pn=["id","aria-expanded","aria-controls","onClick"],vn={class:"text-gray-dark flex"},hn={class:"ml-4 flex flex-col justify-start"},yn={class:"bg-blue-light w-20 text-white rounded p-1 mb-2"},bn=["id"],gn={key:0,class:"pt-scheduler-detail"},xn={key:0,class:"pt-scheduler-detail__session--decoration"},wn={class:"pt-scheduler-detail__session--content"},kn={class:"font-bold text-sm lg:text-base text-gray-dark"},$n={key:0},Cn={key:0},Sn={class:"text-sm"},En={class:"pt-ponientes"},Tn={key:1},Vn={key:0,class:"text-sm"},Dn={class:"pt-ponientes"},In={__name:"Collapsible",props:{list:{type:Array,default:()=>[]},multiple:{type:Boolean,default:!1},eventFormat:{type:String,default:""},enrolled:{type:Boolean,default:!1},restricted:{type:Boolean,default:!1},existMaterial:{type:Boolean,default:!1},checkNewMaterial:{type:Boolean,default:!1},showMaterial:{type:Boolean,default:!1},material:{type:Boolean,default:!1}},setup(t,{expose:o}){const i=Fe(),{t:d}=ae(),y=t,h=qe({expandedId:void 0,speakersIndex:0,speakerList:[]}),{expandedId:m,speakersIndex:k,speakerList:_}=ze(h),b=v(()=>i.tabSectionIndex);fe(()=>{y.list.length>0&&(m.value=0,N())}),me(b,p=>{Number.isInteger(p)&&C(p)});const C=p=>[m.value=p,k.value=p],f=p=>m.value===p?[m.value=void 0,k.value=0]:[m.value=p,k.value=p];o({openSection:C}
2);const N=()=>{y.list?.forEach(p=>{p?.lectures?.forEach(T=>{T?.speakers?.forEach(I=>{_.value.length===0?_.value.push(I):_.value.some(c=>c.slug===I.slug)||_.value.push(I)})})})};return(p,T)=>{const I=tt,c=J,O=ut,B=pe,S=cn;return s(),a("div",null,[n("dl",un,[t.eventFormat!=="hybrid"?(s(),a("span",{key:0,class:"font-bold text-lg",textContent:u(e(d)("formation.detail.whatContent",{event:e(d)(`strapiDataMap.${t.eventFormat}`)}))},null,8,dn)):r("",!0),t.eventFormat==="hybrid"?(s(),a("span",{key:1,class:"font-bold text-lg",textContent:u(e(d)("formation.detail.whatContentHybrid"))},null,8,mn)):r("",!0),n("div",null,[(s(!0),a(Y,null,X(t.list,(M,$)=>(s(),a("div",{key:M.id,"group-id":M.id,class:"mb-4 shadow"},[n("dt",fn,[n("button",{id:`'Sesión' ${$+1}`,class:"flex justify-between w-full p-4 items-center","aria-expanded":e(m)===$,"aria-controls":`${M.id}-content`,type:"button",onClick:E=>f($)},[n("div",vn,[M.date?(s(),D(I,{key:0,class:"shadow",dense:"",date:M.date},null,8,["date"])):r("",!0),n("div",hn,[n("span",yn,u(e(d)("formation.courses.inscription.session"))+" "+u($+1),1),n("span",null,u(M.title),1)])]),l(c,{class:"text-blue",name:e(m)===$?"pt-angle-up":"pt-angle-down"},null,8,["name"])],8,pn)]),n("dd",{id:`${M.id}-content`,class:F(["pt-collapsible__content",{"pt-expanded":e(m)===$}]),role:"region"},[T[0]||(T[0]=n("hr",{class:"w-full my-4"},null,-1)),t.showMaterial&&t.checkNewMaterial?r("",!0):(s(),a("div",gn,[n("ol",null,[(s(!0),a(Y,null,X(M.lectures,E=>(s(),a("li",{key:E.slug,class:"pt-scheduler-detail__session"},[E.is_lecture_block?r("",!0):(s(),a("span",xn,[l(c,{name:"pt-clock-three",class:"text-xl mt-1"})])),n("div",wn,[n("span",kn,[t.eventFormat!=="online"&&E.event_time&&!E.is_lecture_block?(s(),a("span",$n,u(`${e(rt)(E.event_time)} - `),1)):r("",!0),de(" "+u(E.title),1)]),n("div",null,[E.moderator?(s(),a("div",Cn,[n("span",Sn,u(e(d)("author.moderator")),1),n("div",En,[l(O,{list:E.moderator,section:"autor"},null,8,["list"])])])):r("",!0),E.speakers?.length?(s(),a("div",Tn,[E.moderator?(s(),a("span",Vn,u(e(d)("author.participan")),1)):r("",!0),n("div",Dn,[(s(!0),a(Y,null,X(E.speakers,L=>(s(),a("span",{key:L.slug},[l(O,{list:L,section:"autor"},null,8,["list"])]))),128))])])):r("",!0)]),E.content?(s(),D(B,{key:0,content:E.content,class:"pt-collapsible mt-0"},null,8,["content"])):r("",!0)])]))),128))])])),t.showMaterial&&t.checkNewMaterial&&M?.lectures?(s(),D(S,{key:1,presentations:M?.lectures,video:M?.tierratv_video,material:t.material,restricted:t.restricted,class:"pt-10","id-player":M.id},null,8,["presentations","video","material","restricted","id-player"])):r("",!0)],10,bn)],8,_n))),128))])])])}}},Mn={class:"bg-white"},An={class:"pb-4 bg-white"},Bn={key:0,class:"bg-orange-pastel p-4 mb-4 rounded-lg"},Ln={class:"font-ubuntu font-bold mb-4 mt-6 lg:mt-0"},Pn={class:"flex items-center mb-4"},Nn=["href"],Je=16,Rn={__name:"SummaryCourseDetail",props:{list:{type:Array,default:()=>[]},enrolled:{type:Boolean,default:!1},course:{type:Object,default:()=>({})},currentTab:{type:Number,default:0}},setup(t){const o=t,i=qe({expiredDate:null}),d=H(0),{expiredDate:y}=ze(i),{typeCourse:h}=st(),{t:m}=ae(),k=Fe(),_=we("tabsComponent"),b=we("collapsible"),{scrollPosition:C}=as();Mt("courseEventName",v(()=>o.course?.meta_title||""));const f=()=>{const V=document.querySelectorAll("#blockSection [group-id]");return I.value.map(g=>g.tab===void 0?document.getElementById(g.scroll):V[g.tab])},N=()=>(document.querySelector("header")?.offsetHeight??0)+(_.value?.$el?.offsetHeight??0),p=async V=>{k.setTabSectionIndex(V.index-1),b.value?.openSection(V.index-1),await Ue();const g=f()[V.index];g&&window.scrollTo({top:g.getBoundingClientRect().top+window.scrollY-N()-Je,behavior:"smooth"})},T=()=>{const V=N()+Je*2;d.value=f().reduce((g,z,Q)=>z&&z.getBoundingClientRect().top<=V?Q:g,0)},I=v(()=>{const V=[{name:"Resumen",scroll:"summary",id:"summary-tab"}];return h===Xe&&o.course?.objectives?.length&&V.push({name:"Objetivos",scroll:"objectives",id:"objectives-tab"}),o.typeCourse!=="online"?o.list?.forEach((g,z)=>{V.push({name:`${m("formation.courses.inscription.session")} ${z+1}`,scroll:"blockSection",tab:z})}):o.list?.forEach((g,z)=>{V.push({name:`${m("formation.courses.block")} ${z+1}`,scroll:h===Xe?"blockSectionOnline":"blockSection",id:`block-${z}-tab`,tab:z})}),V}),c=v(()=>
2o.course.event_features?.event_format==="webinar"||o.course.event_features?.show_material_always),O=v(()=>!!(o.course?.resources?.videos?.length||o.course?.resources?.files?.length)),B=v(()=>o.list.some(V=>V.lectures.some(g=>g.file||g.start_video_at))),S=v(()=>o.course.event_features?.will_have_material),M=Se(),{loadingEnrolled:$}=je(M),E=ns(),L=v(()=>E.value&&!o.course.event_features?.show_material_always&&!o.enrolled&&$.value==="success"),G=v(()=>{const V=o.course.external_form_integrations,g=new Date>new Date(V?.registration_datetime_from),z=V?.registration_datetime_limit?new Date(V.registration_datetime_limit)>new Date:!0;return g&&z}),{loggedIn:x}=je(Ee()),{$msal:U}=_e(),P=v(()=>x.value?G.value?m("formation.courses.material.textRestricted"):m("formation.courses.material.textRestrictedClosed"):m("formation.courses.material.textRestrictedLoggedOut")),j=v(()=>x.value?m("formation.courses.material.ctaEnroll"):m("formation.courses.material.loggedOut")),q=v(()=>x.value?G.value?()=>document.getElementById("reference")?.scrollIntoView({behavior:"smooth"}):null:()=>U.signIn());return fe(()=>{y.value=new Date(o.course.external_form_integrations?.registration_datetime_limit)}),me(C,T),(V,g)=>{const z=vt,Q=ts,se=pe,ee=J,re=wo,le=Ro,ie=In;return s(),a("div",null,[n("div",Mn,[l(z,{icons:t.course.icons,"font-size":"text-6xl"},null,8,["icons"])]),t.list.length>1?(s(),D(Q,{key:0,ref_key:"tabsComponent",ref:_,class:"pt-course-detail__tabs","tab-list":e(I),"active-index":e(d),onEmitTab:p},null,8,["tab-list","active-index"])):r("",!0),n("div",An,[l(se,{id:"summary",content:t.course.content,class:"mb-8"},null,8,["content"]),t.course.program_file?(s(),a("div",Bn,[n("p",Ln,u(e(m)("formation.courses.material.downloadPdf")),1),n("div",Pn,[l(ee,{name:"pt-document-pdf",class:"text-xl text-red mr-3 font-bold"}),n("a",{class:"text-sm lg:text-base underline text-left font-semibold text-gray-dark",href:t.course.program_file.file.url},u(t.course.program_file.title),9,Nn)])])):r("",!0)]),!e(O)&&!e(B)&&e(S)?(s(),D(re,{key:1,class:"my-8",icon:"pt-folder-lock",title:e(m)("formation.courses.material.notAvaible"),text:e(m)("formation.courses.material.textNotAvaible")},null,8,["title","text"])):r("",!0),e(L)&&e(c)&&(e(O)||e(B))?(s(),D(re,{key:2,class:"my-8",icon:"pt-folder-lock",title:e(m)("formation.courses.material.restricted"),text:e(P)},{default:A(()=>[e(q)?(s(),a("button",{key:0,class:"btn mt-4 h-10 justify-center bg-green px-6 text-white",onClick:g[0]||(g[0]=(...oe)=>e(q)&&e(q)(...oe))},u(e(j)),1)):r("",!0)]),_:1},8,["title","text"])):r("",!0),e(c)&&e(O)?(s(),D(le,{key:3,resources:t.course.resources,"show-always":t.course.event_features.show_material_always,restricted:e(L),class:"my-4"},null,8,["resources","show-always","restricted"])):r("",!0),t.course.event_features?(s(),D(ie,{key:4,id:"blockSection",ref_key:"collapsible",ref:b,list:t.list,enrolled:t.enrolled,restricted:e(L),"exist-material":e(B)||e(O),"check-new-material":e(B),material:t.course.event_features.show_material_always,"show-material":e(c),"event-format":t.course.event_features.event_format},null,8,["list","enrolled","restricted","exist-material","check-new-material","material","show-material","event-format"])):r("",!0)])}}},jn={class:"pt-course"},Fn={class:"flex flex-col"},On={class:"flex items-center h-full"},Un={class:"pt-course__section mb-2 hidden lg:block"},zn={key:1},qn={class:"my-4 text-base font-bold"},Wn=["data-src","title"],Hn={key:0,class:"mt-4 font-sans text-sm underline text-blue"},Gn={key:2,class:"mt-4 pt-2"},Yn={class:"pt-course__section lg:hidden"},Xn={key:1},Kn={class:"text-xl font-semibold mt-4 lg:m-0"},Qn=["data-src","title"],Zn={key:1,class:"mt-4 font-sans text-sm underline text-blue"},Jn={class:"mt-4 lg:m-0 lg:pr-20"},Ga={__name:"[slug]",async setup(t){let o,i;const d=Rt(),y=Oe(),h=Se(),m=At(),{t:k}=ae(),{createHeadSeo:_}=ls(),{getAuth:b}=lt(),{checkUserIsEnrolledInEvent:C}=Zt(),f=is(),N=d.public.APP_BASE_DOMAIN+y.fullPath,p=qe({progress:0,validateCourseClassLife:!1}),{validateCourseClassLife:T}=ze(p),I=H(null),{data:c}=([o,i]=Pe(async()=>Bt("event",async()=>await m.getEventById(y.params.slug),{transform:g=>({...g??{},...g?.resources?{resources:{...g.resources,video:g.list_of_sessions.filter(z=>z.video?.content).map(z=>z.video?.content)}}:{}})})),o=await o,i(),o);if(!c.value||nt(c.value))throw Lt({statusCode:404,fatal:!0});const{data:O}=([o,i]=Pe(()=>Pt(()=>m.getEventsBySerie(c.value.event_belongs_to_series?.label??"",y.params.slug),"$I7zUqy8roq")),o=await o,i(),o);h.resetEnrolled(),[o,i]=Pe(()=>C()),await o,i();const B=v(()=>c.value.campus||{}),S=v(()=>c.value.event_features?.event_format),{organizerLogos:M,collaboratorLogos:$}=cs(c),E=v(()=>c.value.list_of_sessions?.every(g=>g)?c.value.list_of_sessions:[]),L=v(()=>h.enrolled),G=v(()=>h.dateEnrolled),x=v(()=>h.loadingEnrolled),U=v(()=>m.common.social_sharing),P=v(()=>m.common.social_sharing_modal);let j=!1;c.value?.external_form_integrations?.registration_datetime_limit&&(j=Ze(c.value.external_form_integrations?.registration_datetime_limit));const q=v(()=>L.value?Ze(ge(E.value[0].date,E.value[0].lectures[0].event_time)):j||!1),V=g=>Ue(()=>I.value?.openPlayer(g));return me(b,async g=>{g&&L.value&&["webinar","hybrid"].includes(S.value)&&await h.courseAvailability(y.params.slug)},{immediate:!0}),me(c,g=>{if(Object.entries(g??{}).length){const{meta_title:z,abstract:Q,main_image:se}=g,ee={...g,urlShare:N,courseFormat:S.value};_(z,Q,se?.url||"",ee,jt.EVENT,!g.public)}},{immediate:!0,deep:!0}),(g,z)=>{const Q=pt,se=ht,ee=yt,re=et,le=$e,ie=gs,oe=Ft,Ie=Ts,ve=so,Me=Ht,he=Jt,ce=Te,Ae=Gt,ne=es,ye=vo,Be=Rn,R=rs,w=Nt("lazy-load");return s(),a("div",jn,[l(oe,{class:"bg-orange-very-light",grid:"A","padding-y":"py-8 md:py-10","bg-hero":e(c)?.main_image||""},{header:A(()=>[l(Q,{path:"formacion",section:e(k)("breadcrumbs.formacion"),color:"white",class:"container mb-8 lg:mb-10 z-10"},null,8,["section"])]),"content-left":A(()=>[n("div",Fn,[l(se,{class:"z-15",course:e(c),"url-share":N,"share-networks":e(U),"content-text-share":e(P)},null,8,["course","share-networks","content-text-share"]),l(ee,{class:"hidden md:flex absolute -bottom-[4.375rem] left-36 px-[2.34rem]",course:e(c)},null,8,["course"])])]),"content-right":A(()=>[n("div",On,[e(c).resources?.video?.length===1&&(e(c).event_features.show_material_always||e(L))?(s(),D(re,{key:0,class:"rounded-md cursor-pointer",size:"lg",dir:"row",url:e(c)?.resources?.video[0]?.url,media:e(c)?.resources?.video[0]?.media,onShowVideo:V},null,8,["url","media"])):r("",!0),l(le,{ref_key:"videoPlayerCourse",ref:I,"id-player":"course-video"},null,512),e(E).length>
21&&(!(e(L)||e(c).event_features.show_material_always)||!e(c).resources?.video?.length||e(c).resources?.video?.length>1)?(s(),D(ie,{key:1,list:e(E),"title-banner":e(k)("formation.detail.webinarSesions"),dense:"","serie-name":e(c).event_belongs_to_series?e(c).event_belongs_to_series.label:"",type:"sessionList"},null,8,["list","title-banner","serie-name"])):r("",!0)])]),_:1},8,["bg-hero"]),l(ee,{class:"flex md:hidden justify-center px-8",course:e(c)},null,8,["course"]),e(c)?.resources?.video?.length>1?(s(),D(oe,{key:0,class:"bg-orange-pastel",grid:"E","padding-y":"py-16"},{content:A(()=>[l(Ie,{videos:e(c)?.resources?.video},null,8,["videos"])]),_:1})):r("",!0),l(oe,{id:"reference","padding-y":"py-4 md:py-14",grid:"D",order:"reverse"},{"content-left":A(()=>[n("div",Un,[l(ce,null,{fallback:A(()=>[l(he)]),default:A(()=>[e(c)?.external_form_integrations&&e(x)==="success"?(s(),D(ve,{key:0,class:"mb-2.5",course:e(c),enrolled:e(L),"date-enrolled":e(G),"course-format":e(S),"validate-course-class-life":e(T),"limit-date":e(q),price:e(c).event_features.price,discount:e(c).event_features.discount,currency:e(c).event_features.currency,auth:e(b)},null,8,["course","enrolled","date-enrolled","course-format","validate-course-class-life","limit-date","price","discount","currency","auth"])):r("",!0),(e(S)==="onsite"||e(S)==="hybrid")&&Object.keys(e(B)).length&&e(x)==="success"?(s(),a("div",zn,[n("div",qn,u(e(k)("formation.detail.whereCelebrated")),1),e(B).google_maps_url?xe((s(),a("iframe",{key:0,"data-src":e(B).google_maps_url,class:"w-full",title:e(k)("formation.detail.whereCelebrated")},null,8,Wn)),[[w]]):r("",!0),n("div",null,[e(B)?.address?(s(),a("p",Hn,u(e(B).address),1)):r("",!0)])])):r("",!0),e(L)?(s(),a("div",Gn,[l(Me,{"calendar-event":e(c),"is-list":!0,class:"mb-10 lg:mb-0"},null,8,["calendar-event"])])):r("",!0)]),_:1})]),l(Ae,{class:"py-6",features:e(c).event_features,enrolled:e(L)},null,8,["features","enrolled"]),n("div",null,[l(ne,{title:e(k)("formation.detail.organizers"),dense:"",grayscale:"",class:"my-6",logos:e(M),"custom-logo":e(c).internal_organizer?e(Ke)[e(c).internal_organizer]??{}:e(c).organized_by_cajamar?e(Ke).cajamar:{}},null,8,["title","logos","custom-logo"]),e($).length?(s(),D(ne,{key:0,title:e(k)("formation.detail.collaborators"),dense:"",grayscale:"",logos:e($)},null,8,["title","logos"])):r("",!0)]),e(O)?.length?(s(),D(ye,{key:0,"serie-name":e(O)[0].event_belongs_to_series.label,series:e(O)},null,8,["serie-name","series"])):r("",!0)]),"content-right":A(()=>[n("div",Yn,[l(ce,null,{fallback:A(()=>[l(he)]),default:A(()=>[e(x)==="success"&&e(c).external_form_integrations?(s(),D(ve,{key:0,course:e(c),enrolled:e(L),"date-enrolled":e(G),"course-format":e(S),"validate-course-class-life":e(T),"limit-date":e(q),price:e(c).event_features.price,discount:e(c).event_features.discount,currency:e(c).event_features.currency,auth:e(b)},null,8,["course","enrolled","date-enrolled","course-format","validate-course-class-life","limit-date","price","discount","currency","auth"])):r("",!0),(e(S)==="onsite"||e(S)==="hybrid")&&Object.keys(e(B)).length?(s(),a("div",Xn,[n("div",Kn,u(e(k)("formation.detail.whereCelebrated")),1),e(B).google_maps_url?xe((s(),a("iframe",{key:0,"data-src":e(B).google_maps_url,class:"w-full mt-4",title:e(k)("formation.detail.whereCelebrated")},null,8,Qn)),[[w]]):r("",!0),e(B)?.address?(s(),a("p",Zn,u(e(B).address),1)):r("",!0)])):r("",!0)]),_:1})]),n("div",Jn,[l(Be,{list:e(E),enrolled:e(L),course:e(c),"type-course":e(c).event_features?.event_format},null,8,["list","enrolled","course","type-course"]),l(ce,null,{default:A(()=>[l(R,{id:e(f),class:"pt-8"},null,8,["id"])]),_:1})])]),_:1})])}}};export{Ga 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.