(window.webpackJsonpNewland_Toubiz_Poi_Neos=window.webpackJsonpNewland_Toubiz_Poi_Neos||[]).push([[116],{"4SxT":function(t,o,l){"use strict";l.r(o);var n=l("JPst"),e=l.n(n)()(!1);e.push([t.i,".mapbox[data-v-70a05649]{\n  height:500px\n}\n@media (min-width: 62em){\n.mapbox[data-v-70a05649]{\n    height:600px\n}\n}\n[data-v-70a05649] .mapboxgl-map{\n  border-radius:0.5rem\n}\n[data-v-70a05649] .mapboxgl-canvas:focus{\n  outline:none\n}\n[data-v-70a05649] .mapboxgl-popup-content{\n  padding:0 !important;\n  border-radius:6px\n}\n[data-v-70a05649] .mapboxgl-popup-close-button{\n  display:none !important\n}\n",""]),o.default=e},E7Hi:function(t,o,l){"use strict";l("Qm9q")},Qm9q:function(t,o,l){var n=l("LboF"),e=l("4SxT");"string"==typeof(e=e.__esModule?e.default:e)&&(e=[[t.i,e,""]]);var i={insert:"head",singleton:!1};n(e,i);t.exports=e.locals||{}},eWGo:function(t,o,l){"use strict";l.r(o);var n=function(){var t=this,o=t.$createElement,l=t._self._c||o;return l("div",{ref:"tourMap",staticClass:"mapbox"},[l("MglMap",{attrs:{center:[t.longitude,t.latitude],"mtk-api-key":t.MTKApiKey,"mtk-map-type":t.MTKMapType,zoom:13}},[l("MglScaleControl",{attrs:{position:"top-right"}}),t._v(" "),l("MglFullscreenControl",{attrs:{position:"top-right"}}),t._v(" "),l("MglGeolocateControl",{attrs:{position:"top-right"}}),t._v(" "),l("MglResetViewControl",{attrs:{"reset-view-type":"point","point-coordinate":[t.longitude,t.latitude],position:"top-right"}}),t._v(" "),l("MglMarker",{attrs:{coordinates:[t.longitude,t.latitude],anchor:"bottom"}},[l("tb-w-icon",{staticClass:"tb-w-search__icon",attrs:{slot:"marker",icon:"map-marker-"+t.getDynamicIconLabel(t.article),size:"3"},slot:"marker"}),t._v(" "),l("MglPopup",{attrs:{"close-button":!1,offset:{bottom:[0,-40]},anchor:"bottom"},on:{open:function(o){return t.poiPopupActions(o)}}},[l("tb-w-mapbox-popup",{attrs:{article:t.article}})],1)],1)],1)],1)};n._withStripped=!0;var e=l("kD67"),i=l("rhzA"),a={components:{MglMap:e.MglMap,MglScaleControl:e.MglScaleControl,MglMarker:e.MglMarker,MglPopup:e.MglPopup,MglFullscreenControl:e.MglFullscreenControl,MglGeolocateControl:e.MglGeolocateControl,MglResetViewControl:e.MglResetViewControl},name:"TbWMapboxMap",props:{article:{type:Object,required:!0}},data:()=>({MTKApiKey:"3a0ea8a23ac72fb603d52f89a59fce76",MTKMapType:"toursprung-terrain"}),watch:{"$store.state.scrollIntoMap"(t){t&&this.$refs.tourMap.scrollIntoView({behavior:"smooth",block:"center"})}},computed:{latitude(){var t,o,l,n,e,i,a,r,p,s,u,d,c,g;return null!==(t=null!==(o=null!==(l=null!==(n=null==this||null===(e=this.article)||void 0===e||null===(i=e.geocoordinates)||void 0===i?void 0:i.latitude)&&void 0!==n?n:null==this||null===(a=this.article)||void 0===a||null===(r=a.point)||void 0===r?void 0:r.latitude)&&void 0!==l?l:null==this||null===(p=this.article)||void 0===p||null===(s=p.area)||void 0===s?void 0:s.latitude)&&void 0!==o?o:null==this||null===(u=this.article)||void 0===u||null===(d=u.tour)||void 0===d||null===(c=d.points)||void 0===c||null===(g=c[0])||void 0===g?void 0:g[0])&&void 0!==t?t:null},longitude(){var t,o,l,n,e,i,a,r,p,s,u,d,c,g;return null!==(t=null!==(o=null!==(l=null!==(n=null==this||null===(e=this.article)||void 0===e||null===(i=e.geocoordinates)||void 0===i?void 0:i.longitude)&&void 0!==n?n:null==this||null===(a=this.article)||void 0===a||null===(r=a.point)||void 0===r?void 0:r.longitude)&&void 0!==l?l:null==this||null===(p=this.article)||void 0===p||null===(s=p.area)||void 0===s?void 0:s.longitude)&&void 0!==o?o:null==this||null===(u=this.article)||void 0===u||null===(d=u.tour)||void 0===d||null===(c=d.points)||void 0===c||null===(g=c[0])||void 0===g?void 0:g[1])&&void 0!==t?t:null}},methods:{poiPopupActions(t){this.flyToMarker(t)},flyToMarker(t){if(this.map.gl.getZoom()<8.5){const o=t.popup._lngLat.lng,l=t.popup._lngLat.lat+(window.innerWidth>1e3?.2:.25);this.map.gl.flyTo({center:[o,l],screenSpeed:.7,zoom:8.4})}else if(this.map.gl.getZoom()<12.5&&this.map.gl.getZoom()>8.5){const o=t.popup._lngLat.lng,l=t.popup._lngLat.lat+(window.innerWidth>1e3?.009:.018);this.map.gl.flyTo({center:[o,l],screenSpeed:.7,zoom:12})}else if(this.map.gl.getZoom()>12.5){const o=t.popup._lngLat.lng,l=t.popup._lngLat.lat+.002;this.map.gl.flyTo({center:[o,l],screenSpeed:.7,zoom:15})}},getDynamicIconLabel:i.a}},r=(l("E7Hi"),l("KHd+")),p=Object(r.a)(a,n,[],!1,null,"70a05649",null);p.options.__file="node_modules/@newland/toubiz-widget/src/components/tb-w-mapbox-map.vue";o.default=p.exports}}]);