{"version":3,"sources":["webpack:///./node_modules/lightgallery/dist/js/lightgallery.js"],"names":["a0","$","defaults","mode","cssEasing","easing","speed","height","width","addClass","startClass","backdropDuration","hideBarsDelay","useLeft","closable","loop","escKey","keyPress","controls","slideEndAnimatoin","hideControlOnEnd","mousewheel","getCaptionFromTitleOrAlt","appendSubHtmlTo","subHtmlSelectorRelative","preload","showAfterLoad","selector","selectWithin","nextHtml","prevHtml","index","iframeMaxWidth","download","counter","appendCounterTo","swipeThreshold","enableSwipe","enableDrag","dynamic","dynamicEl","galleryId","Plugin","element","options","this","el","$el","s","extend","constructor","Array","length","modules","lGalleryOn","lgBusy","hideBartimeout","isTouch","document","documentElement","$items","find","children","$slide","$outer","init","prototype","_this","_hash","window","location","hash","indexOf","parseInt","split","hasClass","setTimeout","build","trigger","on","event","preventDefault","er","returnValue","structure","each","fn","lightGallery","key","slide","arrow","closeGallery","removeClass","clearTimeout","template","list","i","subHtmlCont","append","css","setTop","eq","doCss","$inner","prevScrollTop","scrollTop","wH","top","$lGallery","support","transition","root","style","isVideo","src","html","attr","html5","console","error","youtube","match","vimeo","dailymotion","vk","addHtml","subHtmlUrl","$currentEle","subHtml","first","fL","substring","load","j","loadContent","rec","delay","_$img","_src","_poster","_srcset","_sizes","_html","_hasPoster","getResponsiveSrc","srcItms","rsWidth","rsSrc","__src","splice","push","wWidth","poster","responsive","srcset","sizes","iframe","_isVideo","prepend","videoClass","picturefill","elements","e","warn","_speed","fromTouch","fromThumb","direction","_prevIndex","touchPrev","touchNext","_length","_time","downloadUrl","arrowDisable","text","goToNextSlide","_loop","goToPrevSlide","keyCode","destroy","removeAttr","setTranslate","xValue","yValue","transform","touchMove","startCoords","endCoords","distance","Math","abs","touchEnd","not","isMoved","manageSwipeClass","originalEvent","targetTouches","pageX","isDraging","target","trim","scrollLeft","_touchNext","_touchPrev","deltaY","mousedown","is","d","off","removeData","remove","data","err"],"mappings":";6EAAA,QAMI,EAAO,CAAC,WAEP,KAFkB,EAAF,SAAYA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AAM,0CAClB,MANAtH,EAAEmN,KAAKvK,KAAM,eAAgB,IAAIH,EAAOG,KAAMD,GAQtD,GACJ,EAEA3C,EAAEqF,GAAGC,aAAalC,QAAU,CAAC,CAEhC,CA1zCD,GAFQ,IAAUpD,CATb,4B","file":"lightgallery.js","sourcesContent":["/*! lightgallery - v1.6.11 - 2018-05-22\n* http://sachinchoolur.github.io/lightGallery/\n* Copyright (c) 2018 Sachin N; Licensed GPLv3 */\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module unless amdModuleId is set\n define(['jquery'], function (a0) {\n return (factory(a0));\n });\n } else if (typeof module === 'object' && module.exports) {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory(require('jquery'));\n } else {\n factory(root[\"jQuery\"]);\n }\n}(this, function ($) {\n\n(function() {\n 'use strict';\n\n var defaults = {\n\n mode: 'lg-slide',\n\n // Ex : 'ease'\n cssEasing: 'ease',\n\n //'for jquery animation'\n easing: 'linear',\n speed: 600,\n height: '100%',\n width: '100%',\n addClass: '',\n startClass: 'lg-start-zoom',\n backdropDuration: 150,\n hideBarsDelay: 6000,\n\n useLeft: false,\n\n closable: true,\n loop: true,\n escKey: true,\n keyPress: true,\n controls: true,\n slideEndAnimatoin: true,\n hideControlOnEnd: false,\n mousewheel: true,\n\n getCaptionFromTitleOrAlt: true,\n\n // .lg-item || '.lg-sub-html'\n appendSubHtmlTo: '.lg-sub-html',\n\n subHtmlSelectorRelative: false,\n\n /**\n * @desc number of preload slides\n * will exicute only after the current slide is fully loaded.\n *\n * @ex you clicked on 4th image and if preload = 1 then 3rd slide and 5th\n * slide will be loaded in the background after the 4th slide is fully loaded..\n * if preload is 2 then 2nd 3rd 5th 6th slides will be preloaded.. ... ...\n *\n */\n preload: 1,\n showAfterLoad: true,\n selector: '',\n selectWithin: '',\n nextHtml: '',\n prevHtml: '',\n\n // 0, 1\n index: false,\n\n iframeMaxWidth: '100%',\n\n download: true,\n counter: true,\n appendCounterTo: '.lg-toolbar',\n\n swipeThreshold: 50,\n enableSwipe: true,\n enableDrag: true,\n\n dynamic: false,\n dynamicEl: [],\n galleryId: 1\n };\n\n function Plugin(element, options) {\n\n // Current lightGallery element\n this.el = element;\n\n // Current jquery element\n this.$el = $(element);\n\n // lightGallery settings\n this.s = $.extend({}, defaults, options);\n\n // When using dynamic mode, ensure dynamicEl is an array\n if (this.s.dynamic && this.s.dynamicEl !== 'undefined' && this.s.dynamicEl.constructor === Array && !this.s.dynamicEl.length) {\n throw ('When using dynamic mode, you must also define dynamicEl as an Array.');\n }\n\n // lightGallery modules\n this.modules = {};\n\n // false when lightgallery complete first slide;\n this.lGalleryOn = false;\n\n this.lgBusy = false;\n\n // Timeout function for hiding controls;\n this.hideBartimeout = false;\n\n // To determine browser supports for touch events;\n this.isTouch = ('ontouchstart' in document.documentElement);\n\n // Disable hideControlOnEnd if sildeEndAnimation is true\n if (this.s.slideEndAnimatoin) {\n this.s.hideControlOnEnd = false;\n }\n\n // Gallery items\n if (this.s.dynamic) {\n this.$items = this.s.dynamicEl;\n } else {\n if (this.s.selector === 'this') {\n this.$items = this.$el;\n } else if (this.s.selector !== '') {\n if (this.s.selectWithin) {\n this.$items = $(this.s.selectWithin).find(this.s.selector);\n } else {\n this.$items = this.$el.find($(this.s.selector));\n }\n } else {\n this.$items = this.$el.children();\n }\n }\n\n // .lg-item\n this.$slide = '';\n\n // .lg-outer\n this.$outer = '';\n\n this.init();\n\n return this;\n }\n\n Plugin.prototype.init = function() {\n\n var _this = this;\n\n // s.preload should not be more than $item.length\n if (_this.s.preload > _this.$items.length) {\n _this.s.preload = _this.$items.length;\n }\n\n // if dynamic option is enabled execute immediately\n var _hash = window.location.hash;\n if (_hash.indexOf('lg=' + this.s.galleryId) > 0) {\n\n _this.index = parseInt(_hash.split('&slide=')[1], 10);\n\n $('body').addClass('lg-from-hash');\n if (!$('body').hasClass('lg-on')) {\n setTimeout(function() {\n _this.build(_this.index);\n });\n\n $('body').addClass('lg-on');\n }\n }\n\n if (_this.s.dynamic) {\n\n _this.$el.trigger('onBeforeOpen.lg');\n\n _this.index = _this.s.index || 0;\n\n // prevent accidental double execution\n if (!$('body').hasClass('lg-on')) {\n setTimeout(function() {\n _this.build(_this.index);\n $('body').addClass('lg-on');\n });\n }\n } else {\n\n // Using different namespace for click because click event should not unbind if selector is same object('this')\n _this.$items.on('click.lgcustom', function(event) {\n\n // For IE8\n try {\n event.preventDefault();\n event.preventDefault();\n } catch (er) {\n event.returnValue = false;\n }\n\n _this.$el.trigger('onBeforeOpen.lg');\n\n _this.index = _this.s.index || _this.$items.index(this);\n\n // prevent accidental double execution\n if (!$('body').hasClass('lg-on')) {\n _this.build(_this.index);\n $('body').addClass('lg-on');\n }\n });\n }\n\n };\n\n Plugin.prototype.build = function(index) {\n\n var _this = this;\n\n _this.structure();\n\n // module constructor\n $.each($.fn.lightGallery.modules, function(key) {\n _this.modules[key] = new $.fn.lightGallery.modules[key](_this.el);\n });\n\n // initiate slide function\n _this.slide(index, false, false, false);\n\n if (_this.s.keyPress) {\n _this.keyPress();\n }\n\n if (_this.$items.length > 1) {\n\n _this.arrow();\n\n setTimeout(function() {\n _this.enableDrag();\n _this.enableSwipe();\n }, 50);\n\n if (_this.s.mousewheel) {\n _this.mousewheel();\n }\n } else {\n _this.$slide.on('click.lg', function() {\n _this.$el.trigger('onSlideClick.lg');\n });\n }\n\n _this.counter();\n\n _this.closeGallery();\n\n _this.$el.trigger('onAfterOpen.lg');\n\n // Hide controllers if mouse doesn't move for some period\n _this.$outer.on('mousemove.lg click.lg touchstart.lg', function() {\n\n _this.$outer.removeClass('lg-hide-items');\n\n clearTimeout(_this.hideBartimeout);\n\n // Timeout will be cleared on each slide movement also\n _this.hideBartimeout = setTimeout(function() {\n _this.$outer.addClass('lg-hide-items');\n }, _this.s.hideBarsDelay);\n\n });\n\n _this.$outer.trigger('mousemove.lg');\n\n };\n\n Plugin.prototype.structure = function() {\n var list = '';\n var controls = '';\n var i = 0;\n var subHtmlCont = '';\n var template;\n var _this = this;\n\n $('body').append('
');\n $('.lg-backdrop').css('transition-duration', this.s.backdropDuration + 'ms');\n\n // Create gallery items\n for (i = 0; i < this.$items.length; i++) {\n list += '
';\n }\n\n // Create controlls\n if (this.s.controls && this.$items.length > 1) {\n controls = '
' +\n '' +\n '' +\n '
';\n }\n\n if (this.s.appendSubHtmlTo === '.lg-sub-html') {\n subHtmlCont = '
';\n }\n\n template = '
' +\n '
' +\n '
' + list + '
' +\n '
' +\n '' +\n '
' +\n controls +\n subHtmlCont +\n '
' +\n '
';\n\n $('body').append(template);\n this.$outer = $('.lg-outer');\n this.$slide = this.$outer.find('.lg-item');\n\n if (this.s.useLeft) {\n this.$outer.addClass('lg-use-left');\n\n // Set mode lg-slide if use left is true;\n this.s.mode = 'lg-slide';\n } else {\n this.$outer.addClass('lg-use-css3');\n }\n\n // For fixed height gallery\n _this.setTop();\n $(window).on('resize.lg orientationchange.lg', function() {\n setTimeout(function() {\n _this.setTop();\n }, 100);\n });\n\n // add class lg-current to remove initial transition\n this.$slide.eq(this.index).addClass('lg-current');\n\n // add Class for css support and transition mode\n if (this.doCss()) {\n this.$outer.addClass('lg-css3');\n } else {\n this.$outer.addClass('lg-css');\n\n // Set speed 0 because no animation will happen if browser doesn't support css3\n this.s.speed = 0;\n }\n\n this.$outer.addClass(this.s.mode);\n\n if (this.s.enableDrag && this.$items.length > 1) {\n this.$outer.addClass('lg-grab');\n }\n\n if (this.s.showAfterLoad) {\n this.$outer.addClass('lg-show-after-load');\n }\n\n if (this.doCss()) {\n var $inner = this.$outer.find('.lg-inner');\n $inner.css('transition-timing-function', this.s.cssEasing);\n $inner.css('transition-duration', this.s.speed + 'ms');\n }\n\n setTimeout(function() {\n $('.lg-backdrop').addClass('in');\n });\n\n setTimeout(function() {\n _this.$outer.addClass('lg-visible');\n }, this.s.backdropDuration);\n\n if (this.s.download) {\n this.$outer.find('.lg-toolbar').append('');\n }\n\n // Store the current scroll top value to scroll back after closing the gallery..\n this.prevScrollTop = $(window).scrollTop();\n\n };\n\n // For fixed height gallery\n Plugin.prototype.setTop = function() {\n if (this.s.height !== '100%') {\n var wH = $(window).height();\n var top = (wH - parseInt(this.s.height, 10)) / 2;\n var $lGallery = this.$outer.find('.lg');\n if (wH >= parseInt(this.s.height, 10)) {\n $lGallery.css('top', top + 'px');\n } else {\n $lGallery.css('top', '0px');\n }\n }\n };\n\n // Find css3 support\n Plugin.prototype.doCss = function() {\n // check for css animation support\n var support = function() {\n var transition = ['transition', 'MozTransition', 'WebkitTransition', 'OTransition', 'msTransition', 'KhtmlTransition'];\n var root = document.documentElement;\n var i = 0;\n for (i = 0; i < transition.length; i++) {\n if (transition[i] in root.style) {\n return true;\n }\n }\n };\n\n if (support()) {\n return true;\n }\n\n return false;\n };\n\n /**\n * @desc Check the given src is video\n * @param {String} src\n * @return {Object} video type\n * Ex:{ youtube : [\"//www.youtube.com/watch?v=c0asJgSyxcY\", \"c0asJgSyxcY\"] }\n */\n Plugin.prototype.isVideo = function(src, index) {\n\n var html;\n if (this.s.dynamic) {\n html = this.s.dynamicEl[index].html;\n } else {\n html = this.$items.eq(index).attr('data-html');\n }\n\n if (!src) {\n if(html) {\n return {\n html5: true\n };\n } else {\n console.error('lightGallery :- data-src is not pvovided on slide item ' + (index + 1) + '. Please make sure the selector property is properly configured. More info - http://sachinchoolur.github.io/lightGallery/demos/html-markup.html');\n return false;\n }\n }\n\n var youtube = src.match(/\\/\\/(?:www\\.)?youtu(?:\\.be|be\\.com|be-nocookie\\.com)\\/(?:watch\\?v=|embed\\/)?([a-z0-9\\-\\_\\%]+)/i);\n var vimeo = src.match(/\\/\\/(?:www\\.)?vimeo.com\\/([0-9a-z\\-_]+)/i);\n var dailymotion = src.match(/\\/\\/(?:www\\.)?dai.ly\\/([0-9a-z\\-_]+)/i);\n var vk = src.match(/\\/\\/(?:www\\.)?(?:vk\\.com|vkontakte\\.ru)\\/(?:video_ext\\.php\\?)(.*)/i);\n\n if (youtube) {\n return {\n youtube: youtube\n };\n } else if (vimeo) {\n return {\n vimeo: vimeo\n };\n } else if (dailymotion) {\n return {\n dailymotion: dailymotion\n };\n } else if (vk) {\n return {\n vk: vk\n };\n }\n };\n\n /**\n * @desc Create image counter\n * Ex: 1/10\n */\n Plugin.prototype.counter = function() {\n if (this.s.counter) {\n $(this.s.appendCounterTo).append('
' + (parseInt(this.index, 10) + 1) + ' / ' + this.$items.length + '
');\n }\n };\n\n /**\n * @desc add sub-html into the slide\n * @param {Number} index - index of the slide\n */\n Plugin.prototype.addHtml = function(index) {\n var subHtml = null;\n var subHtmlUrl;\n var $currentEle;\n if (this.s.dynamic) {\n if (this.s.dynamicEl[index].subHtmlUrl) {\n subHtmlUrl = this.s.dynamicEl[index].subHtmlUrl;\n } else {\n subHtml = this.s.dynamicEl[index].subHtml;\n }\n } else {\n $currentEle = this.$items.eq(index);\n if ($currentEle.attr('data-sub-html-url')) {\n subHtmlUrl = $currentEle.attr('data-sub-html-url');\n } else {\n subHtml = $currentEle.attr('data-sub-html');\n if (this.s.getCaptionFromTitleOrAlt && !subHtml) {\n subHtml = $currentEle.attr('title') || $currentEle.find('img').first().attr('alt');\n }\n }\n }\n\n if (!subHtmlUrl) {\n if (typeof subHtml !== 'undefined' && subHtml !== null) {\n\n // get first letter of subhtml\n // if first letter starts with . or # get the html form the jQuery object\n var fL = subHtml.substring(0, 1);\n if (fL === '.' || fL === '#') {\n if (this.s.subHtmlSelectorRelative && !this.s.dynamic) {\n subHtml = $currentEle.find(subHtml).html();\n } else {\n subHtml = $(subHtml).html();\n }\n }\n } else {\n subHtml = '';\n }\n }\n\n if (this.s.appendSubHtmlTo === '.lg-sub-html') {\n\n if (subHtmlUrl) {\n this.$outer.find(this.s.appendSubHtmlTo).load(subHtmlUrl);\n } else {\n this.$outer.find(this.s.appendSubHtmlTo).html(subHtml);\n }\n\n } else {\n\n if (subHtmlUrl) {\n this.$slide.eq(index).load(subHtmlUrl);\n } else {\n this.$slide.eq(index).append(subHtml);\n }\n }\n\n // Add lg-empty-html class if title doesn't exist\n if (typeof subHtml !== 'undefined' && subHtml !== null) {\n if (subHtml === '') {\n this.$outer.find(this.s.appendSubHtmlTo).addClass('lg-empty-html');\n } else {\n this.$outer.find(this.s.appendSubHtmlTo).removeClass('lg-empty-html');\n }\n }\n\n this.$el.trigger('onAfterAppendSubHtml.lg', [index]);\n };\n\n /**\n * @desc Preload slides\n * @param {Number} index - index of the slide\n */\n Plugin.prototype.preload = function(index) {\n var i = 1;\n var j = 1;\n for (i = 1; i <= this.s.preload; i++) {\n if (i >= this.$items.length - index) {\n break;\n }\n\n this.loadContent(index + i, false, 0);\n }\n\n for (j = 1; j <= this.s.preload; j++) {\n if (index - j < 0) {\n break;\n }\n\n this.loadContent(index - j, false, 0);\n }\n };\n\n /**\n * @desc Load slide content into slide.\n * @param {Number} index - index of the slide.\n * @param {Boolean} rec - if true call loadcontent() function again.\n * @param {Boolean} delay - delay for adding complete class. it is 0 except first time.\n */\n Plugin.prototype.loadContent = function(index, rec, delay) {\n\n var _this = this;\n var _hasPoster = false;\n var _$img;\n var _src;\n var _poster;\n var _srcset;\n var _sizes;\n var _html;\n var getResponsiveSrc = function(srcItms) {\n var rsWidth = [];\n var rsSrc = [];\n for (var i = 0; i < srcItms.length; i++) {\n var __src = srcItms[i].split(' ');\n\n // Manage empty space\n if (__src[0] === '') {\n __src.splice(0, 1);\n }\n\n rsSrc.push(__src[0]);\n rsWidth.push(__src[1]);\n }\n\n var wWidth = $(window).width();\n for (var j = 0; j < rsWidth.length; j++) {\n if (parseInt(rsWidth[j], 10) > wWidth) {\n _src = rsSrc[j];\n break;\n }\n }\n };\n\n if (_this.s.dynamic) {\n\n if (_this.s.dynamicEl[index].poster) {\n _hasPoster = true;\n _poster = _this.s.dynamicEl[index].poster;\n }\n\n _html = _this.s.dynamicEl[index].html;\n _src = _this.s.dynamicEl[index].src;\n\n if (_this.s.dynamicEl[index].responsive) {\n var srcDyItms = _this.s.dynamicEl[index].responsive.split(',');\n getResponsiveSrc(srcDyItms);\n }\n\n _srcset = _this.s.dynamicEl[index].srcset;\n _sizes = _this.s.dynamicEl[index].sizes;\n\n } else {\n\n if (_this.$items.eq(index).attr('data-poster')) {\n _hasPoster = true;\n _poster = _this.$items.eq(index).attr('data-poster');\n }\n\n _html = _this.$items.eq(index).attr('data-html');\n _src = _this.$items.eq(index).attr('href') || _this.$items.eq(index).attr('data-src');\n\n if (_this.$items.eq(index).attr('data-responsive')) {\n var srcItms = _this.$items.eq(index).attr('data-responsive').split(',');\n getResponsiveSrc(srcItms);\n }\n\n _srcset = _this.$items.eq(index).attr('data-srcset');\n _sizes = _this.$items.eq(index).attr('data-sizes');\n\n }\n\n //if (_src || _srcset || _sizes || _poster) {\n\n var iframe = false;\n if (_this.s.dynamic) {\n if (_this.s.dynamicEl[index].iframe) {\n iframe = true;\n }\n } else {\n if (_this.$items.eq(index).attr('data-iframe') === 'true') {\n iframe = true;\n }\n }\n\n var _isVideo = _this.isVideo(_src, index);\n if (!_this.$slide.eq(index).hasClass('lg-loaded')) {\n if (iframe) {\n _this.$slide.eq(index).prepend('
');\n } else if (_hasPoster) {\n var videoClass = '';\n if (_isVideo && _isVideo.youtube) {\n videoClass = 'lg-has-youtube';\n } else if (_isVideo && _isVideo.vimeo) {\n videoClass = 'lg-has-vimeo';\n } else {\n videoClass = 'lg-has-html5';\n }\n\n _this.$slide.eq(index).prepend('
');\n\n } else if (_isVideo) {\n _this.$slide.eq(index).prepend('
');\n _this.$el.trigger('hasVideo.lg', [index, _src, _html]);\n } else {\n _this.$slide.eq(index).prepend('
');\n }\n\n _this.$el.trigger('onAferAppendSlide.lg', [index]);\n\n _$img = _this.$slide.eq(index).find('.lg-object');\n if (_sizes) {\n _$img.attr('sizes', _sizes);\n }\n\n if (_srcset) {\n _$img.attr('srcset', _srcset);\n try {\n picturefill({\n elements: [_$img[0]]\n });\n } catch (e) {\n console.warn('lightGallery :- If you want srcset to be supported for older browser please include picturefil version 2 javascript library in your document.');\n }\n }\n\n if (this.s.appendSubHtmlTo !== '.lg-sub-html') {\n _this.addHtml(index);\n }\n\n _this.$slide.eq(index).addClass('lg-loaded');\n }\n\n _this.$slide.eq(index).find('.lg-object').on('load.lg error.lg', function() {\n\n // For first time add some delay for displaying the start animation.\n var _speed = 0;\n\n // Do not change the delay value because it is required for zoom plugin.\n // If gallery opened from direct url (hash) speed value should be 0\n if (delay && !$('body').hasClass('lg-from-hash')) {\n _speed = delay;\n }\n\n setTimeout(function() {\n _this.$slide.eq(index).addClass('lg-complete');\n _this.$el.trigger('onSlideItemLoad.lg', [index, delay || 0]);\n }, _speed);\n\n });\n\n // @todo check load state for html5 videos\n if (_isVideo && _isVideo.html5 && !_hasPoster) {\n _this.$slide.eq(index).addClass('lg-complete');\n }\n\n if (rec === true) {\n if (!_this.$slide.eq(index).hasClass('lg-complete')) {\n _this.$slide.eq(index).find('.lg-object').on('load.lg error.lg', function() {\n _this.preload(index);\n });\n } else {\n _this.preload(index);\n }\n }\n\n //}\n };\n\n /**\n * @desc slide function for lightgallery\n ** Slide() gets call on start\n ** ** Set lg.on true once slide() function gets called.\n ** Call loadContent() on slide() function inside setTimeout\n ** ** On first slide we do not want any animation like slide of fade\n ** ** So on first slide( if lg.on if false that is first slide) loadContent() should start loading immediately\n ** ** Else loadContent() should wait for the transition to complete.\n ** ** So set timeout s.speed + 50\n <=> ** loadContent() will load slide content in to the particular slide\n ** ** It has recursion (rec) parameter. if rec === true loadContent() will call preload() function.\n ** ** preload will execute only when the previous slide is fully loaded (images iframe)\n ** ** avoid simultaneous image load\n <=> ** Preload() will check for s.preload value and call loadContent() again accoring to preload value\n ** loadContent() <====> Preload();\n\n * @param {Number} index - index of the slide\n * @param {Boolean} fromTouch - true if slide function called via touch event or mouse drag\n * @param {Boolean} fromThumb - true if slide function called via thumbnail click\n * @param {String} direction - Direction of the slide(next/prev)\n */\n Plugin.prototype.slide = function(index, fromTouch, fromThumb, direction) {\n\n var _prevIndex = this.$outer.find('.lg-current').index();\n var _this = this;\n\n // Prevent if multiple call\n // Required for hsh plugin\n if (_this.lGalleryOn && (_prevIndex === index)) {\n return;\n }\n\n var _length = this.$slide.length;\n var _time = _this.lGalleryOn ? this.s.speed : 0;\n\n if (!_this.lgBusy) {\n\n if (this.s.download) {\n var _src;\n if (_this.s.dynamic) {\n _src = _this.s.dynamicEl[index].downloadUrl !== false && (_this.s.dynamicEl[index].downloadUrl || _this.s.dynamicEl[index].src);\n } else {\n _src = _this.$items.eq(index).attr('data-download-url') !== 'false' && (_this.$items.eq(index).attr('data-download-url') || _this.$items.eq(index).attr('href') || _this.$items.eq(index).attr('data-src'));\n\n }\n\n if (_src) {\n $('#lg-download').attr('href', _src);\n _this.$outer.removeClass('lg-hide-download');\n } else {\n _this.$outer.addClass('lg-hide-download');\n }\n }\n\n this.$el.trigger('onBeforeSlide.lg', [_prevIndex, index, fromTouch, fromThumb]);\n\n _this.lgBusy = true;\n\n clearTimeout(_this.hideBartimeout);\n\n // Add title if this.s.appendSubHtmlTo === lg-sub-html\n if (this.s.appendSubHtmlTo === '.lg-sub-html') {\n\n // wait for slide animation to complete\n setTimeout(function() {\n _this.addHtml(index);\n }, _time);\n }\n\n this.arrowDisable(index);\n\n if (!direction) {\n if (index < _prevIndex) {\n direction = 'prev';\n } else if (index > _prevIndex) {\n direction = 'next';\n }\n }\n\n if (!fromTouch) {\n\n // remove all transitions\n _this.$outer.addClass('lg-no-trans');\n\n this.$slide.removeClass('lg-prev-slide lg-next-slide');\n\n if (direction === 'prev') {\n\n //prevslide\n this.$slide.eq(index).addClass('lg-prev-slide');\n this.$slide.eq(_prevIndex).addClass('lg-next-slide');\n } else {\n\n // next slide\n this.$slide.eq(index).addClass('lg-next-slide');\n this.$slide.eq(_prevIndex).addClass('lg-prev-slide');\n }\n\n // give 50 ms for browser to add/remove class\n setTimeout(function() {\n _this.$slide.removeClass('lg-current');\n\n //_this.$slide.eq(_prevIndex).removeClass('lg-current');\n _this.$slide.eq(index).addClass('lg-current');\n\n // reset all transitions\n _this.$outer.removeClass('lg-no-trans');\n }, 50);\n } else {\n\n this.$slide.removeClass('lg-prev-slide lg-current lg-next-slide');\n var touchPrev;\n var touchNext;\n if (_length > 2) {\n touchPrev = index - 1;\n touchNext = index + 1;\n\n if ((index === 0) && (_prevIndex === _length - 1)) {\n\n // next slide\n touchNext = 0;\n touchPrev = _length - 1;\n } else if ((index === _length - 1) && (_prevIndex === 0)) {\n\n // prev slide\n touchNext = 0;\n touchPrev = _length - 1;\n }\n\n } else {\n touchPrev = 0;\n touchNext = 1;\n }\n\n if (direction === 'prev') {\n _this.$slide.eq(touchNext).addClass('lg-next-slide');\n } else {\n _this.$slide.eq(touchPrev).addClass('lg-prev-slide');\n }\n\n _this.$slide.eq(index).addClass('lg-current');\n }\n\n if (_this.lGalleryOn) {\n setTimeout(function() {\n _this.loadContent(index, true, 0);\n }, this.s.speed + 50);\n\n setTimeout(function() {\n _this.lgBusy = false;\n _this.$el.trigger('onAfterSlide.lg', [_prevIndex, index, fromTouch, fromThumb]);\n }, this.s.speed);\n\n } else {\n _this.loadContent(index, true, _this.s.backdropDuration);\n\n _this.lgBusy = false;\n _this.$el.trigger('onAfterSlide.lg', [_prevIndex, index, fromTouch, fromThumb]);\n }\n\n _this.lGalleryOn = true;\n\n if (this.s.counter) {\n $('#lg-counter-current').text(index + 1);\n }\n\n }\n _this.index = index;\n\n };\n\n /**\n * @desc Go to next slide\n * @param {Boolean} fromTouch - true if slide function called via touch event\n */\n Plugin.prototype.goToNextSlide = function(fromTouch) {\n var _this = this;\n var _loop = _this.s.loop;\n if (fromTouch && _this.$slide.length < 3) {\n _loop = false;\n }\n\n if (!_this.lgBusy) {\n if ((_this.index + 1) < _this.$slide.length) {\n _this.index++;\n _this.$el.trigger('onBeforeNextSlide.lg', [_this.index]);\n _this.slide(_this.index, fromTouch, false, 'next');\n } else {\n if (_loop) {\n _this.index = 0;\n _this.$el.trigger('onBeforeNextSlide.lg', [_this.index]);\n _this.slide(_this.index, fromTouch, false, 'next');\n } else if (_this.s.slideEndAnimatoin && !fromTouch) {\n _this.$outer.addClass('lg-right-end');\n setTimeout(function() {\n _this.$outer.removeClass('lg-right-end');\n }, 400);\n }\n }\n }\n };\n\n /**\n * @desc Go to previous slide\n * @param {Boolean} fromTouch - true if slide function called via touch event\n */\n Plugin.prototype.goToPrevSlide = function(fromTouch) {\n var _this = this;\n var _loop = _this.s.loop;\n if (fromTouch && _this.$slide.length < 3) {\n _loop = false;\n }\n\n if (!_this.lgBusy) {\n if (_this.index > 0) {\n _this.index--;\n _this.$el.trigger('onBeforePrevSlide.lg', [_this.index, fromTouch]);\n _this.slide(_this.index, fromTouch, false, 'prev');\n } else {\n if (_loop) {\n _this.index = _this.$items.length - 1;\n _this.$el.trigger('onBeforePrevSlide.lg', [_this.index, fromTouch]);\n _this.slide(_this.index, fromTouch, false, 'prev');\n } else if (_this.s.slideEndAnimatoin && !fromTouch) {\n _this.$outer.addClass('lg-left-end');\n setTimeout(function() {\n _this.$outer.removeClass('lg-left-end');\n }, 400);\n }\n }\n }\n };\n\n Plugin.prototype.keyPress = function() {\n var _this = this;\n if (this.$items.length > 1) {\n $(window).on('keyup.lg', function(e) {\n if (_this.$items.length > 1) {\n if (e.keyCode === 37) {\n e.preventDefault();\n _this.goToPrevSlide();\n }\n\n if (e.keyCode === 39) {\n e.preventDefault();\n _this.goToNextSlide();\n }\n }\n });\n }\n\n $(window).on('keydown.lg', function(e) {\n if (_this.s.escKey === true && e.keyCode === 27) {\n e.preventDefault();\n if (!_this.$outer.hasClass('lg-thumb-open')) {\n _this.destroy();\n } else {\n _this.$outer.removeClass('lg-thumb-open');\n }\n }\n });\n };\n\n Plugin.prototype.arrow = function() {\n var _this = this;\n this.$outer.find('.lg-prev').on('click.lg', function() {\n _this.goToPrevSlide();\n });\n\n this.$outer.find('.lg-next').on('click.lg', function() {\n _this.goToNextSlide();\n });\n };\n\n Plugin.prototype.arrowDisable = function(index) {\n\n // Disable arrows if s.hideControlOnEnd is true\n if (!this.s.loop && this.s.hideControlOnEnd) {\n if ((index + 1) < this.$slide.length) {\n this.$outer.find('.lg-next').removeAttr('disabled').removeClass('disabled');\n } else {\n this.$outer.find('.lg-next').attr('disabled', 'disabled').addClass('disabled');\n }\n\n if (index > 0) {\n this.$outer.find('.lg-prev').removeAttr('disabled').removeClass('disabled');\n } else {\n this.$outer.find('.lg-prev').attr('disabled', 'disabled').addClass('disabled');\n }\n }\n };\n\n Plugin.prototype.setTranslate = function($el, xValue, yValue) {\n // jQuery supports Automatic CSS prefixing since jQuery 1.8.0\n if (this.s.useLeft) {\n $el.css('left', xValue);\n } else {\n $el.css({\n transform: 'translate3d(' + (xValue) + 'px, ' + yValue + 'px, 0px)'\n });\n }\n };\n\n Plugin.prototype.touchMove = function(startCoords, endCoords) {\n\n var distance = endCoords - startCoords;\n\n if (Math.abs(distance) > 15) {\n // reset opacity and transition duration\n this.$outer.addClass('lg-dragging');\n\n // move current slide\n this.setTranslate(this.$slide.eq(this.index), distance, 0);\n\n // move next and prev slide with current slide\n this.setTranslate($('.lg-prev-slide'), -this.$slide.eq(this.index).width() + distance, 0);\n this.setTranslate($('.lg-next-slide'), this.$slide.eq(this.index).width() + distance, 0);\n }\n };\n\n Plugin.prototype.touchEnd = function(distance) {\n var _this = this;\n\n // keep slide animation for any mode while dragg/swipe\n if (_this.s.mode !== 'lg-slide') {\n _this.$outer.addClass('lg-slide');\n }\n\n this.$slide.not('.lg-current, .lg-prev-slide, .lg-next-slide').css('opacity', '0');\n\n // set transition duration\n setTimeout(function() {\n _this.$outer.removeClass('lg-dragging');\n if ((distance < 0) && (Math.abs(distance) > _this.s.swipeThreshold)) {\n _this.goToNextSlide(true);\n } else if ((distance > 0) && (Math.abs(distance) > _this.s.swipeThreshold)) {\n _this.goToPrevSlide(true);\n } else if (Math.abs(distance) < 5) {\n\n // Trigger click if distance is less than 5 pix\n _this.$el.trigger('onSlideClick.lg');\n }\n\n _this.$slide.removeAttr('style');\n });\n\n // remove slide class once drag/swipe is completed if mode is not slide\n setTimeout(function() {\n if (!_this.$outer.hasClass('lg-dragging') && _this.s.mode !== 'lg-slide') {\n _this.$outer.removeClass('lg-slide');\n }\n }, _this.s.speed + 100);\n\n };\n\n Plugin.prototype.enableSwipe = function() {\n var _this = this;\n var startCoords = 0;\n var endCoords = 0;\n var isMoved = false;\n\n if (_this.s.enableSwipe && _this.doCss()) {\n\n _this.$slide.on('touchstart.lg', function(e) {\n if (!_this.$outer.hasClass('lg-zoomed') && !_this.lgBusy) {\n e.preventDefault();\n _this.manageSwipeClass();\n startCoords = e.originalEvent.targetTouches[0].pageX;\n }\n });\n\n _this.$slide.on('touchmove.lg', function(e) {\n if (!_this.$outer.hasClass('lg-zoomed')) {\n e.preventDefault();\n endCoords = e.originalEvent.targetTouches[0].pageX;\n _this.touchMove(startCoords, endCoords);\n isMoved = true;\n }\n });\n\n _this.$slide.on('touchend.lg', function() {\n if (!_this.$outer.hasClass('lg-zoomed')) {\n if (isMoved) {\n isMoved = false;\n _this.touchEnd(endCoords - startCoords);\n } else {\n _this.$el.trigger('onSlideClick.lg');\n }\n }\n });\n }\n\n };\n\n Plugin.prototype.enableDrag = function() {\n var _this = this;\n var startCoords = 0;\n var endCoords = 0;\n var isDraging = false;\n var isMoved = false;\n if (_this.s.enableDrag && _this.doCss()) {\n _this.$slide.on('mousedown.lg', function(e) {\n if (!_this.$outer.hasClass('lg-zoomed') && !_this.lgBusy && !$(e.target).text().trim()) {\n e.preventDefault();\n _this.manageSwipeClass();\n startCoords = e.pageX;\n isDraging = true;\n\n // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723\n _this.$outer.scrollLeft += 1;\n _this.$outer.scrollLeft -= 1;\n\n // *\n\n _this.$outer.removeClass('lg-grab').addClass('lg-grabbing');\n\n _this.$el.trigger('onDragstart.lg');\n }\n });\n\n $(window).on('mousemove.lg', function(e) {\n if (isDraging) {\n isMoved = true;\n endCoords = e.pageX;\n _this.touchMove(startCoords, endCoords);\n _this.$el.trigger('onDragmove.lg');\n }\n });\n\n $(window).on('mouseup.lg', function(e) {\n if (isMoved) {\n isMoved = false;\n _this.touchEnd(endCoords - startCoords);\n _this.$el.trigger('onDragend.lg');\n } else if ($(e.target).hasClass('lg-object') || $(e.target).hasClass('lg-video-play')) {\n _this.$el.trigger('onSlideClick.lg');\n }\n\n // Prevent execution on click\n if (isDraging) {\n isDraging = false;\n _this.$outer.removeClass('lg-grabbing').addClass('lg-grab');\n }\n });\n\n }\n };\n\n Plugin.prototype.manageSwipeClass = function() {\n var _touchNext = this.index + 1;\n var _touchPrev = this.index - 1;\n if (this.s.loop && this.$slide.length > 2) {\n if (this.index === 0) {\n _touchPrev = this.$slide.length - 1;\n } else if (this.index === this.$slide.length - 1) {\n _touchNext = 0;\n }\n }\n\n this.$slide.removeClass('lg-next-slide lg-prev-slide');\n if (_touchPrev > -1) {\n this.$slide.eq(_touchPrev).addClass('lg-prev-slide');\n }\n\n this.$slide.eq(_touchNext).addClass('lg-next-slide');\n };\n\n Plugin.prototype.mousewheel = function() {\n var _this = this;\n _this.$outer.on('mousewheel.lg', function(e) {\n\n if (!e.deltaY) {\n return;\n }\n\n if (e.deltaY > 0) {\n _this.goToPrevSlide();\n } else {\n _this.goToNextSlide();\n }\n\n e.preventDefault();\n });\n\n };\n\n Plugin.prototype.closeGallery = function() {\n\n var _this = this;\n var mousedown = false;\n this.$outer.find('.lg-close').on('click.lg', function() {\n _this.destroy();\n });\n\n if (_this.s.closable) {\n\n // If you drag the slide and release outside gallery gets close on chrome\n // for preventing this check mousedown and mouseup happened on .lg-item or lg-outer\n _this.$outer.on('mousedown.lg', function(e) {\n\n if ($(e.target).is('.lg-outer') || $(e.target).is('.lg-item ') || $(e.target).is('.lg-img-wrap')) {\n mousedown = true;\n } else {\n mousedown = false;\n }\n\n });\n \n _this.$outer.on('mousemove.lg', function() {\n mousedown = false;\n });\n\n _this.$outer.on('mouseup.lg', function(e) {\n\n if ($(e.target).is('.lg-outer') || $(e.target).is('.lg-item ') || $(e.target).is('.lg-img-wrap') && mousedown) {\n if (!_this.$outer.hasClass('lg-dragging')) {\n _this.destroy();\n }\n }\n\n });\n\n }\n\n };\n\n Plugin.prototype.destroy = function(d) {\n\n var _this = this;\n\n if (!d) {\n _this.$el.trigger('onBeforeClose.lg');\n $(window).scrollTop(_this.prevScrollTop);\n }\n\n\n /**\n * if d is false or undefined destroy will only close the gallery\n * plugins instance remains with the element\n *\n * if d is true destroy will completely remove the plugin\n */\n\n if (d) {\n if (!_this.s.dynamic) {\n // only when not using dynamic mode is $items a jquery collection\n this.$items.off('click.lg click.lgcustom');\n }\n\n $.removeData(_this.el, 'lightGallery');\n }\n\n // Unbind all events added by lightGallery\n this.$el.off('.lg.tm');\n\n // Distroy all lightGallery modules\n $.each($.fn.lightGallery.modules, function(key) {\n if (_this.modules[key]) {\n _this.modules[key].destroy();\n }\n });\n\n this.lGalleryOn = false;\n\n clearTimeout(_this.hideBartimeout);\n this.hideBartimeout = false;\n $(window).off('.lg');\n $('body').removeClass('lg-on lg-from-hash');\n\n if (_this.$outer) {\n _this.$outer.removeClass('lg-visible');\n }\n\n $('.lg-backdrop').removeClass('in');\n\n setTimeout(function() {\n if (_this.$outer) {\n _this.$outer.remove();\n }\n\n $('.lg-backdrop').remove();\n\n if (!d) {\n _this.$el.trigger('onCloseAfter.lg');\n }\n\n }, _this.s.backdropDuration + 50);\n };\n\n $.fn.lightGallery = function(options) {\n return this.each(function() {\n if (!$.data(this, 'lightGallery')) {\n $.data(this, 'lightGallery', new Plugin(this, options));\n } else {\n try {\n $(this).data('lightGallery').init();\n } catch (err) {\n console.error('lightGallery has not initiated properly');\n }\n }\n });\n };\n\n $.fn.lightGallery.modules = {};\n\n})();\n\n\n}));\n"],"sourceRoot":""}