1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ShareButtons-pL-O_6lt.js","assets/index-sUPB-bMu.js","assets/index-CjsJg3P0.css","assets/ShareButtons-DOncPu2p.css","assets/Base-Cq-6GNZm.js","assets/Base-B7-VsiAX.css","assets/EmbedPlayer-BGwwtTMD.js","assets/EmbedPlayer-6TtYyaX2.css","assets/Editor-PfZH6EpR.js","assets/Editor-BKywbPlz.css","assets/Modal-RXN8FhsK.js","assets/Modal-BtAHUlcp.css"])))=>i.map(i=>d[i]); 2import{a5 as m,_ as M,m as B,j as D,k as p,b as u,c as n,o as a,d as C,e as d,w as L,Z as N,t as i,g as l,a as t,n as r,F as G,s as k,a6 as T,p as E}from"./index-sUPB-bMu.js";import{m as U}from"./menuItemNameMixin-D-Sxrcvm.js";m.defaults.baseURL="https://admin.inpeaceapp.com/api/v1";m.defaults.headers.post["Content-Type"]="application/json";m.defaults.headers.post.Accept="application/json";m.defaults.headers.common["Opa-Meu-Bom"]="enos";const P={liveGet(e){return m({method:"GET",url:`/culto/nova/aovivo?igreja=${e}`,data:null})}},w=p(()=>E(()=>import("./ShareButtons-pL-O_6lt.js"),__vite__mapDeps([0,1,2,3]))),H=p(()=>E(()=>import("./Base-Cq-6GNZm.js").then(e=>e.B),__vite__mapDeps([4,1,2,5]))),x=p(()=>E(()=>import("./EmbedPlayer-BGwwtTMD.js"),__vite__mapDeps([6,1,2,7]))),j=p(()=>E(()=>import("./Editor-PfZH6EpR.js"),__vite__mapDeps([8,1,2,9]))),F=p(()=>E(()=>import("./Modal-RXN8FhsK.js"),__vite__mapDeps([10,1,2,11]))),X={name:"Live",components:{ShareButtons:w,EmbedPlayer:x,Chat:H,NoteEditor:j,NoteModal:F},mixins:[U],data(){return{activeContent:"",orderFistActiveContent:["give","bible","note","live-schedule"],apiResponse:null,alertBox:{type:null,message:null},newNote:null,saveNoteLive:!1}},computed:{...D(["churchData","churchModules","churchMenuItems","notesGetNewSingle","notesGetSingle","notesLiveId","userLoggedIn"]),hasLiveModule(){return!!this.churchModules.find(e=>e.codigo==="MOD_CULTO")},playerData(){switch(this.churchData.servicoStreaming){case"twitch":return{service:"TWITCH",url:this.apiResponse.cultoAoVivo?.embeddedPlayerUrl,code:null};case"youtube":return{service:"YOUTUBE",url:null,code:this.apiResponse.cultoAoVivo?.id};case"vimeo":return{service:"VIMEO_EVENT",url:null,code:this.apiResponse.cultoAoVivo?.id};case"facebook":return{service:"FACEBOOK",url:null,code:this.apiResponse.cultoAoVivo?.id};default:return{service:"EXTERNAL_URL",url:this.churchData.urlStreaming,code:null}}},scheduleItems(){return this.apiResponse.cultos.flatMap(o=>{let v=o;return o.flagRecorrente&&(v=o.recorrencias.map(g=>({titulo:o.titulo,descricao:o.descricao,flagRecorrente:o.flagRecorrente,data:`${this.$dayjs.utc(o.data).format("YYYY-MM-DD")}T${g.hora.split("T")[1]}`,tempoDuracaoHora:o.tempoDuracao.match(/\d+(?=H)/i),tempoDuracaoMinutos:o.tempoDuracao.match(/\d+(?=M)/i)}))),v.tempoDuracaoHora=o.tempoDuracao.match(/\d+(?=H)/i),v.tempoDuracaoMinutos=o.tempoDuracao.match(/\d+(?=M)/i),v}).sort((o,v)=>new Date(o.data).getTime()-new Date(v.data).getTime())},showPageContent(){return!!this.apiResponse},hasChat(){return this.apiResponse.cultoAoVivo&&this.apiResponse.cultoAoVivo.flagChat},hasGive(){return!!this.churchModules.find(e=>e.codigo==="MOD_DOACAO")},hasMenuGive(){return!!this.churchMenuItems.find(e=>e.codigo==="INPCAPP_DOACOES"&&e.flagAtivo)},hasLiveContent(){return!!this.apiResponse.cultoAoVivo},hasLiveOn(){return!!this.apiResponse.cultoAoVivo?.live},hasValidId(){return this.hasLiveContent&&this.apiResponse.cultoAoVivo?.id!=="live_stream"},hasBible(){return!!this.churchData.urlBibliaExterna}},watch:{hasLiveModule(){this.loadContent()},apiResponse(){this.notesLiveId&&this.apiResponse.cultoAoVivo?.id!==this.notesLiveId.liveId&&(this.handleUpdateNote(),this.clearNoteLive(),this.noteInit())}},created(){this.$useHead({title:this.$t("LIVE.TITLE.PAGE.HOME")}),this.appSetLoadingState({context:"GLOBAL",status:!0}),this.isFirstActive(),this.loadContent(),this.notesLiveId!==null&&this.handleGet()},beforeUnmount(){this.clearNote(),this.clearNewNote()},methods:{...B(["appSetLoadingState","chatSetConnection","chatSetFormat","setNote","setNoteLive","fetchNote","clearNote","clearNewNote","clearNoteLive"]),loadContent(){if(!this.hasLiveModule){this.alertBox={type:"warning",message:this.$t("LIVE.MESSAGE.ERROR.NO_MODULE",[this.churchData.nome])},this.appSetLoadingState({context:"GLOBAL",status:!1});return}P.liveGet(this.churchData.id).then(e=>{this.apiResponse=e.data,this.loadChat()}).catch(()=>{this.alertBox={type:"warning",message:this.$t("LIVE.MESSAGE.ERROR.GENERIC",[this.churchData.nome])}}).finally(()=>{this.noteInit(),this.appSetLoadingState({context:"GLOBAL",status:!1})})},loadChat(){this.hasChat&&(this.setActiveOption("chat"),this.chatSetConnection({channel:`${this.apiResponse.cultoAoVivo.canalChat}`}),this.chatSetFormat({embed:!1,showManagement:!0}))},setActiveOption(e){this.activeContent=e},isActive(e){return e===this.activeContent?"active":""}
2,isFirstActive(){this.orderFistActiveContent.reverse().forEach(e=>{e==="give"?this.hasGive&&this.hasMenuGive&&this.setActiveOption(e):this.setActiveOption(e)})},async handleSubmitNote(){try{const e=await T.postNote(this.churchData.id,this.notesGetNewSingle);this.setNoteLive({noteId:e.data.data.id,liveId:this.apiResponse.cultoAoVivo.id}),this.setNote(e.data),this.toggleSaveModal()}catch(e){this.alertBox={type:"error",message:e}}},async handleUpdateNote(){try{await T.putNote(this.notesLiveId.noteId,this.notesGetNewSingle);const e={data:{titulo:this.notesGetNewSingle.titulo,texto:this.notesGetNewSingle.texto}};this.setNote(e)}catch(e){this.alertBox={type:"error",message:e}}},async handleGet(){try{await this.fetchNote(this.notesLiveId.noteId)}catch{this.alertBox={type:"error",message:this.$t("USER.NOTES.MESSAGE.ERROR.GENERIC")}}this.noteInit()},noteInit(){this.notesGetSingle?this.newNote={data:{titulo:this.notesGetSingle.data.titulo,texto:this.notesGetSingle.data.texto}}:this.newNote={data:{titulo:this.apiResponse.cultoAoVivo?.tituloCadastrado?`${this.apiResponse.cultoAoVivo.tituloCadastrado} - ${this.$dayjs().format("L")}`:this.$dayjs().format("L"),texto:null}}},toggleSaveModal(){this.saveNoteLive=!this.saveNoteLive},newNoteLiveModal(){this.clearNote(),this.clearNewNote(),this.clearNoteLive(),this.noteInit(),this.toggleSaveModal()}}},W={class:"page-live page-content__desktop-large"},Y={key:1,class:"page-live__content"},q={class:"page-content__content"},z={key:1,class:"page-live__content__not-video"},K={class:"text"},Z={class:"page-live__content__heading"},$={class:"block-title"},J={class:"title"},Q={key:0,class:"share-button"},ee={class:"live-card"},te={class:"live-card__menu"},se={class:"live-menu"},oe={class:"live-card__content"},ie={class:"content-items"},ae={class:"live-schedule"},ne={key:0,class:"live-schedule__items"},le={class:"schedule__inner"},ce={class:"data-side"},re={class:"data-side__title"},de={class:"data-side__info"},he={class:"data-side__info__date"},ue={class:"data-side__info__time"},ve={class:"share-side"},_e={key:1,class:"no-live-schedule"},me={class:"text"},pe={class:"bible"},Ee=["src"],Le={class:"note"},Ne={key:1,class:"note__content"},ge={class:"description"},Ae={class:"note__content__button"},Ie={class:"btn__text"},Ce={class:"give"},Te={class:"text"},Se={class:"description"},Oe={class:"give__button"},fe={class:"btn__text"};function ye(e,o,v,g,h,s){const S=u("AlertBox"),O=u("PageContentHeader"),f=u("EmbedPlayer"),_=u("SvgElement"),A=u("ShareButtons"),y=u("Chat"),V=u("NoteEditor"),I=u("router-link"),R=u("NoteModal");return a(),n("div",W,[h.alertBox.message?(a(),C(S,{key:0,type:h.alertBox.type},{default:L(()=>[N(i(h.alertBox.message),1)]),_:1},8,["type"])):d("",!0),s.showPageContent?(a(),n("div",Y,[l(O,{padded:!0},{default:L(()=>[N(i(e.menuItemName("INPCAPP_CULTO_AO_VIVO")||e.$t("LIVE.TITLE.PAGE.HOME")),1)]),_:1}),t("div",q,[s.hasLiveContent?(a(),n("div",{key:0,class:r(["page-live__content__video",{"page-live__content__video--facebook":e.churchData.servicoStreaming==="facebook"}])},[l(f,{data:s.playerData},null,8,["data"])],2)):(a(),n("div",z,[l(_,{type:"icon",name:"Camera",title:"Camera",class:"icon-svg"}),t("p",K,i(e.$t("LIVE.TEXT.NO_WORSHIP_LIVE")),1)])),t("div",Z,[t("div",$,[s.hasValidId?(a(),n("div",{key:0,class:r(["live-status",h.apiResponse.cultoAoVivo.live?"live":"last-streaming"])},i(e.$t(`LIVE.TEXT.TAG_STATUS.${h.apiResponse.cultoAoVivo.live?"LIVE":"LAST"}`)),3)):d("",!0),t("h2",J,i(s.hasLiveContent?h.apiResponse.cultoAoVivo?.tituloCadastrado:null),1)]),s.hasLiveContent?(a(),n("div",Q,[l(A,{text:e.$t("LIVE.TEXT.SHARE.LIVE",[h.apiResponse.cultoAoVivo?.tituloCadastrado]),url:"/live/",direction:"left",color:"primary"},null,8,["text"])])):d("",!0)]),t("div",ee,[t("div",te,[t("div",se,[s.hasChat?(a(),n("button",{key:0,class:r(["live-menu__option",s.isActive("chat")]),onClick:o[0]||(o[0]=c=>s.setActiveOption("chat"))},i(e.$t("LIVE.BUTTON.LIVE_CHAT")),3)):d("",!0),s.hasGive&&s.hasMenuGive?(a(),n("button",{key:1,class:r(["live-menu__option",s.isActive("give")]),onClick:o[1]||(o[1]=c=>s.setActiveOption("give"))},i(e.$t("LIVE.BUTTON.GIVE")),3)):d("",!0),s.hasBible?(a(),n("button",{key:2,class:r(["live-menu__option",s.isActive("bible")]),onClick:o[2]||(o[2]=c=>s.setActiveOption("bible"))},i(e.$t("LIVE.BUTTON.BIBLE")),3)):d("",!0),s.hasLiveOn?(a(),n("button",{key:3,class:r(["live-menu__option",s.isActive("note")]),onClick:o[3]||(o[3]=c=>s.setActiveOption("note"))},i(e.$t("LIVE.BUTTON.NOTE")),3)):d("",!0),t("button",{class:r(["live-menu__option",s.isActive("live-schedule")]),onClick:o[4]||(o[4]=c=>s.setActiveOption("live-schedule"))},i(e.$t("LIVE.BUTTON.UPCOMING_STREAMS")),3)])]),t("div",oe,[t("div",ie,[s.hasChat?(a(),n("div",{key:0,class:r(["content-items__item",s.isActive("chat")])},[l(y)],2)):d("",!0),t("div",{class:r(["content-items__item",s.isActive("live-schedule")])},[t("div",ae,[s.scheduleItems.length?(a(),n("div",ne,[(a(!0),n(G,null,k(s.scheduleItems,(c,b)=>(a(),n("div",{key:b,class:"schedule"},[t("div",le,[t("div",ce,[t("h4",re,i(c.titulo),1),t("div",de,[t("p",he,[l(_,{type:"icon",name:"CalendarBorder",title:"CalendarBorder",class:"icon"}),N(" "+i(e.$dayjs.utc(c.data).format("LL")),1)]),t("p",ue,[l(_,{type:"icon",name:"ClockBorder",title:"ClockBorder",class:"icon"}),t("time",null,i(e.$dayjs.utc(c.data).format("LT")),1),o[5]||(o[5]=N(" - ",-1)),t("time",null,i(e.$dayjs.utc(c.data).add(c.tempoDuracaoHora,"h").add(c.tempoDuracaoMinutos,"m").format("LT")),1)])])]),t("div",ve,[l(A,{text:e.$t("LIVE.TEXT.SHARE.UPCOMING",[c.title,e.$dayjs.utc(c.data).format("LLLL")]),url:"/live/",direction:"left",color:"primary"},null,8,["text"])])])]))),128))])):(a(),n("div",_e,[l(_,{type:"icon",name:"CalendarCircle",title:"CalendarCircle",class:"icon-svg"}
2),t("p",me,i(e.$t("LIVE.TEXT.NO_WORSHIP_SCHEDULE")),1)]))])],2),t("div",{class:r(["content-items__item",s.isActive("bible")])},[t("div",pe,[t("iframe",{src:e.churchData.urlBibliaExterna,frameborder:"0",class:"bible__iframe"},null,8,Ee)])],2),t("div",{class:r(["content-items__item",s.isActive("note")])},[t("div",Le,[e.userLoggedIn?(a(),C(V,{key:0,class:"note__editor",note:h.newNote,onUpdateNote:s.handleUpdateNote,onSubmitNote:s.handleSubmitNote},null,8,["note","onUpdateNote","onSubmitNote"])):(a(),n("div",Ne,[l(_,{type:"icon",name:"NotesCircle",title:"NotesCircle",class:"icon-svg"}),t("p",ge,i(e.$t("USER.NOTES.LIVE.DESCRIPTION")),1),t("div",Ae,[l(I,{class:"btn btn--color-primary",to:{name:"userAccess",query:{redirectTo:"/live/"}}},{default:L(()=>[t("span",Ie,i(e.$t("USER.NOTES.LIVE.BUTTON")),1)]),_:1})])])),l(R,{"save-note-live":h.saveNoteLive,onNewNoteLiveModal:s.newNoteLiveModal,onToggleSaveModal:s.toggleSaveModal},null,8,["save-note-live","onNewNoteLiveModal","onToggleSaveModal"])])],2),s.hasGive?(a(),n("div",{key:1,class:r(["content-items__item",s.isActive("give")])},[t("div",Ce,[l(_,{type:"icon",name:"Give",title:"Give",class:"icon-svg"}),t("h3",Te,i(e.$t("LIVE.TEXT.GIVE.REDIRECT")),1),t("p",Se,i(e.$t("LIVE.TEXT.GIVE.REDIRECT_MESSAGE")),1),t("div",Oe,[l(I,{class:"btn btn--color-primary",to:{name:"giveOptions"}},{default:L(()=>[t("span",fe,i(e.$t("LIVE.BUTTON.DONATE_NOW")),1)]),_:1})])])],2)):d("",!0)])])])])])):d("",!0)])}const be=M(X,[["render",ye],["__scopeId","data-v-c9af121b"]]);export{be 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.