App.Views.OnBoardingView=Backbone.View.extend({id:"child_content",el:"#child_content",className:"onboarding",initialize:function(e){var t=this;try{this.render()}catch(n){}this.listenTo(app.Models.MainLayoutModel,"change:orientation",_.bind(function(e){showDebug===2&&console.log("UPDATE_UI_ORENTATION: "+e.changed.orientation),setTimeout(function(){var e=$("#swiper-onboard")[0].swiper;e.onResize()},100)}),this),this.setElement(e.el)},events:function(){var e={};return e["click div#onboarding_done_button"]="closeBottomDrawer",e["click div#onboarding .skip_tour"]="closeBottomDrawer",e},render:function(){showDebug==2&&console.log("OnBoardingView rendering"),this.$el.addClass(this.className);var e=funcObj.contentCon.getContent("ONBOARDUNGVIEW",{repl:{}});this.$el.html(e),this.setUpSwiper(),this.populateSlides();var t=$("#"+this.model.get("parentDrawer")).parent();t.addClass("onboard_on")},closeBottomDrawer:function(e){var t="#"+this.model.get("parentDrawer");$(t).close(),funcObj.tips.toggleCondition(16);var n=$("#"+this.model.get("parentDrawer")).parent();n.removeClass("onboard_on"),funcObj.UIMain.updateInAppMsgReadyState({onboardingCheckComplete:!0}),funcObj.tips.showQuickTour()},setUpSwiper:function(){var e=new Swiper("#swiper-onboard",{speed:300,pagination:"#onboarding .swiper-pagination",paginationClickable:!0,nextButton:"#onboarding .swiper-button-next",prevButton:"#onboarding .swiper-button-prev",centeredSlides:!0,threshold:20,slidesPerView:1,spaceBetween:0,resistance:!1,preloadImages:!0,onSlideChangeStart:this.setUpSwiperListeners});touchDevice?($(".swiper-button-prev").addClass("hidden"),$(".swiper-button-next").addClass("hidden")):($(".swiper-button-next").removeClass("hidden"),$(".first_slide_footer").addClass("hidden"))},populateSlides:function(){var e=$("#swiper-onboard")[0].swiper;e.removeAllSlides(),this.collection=this.getOnBoardSlides(),this.collection.each(function(e){var t=new App.OnBoardingSlideView({model:e});$("#onboard_swiper-wrapper").append(t.el)},this),e.update()},getOnBoardSlides:function(){var e=new App.OnBoardList([new App.OnBoardingSlideModel({content:_.template('<div class="first_slide media_content"><span>'+funcObj.langCon.getString("OnBoarding_StartSlide_Title")+"</span></div>")}),new App.OnBoardingSlideModel({content:_.template('<div class="second_slide media_content"></div>'),title:funcObj.langCon.getString("OnBoarding_FirstSlide_Title"),description:funcObj.langCon.getString("OnBoarding_FirstSlide_MSG")}),new App.OnBoardingSlideModel({content:_.template('<div class="third_slide media_content"></div>'),title:funcObj.langCon.getString("OnBoarding_SecondSlide_Title"),description:funcObj.langCon.getString("OnBoarding_SecondSlide_MSG")}),new App.OnBoardingSlideModel({content:_.template('<div class="fourth_slide media_content"></div>'),title:funcObj.langCon.getString("OnBoarding_ThirdSlide_Title"),description:funcObj.langCon.getString("OnBoarding_ThirdSlide_MSG")}),new App.OnBoardingSlideModel({content:_.template('<div class="fifth_slide media_content"></div>'),title:funcObj.langCon.getString("OnBoarding_FourthSlide_Title"),description:funcObj.langCon.getString("OnBoarding_FourthSlide_MSG")}),new App.OnBoardingSlideModel({content:_.template('<div class="sixth_slide media_content"></div>'),title:funcObj.langCon.getString("OnBoarding_FifthSlide_Title"),description:funcObj.langCon.getString("OnBoarding_FifthSlide_MSG")}),new App.OnBoardingSlideModel({content:_.template('<div class="last_slide media_content"><span>'+funcObj.langCon.getString("OnBoarding_FinishSlide_Title")+"</span></div>")})]);return e},setUpSwiperListeners:function(e){e.isBeginning?($(".swiper-pagination").removeClass("hidden"),$("#onboarding_done_button").addClass("hidden"),$("#onboarding .skip_tour").removeClass("hidden"),touchDevice?$("#first_slide_footer").removeClass("hidden"):($(".swiper-button-prev").addClass("hidden"),$(".swiper-button-next").removeClass("hidden"))):e.isEnd?($(".swiper-pagination").addClass("hidden"),$("#onboarding_done_button").removeClass("hidden"),$("#onboarding .skip_tour").addClass("hidden"),$("#first_slide_footer").addClass("hidden"),touchDevice||($(".swiper-button-prev").removeClass("hidden"),$(".swiper-button-next").addClass("hidden"))):($(".swiper-pagination").removeClass("hidden"),$("#onboarding_done_button").addClass("hidden"),$("#onboarding .skip_tour").addClass("hidden"),$("#first_slide_footer").addClass("hidden"),touchDevice||($(".swiper-button-prev").removeClass("hidden"),$(".swiper-button-next").removeClass("hidden")))}});