(window.webpackJsonpNewland_Toubiz_Poi_Neos=window.webpackJsonpNewland_Toubiz_Poi_Neos||[]).push([[220],{"7yoQ":function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}));var s=n("6dQ1");function i(t){return Object(s.b)()?e.from(t,"utf-8").toString("base64"):btoa(t)}function o(t){return Object(s.b)()?e.from(t,"base64").toString("utf-8"):atob(t)}}).call(this,n("tjlA").Buffer)},K2Io:function(e,t,n){"use strict";n.r(t);var s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.personEvents.length?n("div",[n("tb-w-section",{staticClass:"tb-w-area-events",scopedSlots:e._u([{key:"content",fn:function(){return[n("tb-w-slider",[e._l(e.personEvents.slice(0,6),(function(e){return n("tb-w-slider-item",{key:e.id},[n("tb-w-teaser-card-event-date",{attrs:{"event-date":e}})],1)})),e._v(" "),e.personEvents.length>6?n("tb-w-show-all",{attrs:{"widget-route":e.buildWidgetRoute({name:"event.list",query:{params:e.getPersonEventsFilterParams(e.article.id)}})}},[e._v("\n                    "+e._s(e.$t("message.allEvents"))+"\n                ")]):e._e()],2)]},proxy:!0}],null,!1,4239148046)},[e._v("\n        "+e._s(e.$t("message.myEvents"))+"\n\n        ")])],1):n("div")};s._withStripped=!0;var i=n("6dQ1"),o=n("VjoN"),r={name:"TbWArticleDetailPersonHostedEvents",props:{article:{type:Object,required:!0}},data:()=>({personEvents:[]}),async created(){if(!Object(i.b)()){const e=await this.eventDateRepository.list({filter:{clientIncludingManaged:"",host:this.article.id,date:{after:"today",includeOnDemand:!0}},language:this.$store.state.language});this.personEvents=e.payload}},methods:{getPersonEventsFilterParams:e=>Object(o.b)({predefinedParams:{apiQueryState:{filter:{clientIncludingManaged:"",after:"today",host:[e]},sorting:{property:"date"}}},guiQuery:{isSecondaryList:!0}})},i18n:{fallbackLocale:"de",silentFallbackWarn:"undefined"==typeof window,messages:{de:{message:{myEvents:"Meine Veranstaltungen",allEvents:"Alle Events anzeigen"}},en:{message:{myEvents:"My events",allEvents:"Show all events"}},fr:{message:{myEvents:"Mes événements",allEvents:"Montrer tous les événements"}},it:{message:{myEvents:"I miei eventi eventi",allEvents:"Mostrare tutte le manifestazioni"}},es:{message:{myEvents:"Mis eventos",allEvents:"Mostrar todos los eventos"}},nl:{message:{myEvents:"Mijn evenementen",allEvents:"Toon alle evenementen"}},cs:{message:{myEvents:"Mé události",allEvents:"Zobrazit všechny události"}}}}},a=n("KHd+"),l=Object(a.a)(r,s,[],!1,null,null,null);l.options.__file="node_modules/@newland/toubiz-widget/src/components/article-detail/tb-w-article-detail-person-hosted-events.vue";t.default=l.exports},"KHd+":function(e,t,n){"use strict";function s(e,t,n,s,i,o,r,a){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),s&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),r?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(r)},c._ssrRegister=l):i&&(l=a?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(e,t){return l.call(t),d(e,t)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:e,options:c}}n.d(t,"a",(function(){return s}))},VjoN:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}));var s=n("7yoQ");function i(e){return encodeURIComponent(Object(s.b)(JSON.stringify(e)))}const o={created(){for(const e of this.$options.urlState)this.restoreStateFromUrl(e),this.$watch(e,t=>{this.saveStateToUrl(e,t)},{deep:!0})},methods:{saveStateToUrl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this[e];const n=Object.assign({},this.$route.query);n[e]=i(t),this.$router.replace({name:this.$route.name,query:n}).catch(e=>{if(!(""+e.message).includes("redundant navigation"))throw e})},restoreStateFromUrl(e){var t;if(this.$route.query[e])try{const n=(t=this.$route.query[e],JSON.parse(Object(s.a)(decodeURIComponent(t))));this.$set(this,e,n),"params"===e&&this.initialListFetch(n)}catch(t){console.warn(`Could not restore state ${e} from URL parameter ${e}`,t),this.initialListFetch()}else this.initialListFetch()}}}}}]);