(window.webpackJsonpNewland_Toubiz_Poi_Neos=window.webpackJsonpNewland_Toubiz_Poi_Neos||[]).push([[140],{VjoN:function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return i}));var a=n("7yoQ");function s(t){return encodeURIComponent(Object(a.b)(JSON.stringify(t)))}const i={created(){for(const t of this.$options.urlState)this.restoreStateFromUrl(t),this.$watch(t,e=>this.saveStateToUrl(t,e),{deep:!0})},methods:{saveStateToUrl(t,e=this[t]){const n=Object.assign({},this.$route.query);n[t]=s(e),this.$router.push({name:this.$route.name,query:n}).catch(t=>{if(!(""+t.message).includes("redundant navigation"))throw t})},restoreStateFromUrl(t){if(!this.$route.query[t])return null;try{const e=function(t){return JSON.parse(Object(a.a)(decodeURIComponent(t)))}(this.$route.query[t]);return this.$set(this,t,e),e}catch(e){return console.warn(`Could not restore state ${t} from URL parameter ${t}`,e),null}}}}},s3mq:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"tb-w-events-at-this-location"},[t.loading?n("tb-w-loader"):t.eventsAtThisLocation.length?n("tb-w-section",{scopedSlots:t._u([{key:"content",fn:function(){return[n("tb-w-slider",[t._l(t.eventsAtThisLocation.slice(0,6),(function(e){return n("tb-w-slider-item",{key:e.id},[n("tb-w-teaser-card",{attrs:{background:t.buildImageUri(e.event.id,"event",[null,376]),href:t.buildUrl({name:"eventDate.detail",params:{id:e.id,eventId:e.event.id}}),type:"stacked"},scopedSlots:t._u([{key:"labels",fn:function(){return[n("span",{class:{"line-through":e.event.canceled||e.isCancelled}},[t._v("\n                                "+t._s(t.getDatesToDisplay(e.event,e.date))+"\n                            ")]),t._v(" "),e.event.canceled||e.isCancelled?n("span",{staticClass:"text-negative-500 font-bold"},[t._v("\n                                "+t._s(t.$t("message.canceled"))+"\n                            ")]):t._e()]},proxy:!0},{key:"topline",fn:function(){return[t._v("\n                            "+t._s(e.event.category.name)+"\n                        ")]},proxy:!0}],null,!0)},[t._v(" "),t._v("\n\n                        "+t._s(e.event.name)+"\n                    ")])],1)})),t._v(" "),t.eventsAtThisLocation.length>6?n("tb-w-show-all",{attrs:{href:t.buildUrl({name:"event.list",query:{params:t.getEventLocationFilterParams(t.article.id)}})}},[t._v("\n                    "+t._s(t.$t("message.allEvents"))+"\n                ")]):t._e()],2)]},proxy:!0}])},[t._v("\n        "+t._s(t.$t("message.events"))+"\n\n        ")]):t._e()],1)};a._withStripped=!0;var s=n("g8pp"),i=n("VjoN"),o=n("vqf1"),r=n("6dQ1"),l={name:"TbWArticleDetailEventsAtThisLocation",props:{article:{type:Object,required:!0}},mixins:[o.a],data:()=>({loading:!0,eventsAtThisLocation:[],today:Object(s.a)(new Date,"y-M-d")}),async created(){if(!Object(r.a)()&&this.eventDateRepository){const t=await this.eventDateRepository.listMerged({filter:{clientIncludingManaged:"current",location:this.article.id,date:{after:this.today}},language:this.$store.state.language});this.eventsAtThisLocation=t.payload,this.loading=!1}},methods:{getEventLocationFilterParams:t=>Object(i.b)({filter:{location:[t]}})}},c=n("KHd+"),d=Object(c.a)(l,a,[],!1,null,null,null);d.options.__file="node_modules/@newland/toubiz-widget/src/components/article-detail/tb-w-article-detail-events-at-this-location.vue";e.default=d.exports},vqf1:function(t,e,n){"use strict";var a=n("g8pp"),s=n("N8I4"),i=n("sdSa");e.a={methods:{getDatesToDisplay:(t,e)=>t.firstDate.id===t.lastDate.id?Object(a.a)(new Date(t.firstDate.date),"d.M.Y"):function(t,e){Object(i.a)(2,arguments);var n=Object(s.a)(t),a=Object(s.a)(e);return n.getFullYear()===a.getFullYear()}(new Date(e||t.firstDate.date),new Date(t.lastDate.date))?`${Object(a.a)(new Date(e||t.firstDate.date),"d.M.")} - ${Object(a.a)(new Date(t.lastDate.date),"d.M.Y")}`:`${Object(a.a)(new Date(e||t.firstDate.date),"d.M.Y")} - ${Object(a.a)(new Date(t.lastDate.date),"d.M.Y")}`}}}}]);