(window.webpackJsonpNewland_Toubiz_Poi_Neos=window.webpackJsonpNewland_Toubiz_Poi_Neos||[]).push([[127],{VjoN:function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return r}));var a=n("7yoQ");function s(e){return encodeURIComponent(Object(a.b)(JSON.stringify(e)))}const r={created(){for(const e of this.$options.urlState)this.restoreStateFromUrl(e),this.$watch(e,t=>this.saveStateToUrl(e,t),{deep:!0})},methods:{saveStateToUrl(e,t=this[e]){const n=Object.assign({},this.$route.query);n[e]=s(t),this.$router.push({name:this.$route.name,query:n}).catch(e=>{if(!(""+e.message).includes("redundant navigation"))throw e})},restoreStateFromUrl(e){if(!this.$route.query[e])return null;try{const t=function(e){return JSON.parse(Object(a.a)(decodeURIComponent(e)))}(this.$route.query[e]);return this.$set(this,e,t),t}catch(t){return console.warn(`Could not restore state ${e} from URL parameter ${e}`,t),null}}}}},ruXV:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.areaEvents.length?n("div",[n("tb-w-section",{attrs:{background:""},scopedSlots:e._u([{key:"content",fn:function(){return[n("tb-w-slider",[e._l(e.areaEvents.slice(0,6),(function(t){return n("tb-w-slider-item",{key:t.id},[n("tb-w-teaser-card",{attrs:{background:e.buildImageUri(t.event.id,"event",[null,376]),href:e.buildUrl({name:"eventDate.detail",params:{id:t.id,eventId:t.event.id}}),type:"stacked"},scopedSlots:e._u([{key:"labels",fn:function(){return[n("span",{class:{"line-through":t.event.canceled||t.isCancelled}},[e._v("\n                                "+e._s(e.getDatesToDisplay(t.event,t.date))+"\n                            ")]),e._v(" "),t.event.canceled||t.isCancelled?n("span",{staticClass:"text-negative-500 font-bold"},[e._v("\n                                "+e._s(e.$t("message.cancelled"))+"\n                            ")]):e._e()]},proxy:!0},{key:"topline",fn:function(){return[e._v("\n                            "+e._s(t.event.category.name)+"\n                        ")]},proxy:!0}],null,!0)},[e._v(" "),e._v("\n\n                        "+e._s(t.event.name)+"\n                    ")])],1)})),e._v(" "),e.areaEvents.length>6?n("tb-w-show-all",{attrs:{href:e.buildUrl({name:"event.list",query:{params:e.getEventLocationFilterParams(e.article.id)}})}},[e._v("\n                    "+e._s(e.$t("message.allEvents"))+"\n                ")]):e._e()],2)]},proxy:!0}],null,!1,2710010499)},[e._v("\n        "+e._s(e.$t("message.ourEvents"))+"\n\n        ")])],1):n("div")};a._withStripped=!0;var s=n("g8pp"),r=n("6dQ1"),l=n("vqf1"),o=n("VjoN"),i={props:{article:{type:Object,required:!0}},mixins:[l.a],data:()=>({areaEvents:[],today:Object(s.a)(new Date,"y-M-d")}),async created(){if(!Object(r.a)()){const e=await this.eventDateRepository.listMerged({filter:{clientIncludingManaged:"current",locationArea:this.article.id,date:{after:this.today}},language:this.$store.state.language});this.areaEvents=e.payload}},methods:{getEventLocationFilterParams:e=>Object(o.b)({filter:{locationArea:[e]}})},i18n:{fallbackLocale:"de",silentFallbackWarn:"undefined"==typeof window,messages:{de:{message:{ourEvents:"Unsere Veranstaltungen",allEvents:"Alle Events anzeigen",cancelled:"Abgesagt"}},en:{message:{ourEvents:"Our events",allEvents:"Show all events",cancelled:"Canceled"}},fr:{message:{ourEvents:"Nos manifestations",allEvents:"Montrer tous les événements",cancelled:"Annulé"}},it:{message:{ourEvents:"I nostri eventi",allEvents:"Mostrare tutte le manifestazioni",cancelled:"Annullata"}},es:{message:{ourEvents:"Nuestros eventos",allEvents:"Mostrar todos los eventos",cancelled:"Cancelada"}},nl:{message:{ourEvents:"Onze evenementen",allEvents:"Toon alle evenementen",cancelled:"Geannuleerd"}},cz:{message:{ourEvents:"Naše události",allEvents:"Zobrazit všechny události",cancelled:"Zrušeno"}}}}},c=n("KHd+"),d=Object(c.a)(i,a,[],!1,null,null,null);d.options.__file="node_modules/@newland/toubiz-widget/src/components/tb-w-area-events.vue";t.default=d.exports},vqf1:function(e,t,n){"use strict";var a=n("g8pp"),s=n("N8I4"),r=n("sdSa");t.a={methods:{getDatesToDisplay:(e,t)=>e.firstDate.id===e.lastDate.id?Object(a.a)(new Date(e.firstDate.date),"d.M.Y"):function(e,t){Object(r.a)(2,arguments);var n=Object(s.a)(e),a=Object(s.a)(t);return n.getFullYear()===a.getFullYear()}(new Date(t||e.firstDate.date),new Date(e.lastDate.date))?`${Object(a.a)(new Date(t||e.firstDate.date),"d.M.")} - ${Object(a.a)(new Date(e.lastDate.date),"d.M.Y")}`:`${Object(a.a)(new Date(t||e.firstDate.date),"d.M.Y")} - ${Object(a.a)(new Date(e.lastDate.date),"d.M.Y")}`}}}}]);