﻿var __extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},CZ;(function(n){(function(t){var r=function(){function t(n,t){this.container=n;this.tour=t.context;this.playPauseButton=this.container.find(t.playPauseButton);this.nextButton=this.container.find(t.nextButton);this.prevButton=this.container.find(t.prevButton);this.volButton=this.container.find(t.volButton);this.playPauseButton.off();this.nextButton.off();this.prevButton.off();this.volButton.off();this.initialize()}return t.prototype.initialize=function(){var n=this;this.playPauseButton.attr("state","pause");this.volButton.attr("state","on");this.playPauseButton.click(function(){var t=n.playPauseButton.attr("state"),i={play:function(){n.play()},pause:function(){n.pause()}};i[t]()});this.nextButton.click(function(){n.next()});this.prevButton.click(function(){n.prev()});this.volButton.click(function(){var t=n.volButton.attr("state"),i={on:function(){n.volumeOff()},off:function(){n.volumeOn()}};i[t]()})},t.prototype.play=function(){this.playPauseButton.attr("state","pause");n.Tours.tourResume()},t.prototype.pause=function(){this.playPauseButton.attr("state","play");n.Tours.tourPause()},t.prototype.next=function(){n.Tours.tourNext()},t.prototype.prev=function(){n.Tours.tourPrev()},t.prototype.exit=function(){n.Tours.tourAbort()},t.prototype.volumeOn=function(){this.volButton.attr("state","on");n.Tours.isNarrationOn=!0;this.tour.audioElement.volume=1},t.prototype.volumeOff=function(){this.volButton.attr("state","off");n.Tours.isNarrationOn=!1;this.tour.audioElement.volume=0},t}(),i;t.TourPlayer=r;i=function(t){function i(i,r){t.call(this,i,r);this.minButton=this.container.find(r.minButton);this.captionTextarea=this.container.find(r.captionTextarea);this.tourPlayerContainer=this.container.find(r.tourPlayerContainer);this.bookmarksCount=this.container.find(r.bookmarksCount);this.tour=r.context;this.tourPlayer=new n.UI.TourPlayer(this.tourPlayerContainer,{playPauseButton:"div:nth-child(2)",nextButton:"div:nth-child(3)",prevButton:"div:nth-child(1)",volButton:"div:nth-child(4)",context:this.tour});this.minButton.off();this.initialize()}return __extends(i,t),i.prototype.initialize=function(){var n=this;this.titleTextblock.text(this.tour.title);this.bookmarksCount.text("Slide 1 of "+this.tour.bookmarks.length);this.captionTextarea.css("opacity",0);this.isMinimized=!1;this.minButton.click(function(){n.minimize()})},i.prototype.hideBookmark=function(){this.captionTextarea.css("opacity",0)},i.prototype.showBookmark=function(n){this.captionTextarea.text(n.text);this.bookmarksCount.text("Slide "+n.number+" of "+this.tour.bookmarks.length);this.captionTextarea.stop();this.captionTextarea.animate({opacity:1})},i.prototype.showTourEndMessage=function(){this.captionTextarea.text(n.Tours.TourEndMessage);this.bookmarksCount.text("Start a tour")},i.prototype.setPlayPauseButtonState=function(n){this.tourPlayer.playPauseButton.attr("state",n)},i.prototype.show=function(){t.prototype.show.call(this,{effect:"slide",direction:"left",duration:500});this.activationSource.addClass("active")},i.prototype.close=function(){var i=this;t.prototype.close.call(this,{effect:"slide",direction:"left",duration:500,complete:function(){i.tourPlayer.exit();n.Common.hashHandle=!0}});this.activationSource.removeClass("active")},i.prototype.minimize=function(){this.isMinimized?this.contentContainer.show({effect:"slide",direction:"up",duration:500}):this.contentContainer.hide({effect:"slide",direction:"up",duration:500});this.isMinimized=!this.isMinimized},i}(n.UI.FormBase);t.FormTourCaption=i})(n.UI||(n.UI={}));var t=n.UI})(CZ||(CZ={}));
/*
//# sourceMappingURL=tour-caption-form.min.js.map
*/