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AAMuF,QAAQ/E,GAAK6L,QAAQyB,GAInCjR,KAAK2I,YAAa,EAElB2B,aAAanH,EAAM0F,gBACnB7I,KAAK6I,gBAAiB,EACtBtE,EAAUF,QAAQd,IAAIyB,OAAQ,OAC9BT,EAAUF,QAAQ/C,YAAYT,SAAS+I,KAAM,SAC7CrF,EAAUF,QAAQ/C,YAAYT,SAAS+I,KAAM,gBAEzCzG,EAAMmG,OACN/E,EAAUF,QAAQ/C,YAAY6B,EAAMmG,MAAO,cAG/C/E,EAAUF,QAAQ/C,YAAYT,SAASqI,cAAc,gBAAiB,MACtEW,YAAW,WACP,IACQ1G,EAAMmG,OACNnG,EAAMmG,MAAMvI,WAAWE,YAAYkC,EAAMmG,OAGzCzI,SAASqI,cAAc,iBACvBrI,SAASqI,cAAc,gBAAgBnI,WAAWE,YAAYJ,SAASqI,cAAc,iBAGpF+H,GACD1M,EAAUF,QAAQhC,QAAQc,EAAM5C,GAAI,gBAExC4C,EAAM5C,GAAGoK,OACb,CAAE,MAAOwG,GAAM,CACnB,GAAGhO,EAAMoF,EAAErC,iBAAmB,GAClC,EAEAlB,OAAOoM,aAAe,SAAU7Q,EAAI+H,GAChC,GAAK/H,EAIL,IACI,GAAKA,EAAGD,aAAa,UAKjB0E,OAAOQ,OAAOjF,EAAGD,aAAa,WAAWiJ,WALb,CAC5B,IAAIxG,EAAM,KAAOiC,OAAOQ,OAAOzC,MAC/BiC,OAAOQ,OAAOzC,GAAO,IAAIqF,EAAO7H,EAAI+H,GACpC/H,EAAGE,aAAa,SAAUsC,EAC9B,CAGJ,CAAE,MAAOoO,GACL9C,QAAQgD,MAAM,0CAA2CF,EAC7D,CACJ,CACJ,G","sources":["webpack://i4proportal/./node_modules/lightgallery.js/lib/js/lg-utils.js","webpack://i4proportal/./node_modules/lightgallery.js/lib/js/lightgallery.js"],"sourcesContent":["(function (global, factory) {\n    if (typeof define === \"function\" && define.amd) {\n        define(['exports'], factory);\n    } else if (typeof exports !== \"undefined\") {\n        factory(exports);\n    } else {\n        var mod = {\n            exports: {}\n        };\n        factory(mod.exports);\n        global.lgUtils = mod.exports;\n    }\n})(this, function (exports) {\n    'use strict';\n\n    Object.defineProperty(exports, \"__esModule\", {\n        value: true\n    });\n\n    var utils = {\n        getAttribute: function getAttribute(el, label) {\n            return el[label];\n        },\n\n        setAttribute: function setAttribute(el, label, value) {\n            el[label] = value;\n        },\n        wrap: function wrap(el, className) {\n            if (!el) {\n                return;\n            }\n\n            var wrapper = document.createElement('div');\n            wrapper.className = className;\n            el.parentNode.insertBefore(wrapper, el);\n            el.parentNode.removeChild(el);\n            wrapper.appendChild(el);\n        },\n\n        addClass: function addClass(el, className) {\n            if (!el) {\n                return;\n            }\n\n            if (el.classList) {\n                el.classList.add(className);\n            } else {\n                el.className += ' ' + className;\n            }\n        },\n\n        removeClass: function removeClass(el, className) {\n            if (!el) {\n                return;\n            }\n\n            if (el.classList) {\n                el.classList.remove(className);\n            } else {\n                el.className = el.className.replace(new RegExp('(^|\\\\b)' + className.split(' ').join('|') + '(\\\\b|$)', 'gi'), ' ');\n            }\n        },\n\n        hasClass: function hasClass(el, className) {\n            if (el.classList) {\n                return el.classList.contains(className);\n            } else {\n                return new RegExp('(^| )' + className + '( |$)', 'gi').test(el.className);\n            }\n        },\n\n        // ex Transform\n        // ex TransitionTimingFunction\n        setVendor: function setVendor(el, property, value) {\n            if (!el) {\n                return;\n            }\n\n            el.style[property.charAt(0).toLowerCase() + property.slice(1)] = value;\n            el.style['webkit' + property] = value;\n            el.style['moz' + property] = value;\n            el.style['ms' + property] = value;\n            el.style['o' + property] = value;\n        },\n\n        trigger: function trigger(el, event) {\n            var detail = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n            if (!el) {\n                return;\n            }\n\n            var customEvent = new CustomEvent(event, {\n                detail: detail\n            });\n            el.dispatchEvent(customEvent);\n        },\n\n        Listener: {\n            uid: 0\n        },\n        on: function on(el, events, fn) {\n            var _this = this;\n\n            if (!el) {\n                return;\n            }\n\n            events.split(' ').forEach(function (event) {\n                var _id = _this.getAttribute(el, 'lg-event-uid') || '';\n                utils.Listener.uid++;\n                _id += '&' + utils.Listener.uid;\n                _this.setAttribute(el, 'lg-event-uid', _id);\n                utils.Listener[event + utils.Listener.uid] = fn;\n                el.addEventListener(event.split('.')[0], fn, false);\n            });\n        },\n\n        off: function off(el, event) {\n            if (!el) {\n                return;\n            }\n\n            var _id = this.getAttribute(el, 'lg-event-uid');\n            if (_id) {\n                _id = _id.split('&');\n                for (var i = 0; i < _id.length; i++) {\n                    if (_id[i]) {\n                        var _event = event + _id[i];\n                        if (_event.substring(0, 1) === '.') {\n                            for (var key in utils.Listener) {\n                                if (utils.Listener.hasOwnProperty(key)) {\n                                    if (key.split('.').indexOf(_event.split('.')[1]) > -1) {\n                                        el.removeEventListener(key.split('.')[0], utils.Listener[key]);\n                                        this.setAttribute(el, 'lg-event-uid', this.getAttribute(el, 'lg-event-uid').replace('&' + _id[i], ''));\n                                        delete utils.Listener[key];\n                                    }\n                                }\n                            }\n                        } else {\n                            el.removeEventListener(_event.split('.')[0], utils.Listener[_event]);\n                            this.setAttribute(el, 'lg-event-uid', this.getAttribute(el, 'lg-event-uid').replace('&' + _id[i], ''));\n                            delete utils.Listener[_event];\n                        }\n                    }\n                }\n            }\n        },\n\n        param: function param(obj) {\n            return Object.keys(obj).map(function (k) {\n                return encodeURIComponent(k) + '=' + encodeURIComponent(obj[k]);\n            }).join('&');\n        }\n    };\n\n    exports.default = utils;\n});","(function (global, factory) {\n    if (typeof define === \"function\" && define.amd) {\n        define(['./lg-utils'], factory);\n    } else if (typeof exports !== \"undefined\") {\n        factory(require('./lg-utils'));\n    } else {\n        var mod = {\n            exports: {}\n        };\n        factory(global.lgUtils);\n        global.lightgallery = mod.exports;\n    }\n})(this, function (_lgUtils) {\n    'use strict';\n\n    var _lgUtils2 = _interopRequireDefault(_lgUtils);\n\n    function _interopRequireDefault(obj) {\n        return obj && obj.__esModule ? obj : {\n            default: obj\n        };\n    }\n\n    var _extends = Object.assign || function (target) {\n        for (var i = 1; i < arguments.length; i++) {\n            var source = arguments[i];\n\n            for (var key in source) {\n                if (Object.prototype.hasOwnProperty.call(source, key)) {\n                    target[key] = source[key];\n                }\n            }\n        }\n\n        return target;\n    };\n\n    /** Polyfill the CustomEvent() constructor functionality in Internet Explorer 9 and higher */\n    (function () {\n\n        if (typeof window.CustomEvent === 'function') {\n            return false;\n        }\n\n        function CustomEvent(event, params) {\n            params = params || {\n                bubbles: false,\n                cancelable: false,\n                detail: undefined\n            };\n            var evt = document.createEvent('CustomEvent');\n            evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n            return evt;\n        }\n\n        CustomEvent.prototype = window.Event.prototype;\n\n        window.CustomEvent = CustomEvent;\n    })();\n\n    window.utils = _lgUtils2.default;\n    window.lgData = {\n        uid: 0\n    };\n\n    window.lgModules = {};\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\n        // Set 0, if u don't want to hide the controls \n        hideBarsDelay: 6000,\n\n        useLeft: false,\n\n        // aria-labelledby attribute fot gallery\n        ariaLabelledby: '',\n\n        //aria-describedby attribute for gallery\n        ariaDescribedby: '',\n\n        closable: true,\n        loop: true,\n        escKey: true,\n        keyPress: true,\n        controls: true,\n        slideEndAnimatoin: true,\n        hideControlOnEnd: false,\n        mousewheel: false,\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        supportLegacyBrowser: true\n    };\n\n    function Plugin(element, options) {\n\n        // Current lightGallery element\n        this.el = element;\n\n        // lightGallery settings\n        this.s = _extends({}, 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        this.items = [];\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.push(this.el);\n            } else if (this.s.selector !== '') {\n                if (this.s.selectWithin) {\n                    this.items = document.querySelector(this.s.selectWithin).querySelectorAll(this.s.selector);\n                } else {\n                    this.items = this.el.querySelectorAll(this.s.selector);\n                }\n            } else {\n                this.items = this.el.children;\n            }\n        }\n\n        // .lg-item\n\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            _lgUtils2.default.addClass(document.body, 'lg-from-hash');\n            if (!_lgUtils2.default.hasClass(document.body, 'lg-on')) {\n                _lgUtils2.default.addClass(document.body, 'lg-on');\n                setTimeout(function () {\n                    _this.build(_this.index);\n                });\n            }\n        }\n\n        if (_this.s.dynamic) {\n\n            _lgUtils2.default.trigger(this.el, 'onBeforeOpen');\n\n            _this.index = _this.s.index || 0;\n\n            // prevent accidental double execution\n            if (!_lgUtils2.default.hasClass(document.body, 'lg-on')) {\n                _lgUtils2.default.addClass(document.body, 'lg-on');\n                setTimeout(function () {\n                    _this.build(_this.index);\n                });\n            }\n        } else {\n\n            for (var i = 0; i < _this.items.length; i++) {\n\n                /*jshint loopfunc: true */\n                (function (index) {\n\n                    // Using different namespace for click because click event should not unbind if selector is same object('this')\n                    _lgUtils2.default.on(_this.items[index], 'click.lgcustom', function (e) {\n\n                        e.preventDefault();\n\n                        _lgUtils2.default.trigger(_this.el, 'onBeforeOpen');\n\n                        _this.index = _this.s.index || index;\n\n                        if (!_lgUtils2.default.hasClass(document.body, 'lg-on')) {\n                            _this.build(_this.index);\n                            _lgUtils2.default.addClass(document.body, 'lg-on');\n                        }\n                    });\n                })(i);\n            }\n        }\n    };\n\n    Plugin.prototype.build = function (index) {\n\n        var _this = this;\n\n        _this.structure();\n\n        for (var key in window.lgModules) {\n            _this.modules[key] = new window.lgModules[key](_this.el);\n        }\n\n        // initiate slide function\n        _this.slide(index, 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        }\n\n        _this.counter();\n\n        _this.closeGallery();\n\n        _lgUtils2.default.trigger(_this.el, 'onAfterOpen');\n\n        // Hide controllers if mouse doesn't move for some period\n        if (_this.s.hideBarsDelay > 0) {\n\n            // Hide controls if user doesn't use mouse or touch after opening gallery\n            var initialHideBarTimeout = setTimeout(function () {\n                _lgUtils2.default.addClass(_this.outer, 'lg-hide-items');\n            }, _this.s.hideBarsDelay);\n            _lgUtils2.default.on(_this.outer, 'mousemove.lg click.lg touchstart.lg', function () {\n\n                // Cancel initalHideBarTimout if user uses mouse or touch events\n                // Before it fires\n                clearTimeout(initialHideBarTimeout);\n\n                _lgUtils2.default.removeClass(_this.outer, '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                    _lgUtils2.default.addClass(_this.outer, 'lg-hide-items');\n                }, _this.s.hideBarsDelay);\n            });\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        document.body.insertAdjacentHTML('beforeend', '<div class=\"lg-backdrop\"></div>');\n        _lgUtils2.default.setVendor(document.querySelector('.lg-backdrop'), 'TransitionDuration', this.s.backdropDuration + 'ms');\n\n        // Create gallery items\n        for (i = 0; i < this.items.length; i++) {\n            list += '<div class=\"lg-item\"></div>';\n        }\n\n        // Create controlls\n        if (this.s.controls && this.items.length > 1) {\n            controls = '<div class=\"lg-actions\">' + '<button type=\"button\" aria-label=\"Previous slide\" class=\"lg-prev lg-icon\">' + this.s.prevHtml + '</button>' + '<button type=\"button\" aria-label=\"Next slide\" class=\"lg-next lg-icon\">' + this.s.nextHtml + '</button>' + '</div>';\n        }\n\n        if (this.s.appendSubHtmlTo === '.lg-sub-html') {\n            subHtmlCont = '<div role=\"status\" aria-live=\"polite\" class=\"lg-sub-html\"></div>';\n        }\n\n        var ariaLabelledby = this.s.ariaLabelledby ? 'aria-labelledby=\"' + this.s.ariaLabelledby + '\"' : '';\n        var ariaDescribedby = this.s.ariaDescribedby ? 'aria-describedby=\"' + this.s.ariaDescribedby + '\"' : '';\n\n        template = '<div tabindex=\"-1\" aria-modal=\"true\" ' + ariaLabelledby + ' ' + ariaDescribedby + ' role=\"dialog\" class=\"lg-outer ' + this.s.addClass + ' ' + this.s.startClass + '\">' + '<div class=\"lg\" style=\"width:' + this.s.width + '; height:' + this.s.height + '\">' + '<div class=\"lg-inner\">' + list + '</div>' + '<div class=\"lg-toolbar lg-group\">' + '<button type=\"button\" aria-label=\"Close gallery\" class=\"lg-close lg-icon\"></button>' + '</div>' + controls + subHtmlCont + '</div>' + '</div>';\n\n        document.body.insertAdjacentHTML('beforeend', template);\n        this.outer = document.querySelector('.lg-outer');\n        this.outer.focus();\n        this.___slide = this.outer.querySelectorAll('.lg-item');\n\n        if (this.s.useLeft) {\n            _lgUtils2.default.addClass(this.outer, 'lg-use-left');\n\n            // Set mode lg-slide if use left is true;\n            this.s.mode = 'lg-slide';\n        } else {\n            _lgUtils2.default.addClass(this.outer, 'lg-use-css3');\n        }\n\n        // For fixed height gallery\n        _this.setTop();\n        _lgUtils2.default.on(window, '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        _lgUtils2.default.addClass(this.___slide[this.index], 'lg-current');\n\n        // add Class for css support and transition mode\n        if (this.doCss()) {\n            _lgUtils2.default.addClass(this.outer, 'lg-css3');\n        } else {\n            _lgUtils2.default.addClass(this.outer, '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        _lgUtils2.default.addClass(this.outer, this.s.mode);\n\n        if (this.s.enableDrag && this.items.length > 1) {\n            _lgUtils2.default.addClass(this.outer, 'lg-grab');\n        }\n\n        if (this.s.showAfterLoad) {\n            _lgUtils2.default.addClass(this.outer, 'lg-show-after-load');\n        }\n\n        if (this.doCss()) {\n            var inner = this.outer.querySelector('.lg-inner');\n            _lgUtils2.default.setVendor(inner, 'TransitionTimingFunction', this.s.cssEasing);\n            _lgUtils2.default.setVendor(inner, 'TransitionDuration', this.s.speed + 'ms');\n        }\n\n        setTimeout(function () {\n            _lgUtils2.default.addClass(document.querySelector('.lg-backdrop'), 'in');\n        });\n\n        setTimeout(function () {\n            _lgUtils2.default.addClass(_this.outer, 'lg-visible');\n        }, this.s.backdropDuration);\n\n        if (this.s.download) {\n            this.outer.querySelector('.lg-toolbar').insertAdjacentHTML('beforeend', '<a id=\"lg-download\" aria-label=\"Download\" target=\"_blank\" download class=\"lg-download lg-icon\"></a>');\n        }\n\n        // Store the current scroll top value to scroll back after closing the gallery..\n        this.prevScrollTop = document.documentElement.scrollTop || document.body.scrollTop;\n    };\n\n    // For fixed height gallery\n    Plugin.prototype.setTop = function () {\n        if (this.s.height !== '100%') {\n            var wH = window.innerHeight;\n            var top = (wH - parseInt(this.s.height, 10)) / 2;\n            var lGallery = this.outer.querySelector('.lg');\n            if (wH >= parseInt(this.s.height, 10)) {\n                lGallery.style.top = top + 'px';\n            } else {\n                lGallery.style.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 support() {\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[index].getAttribute('data-html');\n        }\n\n        if (!src && html) {\n            return {\n                html5: true\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.outer.querySelector(this.s.appendCounterTo).insertAdjacentHTML('beforeend', '<div id=\"lg-counter\" role=\"status\" aria-live=\"polite\"><span id=\"lg-counter-current\">' + (parseInt(this.index, 10) + 1) + '</span> / <span id=\"lg-counter-all\">' + this.items.length + '</span></div>');\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 currentEle;\n        if (this.s.dynamic) {\n            subHtml = this.s.dynamicEl[index].subHtml;\n        } else {\n            currentEle = this.items[index];\n            subHtml = currentEle.getAttribute('data-sub-html');\n            if (this.s.getCaptionFromTitleOrAlt && !subHtml) {\n                subHtml = currentEle.getAttribute('title');\n                if (subHtml && currentEle.querySelector('img')) {\n                    subHtml = currentEle.querySelector('img').getAttribute('alt');\n                }\n            }\n        }\n\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.querySelector(subHtml).innerHTML;\n                } else {\n                    subHtml = document.querySelector(subHtml).innerHTML;\n                }\n            }\n        } else {\n            subHtml = '';\n        }\n\n        if (this.s.appendSubHtmlTo === '.lg-sub-html') {\n            this.outer.querySelector(this.s.appendSubHtmlTo).innerHTML = subHtml;\n        } else {\n            this.___slide[index].insertAdjacentHTML('beforeend', subHtml);\n        }\n\n        // Add lg-empty-html class if title doesn't exist\n        if (typeof subHtml !== 'undefined' && subHtml !== null) {\n            if (subHtml === '') {\n                _lgUtils2.default.addClass(this.outer.querySelector(this.s.appendSubHtmlTo), 'lg-empty-html');\n            } else {\n                _lgUtils2.default.removeClass(this.outer.querySelector(this.s.appendSubHtmlTo), 'lg-empty-html');\n            }\n        }\n\n        _lgUtils2.default.trigger(this.el, 'onAfterAppendSubHtml', {\n            index: index\n        });\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 _alt;\n        var getResponsiveSrc = function getResponsiveSrc(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.innerWidth;\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            _alt = _this.s.dynamicEl[index].alt;\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        } else {\n\n            if (_this.items[index].getAttribute('data-poster')) {\n                _hasPoster = true;\n                _poster = _this.items[index].getAttribute('data-poster');\n            }\n\n            _html = _this.items[index].getAttribute('data-html');\n            _src = _this.items[index].getAttribute('href') || _this.items[index].getAttribute('data-src');\n            _alt = _this.items[index].getAttribute('title');\n\n            if (_this.items[index].querySelector('img')) {\n                _alt = _alt || _this.items[index].querySelector('img').getAttribute('alt');\n            }\n\n            if (_this.items[index].getAttribute('data-responsive')) {\n                var srcItms = _this.items[index].getAttribute('data-responsive').split(',');\n                getResponsiveSrc(srcItms);\n            }\n\n            _srcset = _this.items[index].getAttribute('data-srcset');\n            _sizes = _this.items[index].getAttribute('data-sizes');\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[index].getAttribute('data-iframe') === 'true') {\n                iframe = true;\n            }\n        }\n\n        var _isVideo = _this.isVideo(_src, index);\n        if (!_lgUtils2.default.hasClass(_this.___slide[index], 'lg-loaded')) {\n            if (iframe) {\n                _this.___slide[index].insertAdjacentHTML('afterbegin', '<div class=\"lg-video-cont\" style=\"max-width:' + _this.s.iframeMaxWidth + '\"><div class=\"lg-video\"><iframe class=\"lg-object\" frameborder=\"0\" src=\"' + _src + '\"  allowfullscreen=\"true\"></iframe></div></div>');\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[index].insertAdjacentHTML('beforeend', '<div class=\"lg-video-cont ' + videoClass + ' \"><div class=\"lg-video\"><span class=\"lg-video-play\"></span><img class=\"lg-object lg-has-poster\" src=\"' + _poster + '\" /></div></div>');\n            } else if (_isVideo) {\n                _this.___slide[index].insertAdjacentHTML('beforeend', '<div class=\"lg-video-cont \"><div class=\"lg-video\"></div></div>');\n                _lgUtils2.default.trigger(_this.el, 'hasVideo', {\n                    index: index,\n                    src: _src,\n                    html: _html\n                });\n            } else {\n                _alt = _alt ? 'alt=\"' + _alt + '\"' : '';\n                _this.___slide[index].insertAdjacentHTML('beforeend', '<div class=\"lg-img-wrap\"><img class=\"lg-object lg-image\" ' + _alt + ' src=\"' + _src + '\" /></div>');\n            }\n\n            _lgUtils2.default.trigger(_this.el, 'onAferAppendSlide', {\n                index: index\n            });\n\n            _img = _this.___slide[index].querySelector('.lg-object');\n            if (_sizes) {\n                _img.setAttribute('sizes', _sizes);\n            }\n\n            if (_srcset) {\n                _img.setAttribute('srcset', _srcset);\n\n                if (this.s.supportLegacyBrowser) {\n                    try {\n                        picturefill({\n                            elements: [_img[0]]\n                        });\n                    } catch (e) {\n                        console.warn('If you want srcset to be supported for older browsers, ' + 'please include picturefil javascript library in your document.');\n                    }\n                }\n            }\n\n            if (this.s.appendSubHtmlTo !== '.lg-sub-html') {\n                _this.addHtml(index);\n            }\n\n            _lgUtils2.default.addClass(_this.___slide[index], 'lg-loaded');\n        }\n\n        _lgUtils2.default.on(_this.___slide[index].querySelector('.lg-object'), '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 && !_lgUtils2.default.hasClass(document.body, 'lg-from-hash')) {\n                _speed = delay;\n            }\n\n            setTimeout(function () {\n                _lgUtils2.default.addClass(_this.___slide[index], 'lg-complete');\n\n                _lgUtils2.default.trigger(_this.el, 'onSlideItemLoad', {\n                    index: index,\n                    delay: delay || 0\n                });\n            }, _speed);\n        });\n\n        // @todo check load state for html5 videos\n        if (_isVideo && _isVideo.html5 && !_hasPoster) {\n            _lgUtils2.default.addClass(_this.___slide[index], 'lg-complete');\n        }\n\n        if (rec === true) {\n            if (!_lgUtils2.default.hasClass(_this.___slide[index], 'lg-complete')) {\n                _lgUtils2.default.on(_this.___slide[index].querySelector('.lg-object'), '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    */\n    Plugin.prototype.slide = function (index, fromTouch, fromThumb) {\n\n        var _prevIndex = 0;\n        for (var i = 0; i < this.___slide.length; i++) {\n            if (_lgUtils2.default.hasClass(this.___slide[i], 'lg-current')) {\n                _prevIndex = i;\n                break;\n            }\n        }\n\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        var _next = false;\n        var _prev = false;\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[index].getAttribute('data-download-url') !== 'false' && (_this.items[index].getAttribute('data-download-url') || _this.items[index].getAttribute('href') || _this.items[index].getAttribute('data-src'));\n                }\n\n                if (_src) {\n                    document.getElementById('lg-download').setAttribute('href', _src);\n                    _lgUtils2.default.removeClass(_this.outer, 'lg-hide-download');\n                } else {\n                    _lgUtils2.default.addClass(_this.outer, 'lg-hide-download');\n                }\n            }\n\n            _lgUtils2.default.trigger(_this.el, 'onBeforeSlide', {\n                prevIndex: _prevIndex,\n                index: index,\n                fromTouch: fromTouch,\n                fromThumb: fromThumb\n            });\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 (!fromTouch) {\n\n                // remove all transitions\n                _lgUtils2.default.addClass(_this.outer, 'lg-no-trans');\n\n                for (var j = 0; j < this.___slide.length; j++) {\n                    _lgUtils2.default.removeClass(this.___slide[j], 'lg-prev-slide');\n                    _lgUtils2.default.removeClass(this.___slide[j], 'lg-next-slide');\n                }\n\n                if (index < _prevIndex) {\n                    _prev = true;\n                    if (index === 0 && _prevIndex === _length - 1 && !fromThumb) {\n                        _prev = false;\n                        _next = true;\n                    }\n                } else if (index > _prevIndex) {\n                    _next = true;\n                    if (index === _length - 1 && _prevIndex === 0 && !fromThumb) {\n                        _prev = true;\n                        _next = false;\n                    }\n                }\n\n                if (_prev) {\n\n                    //prevslide\n                    _lgUtils2.default.addClass(this.___slide[index], 'lg-prev-slide');\n                    _lgUtils2.default.addClass(this.___slide[_prevIndex], 'lg-next-slide');\n                } else if (_next) {\n\n                    // next slide\n                    _lgUtils2.default.addClass(this.___slide[index], 'lg-next-slide');\n                    _lgUtils2.default.addClass(this.___slide[_prevIndex], 'lg-prev-slide');\n                }\n\n                // give 50 ms for browser to add/remove class\n                setTimeout(function () {\n                    _lgUtils2.default.removeClass(_this.outer.querySelector('.lg-current'), 'lg-current');\n\n                    //_this.$slide.eq(_prevIndex).removeClass('lg-current');\n                    _lgUtils2.default.addClass(_this.___slide[index], 'lg-current');\n\n                    // reset all transitions\n                    _lgUtils2.default.removeClass(_this.outer, 'lg-no-trans');\n                }, 50);\n            } else {\n\n                var touchPrev = index - 1;\n                var 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                _lgUtils2.default.removeClass(_this.outer.querySelector('.lg-prev-slide'), 'lg-prev-slide');\n                _lgUtils2.default.removeClass(_this.outer.querySelector('.lg-current'), 'lg-current');\n                _lgUtils2.default.removeClass(_this.outer.querySelector('.lg-next-slide'), 'lg-next-slide');\n                _lgUtils2.default.addClass(_this.___slide[touchPrev], 'lg-prev-slide');\n                _lgUtils2.default.addClass(_this.___slide[touchNext], 'lg-next-slide');\n                _lgUtils2.default.addClass(_this.___slide[index], '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                    _lgUtils2.default.trigger(_this.el, 'onAfterSlide', {\n                        prevIndex: _prevIndex,\n                        index: index,\n                        fromTouch: fromTouch,\n                        fromThumb: fromThumb\n                    });\n                }, this.s.speed);\n            } else {\n                _this.loadContent(index, true, _this.s.backdropDuration);\n\n                _this.lgBusy = false;\n                _lgUtils2.default.trigger(_this.el, 'onAfterSlide', {\n                    prevIndex: _prevIndex,\n                    index: index,\n                    fromTouch: fromTouch,\n                    fromThumb: fromThumb\n                });\n            }\n\n            _this.lGalleryOn = true;\n\n            if (this.s.counter) {\n                if (document.getElementById('lg-counter-current')) {\n                    document.getElementById('lg-counter-current').innerHTML = index + 1;\n                }\n            }\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        if (!_this.lgBusy) {\n            if (_this.index + 1 < _this.___slide.length) {\n                _this.index++;\n                _lgUtils2.default.trigger(_this.el, 'onBeforeNextSlide', {\n                    index: _this.index\n                });\n                _this.slide(_this.index, fromTouch, false);\n            } else {\n                if (_this.s.loop) {\n                    _this.index = 0;\n                    _lgUtils2.default.trigger(_this.el, 'onBeforeNextSlide', {\n                        index: _this.index\n                    });\n                    _this.slide(_this.index, fromTouch, false);\n                } else if (_this.s.slideEndAnimatoin) {\n                    _lgUtils2.default.addClass(_this.outer, 'lg-right-end');\n                    setTimeout(function () {\n                        _lgUtils2.default.removeClass(_this.outer, '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        if (!_this.lgBusy) {\n            if (_this.index > 0) {\n                _this.index--;\n                _lgUtils2.default.trigger(_this.el, 'onBeforePrevSlide', {\n                    index: _this.index,\n                    fromTouch: fromTouch\n                });\n                _this.slide(_this.index, fromTouch, false);\n            } else {\n                if (_this.s.loop) {\n                    _this.index = _this.items.length - 1;\n                    _lgUtils2.default.trigger(_this.el, 'onBeforePrevSlide', {\n                        index: _this.index,\n                        fromTouch: fromTouch\n                    });\n                    _this.slide(_this.index, fromTouch, false);\n                } else if (_this.s.slideEndAnimatoin) {\n                    _lgUtils2.default.addClass(_this.outer, 'lg-left-end');\n                    setTimeout(function () {\n                        _lgUtils2.default.removeClass(_this.outer, '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            _lgUtils2.default.on(window, '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        _lgUtils2.default.on(window, 'keydown.lg', function (e) {\n            if (_this.s.escKey === true && e.keyCode === 27) {\n                e.preventDefault();\n                if (!_lgUtils2.default.hasClass(_this.outer, 'lg-thumb-open')) {\n                    _this.destroy();\n                } else {\n                    _lgUtils2.default.removeClass(_this.outer, 'lg-thumb-open');\n                }\n            }\n        });\n    };\n\n    Plugin.prototype.arrow = function () {\n        var _this = this;\n        _lgUtils2.default.on(this.outer.querySelector('.lg-prev'), 'click.lg', function () {\n            _this.goToPrevSlide();\n        });\n\n        _lgUtils2.default.on(this.outer.querySelector('.lg-next'), '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            var next = this.outer.querySelector('.lg-next');\n            var prev = this.outer.querySelector('.lg-prev');\n            if (index + 1 < this.___slide.length) {\n                next.removeAttribute('disabled');\n                _lgUtils2.default.removeClass(next, 'disabled');\n            } else {\n                next.setAttribute('disabled', 'disabled');\n                _lgUtils2.default.addClass(next, 'disabled');\n            }\n\n            if (index > 0) {\n                prev.removeAttribute('disabled');\n                _lgUtils2.default.removeClass(prev, 'disabled');\n            } else {\n                prev.setAttribute('disabled', 'disabled');\n                _lgUtils2.default.addClass(prev, '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.style.left = xValue;\n        } else {\n            _lgUtils2.default.setVendor(el, 'Transform', 'translate3d(' + xValue + 'px, ' + yValue + 'px, 0px)');\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            _lgUtils2.default.addClass(this.outer, 'lg-dragging');\n\n            // move current slide\n            this.setTranslate(this.___slide[this.index], distance, 0);\n\n            // move next and prev slide with current slide\n            this.setTranslate(document.querySelector('.lg-prev-slide'), -this.___slide[this.index].clientWidth + distance, 0);\n            this.setTranslate(document.querySelector('.lg-next-slide'), this.___slide[this.index].clientWidth + 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            _lgUtils2.default.addClass(_this.outer, 'lg-slide');\n        }\n\n        for (var i = 0; i < this.___slide.length; i++) {\n            if (!_lgUtils2.default.hasClass(this.___slide[i], 'lg-current') && !_lgUtils2.default.hasClass(this.___slide[i], 'lg-prev-slide') && !_lgUtils2.default.hasClass(this.___slide[i], 'lg-next-slide')) {\n                this.___slide[i].style.opacity = '0';\n            }\n        }\n\n        // set transition duration\n        setTimeout(function () {\n            _lgUtils2.default.removeClass(_this.outer, '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                _lgUtils2.default.trigger(_this.el, 'onSlideClick');\n            }\n\n            for (var i = 0; i < _this.___slide.length; i++) {\n                _this.___slide[i].removeAttribute('style');\n            }\n        });\n\n        // remove slide class once drag/swipe is completed if mode is not slide\n        setTimeout(function () {\n            if (!_lgUtils2.default.hasClass(_this.outer, 'lg-dragging') && _this.s.mode !== 'lg-slide') {\n                _lgUtils2.default.removeClass(_this.outer, 'lg-slide');\n            }\n        }, _this.s.speed + 100);\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.isTouch && _this.doCss()) {\n\n            for (var i = 0; i < _this.___slide.length; i++) {\n                /*jshint loopfunc: true */\n                _lgUtils2.default.on(_this.___slide[i], 'touchstart.lg', function (e) {\n                    if (!_lgUtils2.default.hasClass(_this.outer, 'lg-zoomed') && !_this.lgBusy) {\n                        e.preventDefault();\n                        _this.manageSwipeClass();\n                        startCoords = e.targetTouches[0].pageX;\n                    }\n                });\n            }\n\n            for (var j = 0; j < _this.___slide.length; j++) {\n                /*jshint loopfunc: true */\n                _lgUtils2.default.on(_this.___slide[j], 'touchmove.lg', function (e) {\n                    if (!_lgUtils2.default.hasClass(_this.outer, 'lg-zoomed')) {\n                        e.preventDefault();\n                        endCoords = e.targetTouches[0].pageX;\n                        _this.touchMove(startCoords, endCoords);\n                        isMoved = true;\n                    }\n                });\n            }\n\n            for (var k = 0; k < _this.___slide.length; k++) {\n                /*jshint loopfunc: true */\n                _lgUtils2.default.on(_this.___slide[k], 'touchend.lg', function () {\n                    if (!_lgUtils2.default.hasClass(_this.outer, 'lg-zoomed')) {\n                        if (isMoved) {\n                            isMoved = false;\n                            _this.touchEnd(endCoords - startCoords);\n                        } else {\n                            _lgUtils2.default.trigger(_this.el, 'onSlideClick');\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.isTouch && _this.doCss()) {\n            for (var i = 0; i < _this.___slide.length; i++) {\n                /*jshint loopfunc: true */\n                _lgUtils2.default.on(_this.___slide[i], 'mousedown.lg', function (e) {\n                    // execute only on .lg-object\n                    if (!_lgUtils2.default.hasClass(_this.outer, 'lg-zoomed')) {\n                        if (_lgUtils2.default.hasClass(e.target, 'lg-object') || _lgUtils2.default.hasClass(e.target, 'lg-video-play')) {\n                            e.preventDefault();\n\n                            if (!_this.lgBusy) {\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                                _lgUtils2.default.removeClass(_this.outer, 'lg-grab');\n                                _lgUtils2.default.addClass(_this.outer, 'lg-grabbing');\n\n                                _lgUtils2.default.trigger(_this.el, 'onDragstart');\n                            }\n                        }\n                    }\n                });\n            }\n\n            _lgUtils2.default.on(window, 'mousemove.lg', function (e) {\n                if (isDraging) {\n                    isMoved = true;\n                    endCoords = e.pageX;\n                    _this.touchMove(startCoords, endCoords);\n                    _lgUtils2.default.trigger(_this.el, 'onDragmove');\n                }\n            });\n\n            _lgUtils2.default.on(window, 'mouseup.lg', function (e) {\n                if (isMoved) {\n                    isMoved = false;\n                    _this.touchEnd(endCoords - startCoords);\n                    _lgUtils2.default.trigger(_this.el, 'onDragend');\n                } else if (_lgUtils2.default.hasClass(e.target, 'lg-object') || _lgUtils2.default.hasClass(e.target, 'lg-video-play')) {\n                    _lgUtils2.default.trigger(_this.el, 'onSlideClick');\n                }\n\n                // Prevent execution on click\n                if (isDraging) {\n                    isDraging = false;\n                    _lgUtils2.default.removeClass(_this.outer, 'lg-grabbing');\n                    _lgUtils2.default.addClass(_this.outer, 'lg-grab');\n                }\n            });\n        }\n    };\n\n    Plugin.prototype.manageSwipeClass = function () {\n        var touchNext = this.index + 1;\n        var touchPrev = this.index - 1;\n        var length = this.___slide.length;\n        if (this.s.loop) {\n            if (this.index === 0) {\n                touchPrev = length - 1;\n            } else if (this.index === length - 1) {\n                touchNext = 0;\n            }\n        }\n\n        for (var i = 0; i < this.___slide.length; i++) {\n            _lgUtils2.default.removeClass(this.___slide[i], 'lg-next-slide');\n            _lgUtils2.default.removeClass(this.___slide[i], 'lg-prev-slide');\n        }\n\n        if (touchPrev > -1) {\n            _lgUtils2.default.addClass(this.___slide[touchPrev], 'lg-prev-slide');\n        }\n\n        _lgUtils2.default.addClass(this.___slide[touchNext], 'lg-next-slide');\n    };\n\n    Plugin.prototype.mousewheel = function () {\n        var _this = this;\n        _lgUtils2.default.on(_this.outer, '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    Plugin.prototype.closeGallery = function () {\n\n        var _this = this;\n        var mousedown = false;\n        _lgUtils2.default.on(this.outer.querySelector('.lg-close'), '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            _lgUtils2.default.on(_this.outer, 'mousedown.lg', function (e) {\n\n                if (_lgUtils2.default.hasClass(e.target, 'lg-outer') || _lgUtils2.default.hasClass(e.target, 'lg-item') || _lgUtils2.default.hasClass(e.target, 'lg-img-wrap')) {\n                    mousedown = true;\n                } else {\n                    mousedown = false;\n                }\n            });\n\n            _lgUtils2.default.on(_this.outer, 'mouseup.lg', function (e) {\n\n                if (_lgUtils2.default.hasClass(e.target, 'lg-outer') || _lgUtils2.default.hasClass(e.target, 'lg-item') || _lgUtils2.default.hasClass(e.target, 'lg-img-wrap') && mousedown) {\n                    if (!_lgUtils2.default.hasClass(_this.outer, 'lg-dragging')) {\n                        _this.destroy();\n                    }\n                }\n            });\n        }\n    };\n\n    Plugin.prototype.destroy = function (d) {\n\n        var _this = this;\n\n        if (!d) {\n            _lgUtils2.default.trigger(_this.el, 'onBeforeClose');\n        }\n\n        document.body.scrollTop = _this.prevScrollTop;\n        document.documentElement.scrollTop = _this.prevScrollTop;\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\n                for (var i = 0; i < this.items.length; i++) {\n                    _lgUtils2.default.off(this.items[i], '.lg');\n                    _lgUtils2.default.off(this.items[i], '.lgcustom');\n                }\n            }\n\n            var lguid = _this.el.getAttribute('lg-uid');\n            delete window.lgData[lguid];\n            _this.el.removeAttribute('lg-uid');\n        }\n\n        // Unbind all events added by lightGallery\n        _lgUtils2.default.off(this.el, '.lgtm');\n\n        // Distroy all lightGallery modules\n        for (var key in window.lgModules) {\n            if (_this.modules[key]) {\n                _this.modules[key].destroy(d);\n            }\n        }\n\n        this.lGalleryOn = false;\n\n        clearTimeout(_this.hideBartimeout);\n        this.hideBartimeout = false;\n        _lgUtils2.default.off(window, '.lg');\n        _lgUtils2.default.removeClass(document.body, 'lg-on');\n        _lgUtils2.default.removeClass(document.body, 'lg-from-hash');\n\n        if (_this.outer) {\n            _lgUtils2.default.removeClass(_this.outer, 'lg-visible');\n        }\n\n        _lgUtils2.default.removeClass(document.querySelector('.lg-backdrop'), 'in');\n        setTimeout(function () {\n            try {\n                if (_this.outer) {\n                    _this.outer.parentNode.removeChild(_this.outer);\n                }\n\n                if (document.querySelector('.lg-backdrop')) {\n                    document.querySelector('.lg-backdrop').parentNode.removeChild(document.querySelector('.lg-backdrop'));\n                }\n\n                if (!d) {\n                    _lgUtils2.default.trigger(_this.el, 'onCloseAfter');\n                }\n                _this.el.focus();\n            } catch (err) {}\n        }, _this.s.backdropDuration + 50);\n    };\n\n    window.lightGallery = function (el, options) {\n        if (!el) {\n            return;\n        }\n\n        try {\n            if (!el.getAttribute('lg-uid')) {\n                var uid = 'lg' + window.lgData.uid++;\n                window.lgData[uid] = new Plugin(el, options);\n                el.setAttribute('lg-uid', uid);\n            } else {\n                window.lgData[el.getAttribute('lg-uid')].init();\n            }\n        } catch (err) {\n            console.error('lightGallery has not initiated properly', err);\n        }\n    };\n});"],"names":["this","exports","Object","defineProperty","value","utils","getAttribute","el","label","setAttribute","wrap","className","wrapper","document","createElement","parentNode","insertBefore","removeChild","appendChild","addClass","classList","add","removeClass","remove","replace","RegExp","split","join","hasClass","contains","test","setVendor","property","style","charAt","toLowerCase","slice","trigger","event","detail","arguments","length","undefined","customEvent","CustomEvent","dispatchEvent","Listener","uid","on","events","fn","_this","forEach","_id","addEventListener","off","i","_event","substring","key","hasOwnProperty","indexOf","removeEventListener","param","obj","keys","map","k","encodeURIComponent","default","_lgUtils","_lgUtils2","_interopRequireDefault","__esModule","_extends","assign","target","source","prototype","call","window","params","bubbles","cancelable","evt","createEvent","initCustomEvent","Event","lgData","lgModules","defaults","mode","cssEasing","easing","speed","height","width","startClass","backdropDuration","hideBarsDelay","useLeft","ariaLabelledby","ariaDescribedby","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","supportLegacyBrowser","Plugin","element","options","s","constructor","Array","modules","lGalleryOn","lgBusy","hideBartimeout","isTouch","documentElement","items","push","querySelector","querySelectorAll","children","___slide","outer","init","_hash","location","hash","parseInt","body","setTimeout","build","e","preventDefault","structure","slide","arrow","closeGallery","initialHideBarTimeout","clearTimeout","template","list","subHtmlCont","insertAdjacentHTML","focus","setTop","doCss","inner","prevScrollTop","scrollTop","wH","innerHeight","top","lGallery","support","transition","root","isVideo","src","html","html5","youtube","match","vimeo","dailymotion","vk","addHtml","currentEle","subHtml","fL","innerHTML","j","loadContent","rec","delay","_img","_src","_poster","_srcset","_sizes","_html","_alt","_hasPoster","getResponsiveSrc","srcItms","rsWidth","rsSrc","__src","splice","wWidth","innerWidth","poster","alt","responsive","srcDyItms","srcset","sizes","iframe","_isVideo","videoClass","picturefill","elements","console","warn","_speed","fromTouch","fromThumb","_prevIndex","_length","_time","_next","_prev","downloadUrl","getElementById","prevIndex","arrowDisable","touchPrev","touchNext","goToNextSlide","goToPrevSlide","keyCode","destroy","next","prev","removeAttribute","setTranslate","xValue","yValue","left","touchMove","startCoords","endCoords","distance","Math","abs","clientWidth","touchEnd","opacity","isMoved","manageSwipeClass","targetTouches","pageX","isDraging","scrollLeft","deltaY","mousedown","d","lguid","err","lightGallery","error"],"sourceRoot":""}