{"version":3,"file":"components-photo-gallery-lightbox-js-CsmJYYI8.js","sources":["../../../node_modules/lightgallery/lightgallery.es5.js","../../../node_modules/lightgallery/plugins/thumbnail/lg-thumbnail.es5.js","../../../node_modules/lightgallery/plugins/video/lg-video.es5.js","../src/entries/components/photo-gallery-lightbox.js"],"sourcesContent":["/*!\n * lightgallery | 2.8.2 | November 28th 2024\n * http://www.lightgalleryjs.com/\n * Copyright (c) 2020 Sachin Neravath;\n * @license GPLv3\n */\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\n\r\nfunction __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\n\n/**\r\n * List of lightGallery events\r\n * All events should be documented here\r\n * Below interfaces are used to build the website documentations\r\n * */\r\nvar lGEvents = {\r\n afterAppendSlide: 'lgAfterAppendSlide',\r\n init: 'lgInit',\r\n hasVideo: 'lgHasVideo',\r\n containerResize: 'lgContainerResize',\r\n updateSlides: 'lgUpdateSlides',\r\n afterAppendSubHtml: 'lgAfterAppendSubHtml',\r\n beforeOpen: 'lgBeforeOpen',\r\n afterOpen: 'lgAfterOpen',\r\n slideItemLoad: 'lgSlideItemLoad',\r\n beforeSlide: 'lgBeforeSlide',\r\n afterSlide: 'lgAfterSlide',\r\n posterClick: 'lgPosterClick',\r\n dragStart: 'lgDragStart',\r\n dragMove: 'lgDragMove',\r\n dragEnd: 'lgDragEnd',\r\n beforeNextSlide: 'lgBeforeNextSlide',\r\n beforePrevSlide: 'lgBeforePrevSlide',\r\n beforeClose: 'lgBeforeClose',\r\n afterClose: 'lgAfterClose',\r\n rotateLeft: 'lgRotateLeft',\r\n rotateRight: 'lgRotateRight',\r\n flipHorizontal: 'lgFlipHorizontal',\r\n flipVertical: 'lgFlipVertical',\r\n autoplay: 'lgAutoplay',\r\n autoplayStart: 'lgAutoplayStart',\r\n autoplayStop: 'lgAutoplayStop',\r\n};\n\nvar lightGalleryCoreSettings = {\r\n mode: 'lg-slide',\r\n easing: 'ease',\r\n speed: 400,\r\n licenseKey: '0000-0000-000-0000',\r\n height: '100%',\r\n width: '100%',\r\n addClass: '',\r\n startClass: 'lg-start-zoom',\r\n backdropDuration: 300,\r\n container: '',\r\n startAnimationDuration: 400,\r\n zoomFromOrigin: true,\r\n hideBarsDelay: 0,\r\n showBarsAfter: 10000,\r\n slideDelay: 0,\r\n supportLegacyBrowser: true,\r\n allowMediaOverlap: false,\r\n videoMaxSize: '1280-720',\r\n loadYouTubePoster: true,\r\n defaultCaptionHeight: 0,\r\n ariaLabelledby: '',\r\n ariaDescribedby: '',\r\n resetScrollPosition: true,\r\n hideScrollbar: false,\r\n closable: true,\r\n swipeToClose: true,\r\n closeOnTap: true,\r\n showCloseIcon: true,\r\n showMaximizeIcon: false,\r\n loop: true,\r\n escKey: true,\r\n keyPress: true,\r\n trapFocus: true,\r\n controls: true,\r\n slideEndAnimation: true,\r\n hideControlOnEnd: false,\r\n mousewheel: false,\r\n getCaptionFromTitleOrAlt: true,\r\n appendSubHtmlTo: '.lg-sub-html',\r\n subHtmlSelectorRelative: false,\r\n preload: 2,\r\n numberOfSlideItemsInDom: 10,\r\n selector: '',\r\n selectWithin: '',\r\n nextHtml: '',\r\n prevHtml: '',\r\n index: 0,\r\n iframeWidth: '100%',\r\n iframeHeight: '100%',\r\n iframeMaxWidth: '100%',\r\n iframeMaxHeight: '100%',\r\n download: true,\r\n counter: true,\r\n appendCounterTo: '.lg-toolbar',\r\n swipeThreshold: 50,\r\n enableSwipe: true,\r\n enableDrag: true,\r\n dynamic: false,\r\n dynamicEl: [],\r\n extraProps: [],\r\n exThumbImage: '',\r\n isMobile: undefined,\r\n mobileSettings: {\r\n controls: false,\r\n showCloseIcon: false,\r\n download: false,\r\n },\r\n plugins: [],\r\n strings: {\r\n closeGallery: 'Close gallery',\r\n toggleMaximize: 'Toggle maximize',\r\n previousSlide: 'Previous slide',\r\n nextSlide: 'Next slide',\r\n download: 'Download',\r\n playVideo: 'Play video',\r\n mediaLoadingFailed: 'Oops... Failed to load content...',\r\n },\r\n};\n\nfunction initLgPolyfills() {\r\n (function () {\r\n if (typeof window.CustomEvent === 'function')\r\n return false;\r\n function CustomEvent(event, params) {\r\n params = params || {\r\n bubbles: false,\r\n cancelable: false,\r\n detail: null,\r\n };\r\n var evt = document.createEvent('CustomEvent');\r\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\r\n return evt;\r\n }\r\n window.CustomEvent = CustomEvent;\r\n })();\r\n (function () {\r\n if (!Element.prototype.matches) {\r\n Element.prototype.matches =\r\n Element.prototype.msMatchesSelector ||\r\n Element.prototype.webkitMatchesSelector;\r\n }\r\n })();\r\n}\r\nvar lgQuery = /** @class */ (function () {\r\n function lgQuery(selector) {\r\n this.cssVenderPrefixes = [\r\n 'TransitionDuration',\r\n 'TransitionTimingFunction',\r\n 'Transform',\r\n 'Transition',\r\n ];\r\n this.selector = this._getSelector(selector);\r\n this.firstElement = this._getFirstEl();\r\n return this;\r\n }\r\n lgQuery.generateUUID = function () {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\r\n var r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8;\r\n return v.toString(16);\r\n });\r\n };\r\n lgQuery.prototype._getSelector = function (selector, context) {\r\n if (context === void 0) { context = document; }\r\n if (typeof selector !== 'string') {\r\n return selector;\r\n }\r\n context = context || document;\r\n var fl = selector.substring(0, 1);\r\n if (fl === '#') {\r\n return context.querySelector(selector);\r\n }\r\n else {\r\n return context.querySelectorAll(selector);\r\n }\r\n };\r\n lgQuery.prototype._each = function (func) {\r\n if (!this.selector) {\r\n return this;\r\n }\r\n if (this.selector.length !== undefined) {\r\n [].forEach.call(this.selector, func);\r\n }\r\n else {\r\n func(this.selector, 0);\r\n }\r\n return this;\r\n };\r\n lgQuery.prototype._setCssVendorPrefix = function (el, cssProperty, value) {\r\n // prettier-ignore\r\n var property = cssProperty.replace(/-([a-z])/gi, function (s, group1) {\r\n return group1.toUpperCase();\r\n });\r\n if (this.cssVenderPrefixes.indexOf(property) !== -1) {\r\n el.style[property.charAt(0).toLowerCase() + property.slice(1)] = value;\r\n el.style['webkit' + property] = value;\r\n el.style['moz' + property] = value;\r\n el.style['ms' + property] = value;\r\n el.style['o' + property] = value;\r\n }\r\n else {\r\n el.style[property] = value;\r\n }\r\n };\r\n lgQuery.prototype._getFirstEl = function () {\r\n if (this.selector && this.selector.length !== undefined) {\r\n return this.selector[0];\r\n }\r\n else {\r\n return this.selector;\r\n }\r\n };\r\n lgQuery.prototype.isEventMatched = function (event, eventName) {\r\n var eventNamespace = eventName.split('.');\r\n return event\r\n .split('.')\r\n .filter(function (e) { return e; })\r\n .every(function (e) {\r\n return eventNamespace.indexOf(e) !== -1;\r\n });\r\n };\r\n lgQuery.prototype.attr = function (attr, value) {\r\n if (value === undefined) {\r\n if (!this.firstElement) {\r\n return '';\r\n }\r\n return this.firstElement.getAttribute(attr);\r\n }\r\n this._each(function (el) {\r\n el.setAttribute(attr, value);\r\n });\r\n return this;\r\n };\r\n lgQuery.prototype.find = function (selector) {\r\n return $LG(this._getSelector(selector, this.selector));\r\n };\r\n lgQuery.prototype.first = function () {\r\n if (this.selector && this.selector.length !== undefined) {\r\n return $LG(this.selector[0]);\r\n }\r\n else {\r\n return $LG(this.selector);\r\n }\r\n };\r\n lgQuery.prototype.eq = function (index) {\r\n return $LG(this.selector[index]);\r\n };\r\n lgQuery.prototype.parent = function () {\r\n return $LG(this.selector.parentElement);\r\n };\r\n lgQuery.prototype.get = function () {\r\n return this._getFirstEl();\r\n };\r\n lgQuery.prototype.removeAttr = function (attributes) {\r\n var attrs = attributes.split(' ');\r\n this._each(function (el) {\r\n attrs.forEach(function (attr) { return el.removeAttribute(attr); });\r\n });\r\n return this;\r\n };\r\n lgQuery.prototype.wrap = function (className) {\r\n if (!this.firstElement) {\r\n return this;\r\n }\r\n var wrapper = document.createElement('div');\r\n wrapper.className = className;\r\n this.firstElement.parentNode.insertBefore(wrapper, this.firstElement);\r\n this.firstElement.parentNode.removeChild(this.firstElement);\r\n wrapper.appendChild(this.firstElement);\r\n return this;\r\n };\r\n lgQuery.prototype.addClass = function (classNames) {\r\n if (classNames === void 0) { classNames = ''; }\r\n this._each(function (el) {\r\n // IE doesn't support multiple arguments\r\n classNames.split(' ').forEach(function (className) {\r\n if (className) {\r\n el.classList.add(className);\r\n }\r\n });\r\n });\r\n return this;\r\n };\r\n lgQuery.prototype.removeClass = function (classNames) {\r\n this._each(function (el) {\r\n // IE doesn't support multiple arguments\r\n classNames.split(' ').forEach(function (className) {\r\n if (className) {\r\n el.classList.remove(className);\r\n }\r\n });\r\n });\r\n return this;\r\n };\r\n lgQuery.prototype.hasClass = function (className) {\r\n if (!this.firstElement) {\r\n return false;\r\n }\r\n return this.firstElement.classList.contains(className);\r\n };\r\n lgQuery.prototype.hasAttribute = function (attribute) {\r\n if (!this.firstElement) {\r\n return false;\r\n }\r\n return this.firstElement.hasAttribute(attribute);\r\n };\r\n lgQuery.prototype.toggleClass = function (className) {\r\n if (!this.firstElement) {\r\n return this;\r\n }\r\n if (this.hasClass(className)) {\r\n this.removeClass(className);\r\n }\r\n else {\r\n this.addClass(className);\r\n }\r\n return this;\r\n };\r\n lgQuery.prototype.css = function (property, value) {\r\n var _this = this;\r\n this._each(function (el) {\r\n _this._setCssVendorPrefix(el, property, value);\r\n });\r\n return this;\r\n };\r\n // Need to pass separate namespaces for separate elements\r\n lgQuery.prototype.on = function (events, listener) {\r\n var _this = this;\r\n if (!this.selector) {\r\n return this;\r\n }\r\n events.split(' ').forEach(function (event) {\r\n if (!Array.isArray(lgQuery.eventListeners[event])) {\r\n lgQuery.eventListeners[event] = [];\r\n }\r\n lgQuery.eventListeners[event].push(listener);\r\n _this.selector.addEventListener(event.split('.')[0], listener);\r\n });\r\n return this;\r\n };\r\n // @todo - test this\r\n lgQuery.prototype.once = function (event, listener) {\r\n var _this = this;\r\n this.on(event, function () {\r\n _this.off(event);\r\n listener(event);\r\n });\r\n return this;\r\n };\r\n lgQuery.prototype.off = function (event) {\r\n var _this = this;\r\n if (!this.selector) {\r\n return this;\r\n }\r\n Object.keys(lgQuery.eventListeners).forEach(function (eventName) {\r\n if (_this.isEventMatched(event, eventName)) {\r\n lgQuery.eventListeners[eventName].forEach(function (listener) {\r\n _this.selector.removeEventListener(eventName.split('.')[0], listener);\r\n });\r\n lgQuery.eventListeners[eventName] = [];\r\n }\r\n });\r\n return this;\r\n };\r\n lgQuery.prototype.trigger = function (event, detail) {\r\n if (!this.firstElement) {\r\n return this;\r\n }\r\n var customEvent = new CustomEvent(event.split('.')[0], {\r\n detail: detail || null,\r\n });\r\n this.firstElement.dispatchEvent(customEvent);\r\n return this;\r\n };\r\n // Does not support IE\r\n lgQuery.prototype.load = function (url) {\r\n var _this = this;\r\n fetch(url)\r\n .then(function (res) { return res.text(); })\r\n .then(function (html) {\r\n _this.selector.innerHTML = html;\r\n });\r\n return this;\r\n };\r\n lgQuery.prototype.html = function (html) {\r\n if (html === undefined) {\r\n if (!this.firstElement) {\r\n return '';\r\n }\r\n return this.firstElement.innerHTML;\r\n }\r\n this._each(function (el) {\r\n el.innerHTML = html;\r\n });\r\n return this;\r\n };\r\n lgQuery.prototype.append = function (html) {\r\n this._each(function (el) {\r\n if (typeof html === 'string') {\r\n el.insertAdjacentHTML('beforeend', html);\r\n }\r\n else {\r\n el.appendChild(html);\r\n }\r\n });\r\n return this;\r\n };\r\n lgQuery.prototype.prepend = function (html) {\r\n this._each(function (el) {\r\n if (typeof html === 'string') {\r\n el.insertAdjacentHTML('afterbegin', html);\r\n }\r\n else if (html instanceof HTMLElement) {\r\n el.insertBefore(html.cloneNode(true), el.firstChild);\r\n }\r\n });\r\n return this;\r\n };\r\n lgQuery.prototype.remove = function () {\r\n this._each(function (el) {\r\n el.parentNode.removeChild(el);\r\n });\r\n return this;\r\n };\r\n lgQuery.prototype.empty = function () {\r\n this._each(function (el) {\r\n el.innerHTML = '';\r\n });\r\n return this;\r\n };\r\n lgQuery.prototype.scrollTop = function (scrollTop) {\r\n if (scrollTop !== undefined) {\r\n document.body.scrollTop = scrollTop;\r\n document.documentElement.scrollTop = scrollTop;\r\n return this;\r\n }\r\n else {\r\n return (window.pageYOffset ||\r\n document.documentElement.scrollTop ||\r\n document.body.scrollTop ||\r\n 0);\r\n }\r\n };\r\n lgQuery.prototype.scrollLeft = function (scrollLeft) {\r\n if (scrollLeft !== undefined) {\r\n document.body.scrollLeft = scrollLeft;\r\n document.documentElement.scrollLeft = scrollLeft;\r\n return this;\r\n }\r\n else {\r\n return (window.pageXOffset ||\r\n document.documentElement.scrollLeft ||\r\n document.body.scrollLeft ||\r\n 0);\r\n }\r\n };\r\n lgQuery.prototype.offset = function () {\r\n if (!this.firstElement) {\r\n return {\r\n left: 0,\r\n top: 0,\r\n };\r\n }\r\n var rect = this.firstElement.getBoundingClientRect();\r\n var bodyMarginLeft = $LG('body').style().marginLeft;\r\n // Minus body margin - https://stackoverflow.com/questions/30711548/is-getboundingclientrect-left-returning-a-wrong-value\r\n return {\r\n left: rect.left - parseFloat(bodyMarginLeft) + this.scrollLeft(),\r\n top: rect.top + this.scrollTop(),\r\n };\r\n };\r\n lgQuery.prototype.style = function () {\r\n if (!this.firstElement) {\r\n return {};\r\n }\r\n return (this.firstElement.currentStyle ||\r\n window.getComputedStyle(this.firstElement));\r\n };\r\n // Width without padding and border even if box-sizing is used.\r\n lgQuery.prototype.width = function () {\r\n var style = this.style();\r\n return (this.firstElement.clientWidth -\r\n parseFloat(style.paddingLeft) -\r\n parseFloat(style.paddingRight));\r\n };\r\n // Height without padding and border even if box-sizing is used.\r\n lgQuery.prototype.height = function () {\r\n var style = this.style();\r\n return (this.firstElement.clientHeight -\r\n parseFloat(style.paddingTop) -\r\n parseFloat(style.paddingBottom));\r\n };\r\n lgQuery.eventListeners = {};\r\n return lgQuery;\r\n}());\r\nfunction $LG(selector) {\r\n initLgPolyfills();\r\n return new lgQuery(selector);\r\n}\n\nvar defaultDynamicOptions = [\r\n 'src',\r\n 'sources',\r\n 'subHtml',\r\n 'subHtmlUrl',\r\n 'html',\r\n 'video',\r\n 'poster',\r\n 'slideName',\r\n 'responsive',\r\n 'srcset',\r\n 'sizes',\r\n 'iframe',\r\n 'downloadUrl',\r\n 'download',\r\n 'width',\r\n 'facebookShareUrl',\r\n 'tweetText',\r\n 'iframeTitle',\r\n 'twitterShareUrl',\r\n 'pinterestShareUrl',\r\n 'pinterestText',\r\n 'fbHtml',\r\n 'disqusIdentifier',\r\n 'disqusUrl',\r\n];\r\n// Convert html data-attribute to camalcase\r\nfunction convertToData(attr) {\r\n // FInd a way for lgsize\r\n if (attr === 'href') {\r\n return 'src';\r\n }\r\n attr = attr.replace('data-', '');\r\n attr = attr.charAt(0).toLowerCase() + attr.slice(1);\r\n attr = attr.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); });\r\n return attr;\r\n}\r\nvar utils = {\r\n /**\r\n * Fetches HTML content from a given URL and inserts it into a specified element.\r\n *\r\n * @param url - The URL to fetch the HTML content from.\r\n * @param element - The DOM element (jQuery object) to insert the HTML content into.\r\n * @param insertMethod - The method to insert the HTML ('append' or 'replace').\r\n */\r\n fetchCaptionFromUrl: function (url, element, insertMethod) {\r\n // Fetch content from the URL\r\n fetch(url)\r\n .then(function (response) { return response.text(); })\r\n .then(function (htmlContent) {\r\n if (insertMethod === 'append') {\r\n var contentDiv = \"
Image 1 descriptions.
',\r\n * },\r\n * ...\r\n * ],\r\n * });\r\n * $dynamicGallery.addEventListener('click', function () {\r\n * // Starts with third item.(Optional).\r\n * // This is useful if you want use dynamic mode with\r\n * // custom thumbnails (thumbnails outside gallery),\r\n * dynamicGallery.openGallery(2);\r\n * });\r\n *\r\n */\r\n LightGallery.prototype.openGallery = function (index, element) {\r\n var _this = this;\r\n if (index === void 0) { index = this.settings.index; }\r\n // prevent accidental double execution\r\n if (this.lgOpened)\r\n return;\r\n this.lgOpened = true;\r\n this.outer.removeClass('lg-hide-items');\r\n this.hideScrollbar();\r\n // Add display block, but still has opacity 0\r\n this.$container.addClass('lg-show');\r\n var itemsToBeInsertedToDom = this.getItemsToBeInsertedToDom(index, index);\r\n this.currentItemsInDom = itemsToBeInsertedToDom;\r\n var items = '';\r\n itemsToBeInsertedToDom.forEach(function (item) {\r\n items = items + (\"\");\r\n });\r\n this.$inner.append(items);\r\n this.addHtml(index);\r\n var transform = '';\r\n this.mediaContainerPosition = this.getMediaContainerPosition();\r\n var _a = this.mediaContainerPosition, top = _a.top, bottom = _a.bottom;\r\n if (!this.settings.allowMediaOverlap) {\r\n this.setMediaContainerPosition(top, bottom);\r\n }\r\n var __slideVideoInfo = this.galleryItems[index].__slideVideoInfo;\r\n if (this.zoomFromOrigin && element) {\r\n this.currentImageSize = utils.getSize(element, this.outer, top + bottom, __slideVideoInfo && this.settings.videoMaxSize);\r\n transform = utils.getTransform(element, this.outer, top, bottom, this.currentImageSize);\r\n }\r\n if (!this.zoomFromOrigin || !transform) {\r\n this.outer.addClass(this.settings.startClass);\r\n this.getSlideItem(index).removeClass('lg-complete');\r\n }\r\n var timeout = this.settings.zoomFromOrigin\r\n ? 100\r\n : this.settings.backdropDuration;\r\n setTimeout(function () {\r\n _this.outer.addClass('lg-components-open');\r\n }, timeout);\r\n this.index = index;\r\n this.LGel.trigger(lGEvents.beforeOpen);\r\n // add class lg-current to remove initial transition\r\n this.getSlideItem(index).addClass('lg-current');\r\n this.lGalleryOn = false;\r\n // Store the current scroll top value to scroll back after closing the gallery..\r\n this.prevScrollTop = $LG(window).scrollTop();\r\n setTimeout(function () {\r\n // Need to check both zoomFromOrigin and transform values as we need to set set the\r\n // default opening animation if user missed to add the lg-size attribute\r\n if (_this.zoomFromOrigin && transform) {\r\n var currentSlide_1 = _this.getSlideItem(index);\r\n currentSlide_1.css('transform', transform);\r\n setTimeout(function () {\r\n currentSlide_1\r\n .addClass('lg-start-progress lg-start-end-progress')\r\n .css('transition-duration', _this.settings.startAnimationDuration + 'ms');\r\n _this.outer.addClass('lg-zoom-from-image');\r\n });\r\n setTimeout(function () {\r\n currentSlide_1.css('transform', 'translate3d(0, 0, 0)');\r\n }, 100);\r\n }\r\n setTimeout(function () {\r\n _this.$backdrop.addClass('in');\r\n _this.$container.addClass('lg-show-in');\r\n }, 10);\r\n setTimeout(function () {\r\n if (_this.settings.trapFocus &&\r\n document.body === _this.settings.container) {\r\n _this.trapFocus();\r\n }\r\n }, _this.settings.backdropDuration + 50);\r\n // lg-visible class resets gallery opacity to 1\r\n if (!_this.zoomFromOrigin || !transform) {\r\n setTimeout(function () {\r\n _this.outer.addClass('lg-visible');\r\n }, _this.settings.backdropDuration);\r\n }\r\n // initiate slide function\r\n _this.slide(index, false, false, false);\r\n _this.LGel.trigger(lGEvents.afterOpen);\r\n });\r\n if (document.body === this.settings.container) {\r\n $LG('html').addClass('lg-on');\r\n }\r\n };\r\n /**\r\n * Note - Changing the position of the media on every slide transition creates a flickering effect.\r\n * Therefore, The height of the caption is calculated dynamically, only once based on the first slide caption.\r\n * if you have dynamic captions for each media,\r\n * you can provide an appropriate height for the captions via allowMediaOverlap option\r\n */\r\n LightGallery.prototype.getMediaContainerPosition = function () {\r\n if (this.settings.allowMediaOverlap) {\r\n return {\r\n top: 0,\r\n bottom: 0,\r\n };\r\n }\r\n var top = this.$toolbar.get().clientHeight || 0;\r\n var subHtml = this.outer.find('.lg-components .lg-sub-html').get();\r\n var captionHeight = this.settings.defaultCaptionHeight ||\r\n (subHtml && subHtml.clientHeight) ||\r\n 0;\r\n var thumbContainer = this.outer.find('.lg-thumb-outer').get();\r\n var thumbHeight = thumbContainer ? thumbContainer.clientHeight : 0;\r\n var bottom = thumbHeight + captionHeight;\r\n return {\r\n top: top,\r\n bottom: bottom,\r\n };\r\n };\r\n LightGallery.prototype.setMediaContainerPosition = function (top, bottom) {\r\n if (top === void 0) { top = 0; }\r\n if (bottom === void 0) { bottom = 0; }\r\n this.$content.css('top', top + 'px').css('bottom', bottom + 'px');\r\n };\r\n LightGallery.prototype.hideBars = function () {\r\n var _this = this;\r\n // Hide controllers if mouse doesn't move for some period\r\n setTimeout(function () {\r\n _this.outer.removeClass('lg-hide-items');\r\n if (_this.settings.hideBarsDelay > 0) {\r\n _this.outer.on('mousemove.lg click.lg touchstart.lg', function () {\r\n _this.outer.removeClass('lg-hide-items');\r\n clearTimeout(_this.hideBarTimeout);\r\n // Timeout will be cleared on each slide movement also\r\n _this.hideBarTimeout = setTimeout(function () {\r\n _this.outer.addClass('lg-hide-items');\r\n }, _this.settings.hideBarsDelay);\r\n });\r\n _this.outer.trigger('mousemove.lg');\r\n }\r\n }, this.settings.showBarsAfter);\r\n };\r\n LightGallery.prototype.initPictureFill = function ($img) {\r\n if (this.settings.supportLegacyBrowser) {\r\n try {\r\n picturefill({\r\n elements: [$img.get()],\r\n });\r\n }\r\n catch (e) {\r\n console.warn('lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document.');\r\n }\r\n }\r\n };\r\n /**\r\n * @desc Create image counter\r\n * Ex: 1/10\r\n */\r\n LightGallery.prototype.counter = function () {\r\n if (this.settings.counter) {\r\n var counterHtml = \"