(window.webpackJsonpNewland_Toubiz_Poi_Neos=window.webpackJsonpNewland_Toubiz_Poi_Neos||[]).push([[109],{VjoN:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return r}));var s=n("7yoQ");function a(e){return encodeURIComponent(Object(s.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]=a(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(s.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 s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return 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.id,"event",[null,376]),href:e.buildUrl({name:"event.detail",params:{id:t.id}}),type:"stacked"},scopedSlots:e._u([{key:"labels",fn:function(){return[n("span",[e._v(e._s(e.getDatesToDisplay(t)))])]},proxy:!0},{key:"topline",fn:function(){return[e._v("\n                        "+e._s(t.category.name)+"\n                    ")]},proxy:!0}],null,!0)},[e._v(" "),e._v("\n\n                    "+e._s(t.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}])},[e._v("\n    "+e._s(e.$t("message.ourEvents"))+"\n\n    ")])};s._withStripped=!0;var a=n("vqf1"),r=n("VjoN"),o={props:{areaEvents:{type:Array,required:!0},article:{type:Object,required:!0}},mixins:[a.a],methods:{getEventLocationFilterParams:e=>Object(r.b)({filter:{location:[e]}})},i18n:{fallbackLocale:"de",silentFallbackWarn:"undefined"==typeof window,messages:{de:{message:{ourEvents:"Unsere Veranstaltungen",allEvents:"Alle Events anzeigen"}},en:{message:{ourEvents:"Our events",allEvents:"Show all events"}},fr:{message:{ourEvents:"Nos manifestations",allEvents:"Montrer tous les événements"}},it:{message:{ourEvents:"I nostri eventi",allEvents:"Mostrare tutte le manifestazioni"}},es:{message:{ourEvents:"Nuestros eventos",allEvents:"Mostrar todos los eventos"}},nl:{message:{ourEvents:"Onze evenementen",allEvents:"Toon alle evenementen"}},cz:{message:{ourEvents:"Naše události",allEvents:"Zobrazit všechny události"}}}}},i=n("KHd+"),l=Object(i.a)(o,s,[],!1,null,null,null);l.options.__file="node_modules/@newland/toubiz-widget/src/components/tb-w-area-events.vue";t.default=l.exports},vqf1:function(e,t,n){"use strict";var s=n("g8pp"),a=n("N8I4"),r=n("sdSa");t.a={methods:{getDatesToDisplay:e=>e.firstDate.id===e.lastDate.id?Object(s.a)(new Date(e.firstDate.date),"d.M.Y"):function(e,t){Object(r.a)(2,arguments);var n=Object(a.a)(e),s=Object(a.a)(t);return n.getFullYear()===s.getFullYear()}(new Date(e.firstDate.date),new Date(e.lastDate.date))?`${Object(s.a)(new Date(e.firstDate.date),"d.M.")} - ${Object(s.a)(new Date(e.lastDate.date),"d.M.Y")}`:`${Object(s.a)(new Date(e.firstDate.date),"d.M.Y")} - ${Object(s.a)(new Date(e.lastDate.date),"d.M.Y")}`}}}}]);