1(window.webpackJsonp=window.webpackJsonp||[]).push([[160],{521:function(t,e,r){"use strict";r.r(e);r(70);var l={props:{items:Array,canTriggerModal:{type:Boolean,default:!1},startIndex:{type:[Number,Boolean],default:!1}},data:()=>({current:[0],scroll:0,featuredIndex:0}),computed:{firstId:()=>0,lastId(){return this.items.length-1},hasNext(){return-1===this.current.indexOf(this.lastId)},hasPrevious(){return-1===this.current.indexOf(this.firstId)},totalSlides(){return this.items.length}},methods:{setAsFeatured(t){this.featuredIndex=t},getScrollSize(){this.scroll=this.$refs.links.length>0?Math.floor(this.$refs.links[0].clientWidth):400},scrollNext(){this.$refs.carousel.scrollBy({left:this.scroll,behavior:"smooth"})},scrollPrevious(){this.$refs.carousel.scrollBy({left:0-this.scroll,behavior:"smooth"})},navigateTo(i){var t=i-this.current[0];this.scroll=Math.floor(this.$refs.links[0].clientWidth)*t,this.$refs.carousel.scrollBy({left:this.scroll})},setupIntersectionObserver(){var t={threshold:.9,root:this.$el},e=new IntersectionObserver((t=>{t.forEach((t=>{var e=parseInt(t.target.getAttribute("data-id"),10);if(t.isIntersecting)-1===this.current.indexOf(e)&&this.current.push(e);else{var r=this.current.indexOf(e);-1!==r&&this.current.splice(r,1)}}))}),t);this.$refs.links.forEach((t=>{e.observe(t)})),this.$options.observer=e},setup(){this.items.length>1&&(this.setupIntersectionObserver(),this.getScrollSize(),window.addEventListener("resize",this.getScrollSize))},openZoomModal(t){this.$store.commit("helpers/SET_RETURN_FOCUS",this.$refs.trigger),this.$store.commit("helpers/SET_ACTIVE_MODAL","zoom-images");var e={items:this.items,startIndex:this.featuredIndex};this.$store.commit("helpers/SET_ACTIVE_ZOOM_IMAGES",e)}},mounted(){this.current=[0],this.setup(),this.startIndex&&(this.setAsFeatured(this.startIndex),this.navigateTo(this.startIndex))},updated(){this.setup()},beforeDestroy(){window.removeEventListener("resize",this.getScrollSize),this.$options.observer&&this.$options.observer.disconnect()}},o=r(9),component=Object(o.a)(l,(function(){var t=this,e=t._self._c;return t.items&&t.items.length>0?e("section",{staticClass:"product-details-carousel"},[t.canTriggerModal?e("button",{ref:"trigger",staticClass:"spotlight-image",on:{click:t.openZoomModal}},[e("global-image",{staticClass:"main",attrs:{image:t.items[t.featuredIndex].image,size:"desktop-large"}}),t._v(" "),e("span",{staticClass:"sr-only"},[t._v("Click to view larger images in a modal dialog")])],1):e("div",{staticClass:"spotlight-image"},[e("global-image",{staticClass:"main",attrs:{image:t.items[t.featuredIndex].image,size:"for-dealers"}})],1),t._v(" "),t.items.length>1?e("div",{staticClass:"carousel-wrapper"},[e("div",{staticClass:"carousel"},[e("p",{staticClass:"sr-only"},[t._v("Product Images Slider")]),t._v(" "),e("ul",{ref:"carousel",staticClass:"slides"},t._l(t.items,(function(r,l){return e("li",{ref:"links",refInFor:!0,staticClass:"slide",attrs:{"data-id":l,"aria-hidden":-1===t.current.indexOf(l)?"true":"false"}},[e("button",{staticClass:"image-wrapper",class:{active:l===t.featuredIndex},on:{click:function(e){return t.setAsFeatured(l)}}},[e("span",{staticClass:"sr-only"},[t._v("click to view a larger version of this image")]),t._v(" "),e("global-image",{attrs:{image:r.image,size:"desktop-tiny"}})],1)])})),0)]),t._v(" "),t.items.length>1&&t.items.length>4?[e("div",{staticClass:"controls"},[e("div",{staticClass:"arrows",class:[t.hasNext?"has-next":"",t.hasPrevious?"has-previous":""]},[e("button",{staticClass:"previous black",class:{disabled:!t.hasPrevious},attrs:{"aria-label":"Go to previous slide","aria-disabled":!t.hasPrevious},on:{click:function(e){return e.preventDefault(),t.scrollPrevious.apply(null,arguments)}}},[e("svgs-arrow-left")],1),t._v(" "),e("button",{staticClass:"next black",class:{disabled:!t.hasNext},attrs:{"aria-label":"Go to next slide","aria-disabled":!t.hasNext},on:{click:function(e){return e.preventDefault(),t.scrollNext.apply(null,arguments)}}},[e("svgs-arrow-right")],1)])])]:t._e()],2):t._e()]):t._e()}),[],!1,null,null,null);e.default=component.exports}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.