!function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=268)}({268:function(e,t,n){e.exports=n(269)},269:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var r=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.slide=this.getSlide(t)}return i(e,[{key:"getSlide",value:function(e){e.slide.options=e.slide.options||this.getDefaultSlideOptions();var t=_.template($("#slide-template").html());return $(t(e))}},{key:"getDefaultSlideOptions",value:function(){return{caption_1:{},caption_2:{},caption_3:{},call_to_action:{}}}},{key:"render",value:function(){return this.eventListeners(),this.showSelectedOptionBlock(),this.slide}},{key:"eventListeners",value:function(){this.attachDeleteEvent(),this.attachChangeBlockEvent()}},{key:"attachDeleteEvent",value:function(){var e=this;this.slide.find(".delete-slide").on("click",function(){e.slide.remove()})}},{key:"attachChangeBlockEvent",value:function(){var e=this;this.slide.find(".change-option-block").on("change",function(t){e.slide.find(".slide-options").hide(),e.slide.find("."+t.currentTarget.value).show()})}},{key:"showSelectedOptionBlock",value:function(){var e=this;setTimeout(function(){e.slide.find(".change-option-block").trigger("change")})}}]),e}(),a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();new(function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.slideCount=0,$(".add-slide").on("click",function(){t.addSlide()}),this.addSliderSlides(FleetCart.data["slider.slides"]),this.makeSlidesSortable(),this.addSlideImage()}return a(e,[{key:"addSliderSlides",value:function(e){var t=!0,n=!1,i=void 0;try{for(var r,a=e[Symbol.iterator]();!(t=(r=a.next()).done);t=!0){var l=r.value;this.addSlide(l)}}catch(e){n=!0,i=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw i}}0===e.length&&$(".add-slide").trigger("click")}},{key:"addSlide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new r({slideNumber:this.slideCount++,slide:e});$("#slides-wrapper").append(t.render())}},{key:"makeSlidesSortable",value:function(){Sortable.create(document.getElementById("slides-wrapper"),{handle:".slide-drag",animation:150})}},{key:"addSlideImage",value:function(){$("#slides-wrapper").on("click",".slide-image",function(e){new MediaPicker({type:"image"}).on("select",function(t){var n='\n                    <img src="'+t.path+'">\n                    <input type="hidden" name="slides['+e.currentTarget.dataset.slideNumber+'][file_id]" value="'+t.id+'">\n                ';$(e.currentTarget).html(n)})})}}]),e}()),$("#autoplay").on("change",function(e){$(".autoplay-speed-field").toggleClass("hide")}),window.admin.removeSubmitButtonOffsetOn(["#slides"])}});