diff --git a/assets/lightGallery/README.md b/assets/lightGallery/README.md new file mode 100644 index 0000000..dcd5b35 --- /dev/null +++ b/assets/lightGallery/README.md @@ -0,0 +1,219 @@ +![commit](https://badgen.net/github/last-commit/sachinchoolur/lightGallery/master) +![npm](https://img.shields.io/npm/v/lightgallery.svg?color=red) +![npm-tag](https://badgen.net/github/tag/sachinchoolur/lightgallery) +![size](https://badgen.net/bundlephobia/minzip/lightgallery?color=cyan) +![tree-shaking](https://badgen.net/bundlephobia/tree-shaking/lightgallery?color=purple) +![types](https://badgen.net/npm/types/lightgallery?color=blue) +![hits](https://badgen.net/jsdelivr/hits/npm/lightgallery?color=pink) + +# lightGallery + +A customizable, modular, responsive, lightbox gallery plugin. No dependencies.\\ +Available for React.js, Angular, Vue.js, and typescript. + +![lightgallery](https://www.lightgalleryjs.com/lightgallery-demo.png) + +## Core features + +- Fully responsive. +- Modular architecture with built in plugins. +- Highly optimized for touch devices. +- Mouse drag supports for desktops. +- Double-click/Double-tap to see actual size of the image. +- Animated thumbnails. +- Social sharing. +- YouTube Vimeo Wistia and html5 videos Support. +- 20+ Hardware-Accelerated CSS3 transitions. +- Dynamic mode. +- Inline gallery. +- Full screen support. +- Zoom in/out, Pinch to zoom. +- Swipe/Drag up/down support to close gallery. +- Browser history API(deep linking). +- Responsive images. +- HTML iframe support. +- Multiple instances on one page. +- Easily customizable via CSS (SCSS) and Settings. +- Smart image preloading and code optimization. +- Keyboard Navigation for desktop. +- SVG icons. +- Accessibility support. +- Rotate, flip images. +- And many more. + +## Documentation + +- [Getting started](https://www.lightgalleryjs.com/docs/getting-started/) +- [Settings](https://www.lightgalleryjs.com/docs/settings/) +- [React](https://www.lightgalleryjs.com/docs/react/) +- [Vue.js](https://www.lightgalleryjs.com/docs/vue/) +- [Angular](https://www.lightgalleryjs.com/docs/angular/) +- [Demos](https://www.lightgalleryjs.com/demos/thumbnails/) +- [CodePen](https://codepen.io/collection/BNNjpR) + +## Installation + +lightGallery is available on NPM, Yarn, Bower, CDNs, and GitHub. You can use any +of the following method to download lightGallery. + +- [NPM](https://www.npmjs.com/) - NPM is a package manager for the JavaScript + programming language. You can install `lightgallery` using the following + command + + ```sh + npm install lightgallery + ``` + +- [YARN](https://yarnpkg.com/) - Yarn is another popular package manager for + the JavaScript programming language. If you prefer you can use Yarn instead + of NPM + + ```sh + yarn add lightgallery + ``` + +- [Bower](http://bower.io) - You can find lightGallery on Bower package + manager as well + + ```sh + bower install lightgallery --save + ``` + +- [GitHub](https://github.com/sachinchoolur/lightGallery/archive/master.zip) - + You can also directly download lightgallery from GitHub + +- CDN - If you prefer to use a CDN, you can load files via + [jsdelivr](https://www.jsdelivr.com/projects/lightgallery), + [cdnjs](https://cdnjs.com/libraries/lightgallery) or + [unpkg](https://unpkg.com/browse/lightgallery@latest/) + +#### Include CSS and Javascript files + +First of all, include lightgallery.css in the <head> of the document. If +you want include any lightGallery plugin such as thumbnails or zoom, you need to +include respective css files as well. + +Alternatively you can include `lightgallery-bundle.css` which contains +lightGallery and all plugin styles instead of separate stylesheets. + +If you like you can also import scss files instead of css files from the `scss` +folder. + +```HTML + + + + + + + + + + + + +``` + +Then include lightgallery.umd.js into your document. If you want to include any +lightgallery plugin you can include it after lightgallery.umd.js. + +```HTML + + .... + + + + + + + +``` + +lightGallery supports AMD, CommonJS and ES6 modules too. + +```JavaScript +import lightGallery from 'lightgallery'; + +// Plugins +import lgThumbnail from 'lightgallery/plugins/thumbnail' +import lgZoom from 'lightgallery/plugins/zoom' + +``` + +#### The markup + +lightgallery does not force you to use any kind of markup. you can use whatever +markup you want. +Here can find +detailed examples of different kinds of markups. + +If you know the original size of the media, you can pass it via +`data-lg-size="${width}-${height}"` attribute for the initial +[zoom](https://www.lightgalleryjs.com/docs/settings/#zoomFromOrigin) animation. +But, this is completely optional. + +```HTML +
+ + .. + + + .. + + ... +
+``` + +#### Initialize lightGallery + +Finally, you need to initiate the gallery by adding the following code. + +```javascript + +``` + +[CodePen Demos](https://codepen.io/collection/BNNjpR) + +#### License Key + +You'll receive a license key via email one you purchase a license [More info](https://www.lightgalleryjs.com/docs/settings/#licenseKey) + +#### Plugins + +As shown above, you need to pass the plugins via settings if you want to use any +lightGallery plugins. + +If you are including lightGallery files via script tag, please use the same +plugins names as follows. + +`lgZoom`, `lgAutoplay`, ` lgComment`, `lgFullscreen `, `lgHash`, `lgPager`, +`lgRotate`, `lgShare`, `lgThumbnail`, `lgVideo`, `lgMediumZoom` + +## Browser support + +lightGallery supports all major browsers including IE 10 and above. + +## License + +#### Commercial license + +If you want to use lightGallery to develop commercial sites, themes, projects, +and applications, the Commercial license is the appropriate license. With this +option, your source code is kept proprietary. +[Read more about the commercial license](https://www.lightgalleryjs.com/license/) + +#### Open source license + +If you are creating an open source application under a license compatible with +the GNU GPL license v3, you may use this project under the terms of the GPLv3. + +## Support + +If you have any questions, suggestions, feedback, please reach out to [contact@lightgalleryjs.com](mailto:contact@lightgalleryjs.com) or DM me on [twitter](https://twitter.com/SachinNeravath) diff --git a/assets/lightGallery/css/lg-autoplay.css b/assets/lightGallery/css/lg-autoplay.css new file mode 100644 index 0000000..cae5e8f --- /dev/null +++ b/assets/lightGallery/css/lg-autoplay.css @@ -0,0 +1,39 @@ +.lg-progress-bar { + background-color: #333; + height: 5px; + left: 0; + position: absolute; + top: 0; + width: 100%; + z-index: 1083; + opacity: 0; + will-change: opacity; + -webkit-transition: opacity 0.08s ease 0s; + -moz-transition: opacity 0.08s ease 0s; + -o-transition: opacity 0.08s ease 0s; + transition: opacity 0.08s ease 0s; +} +.lg-progress-bar .lg-progress { + background-color: rgb(169, 7, 7); + height: 5px; + width: 0; +} +.lg-progress-bar.lg-start .lg-progress { + width: 100%; +} +.lg-show-autoplay .lg-progress-bar { + opacity: 1; +} + +.lg-autoplay-button:after { + content: "\e01d"; +} +.lg-show-autoplay .lg-autoplay-button:after { + content: "\e01a"; +} +.lg-single-item .lg-autoplay-button { + opacity: 0.75; + pointer-events: none; +} + +/*# sourceMappingURL=lg-autoplay.css.map */ diff --git a/assets/lightGallery/css/lg-autoplay.css.map b/assets/lightGallery/css/lg-autoplay.css.map new file mode 100644 index 0000000..99de90f --- /dev/null +++ b/assets/lightGallery/css/lg-autoplay.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["../../src/scss/lg-autoplay.scss","../../src/scss/_lg-variables.scss","../../src/scss/_lg-mixins.scss"],"names":[],"mappings":"AAGA;EACI,kBC0BiB;EDzBjB,QC2BqB;ED1BrB;EACA;EACA;EACA;EACA,SCiDiB;EDhDjB;EACA;EE8RA;EACA;EACA;EACA,YFhSA;;AAEA;EACI,kBCTa;EDUb,QCeiB;EDdjB;;AAIA;EACI;;AAIR;EACI;;;AAKJ;EAII;;AAHA;EACI;;AAIR;EACI,SCb2B;EDc3B","file":"lg-autoplay.css"} \ No newline at end of file diff --git a/assets/lightGallery/css/lg-comments.css b/assets/lightGallery/css/lg-comments.css new file mode 100644 index 0000000..562b51a --- /dev/null +++ b/assets/lightGallery/css/lg-comments.css @@ -0,0 +1,119 @@ +.lg-comment-box { + width: 420px; + max-width: 100%; + position: absolute; + right: 0; + top: 0; + bottom: 0; + z-index: 9999; + background-color: #fff; + will-change: transform; + -moz-transform: translate3d(100%, 0, 0); + -o-transform: translate3d(100%, 0, 0); + -ms-transform: translate3d(100%, 0, 0); + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + -webkit-transition: -webkit-transform 0.4s cubic-bezier(0, 0, 0.25, 1) 0s; + -moz-transition: -moz-transform 0.4s cubic-bezier(0, 0, 0.25, 1) 0s; + -o-transition: -o-transform 0.4s cubic-bezier(0, 0, 0.25, 1) 0s; + transition: transform 0.4s cubic-bezier(0, 0, 0.25, 1) 0s; +} +.lg-comment-box .lg-comment-title { + margin: 0; + color: #fff; + font-size: 18px; +} +.lg-comment-box .lg-comment-header { + background-color: #000; + padding: 12px 20px; + position: absolute; + left: 0; + right: 0; + top: 0; +} +.lg-comment-box .lg-comment-body { + height: 100% !important; + padding-top: 43px !important; + width: 100% !important; +} +.lg-comment-box .fb-comments { + height: 100%; + width: 100%; + background: url("../images/loading.gif") no-repeat scroll center center #fff; + overflow-y: auto; + display: inline-block; +} +.lg-comment-box .fb-comments[fb-xfbml-state=rendered] { + background-image: none; +} +.lg-comment-box .fb-comments > span { + max-width: 100%; +} +.lg-comment-box .lg-comment-close { + position: absolute; + right: 5px; + top: 12px; + cursor: pointer; + font-size: 20px; + color: #999; + will-change: color; + -webkit-transition: color 0.2s linear; + -o-transition: color 0.2s linear; + transition: color 0.2s linear; +} +.lg-comment-box .lg-comment-close:hover { + color: #fff; +} +.lg-comment-box .lg-comment-close:after { + content: "\e070"; +} +.lg-comment-box iframe { + max-width: 100% !important; + width: 100% !important; +} +.lg-comment-box #disqus_thread { + padding: 0 20px; +} + +.lg-outer .lg-comment-overlay { + background-color: rgba(0, 0, 0, 0.25); + bottom: 0; + cursor: default; + left: 0; + position: fixed; + right: 0; + top: 0; + z-index: 1081; + opacity: 0; + visibility: hidden; + will-change: visibility, opacity; + -webkit-transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s; + -o-transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s; + transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s; +} +.lg-outer .lg-comment-toggle:after { + content: "\e908"; +} +.lg-outer.lg-comment-active .lg-comment-overlay { + -webkit-transition-delay: 0s; + transition-delay: 0s; + -moz-transform: translate3d(0, 0px, 0); + -o-transform: translate3d(0, 0px, 0); + -ms-transform: translate3d(0, 0px, 0); + -webkit-transform: translate3d(0, 0px, 0); + transform: translate3d(0, 0px, 0); + opacity: 1; + visibility: visible; +} +.lg-outer.lg-comment-active .lg-comment-toggle { + color: #fff; +} +.lg-outer.lg-comment-active .lg-comment-box { + -moz-transform: translate3d(0, 0, 0); + -o-transform: translate3d(0, 0, 0); + -ms-transform: translate3d(0, 0, 0); + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} + +/*# sourceMappingURL=lg-comments.css.map */ diff --git a/assets/lightGallery/css/lg-comments.css.map b/assets/lightGallery/css/lg-comments.css.map new file mode 100644 index 0000000..7c0cb0a --- /dev/null +++ b/assets/lightGallery/css/lg-comments.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["../../src/scss/lg-comments.scss","../../src/scss/_lg-mixins.scss"],"names":[],"mappings":"AAGA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;ECyMA,gBDxMmB;ECyMnB,cDzMmB;EC0MnB,eD1MmB;EC2MnB,mBD3MmB;EC4MnB,WD5MmB;EC6RnB;EACA;EACA;EACA,YD/RA;;AAEA;EACI;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;;AAGJ;EACI;EACA;EACA;EAEA;EACA;;AACA;EACI;;AAEJ;EACI;;AAIR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;ECoKJ,oBDnKI;ECoKJ,eDpKI;ECqKJ,YDrKI;;AACA;EACI;;AAEJ;EACI;;AAIR;EACI;EACA;;AAGJ;EACI;;;AAIJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;ECqIJ,oBDpII;ECqIJ,eDrII;ECsIJ,YDtII;;AAMA;EACI;;AAIJ;ECoIJ,0BDnIkC;ECoIlC,kBDpIkC;EC8GlC,gBD7G2B;EC8G3B,cD9G2B;EC+G3B,eD/G2B;ECgH3B,mBDhH2B;ECiH3B,WDjH2B;EACnB;EACA;;AAEJ;EACI;;AAEJ;ECsGJ,gBDrG2B;ECsG3B,cDtG2B;ECuG3B,eDvG2B;ECwG3B,mBDxG2B;ECyG3B,WDzG2B","file":"lg-comments.css"} \ No newline at end of file diff --git a/assets/lightGallery/css/lg-fullscreen.css b/assets/lightGallery/css/lg-fullscreen.css new file mode 100644 index 0000000..51c2516 --- /dev/null +++ b/assets/lightGallery/css/lg-fullscreen.css @@ -0,0 +1,8 @@ +.lg-fullscreen:after { + content: "\e20c"; +} +.lg-fullscreen-on .lg-fullscreen:after { + content: "\e20d"; +} + +/*# sourceMappingURL=lg-fullscreen.css.map */ diff --git a/assets/lightGallery/css/lg-fullscreen.css.map b/assets/lightGallery/css/lg-fullscreen.css.map new file mode 100644 index 0000000..9543949 --- /dev/null +++ b/assets/lightGallery/css/lg-fullscreen.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["../../src/scss/lg-fullscreen.scss"],"names":[],"mappings":"AACI;EACI;;AAEA;EACI","file":"lg-fullscreen.css"} \ No newline at end of file diff --git a/assets/lightGallery/css/lg-medium-zoom.css b/assets/lightGallery/css/lg-medium-zoom.css new file mode 100644 index 0000000..bc3bda3 --- /dev/null +++ b/assets/lightGallery/css/lg-medium-zoom.css @@ -0,0 +1,15 @@ +.lg-medium-zoom-item { + cursor: zoom-in; +} + +.lg-medium-zoom .lg-outer { + cursor: zoom-out; +} +.lg-medium-zoom .lg-outer.lg-grab img.lg-object { + cursor: zoom-out; +} +.lg-medium-zoom .lg-outer.lg-grabbing img.lg-object { + cursor: zoom-out; +} + +/*# sourceMappingURL=lg-medium-zoom.css.map */ diff --git a/assets/lightGallery/css/lg-medium-zoom.css.map b/assets/lightGallery/css/lg-medium-zoom.css.map new file mode 100644 index 0000000..59e3c5a --- /dev/null +++ b/assets/lightGallery/css/lg-medium-zoom.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["../../src/scss/lg-medium-zoom.scss"],"names":[],"mappings":"AAAA;EACI;;;AAGA;EACI;;AAGI;EACI;;AAKJ;EACI","file":"lg-medium-zoom.css"} \ No newline at end of file diff --git a/assets/lightGallery/css/lg-pager.css b/assets/lightGallery/css/lg-pager.css new file mode 100644 index 0000000..47318c6 --- /dev/null +++ b/assets/lightGallery/css/lg-pager.css @@ -0,0 +1,82 @@ +.lg-outer .lg-pager-outer { + text-align: center; + z-index: 1080; + height: 10px; + margin-bottom: 10px; +} +.lg-outer .lg-pager-outer.lg-pager-hover .lg-pager-cont { + overflow: visible; +} +.lg-outer.lg-single-item .lg-pager-outer { + display: none; +} +.lg-outer .lg-pager-cont { + cursor: pointer; + display: inline-block; + overflow: hidden; + position: relative; + vertical-align: top; + margin: 0 5px; +} +.lg-outer .lg-pager-cont:hover .lg-pager-thumb-cont { + opacity: 1; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.lg-outer .lg-pager-cont.lg-pager-active .lg-pager { + box-shadow: 0 0 0 2px white inset; +} +.lg-outer .lg-pager-thumb-cont { + background-color: #fff; + color: #fff; + bottom: 100%; + height: 83px; + left: 0; + margin-bottom: 20px; + margin-left: -60px; + opacity: 0; + padding: 5px; + position: absolute; + width: 120px; + border-radius: 3px; + will-change: transform, opacity; + -webkit-transition: opacity 0.15s ease 0s, -webkit-transform 0.15s ease 0s; + -moz-transition: opacity 0.15s ease 0s, -moz-transform 0.15s ease 0s; + -o-transition: opacity 0.15s ease 0s, -o-transform 0.15s ease 0s; + transition: opacity 0.15s ease 0s, transform 0.15s ease 0s; + -webkit-transform: translate3d(0, 5px, 0); + transform: translate3d(0, 5px, 0); +} +.lg-outer .lg-pager-thumb-cont img { + width: 100%; + height: 100%; +} +.lg-outer .lg-pager { + background-color: rgba(255, 255, 255, 0.5); + border-radius: 50%; + box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.7) inset; + display: block; + height: 12px; + -webkit-transition: box-shadow 0.3s ease 0s; + -o-transition: box-shadow 0.3s ease 0s; + transition: box-shadow 0.3s ease 0s; + width: 12px; +} +.lg-outer .lg-pager:hover, .lg-outer .lg-pager:focus { + box-shadow: 0 0 0 8px white inset; +} +.lg-outer .lg-caret { + border-left: 10px solid transparent; + border-right: 10px solid transparent; + border-top: 10px dashed; + bottom: -10px; + display: inline-block; + height: 0; + left: 50%; + margin-left: -5px; + position: absolute; + vertical-align: middle; + width: 0; +} + +/*# sourceMappingURL=lg-pager.css.map */ diff --git a/assets/lightGallery/css/lg-pager.css.map b/assets/lightGallery/css/lg-pager.css.map new file mode 100644 index 0000000..9471357 --- /dev/null +++ b/assets/lightGallery/css/lg-pager.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["../../src/scss/lg-pager.scss","../../src/scss/_lg-variables.scss","../../src/scss/_lg-mixins.scss"],"names":[],"mappings":"AAII;EACI;EACA,SC0DO;EDzDP;EACA;;AAGI;EACI;;AAMR;EACI;;AAIR;EACI;EACA;EACA;EACA;EACA;EACA;;AAGI;EACI;EEkIZ;EACA;;AF7HQ;EACI;;AAKZ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EEgPJ;EACA;EACA;EACA,YFlPI;EEwGJ;EACA;;AFnGI;EACI;EACA;;AAIR;EACI;EACA;EACA;EACA;EACA;EEmJJ,oBFlJI;EEmJJ,eFnJI;EEoJJ,YFpJI;EACA;;AAEA;EAEI;;AAIR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA","file":"lg-pager.css"} \ No newline at end of file diff --git a/assets/lightGallery/css/lg-relative-caption.css b/assets/lightGallery/css/lg-relative-caption.css new file mode 100644 index 0000000..4198dc2 --- /dev/null +++ b/assets/lightGallery/css/lg-relative-caption.css @@ -0,0 +1,16 @@ +.lg-relative-caption .lg-outer .lg-sub-html { + white-space: normal; + bottom: auto; + padding: 0; + background-image: none; +} +.lg-relative-caption .lg-outer .lg-relative-caption-item { + opacity: 0; + padding: 16px 0; + transition: 0.5s opacity ease; +} +.lg-relative-caption .lg-outer .lg-show-caption .lg-relative-caption-item { + opacity: 1; +} + +/*# sourceMappingURL=lg-relative-caption.css.map */ diff --git a/assets/lightGallery/css/lg-relative-caption.css.map b/assets/lightGallery/css/lg-relative-caption.css.map new file mode 100644 index 0000000..c0ecdcd --- /dev/null +++ b/assets/lightGallery/css/lg-relative-caption.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["../../src/scss/lg-relative-caption.scss"],"names":[],"mappings":"AAEQ;EACI;EACA;EACA;EACA;;AAEJ;EACI;EACA;EACA;;AAIA;EACI","file":"lg-relative-caption.css"} \ No newline at end of file diff --git a/assets/lightGallery/css/lg-rotate.css b/assets/lightGallery/css/lg-rotate.css new file mode 100644 index 0000000..c63ec3b --- /dev/null +++ b/assets/lightGallery/css/lg-rotate.css @@ -0,0 +1,49 @@ +.lg-outer .lg-img-rotate { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + -webkit-transition: -webkit-transform 0.4s cubic-bezier(0, 0, 0.25, 1) 0s; + -moz-transition: -moz-transform 0.4s cubic-bezier(0, 0, 0.25, 1) 0s; + -o-transition: -o-transform 0.4s cubic-bezier(0, 0, 0.25, 1) 0s; + transition: transform 0.4s cubic-bezier(0, 0, 0.25, 1) 0s; +} +.lg-outer[data-lg-slide-type=video] .lg-rotate-left, +.lg-outer[data-lg-slide-type=video] .lg-rotate-right, +.lg-outer[data-lg-slide-type=video] .lg-flip-ver, +.lg-outer[data-lg-slide-type=video] .lg-flip-hor, .lg-outer[data-lg-slide-type=iframe] .lg-rotate-left, +.lg-outer[data-lg-slide-type=iframe] .lg-rotate-right, +.lg-outer[data-lg-slide-type=iframe] .lg-flip-ver, +.lg-outer[data-lg-slide-type=iframe] .lg-flip-hor { + opacity: 0.75; + pointer-events: none; +} +.lg-outer .lg-img-rotate:before { + content: ""; + display: inline-block; + height: 100%; + vertical-align: middle; +} + +.lg-rotate-left:after { + content: "\e900"; +} + +.lg-rotate-right:after { + content: "\e901"; +} + +.lg-icon.lg-flip-hor, .lg-icon.lg-flip-ver { + font-size: 26px; +} + +.lg-flip-ver:after { + content: "\e903"; +} + +.lg-flip-hor:after { + content: "\e902"; +} + +/*# sourceMappingURL=lg-rotate.css.map */ diff --git a/assets/lightGallery/css/lg-rotate.css.map b/assets/lightGallery/css/lg-rotate.css.map new file mode 100644 index 0000000..3761e7a --- /dev/null +++ b/assets/lightGallery/css/lg-rotate.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["../../src/scss/lg-rotate.scss","../../src/scss/_lg-mixins.scss","../../src/scss/_lg-variables.scss"],"names":[],"mappings":"AAII;EACI;EACA;EACA;EACA;EACA;ECiSJ;EACA;EACA;EACA,YDnSI;;AAMA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAII,SEOuB;EFNvB;;AAIJ;EACI;EACA;EACA;EACA;;;AAMR;EACI;;;AAKJ;EACI;;;AAKJ;EAEI;;;AAKJ;EACI;;;AAKJ;EACI","file":"lg-rotate.css"} \ No newline at end of file diff --git a/assets/lightGallery/css/lg-share.css b/assets/lightGallery/css/lg-share.css new file mode 100644 index 0000000..39936e3 --- /dev/null +++ b/assets/lightGallery/css/lg-share.css @@ -0,0 +1,127 @@ +.lg-outer .lg-dropdown-overlay { + background-color: rgba(0, 0, 0, 0.25); + bottom: 0; + cursor: default; + left: 0; + position: absolute; + right: 0; + top: 0; + z-index: 1081; + opacity: 0; + visibility: hidden; + will-change: visibility, opacity; + -webkit-transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s; + -o-transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s; + transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s; +} +.lg-outer.lg-dropdown-active .lg-dropdown, +.lg-outer.lg-dropdown-active .lg-dropdown-overlay { + -webkit-transition-delay: 0s; + transition-delay: 0s; + -moz-transform: translate3d(0, 0px, 0); + -o-transform: translate3d(0, 0px, 0); + -ms-transform: translate3d(0, 0px, 0); + -webkit-transform: translate3d(0, 0px, 0); + transform: translate3d(0, 0px, 0); + opacity: 1; + visibility: visible; +} +.lg-outer.lg-dropdown-active .lg-share { + color: #fff; +} +.lg-outer .lg-dropdown { + background-color: #fff; + border-radius: 2px; + font-size: 14px; + list-style-type: none; + margin: 0; + padding: 10px 0; + position: absolute; + right: 0; + text-align: left; + top: 50px; + opacity: 0; + visibility: hidden; + -moz-transform: translate3d(0, 5px, 0); + -o-transform: translate3d(0, 5px, 0); + -ms-transform: translate3d(0, 5px, 0); + -webkit-transform: translate3d(0, 5px, 0); + transform: translate3d(0, 5px, 0); + will-change: visibility, opacity, transform; + -webkit-transition: -webkit-transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s; + -moz-transition: -moz-transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s; + -o-transition: -o-transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s; + transition: transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s; +} +.lg-outer .lg-dropdown:after { + content: ""; + display: block; + height: 0; + width: 0; + position: absolute; + border: 8px solid transparent; + border-bottom-color: #fff; + right: 16px; + top: -16px; +} +.lg-outer .lg-dropdown > li:last-child { + margin-bottom: 0px; +} +.lg-outer .lg-dropdown > li:hover a { + color: #333; +} +.lg-outer .lg-dropdown a { + color: #333; + display: block; + white-space: pre; + padding: 4px 12px; + font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 12px; +} +.lg-outer .lg-dropdown a:hover { + background-color: rgba(0, 0, 0, 0.07); +} +.lg-outer .lg-dropdown .lg-dropdown-text { + display: inline-block; + line-height: 1; + margin-top: -3px; + vertical-align: middle; +} +.lg-outer .lg-dropdown .lg-icon { + color: #333; + display: inline-block; + float: none; + font-size: 20px; + height: auto; + line-height: 1; + margin-right: 8px; + padding: 0; + vertical-align: middle; + width: auto; +} +.lg-outer .lg-share { + position: relative; +} +.lg-outer .lg-share:after { + content: "\e80d"; +} +.lg-outer .lg-share-facebook .lg-icon { + color: #3b5998; +} +.lg-outer .lg-share-facebook .lg-icon:after { + content: "\e904"; +} +.lg-outer .lg-share-twitter .lg-icon { + color: #00aced; +} +.lg-outer .lg-share-twitter .lg-icon:after { + content: "\e907"; +} +.lg-outer .lg-share-pinterest .lg-icon { + color: #cb2027; +} +.lg-outer .lg-share-pinterest .lg-icon:after { + content: "\e906"; +} + +/*# sourceMappingURL=lg-share.css.map */ diff --git a/assets/lightGallery/css/lg-share.css.map b/assets/lightGallery/css/lg-share.css.map new file mode 100644 index 0000000..ce39b03 --- /dev/null +++ b/assets/lightGallery/css/lg-share.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["../../src/scss/lg-share.scss","../../src/scss/_lg-mixins.scss"],"names":[],"mappings":"AAII;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;ECgNJ,oBD/MI;ECgNJ,eDhNI;ECiNJ,YDjNI;;AAMA;AAAA;ECoNJ,0BDlNkC;ECmNlC,kBDnNkC;EC6LlC,gBD5L2B;EC6L3B,cD7L2B;EC8L3B,eD9L2B;EC+L3B,mBD/L2B;ECgM3B,WDhM2B;EACnB;EACA;;AAEJ;EACI;;AAGR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;ECwKJ,gBDvKuB;ECwKvB,cDxKuB;ECyKvB,eDzKuB;EC0KvB,mBD1KuB;EC2KvB,WD3KuB;EACnB;EC2PJ;EACA;EACA;EACA,YD7PI;;AAMA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGA;EACI;;AAGA;EACI;;AAIZ;EACI;EACA;EACA;EACA;EACA;EAEA;;AACA;EACI;;AAGR;EACI;EACA;EACA;EACA;;AAEJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGR;EACI;;AACA;EACI;;AAIJ;EACI;;AACA;EACI;;AAKR;EACI;;AACA;EACI;;AAKR;EACI;;AACA;EACI","file":"lg-share.css"} \ No newline at end of file diff --git a/assets/lightGallery/css/lg-thumbnail.css b/assets/lightGallery/css/lg-thumbnail.css new file mode 100644 index 0000000..3fc755d --- /dev/null +++ b/assets/lightGallery/css/lg-thumbnail.css @@ -0,0 +1,93 @@ +.lg-outer .lg-thumb-outer { + background-color: #0d0a0a; + width: 100%; + max-height: 350px; + overflow: hidden; + float: left; +} +.lg-outer .lg-thumb-outer.lg-grab .lg-thumb-item { + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: -o-grab; + cursor: -ms-grab; + cursor: grab; +} +.lg-outer .lg-thumb-outer.lg-grabbing .lg-thumb-item { + cursor: move; + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: -o-grabbing; + cursor: -ms-grabbing; + cursor: grabbing; +} +.lg-outer .lg-thumb-outer.lg-dragging .lg-thumb { + -webkit-transition-duration: 0s !important; + transition-duration: 0s !important; +} +.lg-outer .lg-thumb-outer.lg-rebuilding-thumbnails .lg-thumb { + -webkit-transition-duration: 0s !important; + transition-duration: 0s !important; +} +.lg-outer .lg-thumb-outer.lg-thumb-align-middle { + text-align: center; +} +.lg-outer .lg-thumb-outer.lg-thumb-align-left { + text-align: left; +} +.lg-outer .lg-thumb-outer.lg-thumb-align-right { + text-align: right; +} +.lg-outer.lg-single-item .lg-thumb-outer { + display: none; +} +.lg-outer .lg-thumb { + padding: 5px 0; + height: 100%; + margin-bottom: -5px; + display: inline-block; + vertical-align: middle; +} +@media (min-width: 768px) { + .lg-outer .lg-thumb { + padding: 10px 0; + } +} +.lg-outer .lg-thumb-item { + cursor: pointer; + float: left; + overflow: hidden; + height: 100%; + border-radius: 2px; + margin-bottom: 5px; + will-change: border-color; +} +@media (min-width: 768px) { + .lg-outer .lg-thumb-item { + border-radius: 4px; + border: 2px solid #fff; + -webkit-transition: border-color 0.25s ease; + -o-transition: border-color 0.25s ease; + transition: border-color 0.25s ease; + } +} +.lg-outer .lg-thumb-item.active, .lg-outer .lg-thumb-item:hover { + border-color: rgb(169, 7, 7); +} +.lg-outer .lg-thumb-item img { + width: 100%; + height: 100%; + object-fit: cover; + display: block; +} +.lg-outer.lg-can-toggle .lg-item { + padding-bottom: 0; +} +.lg-outer .lg-toggle-thumb:after { + content: "\e1ff"; +} +.lg-outer.lg-animate-thumb .lg-thumb { + -webkit-transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); +} + +/*# sourceMappingURL=lg-thumbnail.css.map */ diff --git a/assets/lightGallery/css/lg-thumbnail.css.map b/assets/lightGallery/css/lg-thumbnail.css.map new file mode 100644 index 0000000..4208464 --- /dev/null +++ b/assets/lightGallery/css/lg-thumbnail.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["../../src/scss/lg-thumbnail.scss","../../src/scss/_lg-variables.scss","../../src/scss/_lg-mixins.scss"],"names":[],"mappings":"AAMI;EACI,kBC6CM;ED5CN;EACA;EACA;EACA;;AAGI;EE+SR;EACA;EACA;EACA;EACA;;AF7SQ;EEiTR;EACA;EACA;EACA;EACA;EACA;;AFhTQ;EEqNR,6BFpNY;EEqNZ,qBFrNY;;AAIJ;EEgNR,6BF/MY;EEgNZ,qBFhNY;;AAIR;EACI;;AAEJ;EACI;;AAEJ;EACI;;AAKJ;EACI;;AAIR;EACI;EACA;EACA;EACA;EACA;;AACA;EANJ;IAOQ;;;AAIR;EACI;EACA;EACA;EACA;EACA;EACA,eAnEY;EAoEZ;;AACA;EARJ;IASQ;IACA;IEqJR,oBFpJQ;IEqJR,eFrJQ;IEsJR,YFtJQ;;;AAGJ;EAEI,cCzES;;AD4Eb;EACI;EACA;EACA;EACA;;AAKJ;EACI;;AAKJ;EACI;;AAIJ;EE6IJ,oCF3IY;EE4IZ,4BF5IY","file":"lg-thumbnail.css"} \ No newline at end of file diff --git a/assets/lightGallery/css/lg-transitions.css b/assets/lightGallery/css/lg-transitions.css new file mode 100644 index 0000000..efc84e7 --- /dev/null +++ b/assets/lightGallery/css/lg-transitions.css @@ -0,0 +1,845 @@ +.lg-css3.lg-zoom-in .lg-item { + opacity: 0; +} +.lg-css3.lg-zoom-in .lg-item.lg-prev-slide { + -webkit-transform: scale3d(1.3, 1.3, 1.3); + transform: scale3d(1.3, 1.3, 1.3); +} +.lg-css3.lg-zoom-in .lg-item.lg-next-slide { + -webkit-transform: scale3d(1.3, 1.3, 1.3); + transform: scale3d(1.3, 1.3, 1.3); +} +.lg-css3.lg-zoom-in .lg-item.lg-current { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + opacity: 1; +} +.lg-css3.lg-zoom-in .lg-item.lg-prev-slide, .lg-css3.lg-zoom-in .lg-item.lg-next-slide, .lg-css3.lg-zoom-in .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; +} + +.lg-css3.lg-lollipop-rev .lg-item { + opacity: 0; +} +.lg-css3.lg-lollipop-rev .lg-item.lg-prev-slide { + -moz-transform: translate3d(0, 0, 0) scale(0.5); + -o-transform: translate3d(0, 0, 0) scale(0.5); + -ms-transform: translate3d(0, 0, 0) scale(0.5); + -webkit-transform: translate3d(0, 0, 0) scale(0.5); + transform: translate3d(0, 0, 0) scale(0.5); +} +.lg-css3.lg-lollipop-rev .lg-item.lg-next-slide { + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); +} +.lg-css3.lg-lollipop-rev .lg-item.lg-current { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1; +} +.lg-css3.lg-lollipop-rev .lg-item.lg-prev-slide, .lg-css3.lg-lollipop-rev .lg-item.lg-next-slide, .lg-css3.lg-lollipop-rev .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; +} + +.lg-css3.lg-slide-skew-ver-cross .lg-item { + opacity: 0; +} +.lg-css3.lg-slide-skew-ver-cross .lg-item.lg-prev-slide { + -moz-transform: skew(0deg, 20deg) translate3d(0, -100%, 0px); + -o-transform: skew(0deg, 20deg) translate3d(0, -100%, 0px); + -ms-transform: skew(0deg, 20deg) translate3d(0, -100%, 0px); + -webkit-transform: skew(0deg, 20deg) translate3d(0, -100%, 0px); + transform: skew(0deg, 20deg) translate3d(0, -100%, 0px); +} +.lg-css3.lg-slide-skew-ver-cross .lg-item.lg-next-slide { + -moz-transform: skew(0deg, 20deg) translate3d(0, 100%, 0px); + -o-transform: skew(0deg, 20deg) translate3d(0, 100%, 0px); + -ms-transform: skew(0deg, 20deg) translate3d(0, 100%, 0px); + -webkit-transform: skew(0deg, 20deg) translate3d(0, 100%, 0px); + transform: skew(0deg, 20deg) translate3d(0, 100%, 0px); +} +.lg-css3.lg-slide-skew-ver-cross .lg-item.lg-current { + -moz-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -o-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -ms-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -webkit-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + opacity: 1; +} +.lg-css3.lg-slide-skew-ver-cross .lg-item.lg-prev-slide, .lg-css3.lg-slide-skew-ver-cross .lg-item.lg-next-slide, .lg-css3.lg-slide-skew-ver-cross .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; +} + +.lg-css3.lg-lollipop .lg-item { + opacity: 0; +} +.lg-css3.lg-lollipop .lg-item.lg-prev-slide { + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); +} +.lg-css3.lg-lollipop .lg-item.lg-next-slide { + -moz-transform: translate3d(0, 0, 0) scale(0.5); + -o-transform: translate3d(0, 0, 0) scale(0.5); + -ms-transform: translate3d(0, 0, 0) scale(0.5); + -webkit-transform: translate3d(0, 0, 0) scale(0.5); + transform: translate3d(0, 0, 0) scale(0.5); +} +.lg-css3.lg-lollipop .lg-item.lg-current { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1; +} +.lg-css3.lg-lollipop .lg-item.lg-prev-slide, .lg-css3.lg-lollipop .lg-item.lg-next-slide, .lg-css3.lg-lollipop .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; +} + +.lg-css3.lg-slide-skew-ver-rev .lg-item { + opacity: 0; +} +.lg-css3.lg-slide-skew-ver-rev .lg-item.lg-prev-slide { + -moz-transform: skew(-60deg, 0deg) translate3d(0, -100%, 0px); + -o-transform: skew(-60deg, 0deg) translate3d(0, -100%, 0px); + -ms-transform: skew(-60deg, 0deg) translate3d(0, -100%, 0px); + -webkit-transform: skew(-60deg, 0deg) translate3d(0, -100%, 0px); + transform: skew(-60deg, 0deg) translate3d(0, -100%, 0px); +} +.lg-css3.lg-slide-skew-ver-rev .lg-item.lg-next-slide { + -moz-transform: skew(-60deg, 0deg) translate3d(0, 100%, 0px); + -o-transform: skew(-60deg, 0deg) translate3d(0, 100%, 0px); + -ms-transform: skew(-60deg, 0deg) translate3d(0, 100%, 0px); + -webkit-transform: skew(-60deg, 0deg) translate3d(0, 100%, 0px); + transform: skew(-60deg, 0deg) translate3d(0, 100%, 0px); +} +.lg-css3.lg-slide-skew-ver-rev .lg-item.lg-current { + -moz-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -o-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -ms-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -webkit-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + opacity: 1; +} +.lg-css3.lg-slide-skew-ver-rev .lg-item.lg-prev-slide, .lg-css3.lg-slide-skew-ver-rev .lg-item.lg-next-slide, .lg-css3.lg-slide-skew-ver-rev .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; +} + +.lg-css3.lg-rotate-rev .lg-item { + opacity: 0; +} +.lg-css3.lg-rotate-rev .lg-item.lg-prev-slide { + -moz-transform: rotate(360deg); + -o-transform: rotate(360deg); + -ms-transform: rotate(360deg); + -webkit-transform: rotate(360deg); + transform: rotate(360deg); +} +.lg-css3.lg-rotate-rev .lg-item.lg-next-slide { + -moz-transform: rotate(-360deg); + -o-transform: rotate(-360deg); + -ms-transform: rotate(-360deg); + -webkit-transform: rotate(-360deg); + transform: rotate(-360deg); +} +.lg-css3.lg-rotate-rev .lg-item.lg-current { + -moz-transform: rotate(0deg); + -o-transform: rotate(0deg); + -ms-transform: rotate(0deg); + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + opacity: 1; +} +.lg-css3.lg-rotate-rev .lg-item.lg-prev-slide, .lg-css3.lg-rotate-rev .lg-item.lg-next-slide, .lg-css3.lg-rotate-rev .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; +} + +.lg-css3.lg-slide-skew-ver .lg-item { + opacity: 0; +} +.lg-css3.lg-slide-skew-ver .lg-item.lg-prev-slide { + -moz-transform: skew(60deg, 0deg) translate3d(0, -100%, 0px); + -o-transform: skew(60deg, 0deg) translate3d(0, -100%, 0px); + -ms-transform: skew(60deg, 0deg) translate3d(0, -100%, 0px); + -webkit-transform: skew(60deg, 0deg) translate3d(0, -100%, 0px); + transform: skew(60deg, 0deg) translate3d(0, -100%, 0px); +} +.lg-css3.lg-slide-skew-ver .lg-item.lg-next-slide { + -moz-transform: skew(60deg, 0deg) translate3d(0, 100%, 0px); + -o-transform: skew(60deg, 0deg) translate3d(0, 100%, 0px); + -ms-transform: skew(60deg, 0deg) translate3d(0, 100%, 0px); + -webkit-transform: skew(60deg, 0deg) translate3d(0, 100%, 0px); + transform: skew(60deg, 0deg) translate3d(0, 100%, 0px); +} +.lg-css3.lg-slide-skew-ver .lg-item.lg-current { + -moz-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -o-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -ms-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -webkit-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + opacity: 1; +} +.lg-css3.lg-slide-skew-ver .lg-item.lg-prev-slide, .lg-css3.lg-slide-skew-ver .lg-item.lg-next-slide, .lg-css3.lg-slide-skew-ver .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; +} + +.lg-css3.lg-rotate .lg-item { + opacity: 0; +} +.lg-css3.lg-rotate .lg-item.lg-prev-slide { + -moz-transform: rotate(-360deg); + -o-transform: rotate(-360deg); + -ms-transform: rotate(-360deg); + -webkit-transform: rotate(-360deg); + transform: rotate(-360deg); +} +.lg-css3.lg-rotate .lg-item.lg-next-slide { + -moz-transform: rotate(360deg); + -o-transform: rotate(360deg); + -ms-transform: rotate(360deg); + -webkit-transform: rotate(360deg); + transform: rotate(360deg); +} +.lg-css3.lg-rotate .lg-item.lg-current { + -moz-transform: rotate(0deg); + -o-transform: rotate(0deg); + -ms-transform: rotate(0deg); + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + opacity: 1; +} +.lg-css3.lg-rotate .lg-item.lg-prev-slide, .lg-css3.lg-rotate .lg-item.lg-next-slide, .lg-css3.lg-rotate .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; +} + +.lg-css3.lg-slide-skew .lg-item { + opacity: 0; +} +.lg-css3.lg-slide-skew .lg-item.lg-prev-slide { + -moz-transform: skew(20deg, 0deg) translate3d(-100%, 0%, 0px); + -o-transform: skew(20deg, 0deg) translate3d(-100%, 0%, 0px); + -ms-transform: skew(20deg, 0deg) translate3d(-100%, 0%, 0px); + -webkit-transform: skew(20deg, 0deg) translate3d(-100%, 0%, 0px); + transform: skew(20deg, 0deg) translate3d(-100%, 0%, 0px); +} +.lg-css3.lg-slide-skew .lg-item.lg-next-slide { + -moz-transform: skew(20deg, 0deg) translate3d(100%, 0%, 0px); + -o-transform: skew(20deg, 0deg) translate3d(100%, 0%, 0px); + -ms-transform: skew(20deg, 0deg) translate3d(100%, 0%, 0px); + -webkit-transform: skew(20deg, 0deg) translate3d(100%, 0%, 0px); + transform: skew(20deg, 0deg) translate3d(100%, 0%, 0px); +} +.lg-css3.lg-slide-skew .lg-item.lg-current { + -moz-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -o-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -ms-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -webkit-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + opacity: 1; +} +.lg-css3.lg-slide-skew .lg-item.lg-prev-slide, .lg-css3.lg-slide-skew .lg-item.lg-next-slide, .lg-css3.lg-slide-skew .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; +} + +.lg-css3.lg-scale-up .lg-item { + opacity: 0; +} +.lg-css3.lg-scale-up .lg-item.lg-prev-slide { + -moz-transform: scale3d(0.8, 0.8, 0.8) translate3d(0%, 10%, 0); + -o-transform: scale3d(0.8, 0.8, 0.8) translate3d(0%, 10%, 0); + -ms-transform: scale3d(0.8, 0.8, 0.8) translate3d(0%, 10%, 0); + -webkit-transform: scale3d(0.8, 0.8, 0.8) translate3d(0%, 10%, 0); + transform: scale3d(0.8, 0.8, 0.8) translate3d(0%, 10%, 0); +} +.lg-css3.lg-scale-up .lg-item.lg-next-slide { + -moz-transform: scale3d(0.8, 0.8, 0.8) translate3d(0%, 10%, 0); + -o-transform: scale3d(0.8, 0.8, 0.8) translate3d(0%, 10%, 0); + -ms-transform: scale3d(0.8, 0.8, 0.8) translate3d(0%, 10%, 0); + -webkit-transform: scale3d(0.8, 0.8, 0.8) translate3d(0%, 10%, 0); + transform: scale3d(0.8, 0.8, 0.8) translate3d(0%, 10%, 0); +} +.lg-css3.lg-scale-up .lg-item.lg-current { + -moz-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -o-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -ms-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -webkit-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + opacity: 1; +} +.lg-css3.lg-scale-up .lg-item.lg-prev-slide, .lg-css3.lg-scale-up .lg-item.lg-next-slide, .lg-css3.lg-scale-up .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; +} + +.lg-css3.lg-slide-vertical-growth .lg-item { + opacity: 0; +} +.lg-css3.lg-slide-vertical-growth .lg-item.lg-prev-slide { + -moz-transform: scale3d(0.5, 0.5, 0.5) translate3d(0, -150%, 0); + -o-transform: scale3d(0.5, 0.5, 0.5) translate3d(0, -150%, 0); + -ms-transform: scale3d(0.5, 0.5, 0.5) translate3d(0, -150%, 0); + -webkit-transform: scale3d(0.5, 0.5, 0.5) translate3d(0, -150%, 0); + transform: scale3d(0.5, 0.5, 0.5) translate3d(0, -150%, 0); +} +.lg-css3.lg-slide-vertical-growth .lg-item.lg-next-slide { + -moz-transform: scale3d(0.5, 0.5, 0.5) translate3d(0, 150%, 0); + -o-transform: scale3d(0.5, 0.5, 0.5) translate3d(0, 150%, 0); + -ms-transform: scale3d(0.5, 0.5, 0.5) translate3d(0, 150%, 0); + -webkit-transform: scale3d(0.5, 0.5, 0.5) translate3d(0, 150%, 0); + transform: scale3d(0.5, 0.5, 0.5) translate3d(0, 150%, 0); +} +.lg-css3.lg-slide-vertical-growth .lg-item.lg-current { + -moz-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -o-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -ms-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -webkit-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + opacity: 1; +} +.lg-css3.lg-slide-vertical-growth .lg-item.lg-prev-slide, .lg-css3.lg-slide-vertical-growth .lg-item.lg-next-slide, .lg-css3.lg-slide-vertical-growth .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; +} + +.lg-css3.lg-slide-circular-vertical .lg-item { + opacity: 0; +} +.lg-css3.lg-slide-circular-vertical .lg-item.lg-prev-slide { + -moz-transform: scale3d(0, 0, 0) translate3d(0, -100%, 0); + -o-transform: scale3d(0, 0, 0) translate3d(0, -100%, 0); + -ms-transform: scale3d(0, 0, 0) translate3d(0, -100%, 0); + -webkit-transform: scale3d(0, 0, 0) translate3d(0, -100%, 0); + transform: scale3d(0, 0, 0) translate3d(0, -100%, 0); +} +.lg-css3.lg-slide-circular-vertical .lg-item.lg-next-slide { + -moz-transform: scale3d(0, 0, 0) translate3d(0, 100%, 0); + -o-transform: scale3d(0, 0, 0) translate3d(0, 100%, 0); + -ms-transform: scale3d(0, 0, 0) translate3d(0, 100%, 0); + -webkit-transform: scale3d(0, 0, 0) translate3d(0, 100%, 0); + transform: scale3d(0, 0, 0) translate3d(0, 100%, 0); +} +.lg-css3.lg-slide-circular-vertical .lg-item.lg-current { + -moz-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -o-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -ms-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -webkit-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + opacity: 1; +} +.lg-css3.lg-slide-circular-vertical .lg-item.lg-prev-slide, .lg-css3.lg-slide-circular-vertical .lg-item.lg-next-slide, .lg-css3.lg-slide-circular-vertical .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; +} + +.lg-css3.lg-slide-vertical .lg-item { + opacity: 0; +} +.lg-css3.lg-slide-vertical .lg-item.lg-prev-slide { + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); +} +.lg-css3.lg-slide-vertical .lg-item.lg-next-slide { + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); +} +.lg-css3.lg-slide-vertical .lg-item.lg-current { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1; +} +.lg-css3.lg-slide-vertical .lg-item.lg-prev-slide, .lg-css3.lg-slide-vertical .lg-item.lg-next-slide, .lg-css3.lg-slide-vertical .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; +} + +.lg-css3.lg-slide-circular .lg-item { + opacity: 0; +} +.lg-css3.lg-slide-circular .lg-item.lg-prev-slide { + -moz-transform: scale3d(0, 0, 0) translate3d(-100%, 0, 0); + -o-transform: scale3d(0, 0, 0) translate3d(-100%, 0, 0); + -ms-transform: scale3d(0, 0, 0) translate3d(-100%, 0, 0); + -webkit-transform: scale3d(0, 0, 0) translate3d(-100%, 0, 0); + transform: scale3d(0, 0, 0) translate3d(-100%, 0, 0); +} +.lg-css3.lg-slide-circular .lg-item.lg-next-slide { + -moz-transform: scale3d(0, 0, 0) translate3d(100%, 0, 0); + -o-transform: scale3d(0, 0, 0) translate3d(100%, 0, 0); + -ms-transform: scale3d(0, 0, 0) translate3d(100%, 0, 0); + -webkit-transform: scale3d(0, 0, 0) translate3d(100%, 0, 0); + transform: scale3d(0, 0, 0) translate3d(100%, 0, 0); +} +.lg-css3.lg-slide-circular .lg-item.lg-current { + -moz-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -o-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -ms-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -webkit-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + opacity: 1; +} +.lg-css3.lg-slide-circular .lg-item.lg-prev-slide, .lg-css3.lg-slide-circular .lg-item.lg-next-slide, .lg-css3.lg-slide-circular .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; +} + +.lg-css3.lg-soft-zoom .lg-item { + opacity: 0; +} +.lg-css3.lg-soft-zoom .lg-item.lg-prev-slide { + -webkit-transform: scale3d(1.1, 1.1, 1.1); + transform: scale3d(1.1, 1.1, 1.1); +} +.lg-css3.lg-soft-zoom .lg-item.lg-next-slide { + -webkit-transform: scale3d(0.9, 0.9, 0.9); + transform: scale3d(0.9, 0.9, 0.9); +} +.lg-css3.lg-soft-zoom .lg-item.lg-current { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + opacity: 1; +} +.lg-css3.lg-soft-zoom .lg-item.lg-prev-slide, .lg-css3.lg-soft-zoom .lg-item.lg-next-slide, .lg-css3.lg-soft-zoom .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; +} + +.lg-css3.lg-slide-skew-cross-rev .lg-item { + opacity: 0; +} +.lg-css3.lg-slide-skew-cross-rev .lg-item.lg-prev-slide { + -moz-transform: skew(0deg, -60deg) translate3d(-100%, 0%, 0px); + -o-transform: skew(0deg, -60deg) translate3d(-100%, 0%, 0px); + -ms-transform: skew(0deg, -60deg) translate3d(-100%, 0%, 0px); + -webkit-transform: skew(0deg, -60deg) translate3d(-100%, 0%, 0px); + transform: skew(0deg, -60deg) translate3d(-100%, 0%, 0px); +} +.lg-css3.lg-slide-skew-cross-rev .lg-item.lg-next-slide { + -moz-transform: skew(0deg, -60deg) translate3d(100%, 0%, 0px); + -o-transform: skew(0deg, -60deg) translate3d(100%, 0%, 0px); + -ms-transform: skew(0deg, -60deg) translate3d(100%, 0%, 0px); + -webkit-transform: skew(0deg, -60deg) translate3d(100%, 0%, 0px); + transform: skew(0deg, -60deg) translate3d(100%, 0%, 0px); +} +.lg-css3.lg-slide-skew-cross-rev .lg-item.lg-current { + -moz-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -o-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -ms-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -webkit-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + opacity: 1; +} +.lg-css3.lg-slide-skew-cross-rev .lg-item.lg-prev-slide, .lg-css3.lg-slide-skew-cross-rev .lg-item.lg-next-slide, .lg-css3.lg-slide-skew-cross-rev .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; +} + +.lg-css3.lg-tube .lg-item { + opacity: 0; +} +.lg-css3.lg-tube .lg-item.lg-prev-slide { + -moz-transform: scale3d(1, 0, 1) translate3d(-100%, 0, 0); + -o-transform: scale3d(1, 0, 1) translate3d(-100%, 0, 0); + -ms-transform: scale3d(1, 0, 1) translate3d(-100%, 0, 0); + -webkit-transform: scale3d(1, 0, 1) translate3d(-100%, 0, 0); + transform: scale3d(1, 0, 1) translate3d(-100%, 0, 0); +} +.lg-css3.lg-tube .lg-item.lg-next-slide { + -moz-transform: scale3d(1, 0, 1) translate3d(100%, 0, 0); + -o-transform: scale3d(1, 0, 1) translate3d(100%, 0, 0); + -ms-transform: scale3d(1, 0, 1) translate3d(100%, 0, 0); + -webkit-transform: scale3d(1, 0, 1) translate3d(100%, 0, 0); + transform: scale3d(1, 0, 1) translate3d(100%, 0, 0); +} +.lg-css3.lg-tube .lg-item.lg-current { + -moz-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -o-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -ms-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + -webkit-transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + transform: scale3d(1, 1, 1) translate3d(0, 0, 0); + opacity: 1; +} +.lg-css3.lg-tube .lg-item.lg-prev-slide, .lg-css3.lg-tube .lg-item.lg-next-slide, .lg-css3.lg-tube .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; +} + +.lg-css3.lg-slide-skew-cross .lg-item { + opacity: 0; +} +.lg-css3.lg-slide-skew-cross .lg-item.lg-prev-slide { + -moz-transform: skew(0deg, 60deg) translate3d(-100%, 0%, 0px); + -o-transform: skew(0deg, 60deg) translate3d(-100%, 0%, 0px); + -ms-transform: skew(0deg, 60deg) translate3d(-100%, 0%, 0px); + -webkit-transform: skew(0deg, 60deg) translate3d(-100%, 0%, 0px); + transform: skew(0deg, 60deg) translate3d(-100%, 0%, 0px); +} +.lg-css3.lg-slide-skew-cross .lg-item.lg-next-slide { + -moz-transform: skew(0deg, 60deg) translate3d(100%, 0%, 0px); + -o-transform: skew(0deg, 60deg) translate3d(100%, 0%, 0px); + -ms-transform: skew(0deg, 60deg) translate3d(100%, 0%, 0px); + -webkit-transform: skew(0deg, 60deg) translate3d(100%, 0%, 0px); + transform: skew(0deg, 60deg) translate3d(100%, 0%, 0px); +} +.lg-css3.lg-slide-skew-cross .lg-item.lg-current { + -moz-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -o-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -ms-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -webkit-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + opacity: 1; +} +.lg-css3.lg-slide-skew-cross .lg-item.lg-prev-slide, .lg-css3.lg-slide-skew-cross .lg-item.lg-next-slide, .lg-css3.lg-slide-skew-cross .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; +} + +.lg-css3.lg-zoom-in-big .lg-item { + opacity: 0; +} +.lg-css3.lg-zoom-in-big .lg-item.lg-prev-slide { + -webkit-transform: scale3d(2, 2, 2); + transform: scale3d(2, 2, 2); +} +.lg-css3.lg-zoom-in-big .lg-item.lg-next-slide { + -webkit-transform: scale3d(2, 2, 2); + transform: scale3d(2, 2, 2); +} +.lg-css3.lg-zoom-in-big .lg-item.lg-current { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + opacity: 1; +} +.lg-css3.lg-zoom-in-big .lg-item.lg-prev-slide, .lg-css3.lg-zoom-in-big .lg-item.lg-next-slide, .lg-css3.lg-zoom-in-big .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; +} + +.lg-css3.lg-slide-skew-only-rev .lg-item { + opacity: 0; +} +.lg-css3.lg-slide-skew-only-rev .lg-item.lg-prev-slide { + -moz-transform: skew(-10deg, 0deg); + -o-transform: skew(-10deg, 0deg); + -ms-transform: skew(-10deg, 0deg); + -webkit-transform: skew(-10deg, 0deg); + transform: skew(-10deg, 0deg); +} +.lg-css3.lg-slide-skew-only-rev .lg-item.lg-next-slide { + -moz-transform: skew(-10deg, 0deg); + -o-transform: skew(-10deg, 0deg); + -ms-transform: skew(-10deg, 0deg); + -webkit-transform: skew(-10deg, 0deg); + transform: skew(-10deg, 0deg); +} +.lg-css3.lg-slide-skew-only-rev .lg-item.lg-current { + -moz-transform: skew(0deg, 0deg); + -o-transform: skew(0deg, 0deg); + -ms-transform: skew(0deg, 0deg); + -webkit-transform: skew(0deg, 0deg); + transform: skew(0deg, 0deg); + opacity: 1; +} +.lg-css3.lg-slide-skew-only-rev .lg-item.lg-prev-slide, .lg-css3.lg-slide-skew-only-rev .lg-item.lg-next-slide, .lg-css3.lg-slide-skew-only-rev .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; +} + +.lg-css3.lg-zoom-in-out .lg-item { + opacity: 0; +} +.lg-css3.lg-zoom-in-out .lg-item.lg-prev-slide { + -webkit-transform: scale3d(2, 2, 2); + transform: scale3d(2, 2, 2); +} +.lg-css3.lg-zoom-in-out .lg-item.lg-next-slide { + -webkit-transform: scale3d(0, 0, 0); + transform: scale3d(0, 0, 0); +} +.lg-css3.lg-zoom-in-out .lg-item.lg-current { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + opacity: 1; +} +.lg-css3.lg-zoom-in-out .lg-item.lg-prev-slide, .lg-css3.lg-zoom-in-out .lg-item.lg-next-slide, .lg-css3.lg-zoom-in-out .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; +} + +.lg-css3.lg-slide-skew-only-y-rev .lg-item { + opacity: 0; +} +.lg-css3.lg-slide-skew-only-y-rev .lg-item.lg-prev-slide { + -moz-transform: skew(0deg, -10deg); + -o-transform: skew(0deg, -10deg); + -ms-transform: skew(0deg, -10deg); + -webkit-transform: skew(0deg, -10deg); + transform: skew(0deg, -10deg); +} +.lg-css3.lg-slide-skew-only-y-rev .lg-item.lg-next-slide { + -moz-transform: skew(0deg, -10deg); + -o-transform: skew(0deg, -10deg); + -ms-transform: skew(0deg, -10deg); + -webkit-transform: skew(0deg, -10deg); + transform: skew(0deg, -10deg); +} +.lg-css3.lg-slide-skew-only-y-rev .lg-item.lg-current { + -moz-transform: skew(0deg, 0deg); + -o-transform: skew(0deg, 0deg); + -ms-transform: skew(0deg, 0deg); + -webkit-transform: skew(0deg, 0deg); + transform: skew(0deg, 0deg); + opacity: 1; +} +.lg-css3.lg-slide-skew-only-y-rev .lg-item.lg-prev-slide, .lg-css3.lg-slide-skew-only-y-rev .lg-item.lg-next-slide, .lg-css3.lg-slide-skew-only-y-rev .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; +} + +.lg-css3.lg-slide-skew-only-y .lg-item { + opacity: 0; +} +.lg-css3.lg-slide-skew-only-y .lg-item.lg-prev-slide { + -moz-transform: skew(0deg, 10deg); + -o-transform: skew(0deg, 10deg); + -ms-transform: skew(0deg, 10deg); + -webkit-transform: skew(0deg, 10deg); + transform: skew(0deg, 10deg); +} +.lg-css3.lg-slide-skew-only-y .lg-item.lg-next-slide { + -moz-transform: skew(0deg, 10deg); + -o-transform: skew(0deg, 10deg); + -ms-transform: skew(0deg, 10deg); + -webkit-transform: skew(0deg, 10deg); + transform: skew(0deg, 10deg); +} +.lg-css3.lg-slide-skew-only-y .lg-item.lg-current { + -moz-transform: skew(0deg, 0deg); + -o-transform: skew(0deg, 0deg); + -ms-transform: skew(0deg, 0deg); + -webkit-transform: skew(0deg, 0deg); + transform: skew(0deg, 0deg); + opacity: 1; +} +.lg-css3.lg-slide-skew-only-y .lg-item.lg-prev-slide, .lg-css3.lg-slide-skew-only-y .lg-item.lg-next-slide, .lg-css3.lg-slide-skew-only-y .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; +} + +.lg-css3.lg-zoom-out-big .lg-item { + opacity: 0; +} +.lg-css3.lg-zoom-out-big .lg-item.lg-prev-slide { + -webkit-transform: scale3d(0, 0, 0); + transform: scale3d(0, 0, 0); +} +.lg-css3.lg-zoom-out-big .lg-item.lg-next-slide { + -webkit-transform: scale3d(0, 0, 0); + transform: scale3d(0, 0, 0); +} +.lg-css3.lg-zoom-out-big .lg-item.lg-current { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + opacity: 1; +} +.lg-css3.lg-zoom-out-big .lg-item.lg-prev-slide, .lg-css3.lg-zoom-out-big .lg-item.lg-next-slide, .lg-css3.lg-zoom-out-big .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; +} + +.lg-css3.lg-slide-skew-only .lg-item { + opacity: 0; +} +.lg-css3.lg-slide-skew-only .lg-item.lg-prev-slide { + -moz-transform: skew(10deg, 0deg); + -o-transform: skew(10deg, 0deg); + -ms-transform: skew(10deg, 0deg); + -webkit-transform: skew(10deg, 0deg); + transform: skew(10deg, 0deg); +} +.lg-css3.lg-slide-skew-only .lg-item.lg-next-slide { + -moz-transform: skew(10deg, 0deg); + -o-transform: skew(10deg, 0deg); + -ms-transform: skew(10deg, 0deg); + -webkit-transform: skew(10deg, 0deg); + transform: skew(10deg, 0deg); +} +.lg-css3.lg-slide-skew-only .lg-item.lg-current { + -moz-transform: skew(0deg, 0deg); + -o-transform: skew(0deg, 0deg); + -ms-transform: skew(0deg, 0deg); + -webkit-transform: skew(0deg, 0deg); + transform: skew(0deg, 0deg); + opacity: 1; +} +.lg-css3.lg-slide-skew-only .lg-item.lg-prev-slide, .lg-css3.lg-slide-skew-only .lg-item.lg-next-slide, .lg-css3.lg-slide-skew-only .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; +} + +.lg-css3.lg-zoom-out-in .lg-item { + opacity: 0; +} +.lg-css3.lg-zoom-out-in .lg-item.lg-prev-slide { + -webkit-transform: scale3d(0, 0, 0); + transform: scale3d(0, 0, 0); +} +.lg-css3.lg-zoom-out-in .lg-item.lg-next-slide { + -webkit-transform: scale3d(2, 2, 2); + transform: scale3d(2, 2, 2); +} +.lg-css3.lg-zoom-out-in .lg-item.lg-current { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + opacity: 1; +} +.lg-css3.lg-zoom-out-in .lg-item.lg-prev-slide, .lg-css3.lg-zoom-out-in .lg-item.lg-next-slide, .lg-css3.lg-zoom-out-in .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; +} + +.lg-css3.lg-slide-skew-rev .lg-item { + opacity: 0; +} +.lg-css3.lg-slide-skew-rev .lg-item.lg-prev-slide { + -moz-transform: skew(-20deg, 0deg) translate3d(-100%, 0%, 0px); + -o-transform: skew(-20deg, 0deg) translate3d(-100%, 0%, 0px); + -ms-transform: skew(-20deg, 0deg) translate3d(-100%, 0%, 0px); + -webkit-transform: skew(-20deg, 0deg) translate3d(-100%, 0%, 0px); + transform: skew(-20deg, 0deg) translate3d(-100%, 0%, 0px); +} +.lg-css3.lg-slide-skew-rev .lg-item.lg-next-slide { + -moz-transform: skew(-20deg, 0deg) translate3d(100%, 0%, 0px); + -o-transform: skew(-20deg, 0deg) translate3d(100%, 0%, 0px); + -ms-transform: skew(-20deg, 0deg) translate3d(100%, 0%, 0px); + -webkit-transform: skew(-20deg, 0deg) translate3d(100%, 0%, 0px); + transform: skew(-20deg, 0deg) translate3d(100%, 0%, 0px); +} +.lg-css3.lg-slide-skew-rev .lg-item.lg-current { + -moz-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -o-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -ms-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -webkit-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + opacity: 1; +} +.lg-css3.lg-slide-skew-rev .lg-item.lg-prev-slide, .lg-css3.lg-slide-skew-rev .lg-item.lg-next-slide, .lg-css3.lg-slide-skew-rev .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; +} + +.lg-css3.lg-zoom-out .lg-item { + opacity: 0; +} +.lg-css3.lg-zoom-out .lg-item.lg-prev-slide { + -webkit-transform: scale3d(0.7, 0.7, 0.7); + transform: scale3d(0.7, 0.7, 0.7); +} +.lg-css3.lg-zoom-out .lg-item.lg-next-slide { + -webkit-transform: scale3d(0.7, 0.7, 0.7); + transform: scale3d(0.7, 0.7, 0.7); +} +.lg-css3.lg-zoom-out .lg-item.lg-current { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + opacity: 1; +} +.lg-css3.lg-zoom-out .lg-item.lg-prev-slide, .lg-css3.lg-zoom-out .lg-item.lg-next-slide, .lg-css3.lg-zoom-out .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 1s ease 0s; +} + +.lg-css3.lg-slide-skew-ver-cross-rev .lg-item { + opacity: 0; +} +.lg-css3.lg-slide-skew-ver-cross-rev .lg-item.lg-prev-slide { + -moz-transform: skew(0deg, -20deg) translate3d(0, -100%, 0px); + -o-transform: skew(0deg, -20deg) translate3d(0, -100%, 0px); + -ms-transform: skew(0deg, -20deg) translate3d(0, -100%, 0px); + -webkit-transform: skew(0deg, -20deg) translate3d(0, -100%, 0px); + transform: skew(0deg, -20deg) translate3d(0, -100%, 0px); +} +.lg-css3.lg-slide-skew-ver-cross-rev .lg-item.lg-next-slide { + -moz-transform: skew(0deg, -20deg) translate3d(0, 100%, 0px); + -o-transform: skew(0deg, -20deg) translate3d(0, 100%, 0px); + -ms-transform: skew(0deg, -20deg) translate3d(0, 100%, 0px); + -webkit-transform: skew(0deg, -20deg) translate3d(0, 100%, 0px); + transform: skew(0deg, -20deg) translate3d(0, 100%, 0px); +} +.lg-css3.lg-slide-skew-ver-cross-rev .lg-item.lg-current { + -moz-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -o-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -ms-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + -webkit-transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + transform: skew(0deg, 0deg) translate3d(0%, 0%, 0px); + opacity: 1; +} +.lg-css3.lg-slide-skew-ver-cross-rev .lg-item.lg-prev-slide, .lg-css3.lg-slide-skew-ver-cross-rev .lg-item.lg-next-slide, .lg-css3.lg-slide-skew-ver-cross-rev .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; +} + +/*# sourceMappingURL=lg-transitions.css.map */ diff --git a/assets/lightGallery/css/lg-transitions.css.map b/assets/lightGallery/css/lg-transitions.css.map new file mode 100644 index 0000000..385c961 --- /dev/null +++ b/assets/lightGallery/css/lg-transitions.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["../../src/scss/transitions/_lg-zoom-in.scss","../../src/scss/_lg-mixins.scss","../../src/scss/transitions/_lg-lollipop-rev.scss","../../src/scss/transitions/_lg-slide-skew-ver-cross.scss","../../src/scss/transitions/_lg-lollipop.scss","../../src/scss/transitions/_lg-slide-skew-ver-rev.scss","../../src/scss/transitions/_lg-rotate-rev.scss","../../src/scss/transitions/_lg-slide-skew-ver.scss","../../src/scss/transitions/_lg-rotate.scss","../../src/scss/transitions/_lg-slide-skew.scss","../../src/scss/transitions/_lg-scale-up.scss","../../src/scss/transitions/_lg-slide-vertical-growth.scss","../../src/scss/transitions/_lg-slide-circular-vertical.scss","../../src/scss/transitions/_lg-slide-vertical.scss","../../src/scss/transitions/_lg-slide-circular.scss","../../src/scss/transitions/_lg-soft-zoom.scss","../../src/scss/transitions/_lg-slide-skew-cross-rev.scss","../../src/scss/transitions/_lg-tube.scss","../../src/scss/transitions/_lg-slide-skew-cross.scss","../../src/scss/transitions/_lg-zoom-in-big.scss","../../src/scss/transitions/_lg-slide-skew-only-rev.scss","../../src/scss/transitions/_lg-zoom-in-out.scss","../../src/scss/transitions/_lg-slide-skew-only-y-rev.scss","../../src/scss/transitions/_lg-slide-skew-only-y.scss","../../src/scss/transitions/_lg-zoom-out-big.scss","../../src/scss/transitions/_lg-slide-skew-only.scss","../../src/scss/transitions/_lg-zoom-out-in.scss","../../src/scss/transitions/_lg-slide-skew-rev.scss","../../src/scss/transitions/_lg-zoom-out.scss","../../src/scss/transitions/_lg-slide-skew-ver-cross-rev.scss"],"names":[],"mappings":"AAIQ;EACI;;AAEA;ECiKR;EACA;;AD9JQ;EC6JR;EACA;;AD1JQ;ECyJR;EACA;EDxJY;;AAGJ;ECsRR;EACA;EACA;EACA,YDtRY;;;AEnBR;EACI;;AAEA;ED8MR,gBC7M+B;ED8M/B,cC9M+B;ED+M/B,eC/M+B;EDgN/B,mBChN+B;EDiN/B,WCjN+B;;AAGvB;EDwJR;EACA;;ACrJQ;EDoJR;EACA;ECnJY;;AAGJ;EDsRR;EACA;EACA;EACA,YCtRY;;;ACnBR;EACI;;AAEA;EF8MR,gBE5MgB;EF6MhB,cE7MgB;EF8MhB,eE9MgB;EF+MhB,mBE/MgB;EFgNhB,WEhNgB;;AAIR;EFwMR,gBEvM+B;EFwM/B,cExM+B;EFyM/B,eEzM+B;EF0M/B,mBE1M+B;EF2M/B,WE3M+B;;AAGvB;EFoMR,gBEnM+B;EFoM/B,cEpM+B;EFqM/B,eErM+B;EFsM/B,mBEtM+B;EFuM/B,WEvM+B;EACnB;;AAGJ;EFoRR;EACA;EACA;EACA,YEpRY;;;ACrBR;EACI;;AAEA;EH4JR;EACA;;AGzJQ;EH0MR,gBGzM+B;EH0M/B,cG1M+B;EH2M/B,eG3M+B;EH4M/B,mBG5M+B;EH6M/B,WG7M+B;;AAGvB;EHoJR;EACA;EGnJY;;AAGJ;EHsRR;EACA;EACA;EACA,YGtRY;;;ACnBR;EACI;;AAEA;EJ8MR,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EACnB;;AAGJ;ExBsRR;EACA;EACA;EACA,YwBtRY;;;ACnBR;EACI;;AAEA;EzBiKR;EACA;;AyB9JQ;EzB6JR;EACA;;AyB1JQ;EzByJR;EACA;EyBxJY;;AAGJ;EzBsRR;EACA;EACA;EACA,YyBtRY;;;ACnBR;EACI;;AAEA;E1B8MR,gB0B5MgB;E1B6MhB,c0B7MgB;E1B8MhB,e0B9MgB;E1B+MhB,mB0B/MgB;E1BgNhB,W0BhNgB;;AAIR;E1BwMR,gB0BtMgB;E1BuMhB,c0BvMgB;E1BwMhB,e0BxMgB;E1ByMhB,mB0BzMgB;E1B0MhB,W0B1MgB;;AAIR;E1BkMR,gB0BjM+B;E1BkM/B,c0BlM+B;E1BmM/B,e0BnM+B;E1BoM/B,mB0BpM+B;E1BqM/B,W0BrM+B;EACnB;;AAGJ;E1BkRR;EACA;EACA;EACA,Y0BlRY;;;ACvBR;EACI;;AAEA;E3BiKR;EACA;;A2B9JQ;E3B6JR;EACA;;A2B1JQ;E3ByJR;EACA;E2BxJY;;AAGJ;E3BsRR;EACA;EACA;EACA,Y2BtRY;;;ACnBR;EACI;;AAEA;E5B8MR,gB4B5MgB;E5B6MhB,c4B7MgB;E5B8MhB,e4B9MgB;E5B+MhB,mB4B/MgB;E5BgNhB,W4BhNgB;;AAIR;E5BwMR,gB4BtMgB;E5BuMhB,c4BvMgB;E5BwMhB,e4BxMgB;E5ByMhB,mB4BzMgB;E5B0MhB,W4B1MgB;;AAIR;E5BkMR,gB4BjM+B;E5BkM/B,c4BlM+B;E5BmM/B,e4BnM+B;E5BoM/B,mB4BpM+B;E5BqM/B,W4BrM+B;EACnB;;AAGJ;E5BkRR;EACA;EACA;EACA,Y4BlRY","file":"lg-transitions.css"} \ No newline at end of file diff --git a/assets/lightGallery/css/lg-video.css b/assets/lightGallery/css/lg-video.css new file mode 100644 index 0000000..7195a37 --- /dev/null +++ b/assets/lightGallery/css/lg-video.css @@ -0,0 +1,135 @@ +.lg-outer .lg-video-cont { + text-align: center; + display: inline-block; + vertical-align: middle; + position: relative; +} +.lg-outer .lg-video-cont .lg-object { + width: 100% !important; + height: 100% !important; +} +.lg-outer .lg-has-iframe .lg-video-cont { + -webkit-overflow-scrolling: touch; + overflow: auto; +} +.lg-outer .lg-video-object { + position: absolute; + left: 0; + right: 0; + width: 100%; + height: 100%; + top: 0; + bottom: 0; + z-index: 3; +} +.lg-outer .lg-video-poster { + z-index: 1; +} +.lg-outer .lg-has-video .lg-video-object { + opacity: 0; + will-change: opacity; + -webkit-transition: opacity 0.3s ease-in; + -o-transition: opacity 0.3s ease-in; + transition: opacity 0.3s ease-in; +} +.lg-outer .lg-has-video.lg-video-loaded .lg-video-poster, +.lg-outer .lg-has-video.lg-video-loaded .lg-video-play-button { + opacity: 0 !important; +} +.lg-outer .lg-has-video.lg-video-loaded .lg-video-object { + opacity: 1; +} + +@keyframes lg-play-stroke { + 0% { + stroke-dasharray: 1, 200; + stroke-dashoffset: 0; + } + 50% { + stroke-dasharray: 89, 200; + stroke-dashoffset: -35px; + } + 100% { + stroke-dasharray: 89, 200; + stroke-dashoffset: -124px; + } +} +@keyframes lg-play-rotate { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} +.lg-video-play-button { + width: 18%; + max-width: 140px; + position: absolute; + top: 50%; + left: 50%; + z-index: 2; + cursor: pointer; + transform: translate(-50%, -50%) scale(1); + will-change: opacity, transform; + -webkit-transition: -webkit-transform 0.25s cubic-bezier(0.17, 0.88, 0.32, 1.28), opacity 0.1s; + -moz-transition: -moz-transform 0.25s cubic-bezier(0.17, 0.88, 0.32, 1.28), opacity 0.1s; + -o-transition: -o-transform 0.25s cubic-bezier(0.17, 0.88, 0.32, 1.28), opacity 0.1s; + transition: transform 0.25s cubic-bezier(0.17, 0.88, 0.32, 1.28), opacity 0.1s; +} +.lg-video-play-button:hover .lg-video-play-icon-bg, +.lg-video-play-button:hover .lg-video-play-icon { + opacity: 1; +} + +.lg-video-play-icon-bg { + fill: none; + stroke-width: 3%; + stroke: #fcfcfc; + opacity: 0.6; + will-change: opacity; + -webkit-transition: opacity 0.12s ease-in; + -o-transition: opacity 0.12s ease-in; + transition: opacity 0.12s ease-in; +} + +.lg-video-play-icon-circle { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + fill: none; + stroke-width: 3%; + stroke: rgba(30, 30, 30, 0.9); + stroke-opacity: 1; + stroke-linecap: round; + stroke-dasharray: 200; + stroke-dashoffset: 200; +} + +.lg-video-play-icon { + position: absolute; + width: 25%; + max-width: 120px; + left: 50%; + top: 50%; + transform: translate3d(-50%, -50%, 0); + opacity: 0.6; + will-change: opacity; + -webkit-transition: opacity 0.12s ease-in; + -o-transition: opacity 0.12s ease-in; + transition: opacity 0.12s ease-in; +} +.lg-video-play-icon .lg-video-play-icon-inner { + fill: #fcfcfc; +} + +.lg-video-loading .lg-video-play-icon-circle { + animation: lg-play-rotate 2s linear 0.25s infinite, lg-play-stroke 1.5s ease-in-out 0.25s infinite; +} + +.lg-video-loaded .lg-video-play-button { + opacity: 0; + transform: translate(-50%, -50%) scale(0.7); +} + +/*# sourceMappingURL=lg-video.css.map */ diff --git a/assets/lightGallery/css/lg-video.css.map b/assets/lightGallery/css/lg-video.css.map new file mode 100644 index 0000000..761e1d7 --- /dev/null +++ b/assets/lightGallery/css/lg-video.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["../../src/scss/lg-video.scss","../../src/scss/_lg-mixins.scss"],"names":[],"mappings":"AAII;EACI;EACA;EACA;EACA;;AACA;EACI;EACA;;AAKJ;EACI;EACA;;AAGR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEJ;EACI;;AAIA;EACI;EACA;ECyLR,oBDxLQ;ECyLR,eDzLQ;EC0LR,YD1LQ;;AAIA;AAAA;EAEI;;AAGJ;EACI;;;AAMhB;EACI;IACI;IACA;;EAGJ;IACI;IACA;;EAGJ;IACI;IACA;;;AAIR;EACI;IACI;IACA;;;AAIR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;ECkNA;EACA;EACA;EACA,YDpNA;;AAKI;AAAA;EAEI;;;AAIZ;EACI;EACA;EACA;EACA;EACA;ECsHA,oBDrHA;ECsHA,eDtHA;ECuHA,YDvHA;;;AAEJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EC4FA,oBD3FA;EC4FA,eD5FA;EC6FA,YD7FA;;AACA;EACI;;;AAKJ;EACI;;;AAKJ;EACI;EACA","file":"lg-video.css"} \ No newline at end of file diff --git a/assets/lightGallery/css/lg-zoom.css b/assets/lightGallery/css/lg-zoom.css new file mode 100644 index 0000000..ab2374e --- /dev/null +++ b/assets/lightGallery/css/lg-zoom.css @@ -0,0 +1,104 @@ +.lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-img-wrap, +.lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-image { + -webkit-transition-duration: 0ms !important; + transition-duration: 0ms !important; +} +.lg-outer.lg-use-transition-for-zoom .lg-item.lg-complete.lg-zoomable .lg-img-wrap { + will-change: transform; + -webkit-transition: -webkit-transform 0.5s cubic-bezier(0.12, 0.415, 0.01, 1.19) 0s; + -moz-transition: -moz-transform 0.5s cubic-bezier(0.12, 0.415, 0.01, 1.19) 0s; + -o-transition: -o-transform 0.5s cubic-bezier(0.12, 0.415, 0.01, 1.19) 0s; + transition: transform 0.5s cubic-bezier(0.12, 0.415, 0.01, 1.19) 0s; +} +.lg-outer.lg-use-transition-for-zoom.lg-zoom-drag-transition .lg-item.lg-complete.lg-zoomable .lg-img-wrap { + will-change: transform; + -webkit-transition: -webkit-transform 0.8s cubic-bezier(0, 0, 0.25, 1) 0s; + -moz-transition: -moz-transform 0.8s cubic-bezier(0, 0, 0.25, 1) 0s; + -o-transition: -o-transform 0.8s cubic-bezier(0, 0, 0.25, 1) 0s; + transition: transform 0.8s cubic-bezier(0, 0, 0.25, 1) 0s; +} +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-img-wrap { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + backface-visibility: hidden; +} +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image, +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + -webkit-transition: -webkit-transform 0.5s cubic-bezier(0.12, 0.415, 0.01, 1.19) 0s, opacity 0.15s !important; + -moz-transition: -moz-transform 0.5s cubic-bezier(0.12, 0.415, 0.01, 1.19) 0s, opacity 0.15s !important; + -o-transition: -o-transform 0.5s cubic-bezier(0.12, 0.415, 0.01, 1.19) 0s, opacity 0.15s !important; + transition: transform 0.5s cubic-bezier(0.12, 0.415, 0.01, 1.19) 0s, opacity 0.15s !important; + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + backface-visibility: hidden; +} +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image.no-transition, +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img.no-transition { + transition: none !important; +} +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image.reset-transition, +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img.reset-transition { + transform: scale3d(1, 1, 1) translate3d(-50%, -50%, 0px) !important; + max-width: none !important; + max-height: none !important; + top: 50% !important; + left: 50% !important; +} +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image.reset-transition-x, +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img.reset-transition-x { + transform: scale3d(1, 1, 1) translate3d(-50%, 0, 0px) !important; + top: 0 !important; + left: 50% !important; + max-width: none !important; + max-height: none !important; +} +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image.reset-transition-y, +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img.reset-transition-y { + transform: scale3d(1, 1, 1) translate3d(0, -50%, 0px) !important; + top: 50% !important; + left: 0% !important; + max-width: none !important; + max-height: none !important; +} + +.lg-icon.lg-zoom-in:after { + content: "\e311"; +} +.lg-actual-size .lg-icon.lg-zoom-in { + opacity: 1; + pointer-events: auto; +} +.lg-icon.lg-actual-size { + font-size: 20px; +} +.lg-icon.lg-actual-size:after { + content: "\e033"; +} +.lg-icon.lg-zoom-out { + opacity: 0.5; + pointer-events: none; +} +.lg-icon.lg-zoom-out:after { + content: "\e312"; +} +.lg-zoomed .lg-icon.lg-zoom-out { + opacity: 1; + pointer-events: auto; +} + +.lg-outer[data-lg-slide-type=video] .lg-zoom-in, +.lg-outer[data-lg-slide-type=video] .lg-actual-size, +.lg-outer[data-lg-slide-type=video] .lg-zoom-out, .lg-outer[data-lg-slide-type=iframe] .lg-zoom-in, +.lg-outer[data-lg-slide-type=iframe] .lg-actual-size, +.lg-outer[data-lg-slide-type=iframe] .lg-zoom-out, .lg-outer.lg-first-slide-loading .lg-zoom-in, +.lg-outer.lg-first-slide-loading .lg-actual-size, +.lg-outer.lg-first-slide-loading .lg-zoom-out { + opacity: 0.75; + pointer-events: none; +} + +/*# sourceMappingURL=lg-zoom.css.map */ diff --git a/assets/lightGallery/css/lg-zoom.css.map b/assets/lightGallery/css/lg-zoom.css.map new file mode 100644 index 0000000..cc5a09f --- /dev/null +++ b/assets/lightGallery/css/lg-zoom.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["../../src/scss/lg-zoom.scss","../../src/scss/_lg-mixins.scss","../../src/scss/_lg-variables.scss"],"names":[],"mappings":"AAOY;AAAA;ECwOR,6BDtOY;ECuOZ,qBDvOY;;AAMJ;EACI;EC0RZ;EACA;EACA;EACA,YD5RY;;AAQA;EACI;ECgRhB;EACA;EACA;EACA,YDlRgB;;AASZ;EC+HJ;EACA;EAhFA,6BD9CqC;EC+CrC,0BD/CqC;ECgDrC,qBDhDqC;;AAGjC;AAAA;EC+HJ;EACA;EAiIA;EACA;EACA;EACA,YDhQQ;ECuCR,6BDlCqC;ECmCrC,0BDnCqC;ECoCrC,qBDpCqC;;AAE7B;AAAA;EACI;;AAEJ;AAAA;EACI;EACA;EACA;EACA;EACA;;AAEJ;AAAA;EACI;EACA;EACA;EACA;EACA;;AAEJ;AAAA;EACI;EACA;EACA;EACA;EACA;;;AASR;EACI;;AAEJ;EACI;EACA;;AAIR;EACI;;AACA;EACI;;AAIR;EACI;EACA;;AAEA;EACI;;AAGJ;EACI;EACA;;;AAQJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAGI,SE7FuB;EF8FvB","file":"lg-zoom.css"} \ No newline at end of file diff --git a/assets/lightGallery/css/lightgallery-bundle.css b/assets/lightGallery/css/lightgallery-bundle.css new file mode 100644 index 0000000..09d4482 --- /dev/null +++ b/assets/lightGallery/css/lightgallery-bundle.css @@ -0,0 +1,1444 @@ +@font-face { + font-family: "lg"; + src: url("../fonts/lg.woff2?io9a6k") format("woff2"), url("../fonts/lg.ttf?io9a6k") format("truetype"), url("../fonts/lg.woff?io9a6k") format("woff"), url("../fonts/lg.svg?io9a6k#lg") format("svg"); + font-weight: normal; + font-style: normal; + font-display: block; +} +.lg-icon { + /* use !important to prevent issues with browser extensions that change fonts */ + font-family: "lg" !important; + speak: never; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.lg-container { + font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; +} + +.lg-next, +.lg-prev { + background-color: rgba(0, 0, 0, 0.45); + border-radius: 2px; + color: #999; + cursor: pointer; + display: block; + font-size: 22px; + margin-top: -10px; + padding: 8px 10px 9px; + position: absolute; + top: 50%; + z-index: 1084; + outline: none; + border: none; +} +.lg-next.disabled, +.lg-prev.disabled { + opacity: 0 !important; + cursor: default; +} +.lg-next:hover:not(.disabled), +.lg-prev:hover:not(.disabled) { + color: #fff; +} +.lg-single-item .lg-next, +.lg-single-item .lg-prev { + display: none; +} + +.lg-next { + right: 20px; +} +.lg-next:before { + content: "\e095"; +} + +.lg-prev { + left: 20px; +} +.lg-prev:after { + content: "\e094"; +} + +@-webkit-keyframes lg-right-end { + 0% { + left: 0; + } + 50% { + left: -30px; + } + 100% { + left: 0; + } +} +@-moz-keyframes lg-right-end { + 0% { + left: 0; + } + 50% { + left: -30px; + } + 100% { + left: 0; + } +} +@-ms-keyframes lg-right-end { + 0% { + left: 0; + } + 50% { + left: -30px; + } + 100% { + left: 0; + } +} +@keyframes lg-right-end { + 0% { + left: 0; + } + 50% { + left: -30px; + } + 100% { + left: 0; + } +} +@-webkit-keyframes lg-left-end { + 0% { + left: 0; + } + 50% { + left: 30px; + } + 100% { + left: 0; + } +} +@-moz-keyframes lg-left-end { + 0% { + left: 0; + } + 50% { + left: 30px; + } + 100% { + left: 0; + } +} +@-ms-keyframes lg-left-end { + 0% { + left: 0; + } + 50% { + left: 30px; + } + 100% { + left: 0; + } +} +@keyframes lg-left-end { + 0% { + left: 0; + } + 50% { + left: 30px; + } + 100% { + left: 0; + } +} +.lg-outer.lg-right-end .lg-object { + -webkit-animation: lg-right-end 0.3s; + -o-animation: lg-right-end 0.3s; + animation: lg-right-end 0.3s; + position: relative; +} +.lg-outer.lg-left-end .lg-object { + -webkit-animation: lg-left-end 0.3s; + -o-animation: lg-left-end 0.3s; + animation: lg-left-end 0.3s; + position: relative; +} + +.lg-toolbar { + z-index: 1082; + left: 0; + position: absolute; + top: 0; + width: 100%; +} +.lg-media-overlap .lg-toolbar { + background-image: linear-gradient(0deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4)); +} +.lg-toolbar .lg-icon { + color: #999; + cursor: pointer; + float: right; + font-size: 24px; + height: 47px; + line-height: 27px; + padding: 10px 0; + text-align: center; + width: 50px; + text-decoration: none !important; + outline: medium none; + will-change: color; + -webkit-transition: color 0.2s linear; + -o-transition: color 0.2s linear; + transition: color 0.2s linear; + background: none; + border: none; + box-shadow: none; +} +.lg-toolbar .lg-icon.lg-icon-18 { + font-size: 18px; +} +.lg-toolbar .lg-icon:hover { + color: #fff; +} +.lg-toolbar .lg-close:after { + content: "\e070"; +} +.lg-toolbar .lg-maximize { + font-size: 22px; +} +.lg-toolbar .lg-maximize:after { + content: "\e90a"; +} +.lg-toolbar .lg-download:after { + content: "\e0f2"; +} + +.lg-sub-html { + color: #eee; + font-size: 16px; + padding: 10px 40px; + text-align: center; + z-index: 1080; + opacity: 0; + -webkit-transition: opacity 0.2s ease-out 0s; + -o-transition: opacity 0.2s ease-out 0s; + transition: opacity 0.2s ease-out 0s; +} +.lg-sub-html h4 { + margin: 0; + font-size: 13px; + font-weight: bold; +} +.lg-sub-html p { + font-size: 12px; + margin: 5px 0 0; +} +.lg-sub-html a { + color: inherit; +} +.lg-sub-html a:hover { + text-decoration: underline; +} +.lg-media-overlap .lg-sub-html { + background-image: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)); +} +.lg-item .lg-sub-html { + position: absolute; + bottom: 0; + right: 0; + left: 0; +} + +.lg-error-msg { + font-size: 14px; + color: #999; +} + +.lg-counter { + color: #999; + display: inline-block; + font-size: 16px; + padding-left: 20px; + padding-top: 12px; + height: 47px; + vertical-align: middle; +} + +.lg-closing .lg-toolbar, +.lg-closing .lg-prev, +.lg-closing .lg-next, +.lg-closing .lg-sub-html { + opacity: 0; + -webkit-transition: -webkit-transform 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, color 0.08 linear; + -moz-transition: -moz-transform 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, color 0.08 linear; + -o-transition: -o-transform 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, color 0.08 linear; + transition: transform 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, color 0.08 linear; +} + +body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable) .lg-img-wrap, +body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable) .lg-video-cont, +body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable) .lg-media-cont { + opacity: 0; + -moz-transform: scale3d(0.5, 0.5, 0.5); + -o-transform: scale3d(0.5, 0.5, 0.5); + -ms-transform: scale3d(0.5, 0.5, 0.5); + -webkit-transform: scale3d(0.5, 0.5, 0.5); + transform: scale3d(0.5, 0.5, 0.5); + will-change: transform, opacity; + -webkit-transition: -webkit-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important; + -moz-transition: -moz-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important; + -o-transition: -o-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important; + transition: transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important; +} +body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable).lg-complete .lg-img-wrap, +body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable).lg-complete .lg-video-cont, +body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable).lg-complete .lg-media-cont { + opacity: 1; + -moz-transform: scale3d(1, 1, 1); + -o-transform: scale3d(1, 1, 1); + -ms-transform: scale3d(1, 1, 1); + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); +} + +.lg-icon:focus-visible { + color: #fff; + border-radius: 3px; + outline: 1px dashed rgba(255, 255, 255, 0.6); +} + +.lg-toolbar .lg-icon:focus-visible { + border-radius: 8px; + outline-offset: -5px; +} + +.lg-outer .lg-thumb-outer { + background-color: #0d0a0a; + width: 100%; + max-height: 350px; + overflow: hidden; + float: left; +} +.lg-outer .lg-thumb-outer.lg-grab .lg-thumb-item { + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: -o-grab; + cursor: -ms-grab; + cursor: grab; +} +.lg-outer .lg-thumb-outer.lg-grabbing .lg-thumb-item { + cursor: move; + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: -o-grabbing; + cursor: -ms-grabbing; + cursor: grabbing; +} +.lg-outer .lg-thumb-outer.lg-dragging .lg-thumb { + -webkit-transition-duration: 0s !important; + transition-duration: 0s !important; +} +.lg-outer .lg-thumb-outer.lg-rebuilding-thumbnails .lg-thumb { + -webkit-transition-duration: 0s !important; + transition-duration: 0s !important; +} +.lg-outer .lg-thumb-outer.lg-thumb-align-middle { + text-align: center; +} +.lg-outer .lg-thumb-outer.lg-thumb-align-left { + text-align: left; +} +.lg-outer .lg-thumb-outer.lg-thumb-align-right { + text-align: right; +} +.lg-outer.lg-single-item .lg-thumb-outer { + display: none; +} +.lg-outer .lg-thumb { + padding: 5px 0; + height: 100%; + margin-bottom: -5px; + display: inline-block; + vertical-align: middle; +} +@media (min-width: 768px) { + .lg-outer .lg-thumb { + padding: 10px 0; + } +} +.lg-outer .lg-thumb-item { + cursor: pointer; + float: left; + overflow: hidden; + height: 100%; + border-radius: 2px; + margin-bottom: 5px; + will-change: border-color; +} +@media (min-width: 768px) { + .lg-outer .lg-thumb-item { + border-radius: 4px; + border: 2px solid #fff; + -webkit-transition: border-color 0.25s ease; + -o-transition: border-color 0.25s ease; + transition: border-color 0.25s ease; + } +} +.lg-outer .lg-thumb-item.active, .lg-outer .lg-thumb-item:hover { + border-color: rgb(169, 7, 7); +} +.lg-outer .lg-thumb-item img { + width: 100%; + height: 100%; + object-fit: cover; + display: block; +} +.lg-outer.lg-can-toggle .lg-item { + padding-bottom: 0; +} +.lg-outer .lg-toggle-thumb:after { + content: "\e1ff"; +} +.lg-outer.lg-animate-thumb .lg-thumb { + -webkit-transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); +} + +.lg-outer .lg-video-cont { + text-align: center; + display: inline-block; + vertical-align: middle; + position: relative; +} +.lg-outer .lg-video-cont .lg-object { + width: 100% !important; + height: 100% !important; +} +.lg-outer .lg-has-iframe .lg-video-cont { + -webkit-overflow-scrolling: touch; + overflow: auto; +} +.lg-outer .lg-video-object { + position: absolute; + left: 0; + right: 0; + width: 100%; + height: 100%; + top: 0; + bottom: 0; + z-index: 3; +} +.lg-outer .lg-video-poster { + z-index: 1; +} +.lg-outer .lg-has-video .lg-video-object { + opacity: 0; + will-change: opacity; + -webkit-transition: opacity 0.3s ease-in; + -o-transition: opacity 0.3s ease-in; + transition: opacity 0.3s ease-in; +} +.lg-outer .lg-has-video.lg-video-loaded .lg-video-poster, +.lg-outer .lg-has-video.lg-video-loaded .lg-video-play-button { + opacity: 0 !important; +} +.lg-outer .lg-has-video.lg-video-loaded .lg-video-object { + opacity: 1; +} + +@keyframes lg-play-stroke { + 0% { + stroke-dasharray: 1, 200; + stroke-dashoffset: 0; + } + 50% { + stroke-dasharray: 89, 200; + stroke-dashoffset: -35px; + } + 100% { + stroke-dasharray: 89, 200; + stroke-dashoffset: -124px; + } +} +@keyframes lg-play-rotate { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} +.lg-video-play-button { + width: 18%; + max-width: 140px; + position: absolute; + top: 50%; + left: 50%; + z-index: 2; + cursor: pointer; + transform: translate(-50%, -50%) scale(1); + will-change: opacity, transform; + -webkit-transition: -webkit-transform 0.25s cubic-bezier(0.17, 0.88, 0.32, 1.28), opacity 0.1s; + -moz-transition: -moz-transform 0.25s cubic-bezier(0.17, 0.88, 0.32, 1.28), opacity 0.1s; + -o-transition: -o-transform 0.25s cubic-bezier(0.17, 0.88, 0.32, 1.28), opacity 0.1s; + transition: transform 0.25s cubic-bezier(0.17, 0.88, 0.32, 1.28), opacity 0.1s; +} +.lg-video-play-button:hover .lg-video-play-icon-bg, +.lg-video-play-button:hover .lg-video-play-icon { + opacity: 1; +} + +.lg-video-play-icon-bg { + fill: none; + stroke-width: 3%; + stroke: #fcfcfc; + opacity: 0.6; + will-change: opacity; + -webkit-transition: opacity 0.12s ease-in; + -o-transition: opacity 0.12s ease-in; + transition: opacity 0.12s ease-in; +} + +.lg-video-play-icon-circle { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + fill: none; + stroke-width: 3%; + stroke: rgba(30, 30, 30, 0.9); + stroke-opacity: 1; + stroke-linecap: round; + stroke-dasharray: 200; + stroke-dashoffset: 200; +} + +.lg-video-play-icon { + position: absolute; + width: 25%; + max-width: 120px; + left: 50%; + top: 50%; + transform: translate3d(-50%, -50%, 0); + opacity: 0.6; + will-change: opacity; + -webkit-transition: opacity 0.12s ease-in; + -o-transition: opacity 0.12s ease-in; + transition: opacity 0.12s ease-in; +} +.lg-video-play-icon .lg-video-play-icon-inner { + fill: #fcfcfc; +} + +.lg-video-loading .lg-video-play-icon-circle { + animation: lg-play-rotate 2s linear 0.25s infinite, lg-play-stroke 1.5s ease-in-out 0.25s infinite; +} + +.lg-video-loaded .lg-video-play-button { + opacity: 0; + transform: translate(-50%, -50%) scale(0.7); +} + +.lg-progress-bar { + background-color: #333; + height: 5px; + left: 0; + position: absolute; + top: 0; + width: 100%; + z-index: 1083; + opacity: 0; + will-change: opacity; + -webkit-transition: opacity 0.08s ease 0s; + -moz-transition: opacity 0.08s ease 0s; + -o-transition: opacity 0.08s ease 0s; + transition: opacity 0.08s ease 0s; +} +.lg-progress-bar .lg-progress { + background-color: rgb(169, 7, 7); + height: 5px; + width: 0; +} +.lg-progress-bar.lg-start .lg-progress { + width: 100%; +} +.lg-show-autoplay .lg-progress-bar { + opacity: 1; +} + +.lg-autoplay-button:after { + content: "\e01d"; +} +.lg-show-autoplay .lg-autoplay-button:after { + content: "\e01a"; +} +.lg-single-item .lg-autoplay-button { + opacity: 0.75; + pointer-events: none; +} + +.lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-img-wrap, +.lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-image { + -webkit-transition-duration: 0ms !important; + transition-duration: 0ms !important; +} +.lg-outer.lg-use-transition-for-zoom .lg-item.lg-complete.lg-zoomable .lg-img-wrap { + will-change: transform; + -webkit-transition: -webkit-transform 0.5s cubic-bezier(0.12, 0.415, 0.01, 1.19) 0s; + -moz-transition: -moz-transform 0.5s cubic-bezier(0.12, 0.415, 0.01, 1.19) 0s; + -o-transition: -o-transform 0.5s cubic-bezier(0.12, 0.415, 0.01, 1.19) 0s; + transition: transform 0.5s cubic-bezier(0.12, 0.415, 0.01, 1.19) 0s; +} +.lg-outer.lg-use-transition-for-zoom.lg-zoom-drag-transition .lg-item.lg-complete.lg-zoomable .lg-img-wrap { + will-change: transform; + -webkit-transition: -webkit-transform 0.8s cubic-bezier(0, 0, 0.25, 1) 0s; + -moz-transition: -moz-transform 0.8s cubic-bezier(0, 0, 0.25, 1) 0s; + -o-transition: -o-transform 0.8s cubic-bezier(0, 0, 0.25, 1) 0s; + transition: transform 0.8s cubic-bezier(0, 0, 0.25, 1) 0s; +} +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-img-wrap { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + backface-visibility: hidden; +} +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image, +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + -webkit-transition: -webkit-transform 0.5s cubic-bezier(0.12, 0.415, 0.01, 1.19) 0s, opacity 0.15s !important; + -moz-transition: -moz-transform 0.5s cubic-bezier(0.12, 0.415, 0.01, 1.19) 0s, opacity 0.15s !important; + -o-transition: -o-transform 0.5s cubic-bezier(0.12, 0.415, 0.01, 1.19) 0s, opacity 0.15s !important; + transition: transform 0.5s cubic-bezier(0.12, 0.415, 0.01, 1.19) 0s, opacity 0.15s !important; + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + backface-visibility: hidden; +} +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image.no-transition, +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img.no-transition { + transition: none !important; +} +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image.reset-transition, +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img.reset-transition { + transform: scale3d(1, 1, 1) translate3d(-50%, -50%, 0px) !important; + max-width: none !important; + max-height: none !important; + top: 50% !important; + left: 50% !important; +} +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image.reset-transition-x, +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img.reset-transition-x { + transform: scale3d(1, 1, 1) translate3d(-50%, 0, 0px) !important; + top: 0 !important; + left: 50% !important; + max-width: none !important; + max-height: none !important; +} +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image.reset-transition-y, +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img.reset-transition-y { + transform: scale3d(1, 1, 1) translate3d(0, -50%, 0px) !important; + top: 50% !important; + left: 0% !important; + max-width: none !important; + max-height: none !important; +} + +.lg-icon.lg-zoom-in:after { + content: "\e311"; +} +.lg-actual-size .lg-icon.lg-zoom-in { + opacity: 1; + pointer-events: auto; +} +.lg-icon.lg-actual-size { + font-size: 20px; +} +.lg-icon.lg-actual-size:after { + content: "\e033"; +} +.lg-icon.lg-zoom-out { + opacity: 0.5; + pointer-events: none; +} +.lg-icon.lg-zoom-out:after { + content: "\e312"; +} +.lg-zoomed .lg-icon.lg-zoom-out { + opacity: 1; + pointer-events: auto; +} + +.lg-outer[data-lg-slide-type=video] .lg-zoom-in, +.lg-outer[data-lg-slide-type=video] .lg-actual-size, +.lg-outer[data-lg-slide-type=video] .lg-zoom-out, .lg-outer[data-lg-slide-type=iframe] .lg-zoom-in, +.lg-outer[data-lg-slide-type=iframe] .lg-actual-size, +.lg-outer[data-lg-slide-type=iframe] .lg-zoom-out, .lg-outer.lg-first-slide-loading .lg-zoom-in, +.lg-outer.lg-first-slide-loading .lg-actual-size, +.lg-outer.lg-first-slide-loading .lg-zoom-out { + opacity: 0.75; + pointer-events: none; +} + +.lg-outer .lg-pager-outer { + text-align: center; + z-index: 1080; + height: 10px; + margin-bottom: 10px; +} +.lg-outer .lg-pager-outer.lg-pager-hover .lg-pager-cont { + overflow: visible; +} +.lg-outer.lg-single-item .lg-pager-outer { + display: none; +} +.lg-outer .lg-pager-cont { + cursor: pointer; + display: inline-block; + overflow: hidden; + position: relative; + vertical-align: top; + margin: 0 5px; +} +.lg-outer .lg-pager-cont:hover .lg-pager-thumb-cont { + opacity: 1; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.lg-outer .lg-pager-cont.lg-pager-active .lg-pager { + box-shadow: 0 0 0 2px white inset; +} +.lg-outer .lg-pager-thumb-cont { + background-color: #fff; + color: #fff; + bottom: 100%; + height: 83px; + left: 0; + margin-bottom: 20px; + margin-left: -60px; + opacity: 0; + padding: 5px; + position: absolute; + width: 120px; + border-radius: 3px; + will-change: transform, opacity; + -webkit-transition: opacity 0.15s ease 0s, -webkit-transform 0.15s ease 0s; + -moz-transition: opacity 0.15s ease 0s, -moz-transform 0.15s ease 0s; + -o-transition: opacity 0.15s ease 0s, -o-transform 0.15s ease 0s; + transition: opacity 0.15s ease 0s, transform 0.15s ease 0s; + -webkit-transform: translate3d(0, 5px, 0); + transform: translate3d(0, 5px, 0); +} +.lg-outer .lg-pager-thumb-cont img { + width: 100%; + height: 100%; +} +.lg-outer .lg-pager { + background-color: rgba(255, 255, 255, 0.5); + border-radius: 50%; + box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.7) inset; + display: block; + height: 12px; + -webkit-transition: box-shadow 0.3s ease 0s; + -o-transition: box-shadow 0.3s ease 0s; + transition: box-shadow 0.3s ease 0s; + width: 12px; +} +.lg-outer .lg-pager:hover, .lg-outer .lg-pager:focus { + box-shadow: 0 0 0 8px white inset; +} +.lg-outer .lg-caret { + border-left: 10px solid transparent; + border-right: 10px solid transparent; + border-top: 10px dashed; + bottom: -10px; + display: inline-block; + height: 0; + left: 50%; + margin-left: -5px; + position: absolute; + vertical-align: middle; + width: 0; +} + +.lg-fullscreen:after { + content: "\e20c"; +} +.lg-fullscreen-on .lg-fullscreen:after { + content: "\e20d"; +} + +.lg-outer .lg-dropdown-overlay { + background-color: rgba(0, 0, 0, 0.25); + bottom: 0; + cursor: default; + left: 0; + position: absolute; + right: 0; + top: 0; + z-index: 1081; + opacity: 0; + visibility: hidden; + will-change: visibility, opacity; + -webkit-transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s; + -o-transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s; + transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s; +} +.lg-outer.lg-dropdown-active .lg-dropdown, +.lg-outer.lg-dropdown-active .lg-dropdown-overlay { + -webkit-transition-delay: 0s; + transition-delay: 0s; + -moz-transform: translate3d(0, 0px, 0); + -o-transform: translate3d(0, 0px, 0); + -ms-transform: translate3d(0, 0px, 0); + -webkit-transform: translate3d(0, 0px, 0); + transform: translate3d(0, 0px, 0); + opacity: 1; + visibility: visible; +} +.lg-outer.lg-dropdown-active .lg-share { + color: #fff; +} +.lg-outer .lg-dropdown { + background-color: #fff; + border-radius: 2px; + font-size: 14px; + list-style-type: none; + margin: 0; + padding: 10px 0; + position: absolute; + right: 0; + text-align: left; + top: 50px; + opacity: 0; + visibility: hidden; + -moz-transform: translate3d(0, 5px, 0); + -o-transform: translate3d(0, 5px, 0); + -ms-transform: translate3d(0, 5px, 0); + -webkit-transform: translate3d(0, 5px, 0); + transform: translate3d(0, 5px, 0); + will-change: visibility, opacity, transform; + -webkit-transition: -webkit-transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s; + -moz-transition: -moz-transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s; + -o-transition: -o-transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s; + transition: transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s; +} +.lg-outer .lg-dropdown:after { + content: ""; + display: block; + height: 0; + width: 0; + position: absolute; + border: 8px solid transparent; + border-bottom-color: #fff; + right: 16px; + top: -16px; +} +.lg-outer .lg-dropdown > li:last-child { + margin-bottom: 0px; +} +.lg-outer .lg-dropdown > li:hover a { + color: #333; +} +.lg-outer .lg-dropdown a { + color: #333; + display: block; + white-space: pre; + padding: 4px 12px; + font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 12px; +} +.lg-outer .lg-dropdown a:hover { + background-color: rgba(0, 0, 0, 0.07); +} +.lg-outer .lg-dropdown .lg-dropdown-text { + display: inline-block; + line-height: 1; + margin-top: -3px; + vertical-align: middle; +} +.lg-outer .lg-dropdown .lg-icon { + color: #333; + display: inline-block; + float: none; + font-size: 20px; + height: auto; + line-height: 1; + margin-right: 8px; + padding: 0; + vertical-align: middle; + width: auto; +} +.lg-outer .lg-share { + position: relative; +} +.lg-outer .lg-share:after { + content: "\e80d"; +} +.lg-outer .lg-share-facebook .lg-icon { + color: #3b5998; +} +.lg-outer .lg-share-facebook .lg-icon:after { + content: "\e904"; +} +.lg-outer .lg-share-twitter .lg-icon { + color: #00aced; +} +.lg-outer .lg-share-twitter .lg-icon:after { + content: "\e907"; +} +.lg-outer .lg-share-pinterest .lg-icon { + color: #cb2027; +} +.lg-outer .lg-share-pinterest .lg-icon:after { + content: "\e906"; +} + +.lg-comment-box { + width: 420px; + max-width: 100%; + position: absolute; + right: 0; + top: 0; + bottom: 0; + z-index: 9999; + background-color: #fff; + will-change: transform; + -moz-transform: translate3d(100%, 0, 0); + -o-transform: translate3d(100%, 0, 0); + -ms-transform: translate3d(100%, 0, 0); + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + -webkit-transition: -webkit-transform 0.4s cubic-bezier(0, 0, 0.25, 1) 0s; + -moz-transition: -moz-transform 0.4s cubic-bezier(0, 0, 0.25, 1) 0s; + -o-transition: -o-transform 0.4s cubic-bezier(0, 0, 0.25, 1) 0s; + transition: transform 0.4s cubic-bezier(0, 0, 0.25, 1) 0s; +} +.lg-comment-box .lg-comment-title { + margin: 0; + color: #fff; + font-size: 18px; +} +.lg-comment-box .lg-comment-header { + background-color: #000; + padding: 12px 20px; + position: absolute; + left: 0; + right: 0; + top: 0; +} +.lg-comment-box .lg-comment-body { + height: 100% !important; + padding-top: 43px !important; + width: 100% !important; +} +.lg-comment-box .fb-comments { + height: 100%; + width: 100%; + background: url("../images/loading.gif") no-repeat scroll center center #fff; + overflow-y: auto; + display: inline-block; +} +.lg-comment-box .fb-comments[fb-xfbml-state=rendered] { + background-image: none; +} +.lg-comment-box .fb-comments > span { + max-width: 100%; +} +.lg-comment-box .lg-comment-close { + position: absolute; + right: 5px; + top: 12px; + cursor: pointer; + font-size: 20px; + color: #999; + will-change: color; + -webkit-transition: color 0.2s linear; + -o-transition: color 0.2s linear; + transition: color 0.2s linear; +} +.lg-comment-box .lg-comment-close:hover { + color: #fff; +} +.lg-comment-box .lg-comment-close:after { + content: "\e070"; +} +.lg-comment-box iframe { + max-width: 100% !important; + width: 100% !important; +} +.lg-comment-box #disqus_thread { + padding: 0 20px; +} + +.lg-outer .lg-comment-overlay { + background-color: rgba(0, 0, 0, 0.25); + bottom: 0; + cursor: default; + left: 0; + position: fixed; + right: 0; + top: 0; + z-index: 1081; + opacity: 0; + visibility: hidden; + will-change: visibility, opacity; + -webkit-transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s; + -o-transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s; + transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s; +} +.lg-outer .lg-comment-toggle:after { + content: "\e908"; +} +.lg-outer.lg-comment-active .lg-comment-overlay { + -webkit-transition-delay: 0s; + transition-delay: 0s; + -moz-transform: translate3d(0, 0px, 0); + -o-transform: translate3d(0, 0px, 0); + -ms-transform: translate3d(0, 0px, 0); + -webkit-transform: translate3d(0, 0px, 0); + transform: translate3d(0, 0px, 0); + opacity: 1; + visibility: visible; +} +.lg-outer.lg-comment-active .lg-comment-toggle { + color: #fff; +} +.lg-outer.lg-comment-active .lg-comment-box { + -moz-transform: translate3d(0, 0, 0); + -o-transform: translate3d(0, 0, 0); + -ms-transform: translate3d(0, 0, 0); + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} + +.lg-outer .lg-img-rotate { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + -webkit-transition: -webkit-transform 0.4s cubic-bezier(0, 0, 0.25, 1) 0s; + -moz-transition: -moz-transform 0.4s cubic-bezier(0, 0, 0.25, 1) 0s; + -o-transition: -o-transform 0.4s cubic-bezier(0, 0, 0.25, 1) 0s; + transition: transform 0.4s cubic-bezier(0, 0, 0.25, 1) 0s; +} +.lg-outer[data-lg-slide-type=video] .lg-rotate-left, +.lg-outer[data-lg-slide-type=video] .lg-rotate-right, +.lg-outer[data-lg-slide-type=video] .lg-flip-ver, +.lg-outer[data-lg-slide-type=video] .lg-flip-hor, .lg-outer[data-lg-slide-type=iframe] .lg-rotate-left, +.lg-outer[data-lg-slide-type=iframe] .lg-rotate-right, +.lg-outer[data-lg-slide-type=iframe] .lg-flip-ver, +.lg-outer[data-lg-slide-type=iframe] .lg-flip-hor { + opacity: 0.75; + pointer-events: none; +} +.lg-outer .lg-img-rotate:before { + content: ""; + display: inline-block; + height: 100%; + vertical-align: middle; +} + +.lg-rotate-left:after { + content: "\e900"; +} + +.lg-rotate-right:after { + content: "\e901"; +} + +.lg-icon.lg-flip-hor, .lg-icon.lg-flip-ver { + font-size: 26px; +} + +.lg-flip-ver:after { + content: "\e903"; +} + +.lg-flip-hor:after { + content: "\e902"; +} + +.lg-medium-zoom-item { + cursor: zoom-in; +} + +.lg-medium-zoom .lg-outer { + cursor: zoom-out; +} +.lg-medium-zoom .lg-outer.lg-grab img.lg-object { + cursor: zoom-out; +} +.lg-medium-zoom .lg-outer.lg-grabbing img.lg-object { + cursor: zoom-out; +} + +.lg-relative-caption .lg-outer .lg-sub-html { + white-space: normal; + bottom: auto; + padding: 0; + background-image: none; +} +.lg-relative-caption .lg-outer .lg-relative-caption-item { + opacity: 0; + padding: 16px 0; + transition: 0.5s opacity ease; +} +.lg-relative-caption .lg-outer .lg-show-caption .lg-relative-caption-item { + opacity: 1; +} + +.lg-group:after { + content: ""; + display: table; + clear: both; +} + +.lg-container { + display: none; + outline: none; +} +.lg-container.lg-show { + display: block; +} + +.lg-on { + scroll-behavior: unset; +} + +.lg-overlay-open { + overflow: hidden; +} + +.lg-toolbar, +.lg-prev, +.lg-next, +.lg-pager-outer, +.lg-hide-sub-html .lg-sub-html { + opacity: 0; + will-change: transform, opacity; + -webkit-transition: -webkit-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; + -moz-transition: -moz-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; + -o-transition: -o-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; + transition: transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; +} + +.lg-show-in .lg-toolbar, +.lg-show-in .lg-prev, +.lg-show-in .lg-next, +.lg-show-in .lg-pager-outer { + opacity: 1; +} +.lg-show-in.lg-hide-sub-html .lg-sub-html { + opacity: 1; +} +.lg-show-in .lg-hide-items .lg-prev { + opacity: 0; + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0); +} +.lg-show-in .lg-hide-items .lg-next { + opacity: 0; + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0); +} +.lg-show-in .lg-hide-items .lg-toolbar { + opacity: 0; + -webkit-transform: translate3d(0, -10px, 0); + transform: translate3d(0, -10px, 0); +} +.lg-show-in .lg-hide-items.lg-hide-sub-html .lg-sub-html { + opacity: 0; + -webkit-transform: translate3d(0, 20px, 0); + transform: translate3d(0, 20px, 0); +} + +.lg-outer { + width: 100%; + height: 100%; + position: fixed; + top: 0; + left: 0; + z-index: 1050; + text-align: left; + opacity: 0.001; + outline: none; + will-change: auto; + overflow: hidden; + -webkit-transition: opacity 0.15s ease 0s; + -o-transition: opacity 0.15s ease 0s; + transition: opacity 0.15s ease 0s; +} +.lg-outer * { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.lg-outer.lg-zoom-from-image { + opacity: 1; +} +.lg-outer.lg-visible { + opacity: 1; +} +.lg-outer.lg-css3 .lg-item:not(.lg-start-end-progress).lg-prev-slide, .lg-outer.lg-css3 .lg-item:not(.lg-start-end-progress).lg-next-slide, .lg-outer.lg-css3 .lg-item:not(.lg-start-end-progress).lg-current { + -webkit-transition-duration: inherit !important; + transition-duration: inherit !important; + -webkit-transition-timing-function: inherit !important; + transition-timing-function: inherit !important; +} +.lg-outer.lg-css3.lg-dragging .lg-item.lg-prev-slide, .lg-outer.lg-css3.lg-dragging .lg-item.lg-next-slide, .lg-outer.lg-css3.lg-dragging .lg-item.lg-current { + -webkit-transition-duration: 0s !important; + transition-duration: 0s !important; + opacity: 1; +} +.lg-outer.lg-grab img.lg-object { + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: -o-grab; + cursor: -ms-grab; + cursor: grab; +} +.lg-outer.lg-grabbing img.lg-object { + cursor: move; + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: -o-grabbing; + cursor: -ms-grabbing; + cursor: grabbing; +} +.lg-outer .lg-content { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +} +.lg-outer .lg-inner { + width: 100%; + position: absolute; + left: 0; + top: 0; + bottom: 0; + -webkit-transition: opacity 0s; + -o-transition: opacity 0s; + transition: opacity 0s; + white-space: nowrap; +} +.lg-outer .lg-item { + display: none !important; +} +.lg-outer .lg-item:not(.lg-start-end-progress) { + background: url("../images/loading.gif") no-repeat scroll center center transparent; +} +.lg-outer.lg-css3 .lg-prev-slide, +.lg-outer.lg-css3 .lg-current, +.lg-outer.lg-css3 .lg-next-slide { + display: inline-block !important; +} +.lg-outer.lg-css .lg-current { + display: inline-block !important; +} +.lg-outer .lg-item, +.lg-outer .lg-img-wrap { + display: inline-block; + text-align: center; + position: absolute; + width: 100%; + height: 100%; +} +.lg-outer .lg-item:before, +.lg-outer .lg-img-wrap:before { + content: ""; + display: inline-block; + height: 100%; + vertical-align: middle; +} +.lg-outer .lg-img-wrap { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + white-space: nowrap; + font-size: 0; +} +.lg-outer .lg-item.lg-complete { + background-image: none; +} +.lg-outer .lg-item.lg-current { + z-index: 1060; +} +.lg-outer .lg-object { + display: inline-block; + vertical-align: middle; + max-width: 100%; + max-height: 100%; + width: auto; + height: auto; + position: relative; +} +.lg-outer .lg-empty-html.lg-sub-html, +.lg-outer .lg-empty-html .lg-sub-html { + display: none; +} +.lg-outer.lg-hide-download .lg-download { + opacity: 0.75; + pointer-events: none; +} +.lg-outer .lg-first-slide .lg-dummy-img { + position: absolute; + top: 50%; + left: 50%; +} +.lg-outer.lg-components-open:not(.lg-zoomed) .lg-components { + -webkit-transform: translate3d(0, 0%, 0); + transform: translate3d(0, 0%, 0); + opacity: 1; +} +.lg-outer.lg-components-open:not(.lg-zoomed) .lg-sub-html { + opacity: 1; + transition: opacity 0.2s ease-out 0.15s; +} +.lg-outer .lg-media-cont { + text-align: center; + display: inline-block; + vertical-align: middle; + position: relative; +} +.lg-outer .lg-media-cont .lg-object { + width: 100% !important; + height: 100% !important; +} +.lg-outer .lg-has-iframe .lg-media-cont { + -webkit-overflow-scrolling: touch; + overflow: auto; +} + +.lg-backdrop { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 1040; + background-color: #000; + opacity: 0; + will-change: auto; + -webkit-transition: opacity 333ms ease-in 0s; + -o-transition: opacity 333ms ease-in 0s; + transition: opacity 333ms ease-in 0s; +} +.lg-backdrop.in { + opacity: 1; +} + +.lg-css3.lg-no-trans .lg-prev-slide, +.lg-css3.lg-no-trans .lg-next-slide, +.lg-css3.lg-no-trans .lg-current { + -webkit-transition: none 0s ease 0s !important; + -moz-transition: none 0s ease 0s !important; + -o-transition: none 0s ease 0s !important; + transition: none 0s ease 0s !important; +} +.lg-css3.lg-use-css3 .lg-item { + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + backface-visibility: hidden; +} +.lg-css3.lg-fade .lg-item { + opacity: 0; +} +.lg-css3.lg-fade .lg-item.lg-current { + opacity: 1; +} +.lg-css3.lg-fade .lg-item.lg-prev-slide, .lg-css3.lg-fade .lg-item.lg-next-slide, .lg-css3.lg-fade .lg-item.lg-current { + -webkit-transition: opacity 0.1s ease 0s; + -moz-transition: opacity 0.1s ease 0s; + -o-transition: opacity 0.1s ease 0s; + transition: opacity 0.1s ease 0s; +} +.lg-css3.lg-use-css3 .lg-item.lg-start-progress { + -webkit-transition: -webkit-transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s; + -o-transition: -o-transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s; + transition: transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s; +} +.lg-css3.lg-use-css3 .lg-item.lg-start-end-progress { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s; +} +.lg-css3.lg-slide.lg-use-css3 .lg-item { + opacity: 0; +} +.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide { + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); +} +.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide { + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); +} +.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1; +} +.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide, .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide, .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; +} + +.lg-container { + display: none; +} +.lg-container.lg-show { + display: block; +} +.lg-container.lg-dragging-vertical .lg-backdrop { + -webkit-transition-duration: 0s !important; + transition-duration: 0s !important; +} +.lg-container.lg-dragging-vertical .lg-css3 .lg-item.lg-current { + -webkit-transition-duration: 0s !important; + transition-duration: 0s !important; + opacity: 1; +} + +.lg-inline .lg-backdrop, +.lg-inline .lg-outer { + position: absolute; +} +.lg-inline .lg-backdrop { + z-index: 1; +} +.lg-inline .lg-outer { + z-index: 2; +} +.lg-inline .lg-maximize:after { + content: "\e909"; +} + +.lg-components { + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + will-change: transform; + -webkit-transition: -webkit-transform 0.35s ease-out 0s; + -moz-transition: -moz-transform 0.35s ease-out 0s; + -o-transition: -o-transform 0.35s ease-out 0s; + transition: transform 0.35s ease-out 0s; + z-index: 1080; + position: absolute; + bottom: 0; + right: 0; + left: 0; +} + +/*# sourceMappingURL=lightgallery-bundle.css.map */ diff --git a/assets/lightGallery/css/lightgallery-bundle.css.map b/assets/lightGallery/css/lightgallery-bundle.css.map new file mode 100644 index 0000000..98cf1d3 --- /dev/null +++ b/assets/lightGallery/css/lightgallery-bundle.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["../../src/scss/_lg-fonts.scss","../../src/scss/_lg-theme-default.scss","../../src/scss/_lg-variables.scss","../../src/scss/_lg-mixins.scss","../../src/scss/lg-thumbnail.scss","../../src/scss/lg-video.scss","../../src/scss/lg-autoplay.scss","../../src/scss/lg-zoom.scss","../../src/scss/lg-pager.scss","../../src/scss/lg-fullscreen.scss","../../src/scss/lg-share.scss","../../src/scss/lg-comments.scss","../../src/scss/lg-rotate.scss","../../src/scss/lg-medium-zoom.scss","../../src/scss/lg-relative-caption.scss","../../src/scss/lightgallery-core.scss"],"names":[],"mappings":"AAEA;EACI;EACA;EAIA;EACA;EACA;;AAGJ;AACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAEA;EACA;EACA;;;ACtBJ;EACI;;;AAKJ;AAAA;EAEI;EACA,eCNoB;EDOpB,OCDY;EDEZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA,SCuCc;EDtCd;EACA;;AAEA;AAAA;EACI;EACA;;AAGJ;AAAA;EACI,OClBc;;ADoBlB;AAAA;EACI;;;AAIR;EACI;;AAEA;EACI;;;AAIR;EACI;;AAEA;EACI;;;AEYJ;EFPA;IACI;;EAGJ;IACI;;EAGJ;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AAEA;EACI;;AAIJ;EZ1BR;EACA;EACA;EACA,YY0BY;;AAMJ;EZnCR;EACA;EACA;EACA,YYiCY;;AAKJ;EZzCR;EACA;EACA;EACA,YYuCY;;AASJ;EACI;;AAEA;EZ7LZ;EACA;;AYgMY;EZjMZ;EACA;;AYoMY;EZrMZ;EACA;EYsMgB;;AAIJ;EZpEZ;EACA;EACA;EACA,YYoEgB;;;AAUpB;EACI;;AACA;EACI;;AAKA;EZpJJ,6BYqJQ;EZpJR,qBYoJQ;;AAII;EZzJZ,6BY0JgB;EZzJhB,qBYyJgB;EACA;;;AAUhB;AAAA;EAEI;;AAEJ;EACI;;AAEJ;EACI;;AAGA;EACI;;;AAMZ;EZnQI;EACA;EYoQA;EZ9HA;EACA;EACA;EACA,YY4HA;EACA,Sb3WgB;Ea4WhB;EACA;EACA;EACA","file":"lightgallery-bundle.css"} \ No newline at end of file diff --git a/assets/lightGallery/css/lightgallery-bundle.min.css b/assets/lightGallery/css/lightgallery-bundle.min.css new file mode 100644 index 0000000..da7c3ce --- /dev/null +++ b/assets/lightGallery/css/lightgallery-bundle.min.css @@ -0,0 +1 @@ +@font-face{font-family:lg;src:url(../fonts/lg.woff2?io9a6k) format("woff2"),url(../fonts/lg.ttf?io9a6k) format("truetype"),url(../fonts/lg.woff?io9a6k) format("woff"),url(../fonts/lg.svg?io9a6k#lg) format("svg");font-weight:400;font-style:normal;font-display:block}.lg-icon{font-family:lg!important;speak:never;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.lg-container{font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"}.lg-next,.lg-prev{background-color:rgba(0,0,0,.45);border-radius:2px;color:#999;cursor:pointer;display:block;font-size:22px;margin-top:-10px;padding:8px 10px 9px;position:absolute;top:50%;z-index:1084;outline:0;border:none}.lg-next.disabled,.lg-prev.disabled{opacity:0!important;cursor:default}.lg-next:hover:not(.disabled),.lg-prev:hover:not(.disabled){color:#fff}.lg-single-item .lg-next,.lg-single-item .lg-prev{display:none}.lg-next{right:20px}.lg-next:before{content:"\e095"}.lg-prev{left:20px}.lg-prev:after{content:"\e094"}@-webkit-keyframes lg-right-end{0%{left:0}50%{left:-30px}100%{left:0}}@-moz-keyframes lg-right-end{0%{left:0}50%{left:-30px}100%{left:0}}@-ms-keyframes lg-right-end{0%{left:0}50%{left:-30px}100%{left:0}}@keyframes lg-right-end{0%{left:0}50%{left:-30px}100%{left:0}}@-webkit-keyframes lg-left-end{0%{left:0}50%{left:30px}100%{left:0}}@-moz-keyframes lg-left-end{0%{left:0}50%{left:30px}100%{left:0}}@-ms-keyframes lg-left-end{0%{left:0}50%{left:30px}100%{left:0}}@keyframes lg-left-end{0%{left:0}50%{left:30px}100%{left:0}}.lg-outer.lg-right-end .lg-object{-webkit-animation:lg-right-end .3s;-o-animation:lg-right-end .3s;animation:lg-right-end .3s;position:relative}.lg-outer.lg-left-end .lg-object{-webkit-animation:lg-left-end .3s;-o-animation:lg-left-end .3s;animation:lg-left-end .3s;position:relative}.lg-toolbar{z-index:1082;left:0;position:absolute;top:0;width:100%}.lg-media-overlap .lg-toolbar{background-image:linear-gradient(0deg,rgba(0,0,0,0),rgba(0,0,0,.4))}.lg-toolbar .lg-icon{color:#999;cursor:pointer;float:right;font-size:24px;height:47px;line-height:27px;padding:10px 0;text-align:center;width:50px;text-decoration:none!important;outline:medium none;will-change:color;-webkit-transition:color .2s linear;-o-transition:color .2s linear;transition:color .2s linear;background:0 0;border:none;box-shadow:none}.lg-toolbar .lg-icon.lg-icon-18{font-size:18px}.lg-toolbar .lg-icon:hover{color:#fff}.lg-toolbar .lg-close:after{content:"\e070"}.lg-toolbar .lg-maximize{font-size:22px}.lg-toolbar .lg-maximize:after{content:"\e90a"}.lg-toolbar .lg-download:after{content:"\e0f2"}.lg-sub-html{color:#eee;font-size:16px;padding:10px 40px;text-align:center;z-index:1080;opacity:0;-webkit-transition:opacity .2s ease-out 0s;-o-transition:opacity .2s ease-out 0s;transition:opacity .2s ease-out 0s}.lg-sub-html h4{margin:0;font-size:13px;font-weight:700}.lg-sub-html p{font-size:12px;margin:5px 0 0}.lg-sub-html a{color:inherit}.lg-sub-html a:hover{text-decoration:underline}.lg-media-overlap .lg-sub-html{background-image:linear-gradient(180deg,rgba(0,0,0,0),rgba(0,0,0,.6))}.lg-item .lg-sub-html{position:absolute;bottom:0;right:0;left:0}.lg-error-msg{font-size:14px;color:#999}.lg-counter{color:#999;display:inline-block;font-size:16px;padding-left:20px;padding-top:12px;height:47px;vertical-align:middle}.lg-closing .lg-next,.lg-closing .lg-prev,.lg-closing .lg-sub-html,.lg-closing .lg-toolbar{opacity:0;-webkit-transition:-webkit-transform .08 cubic-bezier(0,0,.25,1) 0s,opacity .08 cubic-bezier(0,0,.25,1) 0s,color .08 linear;-moz-transition:-moz-transform .08 cubic-bezier(0,0,.25,1) 0s,opacity .08 cubic-bezier(0,0,.25,1) 0s,color .08 linear;-o-transition:-o-transform .08 cubic-bezier(0,0,.25,1) 0s,opacity .08 cubic-bezier(0,0,.25,1) 0s,color .08 linear;transition:transform .08 cubic-bezier(0,0,.25,1) 0s,opacity .08 cubic-bezier(0,0,.25,1) 0s,color .08 linear}body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable) .lg-img-wrap,body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable) .lg-media-cont,body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable) .lg-video-cont{opacity:0;-moz-transform:scale3d(.5,.5,.5);-o-transform:scale3d(.5,.5,.5);-ms-transform:scale3d(.5,.5,.5);-webkit-transform:scale3d(.5,.5,.5);transform:scale3d(.5,.5,.5);will-change:transform,opacity;-webkit-transition:-webkit-transform 250ms cubic-bezier(0,0,.25,1) 0s,opacity 250ms cubic-bezier(0,0,.25,1)!important;-moz-transition:-moz-transform 250ms cubic-bezier(0,0,.25,1) 0s,opacity 250ms cubic-bezier(0,0,.25,1)!important;-o-transition:-o-transform 250ms cubic-bezier(0,0,.25,1) 0s,opacity 250ms cubic-bezier(0,0,.25,1)!important;transition:transform 250ms cubic-bezier(0,0,.25,1) 0s,opacity 250ms cubic-bezier(0,0,.25,1)!important}body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable).lg-complete .lg-img-wrap,body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable).lg-complete .lg-media-cont,body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable).lg-complete .lg-video-cont{opacity:1;-moz-transform:scale3d(1,1,1);-o-transform:scale3d(1,1,1);-ms-transform:scale3d(1,1,1);-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}.lg-icon:focus-visible{color:#fff;border-radius:3px;outline:1px dashed rgba(255,255,255,.6)}.lg-toolbar .lg-icon:focus-visible{border-radius:8px;outline-offset:-5px}.lg-outer .lg-thumb-outer{background-color:#0d0a0a;width:100%;max-height:350px;overflow:hidden;float:left}.lg-outer .lg-thumb-outer.lg-grab .lg-thumb-item{cursor:-webkit-grab;cursor:-moz-grab;cursor:-o-grab;cursor:-ms-grab;cursor:grab}.lg-outer .lg-thumb-outer.lg-grabbing .lg-thumb-item{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:-o-grabbing;cursor:-ms-grabbing;cursor:grabbing}.lg-outer .lg-thumb-outer.lg-dragging .lg-thumb{-webkit-transition-duration:0s!important;transition-duration:0s!important}.lg-outer .lg-thumb-outer.lg-rebuilding-thumbnails .lg-thumb{-webkit-transition-duration:0s!important;transition-duration:0s!important}.lg-outer .lg-thumb-outer.lg-thumb-align-middle{text-align:center}.lg-outer .lg-thumb-outer.lg-thumb-align-left{text-align:left}.lg-outer .lg-thumb-outer.lg-thumb-align-right{text-align:right}.lg-outer.lg-single-item .lg-thumb-outer{display:none}.lg-outer .lg-thumb{padding:5px 0;height:100%;margin-bottom:-5px;display:inline-block;vertical-align:middle}@media (min-width:768px){.lg-outer .lg-thumb{padding:10px 0}}.lg-outer .lg-thumb-item{cursor:pointer;float:left;overflow:hidden;height:100%;border-radius:2px;margin-bottom:5px;will-change:border-color}@media (min-width:768px){.lg-outer .lg-thumb-item{border-radius:4px;border:2px solid #fff;-webkit-transition:border-color .25s ease;-o-transition:border-color .25s ease;transition:border-color .25s ease}}.lg-outer .lg-thumb-item.active,.lg-outer .lg-thumb-item:hover{border-color:#a90707}.lg-outer .lg-thumb-item img{width:100%;height:100%;object-fit:cover;display:block}.lg-outer.lg-can-toggle .lg-item{padding-bottom:0}.lg-outer .lg-toggle-thumb:after{content:"\e1ff"}.lg-outer.lg-animate-thumb .lg-thumb{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1)}.lg-outer .lg-video-cont{text-align:center;display:inline-block;vertical-align:middle;position:relative}.lg-outer .lg-video-cont .lg-object{width:100%!important;height:100%!important}.lg-outer .lg-has-iframe .lg-video-cont{-webkit-overflow-scrolling:touch;overflow:auto}.lg-outer .lg-video-object{position:absolute;left:0;right:0;width:100%;height:100%;top:0;bottom:0;z-index:3}.lg-outer .lg-video-poster{z-index:1}.lg-outer .lg-has-video .lg-video-object{opacity:0;will-change:opacity;-webkit-transition:opacity .3s ease-in;-o-transition:opacity .3s ease-in;transition:opacity .3s ease-in}.lg-outer .lg-has-video.lg-video-loaded .lg-video-play-button,.lg-outer .lg-has-video.lg-video-loaded .lg-video-poster{opacity:0!important}.lg-outer .lg-has-video.lg-video-loaded .lg-video-object{opacity:1}@keyframes lg-play-stroke{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@keyframes lg-play-rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.lg-video-play-button{width:18%;max-width:140px;position:absolute;top:50%;left:50%;z-index:2;cursor:pointer;transform:translate(-50%,-50%) scale(1);will-change:opacity,transform;-webkit-transition:-webkit-transform .25s cubic-bezier(.17,.88,.32,1.28),opacity .1s;-moz-transition:-moz-transform .25s cubic-bezier(.17,.88,.32,1.28),opacity .1s;-o-transition:-o-transform .25s cubic-bezier(.17,.88,.32,1.28),opacity .1s;transition:transform .25s cubic-bezier(.17,.88,.32,1.28),opacity .1s}.lg-video-play-button:hover .lg-video-play-icon,.lg-video-play-button:hover .lg-video-play-icon-bg{opacity:1}.lg-video-play-icon-bg{fill:none;stroke-width:3%;stroke:#fcfcfc;opacity:.6;will-change:opacity;-webkit-transition:opacity .12s ease-in;-o-transition:opacity .12s ease-in;transition:opacity .12s ease-in}.lg-video-play-icon-circle{position:absolute;top:0;left:0;bottom:0;right:0;fill:none;stroke-width:3%;stroke:rgba(30,30,30,.9);stroke-opacity:1;stroke-linecap:round;stroke-dasharray:200;stroke-dashoffset:200}.lg-video-play-icon{position:absolute;width:25%;max-width:120px;left:50%;top:50%;transform:translate3d(-50%,-50%,0);opacity:.6;will-change:opacity;-webkit-transition:opacity .12s ease-in;-o-transition:opacity .12s ease-in;transition:opacity .12s ease-in}.lg-video-play-icon .lg-video-play-icon-inner{fill:#fcfcfc}.lg-video-loading .lg-video-play-icon-circle{animation:lg-play-rotate 2s linear .25s infinite,lg-play-stroke 1.5s ease-in-out .25s infinite}.lg-video-loaded .lg-video-play-button{opacity:0;transform:translate(-50%,-50%) scale(.7)}.lg-progress-bar{background-color:#333;height:5px;left:0;position:absolute;top:0;width:100%;z-index:1083;opacity:0;will-change:opacity;-webkit-transition:opacity 80ms ease 0s;-moz-transition:opacity 80ms ease 0s;-o-transition:opacity 80ms ease 0s;transition:opacity 80ms ease 0s}.lg-progress-bar .lg-progress{background-color:#a90707;height:5px;width:0}.lg-progress-bar.lg-start .lg-progress{width:100%}.lg-show-autoplay .lg-progress-bar{opacity:1}.lg-autoplay-button:after{content:"\e01d"}.lg-show-autoplay .lg-autoplay-button:after{content:"\e01a"}.lg-single-item .lg-autoplay-button{opacity:.75;pointer-events:none}.lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-image,.lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-img-wrap{-webkit-transition-duration:0s!important;transition-duration:0s!important}.lg-outer.lg-use-transition-for-zoom .lg-item.lg-complete.lg-zoomable .lg-img-wrap{will-change:transform;-webkit-transition:-webkit-transform .5s cubic-bezier(.12,.415,.01,1.19) 0s;-moz-transition:-moz-transform .5s cubic-bezier(.12,.415,.01,1.19) 0s;-o-transition:-o-transform .5s cubic-bezier(.12,.415,.01,1.19) 0s;transition:transform .5s cubic-bezier(.12,.415,.01,1.19) 0s}.lg-outer.lg-use-transition-for-zoom.lg-zoom-drag-transition .lg-item.lg-complete.lg-zoomable .lg-img-wrap{will-change:transform;-webkit-transition:-webkit-transform .8s cubic-bezier(0,0,.25,1) 0s;-moz-transition:-moz-transform .8s cubic-bezier(0,0,.25,1) 0s;-o-transition:-o-transform .8s cubic-bezier(0,0,.25,1) 0s;transition:transform .8s cubic-bezier(0,0,.25,1) 0s}.lg-outer .lg-item.lg-complete.lg-zoomable .lg-img-wrap{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;backface-visibility:hidden}.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img,.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1);-webkit-transition:-webkit-transform .5s cubic-bezier(.12,.415,.01,1.19) 0s,opacity .15s!important;-moz-transition:-moz-transform .5s cubic-bezier(.12,.415,.01,1.19) 0s,opacity .15s!important;-o-transition:-o-transform .5s cubic-bezier(.12,.415,.01,1.19) 0s,opacity .15s!important;transition:transform .5s cubic-bezier(.12,.415,.01,1.19) 0s,opacity .15s!important;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;backface-visibility:hidden}.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img.no-transition,.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image.no-transition{transition:none!important}.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img.reset-transition,.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image.reset-transition{transform:scale3d(1,1,1) translate3d(-50%,-50%,0)!important;max-width:none!important;max-height:none!important;top:50%!important;left:50%!important}.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img.reset-transition-x,.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image.reset-transition-x{transform:scale3d(1,1,1) translate3d(-50%,0,0)!important;top:0!important;left:50%!important;max-width:none!important;max-height:none!important}.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img.reset-transition-y,.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image.reset-transition-y{transform:scale3d(1,1,1) translate3d(0,-50%,0)!important;top:50%!important;left:0!important;max-width:none!important;max-height:none!important}.lg-icon.lg-zoom-in:after{content:"\e311"}.lg-actual-size .lg-icon.lg-zoom-in{opacity:1;pointer-events:auto}.lg-icon.lg-actual-size{font-size:20px}.lg-icon.lg-actual-size:after{content:"\e033"}.lg-icon.lg-zoom-out{opacity:.5;pointer-events:none}.lg-icon.lg-zoom-out:after{content:"\e312"}.lg-zoomed .lg-icon.lg-zoom-out{opacity:1;pointer-events:auto}.lg-outer.lg-first-slide-loading .lg-actual-size,.lg-outer.lg-first-slide-loading .lg-zoom-in,.lg-outer.lg-first-slide-loading .lg-zoom-out,.lg-outer[data-lg-slide-type=iframe] .lg-actual-size,.lg-outer[data-lg-slide-type=iframe] .lg-zoom-in,.lg-outer[data-lg-slide-type=iframe] .lg-zoom-out,.lg-outer[data-lg-slide-type=video] .lg-actual-size,.lg-outer[data-lg-slide-type=video] .lg-zoom-in,.lg-outer[data-lg-slide-type=video] .lg-zoom-out{opacity:.75;pointer-events:none}.lg-outer .lg-pager-outer{text-align:center;z-index:1080;height:10px;margin-bottom:10px}.lg-outer .lg-pager-outer.lg-pager-hover .lg-pager-cont{overflow:visible}.lg-outer.lg-single-item .lg-pager-outer{display:none}.lg-outer .lg-pager-cont{cursor:pointer;display:inline-block;overflow:hidden;position:relative;vertical-align:top;margin:0 5px}.lg-outer .lg-pager-cont:hover .lg-pager-thumb-cont{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.lg-outer .lg-pager-cont.lg-pager-active .lg-pager{box-shadow:0 0 0 2px #fff inset}.lg-outer .lg-pager-thumb-cont{background-color:#fff;color:#fff;bottom:100%;height:83px;left:0;margin-bottom:20px;margin-left:-60px;opacity:0;padding:5px;position:absolute;width:120px;border-radius:3px;will-change:transform,opacity;-webkit-transition:opacity .15s ease 0s,-webkit-transform .15s ease 0s;-moz-transition:opacity .15s ease 0s,-moz-transform .15s ease 0s;-o-transition:opacity .15s ease 0s,-o-transform .15s ease 0s;transition:opacity .15s ease 0s,transform .15s ease 0s;-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}.lg-outer .lg-pager-thumb-cont img{width:100%;height:100%}.lg-outer .lg-pager{background-color:rgba(255,255,255,.5);border-radius:50%;box-shadow:0 0 0 8px rgba(255,255,255,.7) inset;display:block;height:12px;-webkit-transition:box-shadow .3s ease 0s;-o-transition:box-shadow .3s ease 0s;transition:box-shadow .3s ease 0s;width:12px}.lg-outer .lg-pager:focus,.lg-outer .lg-pager:hover{box-shadow:0 0 0 8px #fff inset}.lg-outer .lg-caret{border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px dashed;bottom:-10px;display:inline-block;height:0;left:50%;margin-left:-5px;position:absolute;vertical-align:middle;width:0}.lg-fullscreen:after{content:"\e20c"}.lg-fullscreen-on .lg-fullscreen:after{content:"\e20d"}.lg-outer .lg-dropdown-overlay{background-color:rgba(0,0,0,.25);bottom:0;cursor:default;left:0;position:absolute;right:0;top:0;z-index:1081;opacity:0;visibility:hidden;will-change:visibility,opacity;-webkit-transition:visibility 0s linear .18s,opacity .18s linear 0s;-o-transition:visibility 0s linear .18s,opacity .18s linear 0s;transition:visibility 0s linear .18s,opacity .18s linear 0s}.lg-outer.lg-dropdown-active .lg-dropdown,.lg-outer.lg-dropdown-active .lg-dropdown-overlay{-webkit-transition-delay:0s;transition-delay:0s;-moz-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1;visibility:visible}.lg-outer.lg-dropdown-active .lg-share{color:#fff}.lg-outer .lg-dropdown{background-color:#fff;border-radius:2px;font-size:14px;list-style-type:none;margin:0;padding:10px 0;position:absolute;right:0;text-align:left;top:50px;opacity:0;visibility:hidden;-moz-transform:translate3d(0,5px,0);-o-transform:translate3d(0,5px,0);-ms-transform:translate3d(0,5px,0);-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0);will-change:visibility,opacity,transform;-webkit-transition:-webkit-transform .18s linear 0s,visibility 0s linear .5s,opacity .18s linear 0s;-moz-transition:-moz-transform .18s linear 0s,visibility 0s linear .5s,opacity .18s linear 0s;-o-transition:-o-transform .18s linear 0s,visibility 0s linear .5s,opacity .18s linear 0s;transition:transform .18s linear 0s,visibility 0s linear .5s,opacity .18s linear 0s}.lg-outer .lg-dropdown:after{content:"";display:block;height:0;width:0;position:absolute;border:8px solid transparent;border-bottom-color:#fff;right:16px;top:-16px}.lg-outer .lg-dropdown>li:last-child{margin-bottom:0}.lg-outer .lg-dropdown>li:hover a{color:#333}.lg-outer .lg-dropdown a{color:#333;display:block;white-space:pre;padding:4px 12px;font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px}.lg-outer .lg-dropdown a:hover{background-color:rgba(0,0,0,.07)}.lg-outer .lg-dropdown .lg-dropdown-text{display:inline-block;line-height:1;margin-top:-3px;vertical-align:middle}.lg-outer .lg-dropdown .lg-icon{color:#333;display:inline-block;float:none;font-size:20px;height:auto;line-height:1;margin-right:8px;padding:0;vertical-align:middle;width:auto}.lg-outer .lg-share{position:relative}.lg-outer .lg-share:after{content:"\e80d"}.lg-outer .lg-share-facebook .lg-icon{color:#3b5998}.lg-outer .lg-share-facebook .lg-icon:after{content:"\e904"}.lg-outer .lg-share-twitter .lg-icon{color:#00aced}.lg-outer .lg-share-twitter .lg-icon:after{content:"\e907"}.lg-outer .lg-share-pinterest .lg-icon{color:#cb2027}.lg-outer .lg-share-pinterest .lg-icon:after{content:"\e906"}.lg-comment-box{width:420px;max-width:100%;position:absolute;right:0;top:0;bottom:0;z-index:9999;background-color:#fff;will-change:transform;-moz-transform:translate3d(100%,0,0);-o-transform:translate3d(100%,0,0);-ms-transform:translate3d(100%,0,0);-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);-webkit-transition:-webkit-transform .4s cubic-bezier(0,0,.25,1) 0s;-moz-transition:-moz-transform .4s cubic-bezier(0,0,.25,1) 0s;-o-transition:-o-transform .4s cubic-bezier(0,0,.25,1) 0s;transition:transform .4s cubic-bezier(0,0,.25,1) 0s}.lg-comment-box .lg-comment-title{margin:0;color:#fff;font-size:18px}.lg-comment-box .lg-comment-header{background-color:#000;padding:12px 20px;position:absolute;left:0;right:0;top:0}.lg-comment-box .lg-comment-body{height:100%!important;padding-top:43px!important;width:100%!important}.lg-comment-box .fb-comments{height:100%;width:100%;background:url(../images/loading.gif) no-repeat scroll center center #fff;overflow-y:auto;display:inline-block}.lg-comment-box .fb-comments[fb-xfbml-state=rendered]{background-image:none}.lg-comment-box .fb-comments>span{max-width:100%}.lg-comment-box .lg-comment-close{position:absolute;right:5px;top:12px;cursor:pointer;font-size:20px;color:#999;will-change:color;-webkit-transition:color .2s linear;-o-transition:color .2s linear;transition:color .2s linear}.lg-comment-box .lg-comment-close:hover{color:#fff}.lg-comment-box .lg-comment-close:after{content:"\e070"}.lg-comment-box iframe{max-width:100%!important;width:100%!important}.lg-comment-box #disqus_thread{padding:0 20px}.lg-outer .lg-comment-overlay{background-color:rgba(0,0,0,.25);bottom:0;cursor:default;left:0;position:fixed;right:0;top:0;z-index:1081;opacity:0;visibility:hidden;will-change:visibility,opacity;-webkit-transition:visibility 0s linear .18s,opacity .18s linear 0s;-o-transition:visibility 0s linear .18s,opacity .18s linear 0s;transition:visibility 0s linear .18s,opacity .18s linear 0s}.lg-outer .lg-comment-toggle:after{content:"\e908"}.lg-outer.lg-comment-active .lg-comment-overlay{-webkit-transition-delay:0s;transition-delay:0s;-moz-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1;visibility:visible}.lg-outer.lg-comment-active .lg-comment-toggle{color:#fff}.lg-outer.lg-comment-active .lg-comment-box{-moz-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.lg-outer .lg-img-rotate{position:absolute;left:0;right:0;top:0;bottom:0;-webkit-transition:-webkit-transform .4s cubic-bezier(0,0,.25,1) 0s;-moz-transition:-moz-transform .4s cubic-bezier(0,0,.25,1) 0s;-o-transition:-o-transform .4s cubic-bezier(0,0,.25,1) 0s;transition:transform .4s cubic-bezier(0,0,.25,1) 0s}.lg-outer[data-lg-slide-type=iframe] .lg-flip-hor,.lg-outer[data-lg-slide-type=iframe] .lg-flip-ver,.lg-outer[data-lg-slide-type=iframe] .lg-rotate-left,.lg-outer[data-lg-slide-type=iframe] .lg-rotate-right,.lg-outer[data-lg-slide-type=video] .lg-flip-hor,.lg-outer[data-lg-slide-type=video] .lg-flip-ver,.lg-outer[data-lg-slide-type=video] .lg-rotate-left,.lg-outer[data-lg-slide-type=video] .lg-rotate-right{opacity:.75;pointer-events:none}.lg-outer .lg-img-rotate:before{content:"";display:inline-block;height:100%;vertical-align:middle}.lg-rotate-left:after{content:"\e900"}.lg-rotate-right:after{content:"\e901"}.lg-icon.lg-flip-hor,.lg-icon.lg-flip-ver{font-size:26px}.lg-flip-ver:after{content:"\e903"}.lg-flip-hor:after{content:"\e902"}.lg-medium-zoom-item{cursor:zoom-in}.lg-medium-zoom .lg-outer{cursor:zoom-out}.lg-medium-zoom .lg-outer.lg-grab img.lg-object{cursor:zoom-out}.lg-medium-zoom .lg-outer.lg-grabbing img.lg-object{cursor:zoom-out}.lg-relative-caption .lg-outer .lg-sub-html{white-space:normal;bottom:auto;padding:0;background-image:none}.lg-relative-caption .lg-outer .lg-relative-caption-item{opacity:0;padding:16px 0;transition:.5s opacity ease}.lg-relative-caption .lg-outer .lg-show-caption .lg-relative-caption-item{opacity:1}.lg-group:after{content:"";display:table;clear:both}.lg-container{display:none;outline:0}.lg-container.lg-show{display:block}.lg-on{scroll-behavior:unset}.lg-overlay-open{overflow:hidden}.lg-hide-sub-html .lg-sub-html,.lg-next,.lg-pager-outer,.lg-prev,.lg-toolbar{opacity:0;will-change:transform,opacity;-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1) 0s,opacity .25s cubic-bezier(0,0,.25,1) 0s;-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1) 0s,opacity .25s cubic-bezier(0,0,.25,1) 0s;-o-transition:-o-transform .25s cubic-bezier(0,0,.25,1) 0s,opacity .25s cubic-bezier(0,0,.25,1) 0s;transition:transform .25s cubic-bezier(0,0,.25,1) 0s,opacity .25s cubic-bezier(0,0,.25,1) 0s}.lg-show-in .lg-next,.lg-show-in .lg-pager-outer,.lg-show-in .lg-prev,.lg-show-in .lg-toolbar{opacity:1}.lg-show-in.lg-hide-sub-html .lg-sub-html{opacity:1}.lg-show-in .lg-hide-items .lg-prev{opacity:0;-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}.lg-show-in .lg-hide-items .lg-next{opacity:0;-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}.lg-show-in .lg-hide-items .lg-toolbar{opacity:0;-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}.lg-show-in .lg-hide-items.lg-hide-sub-html .lg-sub-html{opacity:0;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}.lg-outer{width:100%;height:100%;position:fixed;top:0;left:0;z-index:1050;text-align:left;opacity:.001;outline:0;will-change:auto;overflow:hidden;-webkit-transition:opacity .15s ease 0s;-o-transition:opacity .15s ease 0s;transition:opacity .15s ease 0s}.lg-outer *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.lg-outer.lg-zoom-from-image{opacity:1}.lg-outer.lg-visible{opacity:1}.lg-outer.lg-css3 .lg-item:not(.lg-start-end-progress).lg-current,.lg-outer.lg-css3 .lg-item:not(.lg-start-end-progress).lg-next-slide,.lg-outer.lg-css3 .lg-item:not(.lg-start-end-progress).lg-prev-slide{-webkit-transition-duration:inherit!important;transition-duration:inherit!important;-webkit-transition-timing-function:inherit!important;transition-timing-function:inherit!important}.lg-outer.lg-css3.lg-dragging .lg-item.lg-current,.lg-outer.lg-css3.lg-dragging .lg-item.lg-next-slide,.lg-outer.lg-css3.lg-dragging .lg-item.lg-prev-slide{-webkit-transition-duration:0s!important;transition-duration:0s!important;opacity:1}.lg-outer.lg-grab img.lg-object{cursor:-webkit-grab;cursor:-moz-grab;cursor:-o-grab;cursor:-ms-grab;cursor:grab}.lg-outer.lg-grabbing img.lg-object{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:-o-grabbing;cursor:-ms-grabbing;cursor:grabbing}.lg-outer .lg-content{position:absolute;top:0;left:0;right:0;bottom:0}.lg-outer .lg-inner{width:100%;position:absolute;left:0;top:0;bottom:0;-webkit-transition:opacity 0s;-o-transition:opacity 0s;transition:opacity 0s;white-space:nowrap}.lg-outer .lg-item{display:none!important}.lg-outer .lg-item:not(.lg-start-end-progress){background:url(../images/loading.gif) no-repeat scroll center center transparent}.lg-outer.lg-css3 .lg-current,.lg-outer.lg-css3 .lg-next-slide,.lg-outer.lg-css3 .lg-prev-slide{display:inline-block!important}.lg-outer.lg-css .lg-current{display:inline-block!important}.lg-outer .lg-img-wrap,.lg-outer .lg-item{display:inline-block;text-align:center;position:absolute;width:100%;height:100%}.lg-outer .lg-img-wrap:before,.lg-outer .lg-item:before{content:"";display:inline-block;height:100%;vertical-align:middle}.lg-outer .lg-img-wrap{position:absolute;left:0;right:0;top:0;bottom:0;white-space:nowrap;font-size:0}.lg-outer .lg-item.lg-complete{background-image:none}.lg-outer .lg-item.lg-current{z-index:1060}.lg-outer .lg-object{display:inline-block;vertical-align:middle;max-width:100%;max-height:100%;width:auto;height:auto;position:relative}.lg-outer .lg-empty-html .lg-sub-html,.lg-outer .lg-empty-html.lg-sub-html{display:none}.lg-outer.lg-hide-download .lg-download{opacity:.75;pointer-events:none}.lg-outer .lg-first-slide .lg-dummy-img{position:absolute;top:50%;left:50%}.lg-outer.lg-components-open:not(.lg-zoomed) .lg-components{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}.lg-outer.lg-components-open:not(.lg-zoomed) .lg-sub-html{opacity:1;transition:opacity .2s ease-out .15s}.lg-outer .lg-media-cont{text-align:center;display:inline-block;vertical-align:middle;position:relative}.lg-outer .lg-media-cont .lg-object{width:100%!important;height:100%!important}.lg-outer .lg-has-iframe .lg-media-cont{-webkit-overflow-scrolling:touch;overflow:auto}.lg-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1040;background-color:#000;opacity:0;will-change:auto;-webkit-transition:opacity 333ms ease-in 0s;-o-transition:opacity 333ms ease-in 0s;transition:opacity 333ms ease-in 0s}.lg-backdrop.in{opacity:1}.lg-css3.lg-no-trans .lg-current,.lg-css3.lg-no-trans .lg-next-slide,.lg-css3.lg-no-trans .lg-prev-slide{-webkit-transition:none 0s ease 0s!important;-moz-transition:none 0s ease 0s!important;-o-transition:none 0s ease 0s!important;transition:none 0s ease 0s!important}.lg-css3.lg-use-css3 .lg-item{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;backface-visibility:hidden}.lg-css3.lg-fade .lg-item{opacity:0}.lg-css3.lg-fade .lg-item.lg-current{opacity:1}.lg-css3.lg-fade .lg-item.lg-current,.lg-css3.lg-fade .lg-item.lg-next-slide,.lg-css3.lg-fade .lg-item.lg-prev-slide{-webkit-transition:opacity .1s ease 0s;-moz-transition:opacity .1s ease 0s;-o-transition:opacity .1s ease 0s;transition:opacity .1s ease 0s}.lg-css3.lg-use-css3 .lg-item.lg-start-progress{-webkit-transition:-webkit-transform 1s cubic-bezier(.175,.885,.32,1.275) 0s;-moz-transition:-moz-transform 1s cubic-bezier(.175,.885,.32,1.275) 0s;-o-transition:-o-transform 1s cubic-bezier(.175,.885,.32,1.275) 0s;transition:transform 1s cubic-bezier(.175,.885,.32,1.275) 0s}.lg-css3.lg-use-css3 .lg-item.lg-start-end-progress{-webkit-transition:-webkit-transform 1s cubic-bezier(0,0,.25,1) 0s;-moz-transition:-moz-transform 1s cubic-bezier(0,0,.25,1) 0s;-o-transition:-o-transform 1s cubic-bezier(0,0,.25,1) 0s;transition:transform 1s cubic-bezier(0,0,.25,1) 0s}.lg-css3.lg-slide.lg-use-css3 .lg-item{opacity:0}.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current,.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide,.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide{-webkit-transition:-webkit-transform 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;-moz-transition:-moz-transform 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;-o-transition:-o-transform 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;transition:transform 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s}.lg-container{display:none}.lg-container.lg-show{display:block}.lg-container.lg-dragging-vertical .lg-backdrop{-webkit-transition-duration:0s!important;transition-duration:0s!important}.lg-container.lg-dragging-vertical .lg-css3 .lg-item.lg-current{-webkit-transition-duration:0s!important;transition-duration:0s!important;opacity:1}.lg-inline .lg-backdrop,.lg-inline .lg-outer{position:absolute}.lg-inline .lg-backdrop{z-index:1}.lg-inline .lg-outer{z-index:2}.lg-inline .lg-maximize:after{content:"\e909"}.lg-components{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);will-change:transform;-webkit-transition:-webkit-transform .35s ease-out 0s;-moz-transition:-moz-transform .35s ease-out 0s;-o-transition:-o-transform .35s ease-out 0s;transition:transform .35s ease-out 0s;z-index:1080;position:absolute;bottom:0;right:0;left:0} \ No newline at end of file diff --git a/assets/lightGallery/css/lightgallery-core.css b/assets/lightGallery/css/lightgallery-core.css new file mode 100644 index 0000000..42ec381 --- /dev/null +++ b/assets/lightGallery/css/lightgallery-core.css @@ -0,0 +1,350 @@ +.lg-group:after { + content: ""; + display: table; + clear: both; +} + +.lg-container { + display: none; + outline: none; +} +.lg-container.lg-show { + display: block; +} + +.lg-on { + scroll-behavior: unset; +} + +.lg-overlay-open { + overflow: hidden; +} + +.lg-toolbar, +.lg-prev, +.lg-next, +.lg-pager-outer, +.lg-hide-sub-html .lg-sub-html { + opacity: 0; + will-change: transform, opacity; + -webkit-transition: -webkit-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; + -moz-transition: -moz-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; + -o-transition: -o-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; + transition: transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; +} + +.lg-show-in .lg-toolbar, +.lg-show-in .lg-prev, +.lg-show-in .lg-next, +.lg-show-in .lg-pager-outer { + opacity: 1; +} +.lg-show-in.lg-hide-sub-html .lg-sub-html { + opacity: 1; +} +.lg-show-in .lg-hide-items .lg-prev { + opacity: 0; + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0); +} +.lg-show-in .lg-hide-items .lg-next { + opacity: 0; + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0); +} +.lg-show-in .lg-hide-items .lg-toolbar { + opacity: 0; + -webkit-transform: translate3d(0, -10px, 0); + transform: translate3d(0, -10px, 0); +} +.lg-show-in .lg-hide-items.lg-hide-sub-html .lg-sub-html { + opacity: 0; + -webkit-transform: translate3d(0, 20px, 0); + transform: translate3d(0, 20px, 0); +} + +.lg-outer { + width: 100%; + height: 100%; + position: fixed; + top: 0; + left: 0; + z-index: 1050; + text-align: left; + opacity: 0.001; + outline: none; + will-change: auto; + overflow: hidden; + -webkit-transition: opacity 0.15s ease 0s; + -o-transition: opacity 0.15s ease 0s; + transition: opacity 0.15s ease 0s; +} +.lg-outer * { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.lg-outer.lg-zoom-from-image { + opacity: 1; +} +.lg-outer.lg-visible { + opacity: 1; +} +.lg-outer.lg-css3 .lg-item:not(.lg-start-end-progress).lg-prev-slide, .lg-outer.lg-css3 .lg-item:not(.lg-start-end-progress).lg-next-slide, .lg-outer.lg-css3 .lg-item:not(.lg-start-end-progress).lg-current { + -webkit-transition-duration: inherit !important; + transition-duration: inherit !important; + -webkit-transition-timing-function: inherit !important; + transition-timing-function: inherit !important; +} +.lg-outer.lg-css3.lg-dragging .lg-item.lg-prev-slide, .lg-outer.lg-css3.lg-dragging .lg-item.lg-next-slide, .lg-outer.lg-css3.lg-dragging .lg-item.lg-current { + -webkit-transition-duration: 0s !important; + transition-duration: 0s !important; + opacity: 1; +} +.lg-outer.lg-grab img.lg-object { + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: -o-grab; + cursor: -ms-grab; + cursor: grab; +} +.lg-outer.lg-grabbing img.lg-object { + cursor: move; + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: -o-grabbing; + cursor: -ms-grabbing; + cursor: grabbing; +} +.lg-outer .lg-content { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +} +.lg-outer .lg-inner { + width: 100%; + position: absolute; + left: 0; + top: 0; + bottom: 0; + -webkit-transition: opacity 0s; + -o-transition: opacity 0s; + transition: opacity 0s; + white-space: nowrap; +} +.lg-outer .lg-item { + display: none !important; +} +.lg-outer .lg-item:not(.lg-start-end-progress) { + background: url("../images/loading.gif") no-repeat scroll center center transparent; +} +.lg-outer.lg-css3 .lg-prev-slide, +.lg-outer.lg-css3 .lg-current, +.lg-outer.lg-css3 .lg-next-slide { + display: inline-block !important; +} +.lg-outer.lg-css .lg-current { + display: inline-block !important; +} +.lg-outer .lg-item, +.lg-outer .lg-img-wrap { + display: inline-block; + text-align: center; + position: absolute; + width: 100%; + height: 100%; +} +.lg-outer .lg-item:before, +.lg-outer .lg-img-wrap:before { + content: ""; + display: inline-block; + height: 100%; + vertical-align: middle; +} +.lg-outer .lg-img-wrap { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + white-space: nowrap; + font-size: 0; +} +.lg-outer .lg-item.lg-complete { + background-image: none; +} +.lg-outer .lg-item.lg-current { + z-index: 1060; +} +.lg-outer .lg-object { + display: inline-block; + vertical-align: middle; + max-width: 100%; + max-height: 100%; + width: auto; + height: auto; + position: relative; +} +.lg-outer .lg-empty-html.lg-sub-html, +.lg-outer .lg-empty-html .lg-sub-html { + display: none; +} +.lg-outer.lg-hide-download .lg-download { + opacity: 0.75; + pointer-events: none; +} +.lg-outer .lg-first-slide .lg-dummy-img { + position: absolute; + top: 50%; + left: 50%; +} +.lg-outer.lg-components-open:not(.lg-zoomed) .lg-components { + -webkit-transform: translate3d(0, 0%, 0); + transform: translate3d(0, 0%, 0); + opacity: 1; +} +.lg-outer.lg-components-open:not(.lg-zoomed) .lg-sub-html { + opacity: 1; + transition: opacity 0.2s ease-out 0.15s; +} +.lg-outer .lg-media-cont { + text-align: center; + display: inline-block; + vertical-align: middle; + position: relative; +} +.lg-outer .lg-media-cont .lg-object { + width: 100% !important; + height: 100% !important; +} +.lg-outer .lg-has-iframe .lg-media-cont { + -webkit-overflow-scrolling: touch; + overflow: auto; +} + +.lg-backdrop { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 1040; + background-color: #000; + opacity: 0; + will-change: auto; + -webkit-transition: opacity 333ms ease-in 0s; + -o-transition: opacity 333ms ease-in 0s; + transition: opacity 333ms ease-in 0s; +} +.lg-backdrop.in { + opacity: 1; +} + +.lg-css3.lg-no-trans .lg-prev-slide, +.lg-css3.lg-no-trans .lg-next-slide, +.lg-css3.lg-no-trans .lg-current { + -webkit-transition: none 0s ease 0s !important; + -moz-transition: none 0s ease 0s !important; + -o-transition: none 0s ease 0s !important; + transition: none 0s ease 0s !important; +} +.lg-css3.lg-use-css3 .lg-item { + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + backface-visibility: hidden; +} +.lg-css3.lg-fade .lg-item { + opacity: 0; +} +.lg-css3.lg-fade .lg-item.lg-current { + opacity: 1; +} +.lg-css3.lg-fade .lg-item.lg-prev-slide, .lg-css3.lg-fade .lg-item.lg-next-slide, .lg-css3.lg-fade .lg-item.lg-current { + -webkit-transition: opacity 0.1s ease 0s; + -moz-transition: opacity 0.1s ease 0s; + -o-transition: opacity 0.1s ease 0s; + transition: opacity 0.1s ease 0s; +} +.lg-css3.lg-use-css3 .lg-item.lg-start-progress { + -webkit-transition: -webkit-transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s; + -o-transition: -o-transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s; + transition: transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s; +} +.lg-css3.lg-use-css3 .lg-item.lg-start-end-progress { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s; +} +.lg-css3.lg-slide.lg-use-css3 .lg-item { + opacity: 0; +} +.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide { + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); +} +.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide { + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); +} +.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1; +} +.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide, .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide, .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; +} + +.lg-container { + display: none; +} +.lg-container.lg-show { + display: block; +} +.lg-container.lg-dragging-vertical .lg-backdrop { + -webkit-transition-duration: 0s !important; + transition-duration: 0s !important; +} +.lg-container.lg-dragging-vertical .lg-css3 .lg-item.lg-current { + -webkit-transition-duration: 0s !important; + transition-duration: 0s !important; + opacity: 1; +} + +.lg-inline .lg-backdrop, +.lg-inline .lg-outer { + position: absolute; +} +.lg-inline .lg-backdrop { + z-index: 1; +} +.lg-inline .lg-outer { + z-index: 2; +} +.lg-inline .lg-maximize:after { + content: "\e909"; +} + +.lg-components { + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + will-change: transform; + -webkit-transition: -webkit-transform 0.35s ease-out 0s; + -moz-transition: -moz-transform 0.35s ease-out 0s; + -o-transition: -o-transform 0.35s ease-out 0s; + transition: transform 0.35s ease-out 0s; + z-index: 1080; + position: absolute; + bottom: 0; + right: 0; + left: 0; +} + +/*# sourceMappingURL=lightgallery-core.css.map */ diff --git a/assets/lightGallery/css/lightgallery-core.css.map b/assets/lightGallery/css/lightgallery-core.css.map new file mode 100644 index 0000000..d7ba949 --- /dev/null +++ b/assets/lightGallery/css/lightgallery-core.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["../../src/scss/lightgallery-core.scss","../../src/scss/_lg-mixins.scss","../../src/scss/_lg-variables.scss"],"names":[],"mappings":"AAIA;EACI;EACA;EACA;;;AAKJ;EACI;EACA;;AACA;EACI;;;AAGR;EACI;;;AAEJ;EACI;;;AAIJ;AAAA;AAAA;AAAA;AAAA;EAKI;EACA;ECyQA;EACA;EACA;EACA,YD3QA;;;AAOA;AAAA;AAAA;AAAA;EAII;;AAGA;EACI;;AAIJ;EACI;EC6GR;EACA;;AD1GI;EACI;ECwGR;EACA;;ADrGI;EACI;ECmGR;EACA;;AD/FQ;EACI;EC6FZ;EACA;;;ADvFJ;EACI;EACA;EACA;EACA;EACA;EACA,SEzBW;EF0BX;EACA;EACA;EACA;EACA;ECuIA,oBDrIA;ECsIA,eDtIA;ECuIA,YDvIA;;A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;EACA;;ADgMY;ECjMZ;EACA;;ADoMY;ECrMZ;EACA;EDsMgB;;AAIJ;ECpEZ;EACA;EACA;EACA,YDoEgB;;;AAUpB;EACI;;AACA;EACI;;AAKA;ECpJJ,6BDqJQ;ECpJR,qBDoJQ;;AAII;ECzJZ,6BD0JgB;ECzJhB,qBDyJgB;EACA;;;AAUhB;AAAA;EAEI;;AAEJ;EACI;;AAEJ;EACI;;AAGA;EACI;;;AAMZ;ECnQI;EACA;EDoQA;EC9HA;EACA;EACA;EACA,YD4HA;EACA,SE3WgB;EF4WhB;EACA;EACA;EACA","file":"lightgallery-core.css"} \ No newline at end of file diff --git a/assets/lightGallery/css/lightgallery.css b/assets/lightGallery/css/lightgallery.css new file mode 100644 index 0000000..d804d19 --- /dev/null +++ b/assets/lightGallery/css/lightgallery.css @@ -0,0 +1,668 @@ +@font-face { + font-family: "lg"; + src: url("../fonts/lg.woff2?io9a6k") format("woff2"), url("../fonts/lg.ttf?io9a6k") format("truetype"), url("../fonts/lg.woff?io9a6k") format("woff"), url("../fonts/lg.svg?io9a6k#lg") format("svg"); + font-weight: normal; + font-style: normal; + font-display: block; +} +.lg-icon { + /* use !important to prevent issues with browser extensions that change fonts */ + font-family: "lg" !important; + speak: never; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.lg-container { + font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; +} + +.lg-next, +.lg-prev { + background-color: rgba(0, 0, 0, 0.45); + border-radius: 2px; + color: #999; + cursor: pointer; + display: block; + font-size: 22px; + margin-top: -10px; + padding: 8px 10px 9px; + position: absolute; + top: 50%; + z-index: 1084; + outline: none; + border: none; +} +.lg-next.disabled, +.lg-prev.disabled { + opacity: 0 !important; + cursor: default; +} +.lg-next:hover:not(.disabled), +.lg-prev:hover:not(.disabled) { + color: #fff; +} +.lg-single-item .lg-next, +.lg-single-item .lg-prev { + display: none; +} + +.lg-next { + right: 20px; +} +.lg-next:before { + content: "\e095"; +} + +.lg-prev { + left: 20px; +} +.lg-prev:after { + content: "\e094"; +} + +@-webkit-keyframes lg-right-end { + 0% { + left: 0; + } + 50% { + left: -30px; + } + 100% { + left: 0; + } +} +@-moz-keyframes lg-right-end { + 0% { + left: 0; + } + 50% { + left: -30px; + } + 100% { + left: 0; + } +} +@-ms-keyframes lg-right-end { + 0% { + left: 0; + } + 50% { + left: -30px; + } + 100% { + left: 0; + } +} +@keyframes lg-right-end { + 0% { + left: 0; + } + 50% { + left: -30px; + } + 100% { + left: 0; + } +} +@-webkit-keyframes lg-left-end { + 0% { + left: 0; + } + 50% { + left: 30px; + } + 100% { + left: 0; + } +} +@-moz-keyframes lg-left-end { + 0% { + left: 0; + } + 50% { + left: 30px; + } + 100% { + left: 0; + } +} +@-ms-keyframes lg-left-end { + 0% { + left: 0; + } + 50% { + left: 30px; + } + 100% { + left: 0; + } +} +@keyframes lg-left-end { + 0% { + left: 0; + } + 50% { + left: 30px; + } + 100% { + left: 0; + } +} +.lg-outer.lg-right-end .lg-object { + -webkit-animation: lg-right-end 0.3s; + -o-animation: lg-right-end 0.3s; + animation: lg-right-end 0.3s; + position: relative; +} +.lg-outer.lg-left-end .lg-object { + -webkit-animation: lg-left-end 0.3s; + -o-animation: lg-left-end 0.3s; + animation: lg-left-end 0.3s; + position: relative; +} + +.lg-toolbar { + z-index: 1082; + left: 0; + position: absolute; + top: 0; + width: 100%; +} +.lg-media-overlap .lg-toolbar { + background-image: linear-gradient(0deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4)); +} +.lg-toolbar .lg-icon { + color: #999; + cursor: pointer; + float: right; + font-size: 24px; + height: 47px; + line-height: 27px; + padding: 10px 0; + text-align: center; + width: 50px; + text-decoration: none !important; + outline: medium none; + will-change: color; + -webkit-transition: color 0.2s linear; + -o-transition: color 0.2s linear; + transition: color 0.2s linear; + background: none; + border: none; + box-shadow: none; +} +.lg-toolbar .lg-icon.lg-icon-18 { + font-size: 18px; +} +.lg-toolbar .lg-icon:hover { + color: #fff; +} +.lg-toolbar .lg-close:after { + content: "\e070"; +} +.lg-toolbar .lg-maximize { + font-size: 22px; +} +.lg-toolbar .lg-maximize:after { + content: "\e90a"; +} +.lg-toolbar .lg-download:after { + content: "\e0f2"; +} + +.lg-sub-html { + color: #eee; + font-size: 16px; + padding: 10px 40px; + text-align: center; + z-index: 1080; + opacity: 0; + -webkit-transition: opacity 0.2s ease-out 0s; + -o-transition: opacity 0.2s ease-out 0s; + transition: opacity 0.2s ease-out 0s; +} +.lg-sub-html h4 { + margin: 0; + font-size: 13px; + font-weight: bold; +} +.lg-sub-html p { + font-size: 12px; + margin: 5px 0 0; +} +.lg-sub-html a { + color: inherit; +} +.lg-sub-html a:hover { + text-decoration: underline; +} +.lg-media-overlap .lg-sub-html { + background-image: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)); +} +.lg-item .lg-sub-html { + position: absolute; + bottom: 0; + right: 0; + left: 0; +} + +.lg-error-msg { + font-size: 14px; + color: #999; +} + +.lg-counter { + color: #999; + display: inline-block; + font-size: 16px; + padding-left: 20px; + padding-top: 12px; + height: 47px; + vertical-align: middle; +} + +.lg-closing .lg-toolbar, +.lg-closing .lg-prev, +.lg-closing .lg-next, +.lg-closing .lg-sub-html { + opacity: 0; + -webkit-transition: -webkit-transform 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, color 0.08 linear; + -moz-transition: -moz-transform 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, color 0.08 linear; + -o-transition: -o-transform 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, color 0.08 linear; + transition: transform 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, color 0.08 linear; +} + +body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable) .lg-img-wrap, +body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable) .lg-video-cont, +body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable) .lg-media-cont { + opacity: 0; + -moz-transform: scale3d(0.5, 0.5, 0.5); + -o-transform: scale3d(0.5, 0.5, 0.5); + -ms-transform: scale3d(0.5, 0.5, 0.5); + -webkit-transform: scale3d(0.5, 0.5, 0.5); + transform: scale3d(0.5, 0.5, 0.5); + will-change: transform, opacity; + -webkit-transition: -webkit-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important; + -moz-transition: -moz-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important; + -o-transition: -o-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important; + transition: transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important; +} +body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable).lg-complete .lg-img-wrap, +body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable).lg-complete .lg-video-cont, +body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable).lg-complete .lg-media-cont { + opacity: 1; + -moz-transform: scale3d(1, 1, 1); + -o-transform: scale3d(1, 1, 1); + -ms-transform: scale3d(1, 1, 1); + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); +} + +.lg-icon:focus-visible { + color: #fff; + border-radius: 3px; + outline: 1px dashed rgba(255, 255, 255, 0.6); +} + +.lg-toolbar .lg-icon:focus-visible { + border-radius: 8px; + outline-offset: -5px; +} + +.lg-group:after { + content: ""; + display: table; + clear: both; +} + +.lg-container { + display: none; + outline: none; +} +.lg-container.lg-show { + display: block; +} + +.lg-on { + scroll-behavior: unset; +} + +.lg-overlay-open { + overflow: hidden; +} + +.lg-toolbar, +.lg-prev, +.lg-next, +.lg-pager-outer, +.lg-hide-sub-html .lg-sub-html { + opacity: 0; + will-change: transform, opacity; + -webkit-transition: -webkit-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; + -moz-transition: -moz-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; + -o-transition: -o-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; + transition: transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; +} + +.lg-show-in .lg-toolbar, +.lg-show-in .lg-prev, +.lg-show-in .lg-next, +.lg-show-in .lg-pager-outer { + opacity: 1; +} +.lg-show-in.lg-hide-sub-html .lg-sub-html { + opacity: 1; +} +.lg-show-in .lg-hide-items .lg-prev { + opacity: 0; + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0); +} +.lg-show-in .lg-hide-items .lg-next { + opacity: 0; + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0); +} +.lg-show-in .lg-hide-items .lg-toolbar { + opacity: 0; + -webkit-transform: translate3d(0, -10px, 0); + transform: translate3d(0, -10px, 0); +} +.lg-show-in .lg-hide-items.lg-hide-sub-html .lg-sub-html { + opacity: 0; + -webkit-transform: translate3d(0, 20px, 0); + transform: translate3d(0, 20px, 0); +} + +.lg-outer { + width: 100%; + height: 100%; + position: fixed; + top: 0; + left: 0; + z-index: 1050; + text-align: left; + opacity: 0.001; + outline: none; + will-change: auto; + overflow: hidden; + -webkit-transition: opacity 0.15s ease 0s; + -o-transition: opacity 0.15s ease 0s; + transition: opacity 0.15s ease 0s; +} +.lg-outer * { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.lg-outer.lg-zoom-from-image { + opacity: 1; +} +.lg-outer.lg-visible { + opacity: 1; +} +.lg-outer.lg-css3 .lg-item:not(.lg-start-end-progress).lg-prev-slide, .lg-outer.lg-css3 .lg-item:not(.lg-start-end-progress).lg-next-slide, .lg-outer.lg-css3 .lg-item:not(.lg-start-end-progress).lg-current { + -webkit-transition-duration: inherit !important; + transition-duration: inherit !important; + -webkit-transition-timing-function: inherit !important; + transition-timing-function: inherit !important; +} +.lg-outer.lg-css3.lg-dragging .lg-item.lg-prev-slide, .lg-outer.lg-css3.lg-dragging .lg-item.lg-next-slide, .lg-outer.lg-css3.lg-dragging .lg-item.lg-current { + -webkit-transition-duration: 0s !important; + transition-duration: 0s !important; + opacity: 1; +} +.lg-outer.lg-grab img.lg-object { + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: -o-grab; + cursor: -ms-grab; + cursor: grab; +} +.lg-outer.lg-grabbing img.lg-object { + cursor: move; + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: -o-grabbing; + cursor: -ms-grabbing; + cursor: grabbing; +} +.lg-outer .lg-content { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +} +.lg-outer .lg-inner { + width: 100%; + position: absolute; + left: 0; + top: 0; + bottom: 0; + -webkit-transition: opacity 0s; + -o-transition: opacity 0s; + transition: opacity 0s; + white-space: nowrap; +} +.lg-outer .lg-item { + display: none !important; +} +.lg-outer .lg-item:not(.lg-start-end-progress) { + background: url("../images/loading.gif") no-repeat scroll center center transparent; +} +.lg-outer.lg-css3 .lg-prev-slide, +.lg-outer.lg-css3 .lg-current, +.lg-outer.lg-css3 .lg-next-slide { + display: inline-block !important; +} +.lg-outer.lg-css .lg-current { + display: inline-block !important; +} +.lg-outer .lg-item, +.lg-outer .lg-img-wrap { + display: inline-block; + text-align: center; + position: absolute; + width: 100%; + height: 100%; +} +.lg-outer .lg-item:before, +.lg-outer .lg-img-wrap:before { + content: ""; + display: inline-block; + height: 100%; + vertical-align: middle; +} +.lg-outer .lg-img-wrap { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + white-space: nowrap; + font-size: 0; +} +.lg-outer .lg-item.lg-complete { + background-image: none; +} +.lg-outer .lg-item.lg-current { + z-index: 1060; +} +.lg-outer .lg-object { + display: inline-block; + vertical-align: middle; + max-width: 100%; + max-height: 100%; + width: auto; + height: auto; + position: relative; +} +.lg-outer .lg-empty-html.lg-sub-html, +.lg-outer .lg-empty-html .lg-sub-html { + display: none; +} +.lg-outer.lg-hide-download .lg-download { + opacity: 0.75; + pointer-events: none; +} +.lg-outer .lg-first-slide .lg-dummy-img { + position: absolute; + top: 50%; + left: 50%; +} +.lg-outer.lg-components-open:not(.lg-zoomed) .lg-components { + -webkit-transform: translate3d(0, 0%, 0); + transform: translate3d(0, 0%, 0); + opacity: 1; +} +.lg-outer.lg-components-open:not(.lg-zoomed) .lg-sub-html { + opacity: 1; + transition: opacity 0.2s ease-out 0.15s; +} +.lg-outer .lg-media-cont { + text-align: center; + display: inline-block; + vertical-align: middle; + position: relative; +} +.lg-outer .lg-media-cont .lg-object { + width: 100% !important; + height: 100% !important; +} +.lg-outer .lg-has-iframe .lg-media-cont { + -webkit-overflow-scrolling: touch; + overflow: auto; +} + +.lg-backdrop { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 1040; + background-color: #000; + opacity: 0; + will-change: auto; + -webkit-transition: opacity 333ms ease-in 0s; + -o-transition: opacity 333ms ease-in 0s; + transition: opacity 333ms ease-in 0s; +} +.lg-backdrop.in { + opacity: 1; +} + +.lg-css3.lg-no-trans .lg-prev-slide, +.lg-css3.lg-no-trans .lg-next-slide, +.lg-css3.lg-no-trans .lg-current { + -webkit-transition: none 0s ease 0s !important; + -moz-transition: none 0s ease 0s !important; + -o-transition: none 0s ease 0s !important; + transition: none 0s ease 0s !important; +} +.lg-css3.lg-use-css3 .lg-item { + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + backface-visibility: hidden; +} +.lg-css3.lg-fade .lg-item { + opacity: 0; +} +.lg-css3.lg-fade .lg-item.lg-current { + opacity: 1; +} +.lg-css3.lg-fade .lg-item.lg-prev-slide, .lg-css3.lg-fade .lg-item.lg-next-slide, .lg-css3.lg-fade .lg-item.lg-current { + -webkit-transition: opacity 0.1s ease 0s; + -moz-transition: opacity 0.1s ease 0s; + -o-transition: opacity 0.1s ease 0s; + transition: opacity 0.1s ease 0s; +} +.lg-css3.lg-use-css3 .lg-item.lg-start-progress { + -webkit-transition: -webkit-transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s; + -o-transition: -o-transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s; + transition: transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s; +} +.lg-css3.lg-use-css3 .lg-item.lg-start-end-progress { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s; +} +.lg-css3.lg-slide.lg-use-css3 .lg-item { + opacity: 0; +} +.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide { + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); +} +.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide { + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); +} +.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1; +} +.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide, .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide, .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; +} + +.lg-container { + display: none; +} +.lg-container.lg-show { + display: block; +} +.lg-container.lg-dragging-vertical .lg-backdrop { + -webkit-transition-duration: 0s !important; + transition-duration: 0s !important; +} +.lg-container.lg-dragging-vertical .lg-css3 .lg-item.lg-current { + -webkit-transition-duration: 0s !important; + transition-duration: 0s !important; + opacity: 1; +} + +.lg-inline .lg-backdrop, +.lg-inline .lg-outer { + position: absolute; +} +.lg-inline .lg-backdrop { + z-index: 1; +} +.lg-inline .lg-outer { + z-index: 2; +} +.lg-inline .lg-maximize:after { + content: "\e909"; +} + +.lg-components { + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + will-change: transform; + -webkit-transition: -webkit-transform 0.35s ease-out 0s; + -moz-transition: -moz-transform 0.35s ease-out 0s; + -o-transition: -o-transform 0.35s ease-out 0s; + transition: transform 0.35s ease-out 0s; + z-index: 1080; + position: absolute; + bottom: 0; + right: 0; + left: 0; +} + +/*# sourceMappingURL=lightgallery.css.map */ diff --git a/assets/lightGallery/css/lightgallery.css.map b/assets/lightGallery/css/lightgallery.css.map new file mode 100644 index 0000000..64eafa8 --- /dev/null +++ b/assets/lightGallery/css/lightgallery.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["../../src/scss/_lg-fonts.scss","../../src/scss/_lg-theme-default.scss","../../src/scss/_lg-variables.scss","../../src/scss/_lg-mixins.scss","../../src/scss/lightgallery-core.scss"],"names":[],"mappings":"AAEA;EACI;EACA;EAIA;EACA;EACA;;AAGJ;AACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAEA;EACA;EACA;;;ACtBJ;EACI;;;AAKJ;AAAA;EAEI;EACA,eCNoB;EDOpB,OCDY;EDEZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA,SCuCc;EDtCd;EACA;;AAEA;AAAA;EACI;EACA;;AAGJ;AAAA;EACI,OClBc;;ADoBlB;AAAA;EACI;;;AAIR;EACI;;AAEA;EACI;;;AAIR;EACI;;AAEA;EACI;;;AEYJ;EFPA;IACI;;EAGJ;IACI;;EAGJ;IACI;;;AEEJ;EFXA;IACI;;EAGJ;IACI;;EAGJ;IACI;;;AEMJ;EFfA;IACI;;EAGJ;IACI;;EAGJ;IACI;;;AEUJ;EFnBA;IACI;;EAGJ;IACI;;EAGJ;IACI;;;AEFJ;EFOA;IACI;;EAGJ;IACI;;EAGJ;IACI;;;AEZJ;EFGA;IACI;;EAGJ;IACI;;EAGJ;IACI;;;AERJ;EFDA;IACI;;EAGJ;IACI;;EAGJ;IACI;;;AEJJ;EFLA;IACI;;EAGJ;IACI;;EAGJ;IACI;;;AAMA;EE/DJ,mBFgE2B;EE/D3B,cF+D2B;EE9D3B,WF8D2B;EACnB;;AAKJ;EEtEJ,mBFuE2B;EEtE3B,cFsE2B;EErE3B,WFqE2B;EACnB;;;AAMZ;EACI,SCvCa;EDwCb;EACA;EACA;EACA;;AACA;EACI,kBCzGQ;;AD4GZ;EACI,OClGQ;EDmGR;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EEsGJ,oBFrGI;EEsGJ,eFtGI;EEuGJ,YFvGI;EACA;EACA;EACA;;AACA;EACI;;AAEJ;EACI,OCrHU;;AD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pB;EACI;;AACA;EACI;;AAKA;EDpJJ,6BCqJQ;EDpJR,qBCoJQ;;AAII;EDzJZ,6BC0JgB;EDzJhB,qBCyJgB;EACA;;;AAUhB;AAAA;EAEI;;AAEJ;EACI;;AAEJ;EACI;;AAGA;EACI;;;AAMZ;EDnQI;EACA;ECoQA;ED9HA;EACA;EACA;EACA,YC4HA;EACA,SF3WgB;EE4WhB;EACA;EACA;EACA","file":"lightgallery.css"} \ No newline at end of file diff --git a/assets/lightGallery/fonts/lg.eot b/assets/lightGallery/fonts/lg.eot deleted file mode 100644 index 5967563..0000000 Binary files a/assets/lightGallery/fonts/lg.eot and /dev/null differ diff --git a/assets/lightGallery/fonts/lg.svg b/assets/lightGallery/fonts/lg.svg index f7c4714..fe8b075 100644 --- a/assets/lightGallery/fonts/lg.svg +++ b/assets/lightGallery/fonts/lg.svg @@ -6,18 +6,18 @@ @@ -29,6 +29,7 @@ + @@ -38,4 +39,16 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/lightGallery/fonts/lg.ttf b/assets/lightGallery/fonts/lg.ttf index c28a509..825f483 100644 Binary files a/assets/lightGallery/fonts/lg.ttf and b/assets/lightGallery/fonts/lg.ttf differ diff --git a/assets/lightGallery/fonts/lg.woff b/assets/lightGallery/fonts/lg.woff index c0599a5..fd02a6f 100644 Binary files a/assets/lightGallery/fonts/lg.woff and b/assets/lightGallery/fonts/lg.woff differ diff --git a/assets/lightGallery/fonts/lg.woff2 b/assets/lightGallery/fonts/lg.woff2 new file mode 100644 index 0000000..2c2e289 Binary files /dev/null and b/assets/lightGallery/fonts/lg.woff2 differ diff --git a/assets/lightGallery/images/loading.gif b/assets/lightGallery/images/loading.gif new file mode 100644 index 0000000..4744c45 Binary files /dev/null and b/assets/lightGallery/images/loading.gif differ diff --git a/assets/lightGallery/index.d.ts b/assets/lightGallery/index.d.ts new file mode 100644 index 0000000..a978d62 --- /dev/null +++ b/assets/lightGallery/index.d.ts @@ -0,0 +1,4 @@ +import { LightGallerySettings } from './lg-settings'; +import { LightGallery } from './lightgallery'; +declare function lightGallery(el: HTMLElement, options?: LightGallerySettings): LightGallery; +export default lightGallery; diff --git a/assets/lightGallery/lg-events.d.ts b/assets/lightGallery/lg-events.d.ts new file mode 100644 index 0000000..2f6f4ed --- /dev/null +++ b/assets/lightGallery/lg-events.d.ts @@ -0,0 +1,300 @@ +import { LightGallery } from './lightgallery'; +import { VideoSource } from './plugins/video/types'; +/** + * List of lightGallery events + * All events should be documented here + * Below interfaces are used to build the website documentations + * */ +export declare const lGEvents: { + [key: string]: string; +}; +/** + * Fired only once when lightGallery is initialized + * @name lgInit + * @method onInit + * @example + * const lg = document.getElementById('custom-events-demo'); + * // Perform any action on lightGallery initialization. + * // Init event returns the plugin instance that can be used to call any lightGalley public method + * let pluginInstance = null; + * lg.addEventListener('lgInit', (event) => { + * pluginInstance = event.detail.instance; + * }); + * lightGallery(lg); + * @see Methods + */ +export interface InitDetail { + /** + * lightGallery plugin instance + */ + instance: LightGallery; +} +/** + * Fired when the slide content has been inserted into it's slide container. + * @name lgAfterAppendSlide + * @method onAfterAppendSlide + */ +export interface AfterAppendSlideEventDetail { + /** + * Index of the slide + */ + index: number; +} +/** + * Fired immediately before opening the gallery + * @name lgBeforeOpen + * @method onBeforeOpen + */ +export interface BeforeOpenDetail { +} +/** + * Fired immediately after opening the gallery + * @name lgAfterOpen + * @method onAfterOpen + */ +export interface AfterOpenDetail { +} +/** + * Fired once the media inside the slide has been completely loaded . + * @name lgSlideItemLoad + * @method onSlideItemLoad + */ +export interface SlideItemLoadDetail { + /** + * Index of the slide + */ + index: number; + /** + * For the first slide, lightGallery adds some delay for displaying the loaded slide item. + * This delay is required for the transition effect when the slide item is displayed + * Respect the delay when you use this event + */ + delay: number; + isFirstSlide: boolean; +} +/** + * Fired immediately before each slide transition. + * @name lgBeforeSlide + * @method onBeforeSlide + * @example + * const lg = document.getElementById('custom-events-demo'); + * // Perform any action before each slide transition + * lg.addEventListener('lgBeforeSlide', (event) => { + * const { index, prevIndex } = event.detail; + * alert(index, prevIndex); + * }); + * lightGallery(lg); + */ +export interface BeforeSlideDetail { + /** + * Index of the previous slide + */ + prevIndex: number; + /** + * Index of the slide + */ + index: number; + /** + * true if slide function called via touch event or mouse drag + */ + fromTouch: boolean; + /** + * true if slide function called via thumbnail click + */ + fromThumb: boolean; +} +/** + * Fired immediately after each slide transition. + * @name lgAfterSlide + * @method onAfterSlide + */ +export interface AfterSlideDetail { + /** + * Index of the previous slide + */ + prevIndex: number; + /** + * Index of the slide + */ + index: number; + /** + * true if slide function called via touch event or mouse drag + */ + fromTouch: boolean; + /** + * true if slide function called via thumbnail click + */ + fromThumb: boolean; +} +/** + * Fired when the video poster is clicked. + * @name lgPosterClick + * @method onPosterClick + */ +export interface PosterClickDetail { +} +/** + * Fired when the drag event to move to different slide starts. + * @name lgDragStart + * @method onDragStart + */ +export interface DragStartDetail { +} +/** + * Fired periodically during the drag operation. + * @name lgDragMove + * @method onDragMove + */ +export interface DragMoveDetail { +} +/** + * Fired when the user has finished the drag operation + * @name lgDragEnd + * @method onDragEnd + */ +export interface DragEndDetail { +} +/** + * Fired immediately before the start of the close process. + * @name lgBeforeClose + * @method onBeforeClose + */ +export interface BeforeCloseDetail { +} +/** + * Fired immediately once lightGallery is closed. + * @name lgAfterClose + * @method onAfterClose + */ +export interface AfterCloseDetail { + /** + * lightGallery plugin instance + */ + instance: LightGallery; +} +/** + * Fired immediately before each "next" slide transition + * @name lgBeforeNextSlide + * @method onBeforeNextSlide + */ +export interface BeforeNextSlideDetail { + /** + * Index of the slide + */ + index: number; + /** + * true if slide function called via touch event or mouse drag + */ + fromTouch: boolean; +} +/** + * Fired immediately before each "prev" slide transition + * @name lgBeforePrevSlide + * @method onBeforePrevSlide + */ +export interface BeforePrevSlideDetail { + /** + * Index of the slide + */ + index: number; + /** + * true if slide function called via touch event or mouse drag + */ + fromTouch: boolean; +} +/** + * Fired when the sub-html content (ex : title/ description) has been appended into the slide. + * @name lgAfterAppendSubHtml + * @method onAfterAppendSubHtml + */ +export interface AfterAppendSubHtmlDetail { + /** + * Index of the slide + */ + index: number; +} +/** + * Fired when the lightGallery container has been resized. + * @name lgContainerResize + * @method onContainerResize + */ +export interface ContainerResizeDetail { + /** + * Index of the slide + */ + index: number; +} +/** + * Fired when lightGallery detects video slide + * @name lgHasVideo + * @method onHasVideo + */ +export interface HasVideoDetail { + /** + * Index of the slide, + */ + index: number; + /** + * Video source + */ + src: string; + /** + * HTML5 video source if available + *

+ HTML5 video source = source: { + src: string; + type: string; + }[]; + attributes: HTMLVideoElement; + *

+ */ + html5Video: VideoSource; + /** + * True if video has poster + */ + hasPoster: boolean; +} +/** + * Fired when the image is rotated in anticlockwise direction + * @name lgRotateLeft + * @method onRotateLeft + */ +export interface RotateLeftDetail { + /** + * Index of the slide + */ + index: number; +} +/** + * Fired when the image is rotated in clockwise direction + * @name lgRotateRight + * @method onRotateRight + */ +export interface RotateRightDetail { + /** + * Index of the slide + */ + index: number; +} +/** + * Fired when the image is flipped horizontally + * @name lgFlipHorizontal + * @method onFlipHorizontal + */ +export interface FlipHorizontalDetail { + /** + * Index of the slide + */ + index: number; +} +/** + * Fired when the image is flipped vertically + * @name lgFlipVertical + * @method onFlipVertical + */ +export interface FlipVerticalDetail { + /** + * Index of the slide + */ + index: number; +} diff --git a/assets/lightGallery/lg-plugin.d.ts b/assets/lightGallery/lg-plugin.d.ts new file mode 100644 index 0000000..2dfd32e --- /dev/null +++ b/assets/lightGallery/lg-plugin.d.ts @@ -0,0 +1,7 @@ +import { LgQuery } from './lgQuery'; +import { LightGallery } from './lightgallery'; +export declare class LgPlugin { + core: LightGallery; + $LG: LgQuery; + constructor(core: LightGallery, $LG: LgQuery); +} diff --git a/assets/lightGallery/lg-settings.d.ts b/assets/lightGallery/lg-settings.d.ts new file mode 100644 index 0000000..0bb399d --- /dev/null +++ b/assets/lightGallery/lg-settings.d.ts @@ -0,0 +1,425 @@ +import { GalleryItem } from './lg-utils'; +import { LgQuery } from './lgQuery'; +import { LightGallery } from './lightgallery'; +import { AutoplaySettings } from './plugins/autoplay/lg-autoplay-settings'; +import { CommentSettings } from './plugins/comment/lg-comment-settings'; +import { FullscreenSettings } from './plugins/fullscreen/lg-fullscreen-settings'; +import { HashSettings } from './plugins/hash/lg-hash-settings'; +import { MediumZoomSettings } from './plugins/mediumZoom/lg-medium-zoom-settings'; +import { PagerSettings } from './plugins/pager/lg-pager-settings'; +import { RotateSettings } from './plugins/rotate/lg-rotate-settings'; +import { ShareSettings } from './plugins/share/lg-share-settings'; +import { ThumbnailsSettings } from './plugins/thumbnail/lg-thumbnail-settings'; +import { VideoSettings } from './plugins/video/lg-video-settings'; +import { ZoomSettings } from './plugins/zoom/lg-zoom-settings'; +declare type LightGalleryCoreMobileSettings = Exclude; +export interface MobileSettings extends LightGalleryCoreMobileSettings, Partial, Partial, Partial, Partial, Partial, Partial, Partial, Partial, Partial, Partial { +} +export interface LightGalleryCoreStrings { + closeGallery: string; + toggleMaximize: string; + previousSlide: string; + nextSlide: string; + download: string; + playVideo: string; + mediaLoadingFailed: string; +} +export declare type LightGalleryAllSettings = LightGalleryCoreSettings & ZoomSettings & ThumbnailsSettings & VideoSettings & AutoplaySettings & CommentSettings & FullscreenSettings & HashSettings & PagerSettings & RotateSettings & ShareSettings & MediumZoomSettings; +export declare type LightGallerySettings = Partial; +export interface LightGalleryCoreSettings { + /** + * Type of transition between images. + */ + mode: 'lg-slide' | 'lg-fade' | 'lg-zoom-in' | 'lg-zoom-in-big' | 'lg-zoom-out' | 'lg-zoom-out-big' | 'lg-zoom-out-in' | 'lg-zoom-in-out' | 'lg-soft-zoom' | 'lg-scale-up' | 'lg-slide-circular' | 'lg-slide-circular-vertical' | 'lg-slide-vertical' | 'lg-slide-vertical-growth' | 'lg-slide-skew-only' | 'lg-slide-skew-only-rev' | 'lg-slide-skew-only-y' | 'lg-slide-skew-only-y-rev' | 'lg-slide-skew' | 'lg-slide-skew-rev' | 'lg-slide-skew-cross' | 'lg-slide-skew-cross-rev' | 'lg-slide-skew-ver' | 'lg-slide-skew-ver-rev' | 'lg-slide-skew-ver-cross' | 'lg-slide-skew-ver-cross-rev' | 'lg-lollipop' | 'lg-lollipop-rev' | 'lg-rotate' | 'lg-rotate-rev' | 'lg-tube'; + /** + * Slide animation CSS easing property + */ + easing: string; + /** + *Transition duration (in ms). + */ + speed: number; + /** + * If you are using lightGallery for commercial projects, you need to purchase a commercial license + * to get the license key. For projects that are compatible with GPLv3 license, + * please contact us for getting a license key at
contact@lightgalleryjs.com. + * If you want to test lightGallery before purchasing a commercial license, you can + * use `0000-0000-000-0000` as a temporary license key + */ + licenseKey: string; + /** + * Height of the gallery. + * example '100%' , '300px' + */ + height: string; + /** + * Width of the gallery. + * example '100%' , '300px' + */ + width: string; + /** + * Add custom class for gallery container + * This can be used to set different style for different galleries + */ + addClass: string; + /** + * Start animation class for the gallery. + * @description + *
    + *
  • startClass will be empty zoomFromOrigin is true.
  • + *
  • This can be used to change the starting effect when the image is loaded
  • + *
  • This is also applied when navigating to new slides
  • + *
+ */ + startClass: string; + /** + * Enable zoom from origin effect. + * @description You need to know the original image size upfront and provide it via data-lg-size attribute as data-lg-size="1920-1280" + * + * If you don't know, the size of a few images in the list, you can skip the data-lg-size attribute for the particular slides, + * lightGallery will show the default animation if data-lg-size is not available + * + * If you are using responsive images, + * you can pass a comma separated list of sizes combined with a max-width (up to what size the particular image should be used) + * + * example - + * data-lg-size="240-160-375, 400-267-480, 1600-1067" + * data-responsive="img-240.jpg 375, img-400.jpg 480" + * data-src="img-1600.jpg" + * + * In the above example, upto 375 width img.240.jpg and lg-size 240-160 will be used. + * Similarly, upto 480 pixel width size 400-267 and img-400.jpg will be used + * And above 480, lg-size 1600-1067 and img-1600.jpg will be used + * + *
    + *
  • At the moment, zoomFromOrigin options is supported only for image slides.
  • + *
  • Will be false if dynamic option is enabled or galleryID found in the URL.
  • + *
  • startClass will be empty if zoomFromOrigin is true to avoid css conflicts.
  • + *
+ */ + zoomFromOrigin: boolean; + /** + * Zoom from image animation duration + */ + startAnimationDuration: number; + /** + * Backdrop transition duration. + * Note - Do not change the value of backdrop via css. + */ + backdropDuration: number; + /** + * Configure where the gallery should be appended. + * Useful to create inline galleries and more + * It is an empty string in the default settings and later assigned to document.body to avoid accessing document for SSR + */ + container: HTMLElement | (() => HTMLElement | null) | (string | null); + /** + * Delay for hiding gallery controls in ms. + * Pass 0 if you don't want to hide the controls + */ + hideBarsDelay: number; + /** + * Delay in hiding controls for the first time when gallery is opened + */ + showBarsAfter: number; + /** + * Delay slide transitions. + * @description This is useful if you want to do any action in the current slide before moving to next slide. + *
+ * For example, fading out the captions before going to next slide. + * .lg-slide-progress class name is added to the current slide immediately after calling the slide method. + * But transition begins only after the delay + *
+ */ + slideDelay: number; + /** + * Support legacy browsers + * @description Currently this is used only for adding support to srcset attribute via picturefill library + * If true lightGallery will show warning message to include picturefill library + */ + supportLegacyBrowser: boolean; + /** + * If true, toolbar, captions and thumbnails will not overlap with media element + * This will not effect thumbnails if animateThumb is false + * Also, toggle thumbnails button is not displayed if allowMediaOverlap is false + *
+ * Note - Changing the position of the media on every slide transition creates a flickering effect. + * Therefore, the height of the caption is calculated dynamically, only once based on the first slide caption. + *
+ *
+ * if you have dynamic captions for each media, + * you can provide an appropriate height for the captions via allowMediaOverlap option + *
+ */ + allowMediaOverlap: boolean; + /** + * Video max size. + * @description This can be over-written by passing specific size via data-lg-size attribute + * Recommended video resolution and & aspect ratios https://support.google.com/youtube/answer/6375112 + */ + videoMaxSize: string; + /** + * Automatically load poster image for YouTube videos + */ + loadYouTubePoster: boolean; + /** + * Height of the caption for calculating allowMediaOverlap positions + * Note - this is only used to find the position of media item if allowMediaOverlap is true. + * Not for setting height of the captions + * Set 0 if you want to calculate the height of captions dynamically + */ + defaultCaptionHeight: number; + /** + * aria-labelledby attribute fot gallery + */ + ariaLabelledby: string; + /** + * aria-describedby attribute for gallery + */ + ariaDescribedby: string; + /** + * Hide scrollbar when gallery is opened + * @version V2.5.0 + */ + hideScrollbar: boolean; + /** + * Reset to previous scrollPosition when lightGallery is closed + * @description By default, lightGallery doesn't hide the scrollbar for a smooth opening transition. + * If a user changes the scroll position, lightGallery resets it to the previous value + * @version V2.5.0 + */ + resetScrollPosition: boolean; + /** + * If false user won't be able to close the gallery at all + * This is useful for creating inline galleries. + */ + closable: boolean; + /** + * allows vertical drag/swipe to close gallery + * false if option closable is false + */ + swipeToClose: boolean; + /** + * allows clicks on black area to close gallery. + */ + closeOnTap: boolean; + /** + * If false, close button won't be displayed. + * Useful for creating inline galleries. + */ + showCloseIcon: boolean; + /** + * Show maximize icon. + * Useful for creating inline galleries. + */ + showMaximizeIcon: boolean; + /** + * If false, will disable the ability to loop back to the beginning of the gallery from the last slide. + */ + loop: boolean; + /** + * Whether the LightGallery could be closed by pressing the "Esc" key. + */ + escKey: boolean; + /** + * Enable keyboard navigation + */ + keyPress: boolean; + /** + * Trap focus within the lightGallery + * @version V2.5.0 + */ + trapFocus: boolean; + /** + * If false, prev/next buttons will not be displayed. + */ + controls: boolean; + /** + * Enable slideEnd animation + */ + slideEndAnimation: boolean; + /** + * If true, prev/next button will be hidden on first/last image. + * @description Note - this option will be ignored if loop or slideEndAnimation is set to true + */ + hideControlOnEnd: boolean; + /** + * ability to navigate to next/prev slides on mousewheel + */ + mousewheel: boolean; + /** + * Option to get captions from alt or title tags. + */ + getCaptionFromTitleOrAlt: boolean; + /** + * control where the sub-html should be appended. + * If you choose '.lg-outer', you are responsible for placing the div at the right position. + * '.lg-outer' is useful if you want show custom HTML outside the normal gallery + */ + appendSubHtmlTo: '.lg-sub-html' | '.lg-item' | '.lg-outer'; + /** + * Set to true if the selector in "data-sub-html" should use the current item as its origin. + */ + subHtmlSelectorRelative: boolean; + /** + * number of preload slides + * @description will exicute only after the current slide is fully loaded. + * for example, if you click on 4th image and if preload = 1 then 3rd slide and 5th + * slide will be loaded in the background after the 4th slide is fully loaded.. + * if preload is 2 then 2nd 3rd 5th 6th slides will be preloaded. + */ + preload: number; + /** + * Control how many slide items should be kept in dom at a time + * @description To improve performance by reducing number of gallery items in the dom, + * lightGallery keeps only the lowest possible number of slides in the dom at a time. + * This has a minimum value of 3 + */ + numberOfSlideItemsInDom: number; + /** + * Custom selector property instead of direct children. + * @description Based on your markup structure, you can specify custom selectors to fetch media data for the gallery + * Pass "this" to select same element + * You can also pass HTMLCollection directly + * Example - '.my-selector' | '#my-selector' | this | document.querySelectorAll('.my-selector') + */ + selector: string | HTMLCollection[]; + /** + * By default selector element relative to the current gallery. + * Instead of that you can tell lightGallery to select element relative to another element. + * Example - '.my-selector-container' | '#my-selector-container' + * In the code this become selector = document.querySelector(this.s.selectWithin ).querySelectorAll(this.s.selector); + */ + selectWithin: string; + /** + * Custom html for next control + */ + nextHtml: string; + /** + * Custom html for prev control + */ + prevHtml: string; + /** + * specify which slide should load initially + */ + index: number; + /** + * Set width for iframe. + */ + iframeWidth: string; + /** + * Set height for iframe. + */ + iframeHeight: string; + /** + * Set max width for iframe. + */ + iframeMaxWidth: string; + /** + * Set max height for iframe. + */ + iframeMaxHeight: string; + /** + * Enable download button. + * @description By default download url will be taken from data-src/href attribute but it supports only for modern browsers. + * If you want you can provide another url for download via data-download-url. + * pass false in data-download-url if you want to hide download button for the particular slide. + */ + download: boolean; + /** + * Whether to show total number of images and index number of currently displayed image. + */ + counter: boolean; + /** + * Where the counter should be appended + */ + appendCounterTo: string; + /** + * By setting the swipeThreshold (in px) you can set how far the user must swipe for the next/prev image. + */ + swipeThreshold: number; + /** + * Enables swipe support for touch devices + */ + enableSwipe: boolean; + /** + * Enables desktop mouse drag support + */ + enableDrag: boolean; + /** + * LightGallery can be instantiated and launched programmatically by setting this option to true and populating dynamicEl option (see below) with the definitions of images. + */ + dynamic: boolean; + /** + * An array of objects (src, iframe, subHtml, thumb, poster, responsive, srcset sizes) representing gallery elements. + */ + dynamicEl: GalleryItem[]; + /** + * Fetch custom properties from the selector + * @description this is useful for plugin development + * By default lightGallery fetches and store all the props selectors to + * reduce frequent dom interaction for fetching props every time. + * + * If you need any addition data to be fetched and stored in the galleryItems variable, + * you can do this just by passing the prop names via extraProps + * @example + * HTML: + *
+ * + * + *
+ * JS: + * lightGallery(document.getElementById('lightGallery'), { + * extraProps: ['customProp'] + * }) + * // Note - If you are using dynamic mode, you can pass any custom prop in the galleryItem + * lightGallery(document.getElementById('lightGallery'), { + * dynamic: true, + * dynamicEl: [{ + * src: 'img/img1.jpg', + * customProp:'abc', + * }] + * }) + * + */ + extraProps: string[]; + /** + * Option to fetch different thumbnail image other than first image + * @description If you want to use external image for thumbnail, + * add the path of that image inside "data-" attribute + * and set value of this option to the name of your custom attribute. + * + * @example + *
+ * + *
+ * + * lightGallery(document.getElementById('lightGallery'), { + * exThumbImage: 'data-external-thumb-image' + * }) + */ + exThumbImage: string; + /** + * Function to detect mobile devices + */ + isMobile?: () => boolean; + /** + * Separate settings for mobile devices + * @description Note - this is applied only at the time of loading + * by default controls and close buttons are disabled on mobile devices. + * use this options if you want to enable them or change any other settings for mobile devices + * Note - mobileSettings does not merge default values, You need to provide all mobileSettings including default values + */ + mobileSettings: Partial; + /** + * Customize string. + * @description This can be useful if you want to localize the lightGallery strings to other languages. + * Use your own service to translate the strings and pass it via settings.strings + * You can find dedicated strings option for all lightGallery modules in their respective documentation. + * Note - You need to provide values for all the strings. For example, even if you just want to change the closeGallery string, you need to provide all the other strings as well. + */ + strings: LightGalleryCoreStrings; + plugins: (new (instance: LightGallery, $LG: LgQuery) => any)[]; +} +export declare const lightGalleryCoreSettings: LightGalleryCoreSettings; +export {}; diff --git a/assets/lightGallery/lg-utils.d.ts b/assets/lightGallery/lg-utils.d.ts new file mode 100644 index 0000000..4bdca5f --- /dev/null +++ b/assets/lightGallery/lg-utils.d.ts @@ -0,0 +1,228 @@ +import { lgQuery } from './lgQuery'; +import { VideoSource } from './plugins/video/types'; +import { VideoInfo } from './types'; +export interface ImageSize { + width: number; + height: number; +} +export interface ImageSources { + media?: string; + srcset: string; + sizes?: string; + type?: string; +} +export interface GalleryItem { + /** + * url of the media + * @data-attr data-src + */ + src?: string; + /** + * Source attributes for the picture element + * @data-attr data-sources + */ + sources?: ImageSources[]; + /** + * Thumbnail url + * @description By default lightGallery uses the image inside gallery selector as thumbnail. + * But, If you want to use external image for thumbnail, + * pass the thumbnail url via any data attribute and + * pass the attribute name via exThumbImage option + * @example + *
+ * + *
+ * + * lightGallery(document.getElementById('lightGallery'), { + * exThumbImage: 'data-external-thumb-image' + * }) + * @data-attr data-* + */ + thumb?: string; + /** + * alt attribute for the image + * @data-attr alt + */ + alt?: string; + /** + * Title attribute for the video + * @data-attr title + */ + title?: string; + /** + * Title for iframe + * @data-attr data-iframe-title + */ + iframeTitle?: string; + /** + * Caption for the slide + * @description You can either pass the HTML markup or the ID or class name of the element which contains the captions + * @data-attr data-sub-html + */ + subHtml?: string; + /** + * url of the file which contain the sub html. + * @description Note - Does not support Internet Explorer browser + * @data-attr data-sub-html-url + */ + subHtmlUrl?: string; + /** + * Video source + * @data-attr data-video + */ + video?: VideoSource; + /** + * Poster url + * @data-attr data-poster + */ + poster?: string; + /** + * Custom slide name to use in the url when hash plugin is enabled + * @data-attr data-slide-name + */ + slideName?: string; + /** + * List of images and viewport's max width separated by comma. + * @description Ex?: img/1-375.jpg 375, img/1-480.jpg 480, img/1-757.jpg 757. + * @data-attr data-responsive + */ + responsive?: string; + /** + * srcset attribute values for the main image + * @data-attr data-srcset + */ + srcset?: string; + /** + * srcset sizes attribute for the main image + * @data-attr data-sizes + */ + sizes?: string; + /** + * Set true is you want to open your url in an iframe + * @data-attr data-iframe + */ + iframe?: boolean; + /** + * Download url for your image/video. + * @description Pass false if you want to disable the download button. + * @data-attr data-download-url + */ + downloadUrl?: string | boolean; + /** + * Name of the file after it is downloaded. + * @description The HTML value of the download attribute. + * There are no restrictions on allowed values, and the browser will automatically + * detect the correct file extension and add it to the file (.img, .pdf, .txt, .html, etc.). + * More info + * @data-attr data-download + */ + download?: string | boolean; + /** + * Actual size of the image in px. + * @description This is used in zoom plugin to see the actual size of the image when double taped on the image. + * @data-attr data-width + */ + width?: string; + /** + * Facebook share URL. + * @description Specify only if you want to provide separate share URL for the specific slide. By default, current browser URL is taken. + * @data-attr data-facebook-share-url + */ + facebookShareUrl?: string; + /** + * Tweet text + * @data-attr data-tweet-text + */ + tweetText?: string; + /** + * Twitter share URL. + * @description Specify only if you want to provide separate share URL for the specific slide. By default, current browser URL will be taken. + * @data-attr data-twitter-share-url + */ + twitterShareUrl?: string; + /** + * Pinterest share URL. + * @description Specify only if you want to provide separate share URL for the specific slide. By default, current browser URL will be taken. + * Note?: Pinterest requires absolute URL + * @data-attr data-pinterest-share-url + */ + pinterestShareUrl?: string; + /** + * Description for Pinterest post. + * @data-attr data-pinterest-text + */ + pinterestText?: string; + /** + * Facebook comments body html + * @description Please refer facebook official documentation for generating the HTML markup + * @example + *
+ *
+ * @data-attr data-fb-html + */ + fbHtml?: string; + /** + * Disqus page identifier + * @description Please refer official disqus documentation for more info + * @data-attr data-disqus-identifier + */ + disqusIdentifier?: string; + /** + * Disqus page url + * @description Please refer official disqus documentation for more info + * @data-attr data-disqus-url + */ + disqusUrl?: string; + __slideVideoInfo?: VideoInfo; + [key: string]: any; +} +export declare function convertToData(attr: string): string; +declare const utils: { + /** + * Fetches HTML content from a given URL and inserts it into a specified element. + * + * @param url - The URL to fetch the HTML content from. + * @param element - The DOM element (jQuery object) to insert the HTML content into. + * @param insertMethod - The method to insert the HTML ('append' or 'replace'). + */ + fetchCaptionFromUrl(url: string, element: lgQuery, insertMethod: 'append' | 'replace'): void; + /** + * get possible width and height from the lgSize attribute. Used for ZoomFromOrigin option + */ + getSize(el: HTMLElement, container: lgQuery, spacing?: number, defaultLgSize?: string | undefined): ImageSize | undefined; + /** + * @desc Get transform value based on the imageSize. Used for ZoomFromOrigin option + * @param {jQuery Element} + * @returns {String} Transform CSS string + */ + getTransform(el: HTMLElement, container: lgQuery, top: number, bottom: number, imageSize?: ImageSize | undefined): string | undefined; + getIframeMarkup(iframeWidth: string, iframeHeight: string, iframeMaxWidth: string, iframeMaxHeight: string, src?: string | undefined, iframeTitle?: string | undefined): string; + getImgMarkup(index: number, src: string, altAttr: string, srcset?: string | undefined, sizes?: string | undefined, sources?: ImageSources[] | undefined): string; + getResponsiveSrc(srcItms: string[]): string; + isImageLoaded(img: HTMLImageElement): boolean; + getVideoPosterMarkup(_poster: string, dummyImg: string | HTMLElement, videoContStyle: string, playVideoString: string, _isVideo?: VideoInfo | undefined): string; + getFocusableElements(container: HTMLElement): NodeListOf; + /** + * @desc Create dynamic elements array from gallery items when dynamic option is false + * It helps to avoid frequent DOM interaction + * and avoid multiple checks for dynamic elments + * + * @returns {Array} dynamicEl + */ + getDynamicOptions(items: any, extraProps: string[], getCaptionFromTitleOrAlt: boolean, exThumbImage: string): GalleryItem[]; + isMobile(): boolean; + /** + * @desc Check the given src is video + * @param {String} src + * @return {Object} video type + * Ex:{ youtube : ["//www.youtube.com/watch?v=c0asJgSyxcY", "c0asJgSyxcY"] } + * + * @todo - this information can be moved to dynamicEl to avoid frequent calls + */ + isVideo(src: string, isHTML5VIdeo: boolean, index: number): VideoInfo | undefined; +}; +export default utils; diff --git a/assets/lightGallery/lgQuery.d.ts b/assets/lightGallery/lgQuery.d.ts new file mode 100644 index 0000000..42dc4d1 --- /dev/null +++ b/assets/lightGallery/lgQuery.d.ts @@ -0,0 +1,56 @@ +interface Offset { + left: number; + top: number; +} +export declare type LgQuery = (selector: any) => lgQuery; +export declare class lgQuery { + static eventListeners: { + [key: string]: any[]; + }; + static generateUUID(): string; + private selector; + private firstElement; + private cssVenderPrefixes; + constructor(selector: string | Element); + private _getSelector; + private _each; + private _setCssVendorPrefix; + private _getFirstEl; + private isEventMatched; + attr(attr: string): string; + attr(attr: string, value: string | number | boolean): this; + find(selector: any): lgQuery; + first(): lgQuery; + eq(index: number): lgQuery; + parent(): lgQuery; + get(): HTMLElement; + removeAttr(attributes: string): this; + wrap(className: string): this; + addClass(classNames?: string): this; + removeClass(classNames: string): this; + hasClass(className: string): boolean; + hasAttribute(attribute: string): boolean; + toggleClass(className: string): this; + css(property: string, value?: string | number): this; + on(events: string, listener: (e: any) => void): this; + once(event: string, listener: (e: any) => void): this; + off(event: string): this; + trigger(event: string, detail?: Detail): this; + load(url: string): this; + html(): string; + html(html: string): this; + append(html: string | HTMLElement): this; + prepend(html: string | HTMLElement): this; + remove(): this; + empty(): this; + scrollTop(): number; + scrollTop(scrollTop: number): this; + scrollLeft(): number; + scrollLeft(scrollLeft?: number): this; + offset(): Offset; + style(): CSSStyleDeclaration; + width(): number; + height(): number; +} +export declare function $LG(selector: any): lgQuery; +export {}; diff --git a/assets/lightGallery/lightGallery.css b/assets/lightGallery/lightGallery.css deleted file mode 100644 index 15fb290..0000000 --- a/assets/lightGallery/lightGallery.css +++ /dev/null @@ -1,916 +0,0 @@ -@font-face { - font-family: 'lg'; - src: url("fonts/lg.eot?n1z373"); - src: url("fonts/lg.eot?#iefixn1z373") format("embedded-opentype"), - url("fonts/lg.woff?n1z373") format("woff"), - url("fonts/lg.ttf?n1z373") format("truetype"), - url("fonts/lg.svg?n1z373#lg") format("svg"); - font-weight: normal; - font-style: normal; -} -.lg-icon { - font-family: 'lg'; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - /* Better Font Rendering =========== */ - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} -.lg-actions .lg-next, .lg-actions .lg-prev { - background-color: rgba(255,255,255,0.5); - border-radius: 2px; - color: #999; - cursor: pointer; - display: block; - font-size: 22px; - margin-top: -10px; - padding: 8px 10px 9px; - position: absolute; - top: calc((100% - 100px) / 2 - 25px); - z-index: 1080; - border: none; - outline: none; -} -.lg-actions .lg-next.disabled, .lg-actions .lg-prev.disabled { - pointer-events: none; - opacity: 0.5; -} -.lg-actions .lg-next:hover, .lg-actions .lg-prev:hover { - color: #404040; -} -.lg-actions .lg-next { - right: 20px; -} -.lg-actions .lg-next:before { - /*content: "\e095";*/ - content: " "; - background-image: url("data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ib3dsX3JpZ2h0X3N2ZyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjI3cHgiIGhlaWdodD0iNTBweCIgdmVyc2lvbj0iMS4xIiBzdHlsZT0ic2hhcGUtcmVuZGVyaW5nOmdlb21ldHJpY1ByZWNpc2lvbjsgdGV4dC1yZW5kZXJpbmc6Z2VvbWV0cmljUHJlY2lzaW9uOyBpbWFnZS1yZW5kZXJpbmc6b3B0aW1pemVRdWFsaXR5OyBmaWxsLXJ1bGU6ZXZlbm9kZDsgY2xpcC1ydWxlOmV2ZW5vZGQiIHZpZXdCb3g9IjAgMCAyOTY0NiA1NDU2NiI+PGcgaWQ9ItCh0LvQvtC5X3gwMDIwXzEiPjxwYXRoIGNsYXNzPSIiIHN0eWxlPSJmaWxsOiNlNWU1ZTUiIGQ9Ik0yODM1OCAwbC0yNzA3MCAwYy03MDgsMCAtMTI4OCw1ODAgLTEyODgsMTI4OGwwIDUxOTkwYzAsNzA4IDU4MCwxMjg4IDEyODgsMTI4OGwyNzA3MCAwYzcxMCwwIDEyODgsLTU4MCAxMjg4LC0xMjg4bDAgLTUxOTkwYzAsLTcwOCAtNTc4LC0xMjg4IC0xMjg4LC0xMjg4em0tMjA5OTIgMTc1MTVsOTc2NyA5NzY3IC05NzY3IDk3NjggMjU3MyAyNTczIDk3NjcgLTk3NjggMjU3MyAtMjU3MyAtMjU3MyAtMjU3MyAtOTc2NyAtOTc2NyAtMjU3MyAyNTczeiI+PC9wYXRoPjwvZz48L3N2Zz4="); - background-position: right; - width: 50px; - height: 50px; - position: absolute; - left: -42px; - /* z-index: 1000000000; */ - background-repeat: no-repeat; - transition: 0.3s; -} -.lg-actions .lg-next:hover:before { - background-image: url("data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ib3dsX3JpZ2h0X3N2ZyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjI3cHgiIGhlaWdodD0iNTBweCIgdmVyc2lvbj0iMS4xIiBzdHlsZT0ic2hhcGUtcmVuZGVyaW5nOmdlb21ldHJpY1ByZWNpc2lvbjsgdGV4dC1yZW5kZXJpbmc6Z2VvbWV0cmljUHJlY2lzaW9uOyBpbWFnZS1yZW5kZXJpbmc6b3B0aW1pemVRdWFsaXR5OyBmaWxsLXJ1bGU6ZXZlbm9kZDsgY2xpcC1ydWxlOmV2ZW5vZGQiIHZpZXdCb3g9IjAgMCAyOTY0NiA1NDU2NiI+PGcgaWQ9ItCh0LvQvtC5X3gwMDIwXzEiPjxwYXRoIGNsYXNzPSIiIHN0eWxlPSJmaWxsOiMwMDAiIGQ9Ik0yODM1OCAwbC0yNzA3MCAwYy03MDgsMCAtMTI4OCw1ODAgLTEyODgsMTI4OGwwIDUxOTkwYzAsNzA4IDU4MCwxMjg4IDEyODgsMTI4OGwyNzA3MCAwYzcxMCwwIDEyODgsLTU4MCAxMjg4LC0xMjg4bDAgLTUxOTkwYzAsLTcwOCAtNTc4LC0xMjg4IC0xMjg4LC0xMjg4em0tMjA5OTIgMTc1MTVsOTc2NyA5NzY3IC05NzY3IDk3NjggMjU3MyAyNTczIDk3NjcgLTk3NjggMjU3MyAtMjU3MyAtMjU3MyAtMjU3MyAtOTc2NyAtOTc2NyAtMjU3MyAyNTczeiI+PC9wYXRoPjwvZz48L3N2Zz4="); -} -.lg-actions .lg-prev { - left: 20px; -} -.lg-actions .lg-prev:after { - /* content: "\e094"; */ - content:""; - background-image: url("data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ib3dsX2xlZnRfc3ZnIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3BhY2U9InByZXNlcnZlIiB3aWR0aD0iMjdweCIgaGVpZ2h0PSI1MHB4IiB2ZXJzaW9uPSIxLjEiIHN0eWxlPSJzaGFwZS1yZW5kZXJpbmc6Z2VvbWV0cmljUHJlY2lzaW9uOyB0ZXh0LXJlbmRlcmluZzpnZW9tZXRyaWNQcmVjaXNpb247IGltYWdlLXJlbmRlcmluZzpvcHRpbWl6ZVF1YWxpdHk7IGZpbGwtcnVsZTpldmVub2RkOyBjbGlwLXJ1bGU6ZXZlbm9kZCIgdmlld0JveD0iMCAwIDI5NjQ2IDU0NTY2Ij48ZyBpZD0i0KHQu9C+0LlfeDAwMjBfMSI+PHBhdGggY2xhc3M9IiIgc3R5bGU9ImZpbGw6I2U1ZTVlNSIgZD0iTTEyODggMGwyNzA3MCAwYzcwOCwwIDEyODgsNTgwIDEyODgsMTI4OGwwIDUxOTkwYzAsNzA4IC01ODAsMTI4OCAtMTI4OCwxMjg4bC0yNzA3MCAwYy03MDksMCAtMTI4OCwtNTgwIC0xMjg4LC0xMjg4bDAgLTUxOTkwYzAsLTcwOCA1NzksLTEyODggMTI4OCwtMTI4OHptMjA5OTIgMTc1MTVsLTk3NjYgOTc2NyA5NzY2IDk3NjggLTI1NzMgMjU3MyAtOTc2NyAtOTc2OCAtMjU3MyAtMjU3MyAyNTczIC0yNTczIDk3NjcgLTk3NjcgMjU3MyAyNTczeiI+PC9wYXRoPjwvZz48L3N2Zz4="); - background-position: left; - width: 50px; - height: 50px; - position: absolute; - right: -42px; - background-repeat: no-repeat; - transition: 0.3s; -} -.lg-actions .lg-prev:hover:after { - background-image: url("data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ib3dsX2xlZnRfc3ZnIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3BhY2U9InByZXNlcnZlIiB3aWR0aD0iMjdweCIgaGVpZ2h0PSI1MHB4IiB2ZXJzaW9uPSIxLjEiIHN0eWxlPSJzaGFwZS1yZW5kZXJpbmc6Z2VvbWV0cmljUHJlY2lzaW9uOyB0ZXh0LXJlbmRlcmluZzpnZW9tZXRyaWNQcmVjaXNpb247IGltYWdlLXJlbmRlcmluZzpvcHRpbWl6ZVF1YWxpdHk7IGZpbGwtcnVsZTpldmVub2RkOyBjbGlwLXJ1bGU6ZXZlbm9kZCIgdmlld0JveD0iMCAwIDI5NjQ2IDU0NTY2Ij48ZyBpZD0i0KHQu9C+0LlfeDAwMjBfMSI+PHBhdGggY2xhc3M9IiIgc3R5bGU9ImZpbGw6IzAwMCIgZD0iTTEyODggMGwyNzA3MCAwYzcwOCwwIDEyODgsNTgwIDEyODgsMTI4OGwwIDUxOTkwYzAsNzA4IC01ODAsMTI4OCAtMTI4OCwxMjg4bC0yNzA3MCAwYy03MDksMCAtMTI4OCwtNTgwIC0xMjg4LC0xMjg4bDAgLTUxOTkwYzAsLTcwOCA1NzksLTEyODggMTI4OCwtMTI4OHptMjA5OTIgMTc1MTVsLTk3NjYgOTc2NyA5NzY2IDk3NjggLTI1NzMgMjU3MyAtOTc2NyAtOTc2OCAtMjU3MyAtMjU3MyAyNTczIC0yNTczIDk3NjcgLTk3NjcgMjU3MyAyNTczeiI+PC9wYXRoPjwvZz48L3N2Zz4="); -} - -@-webkit-keyframes lg-right-end { - 0% { - left: 0; - } - 50% { - left: -30px; - } - 100% { - left: 0; - } -} -@-moz-keyframes lg-right-end { - 0% { - left: 0; - } - 50% { - left: -30px; - } - 100% { - left: 0; - } -} -@keyframes lg-right-end { - 0% { - left: 0; - } - 50% { - left: -30px; - } - 100% { - left: 0; - } -} -@-webkit-keyframes lg-left-end { - 0% { - left: 0; - } - 50% { - left: 30px; - } - 100% { - left: 0; - } -} -@-moz-keyframes lg-left-end { - 0% { - left: 0; - } - 50% { - left: 30px; - } - 100% { - left: 0; - } -} -@keyframes lg-left-end { - 0% { - left: 0; - } - 50% { - left: 30px; - } - 100% { - left: 0; - } -} -.lg-outer.lg-right-end .lg-object { - -webkit-animation: lg-right-end 0.3s; - -moz-animation: lg-right-end 0.3s; - animation: lg-right-end 0.3s; - position: relative; -} -.lg-outer.lg-left-end .lg-object { - -webkit-animation: lg-left-end 0.3s; - -moz-animation: lg-left-end 0.3s; - animation: lg-left-end 0.3s; - position: relative; -} - -.lg-toolbar { - z-index: 1080; - left: 0; - position: absolute; - top: 0; - width: 100%; - background-color: rgba(255, 255, 255, 0.45); -} -.lg-toolbar .lg-icon { - color: #bfbfbf; - cursor: pointer; - float: right; - font-size: 24px; - height: 47px; - line-height: 27px; - padding: 10px 0; - text-align: center; - width: 50px; - text-decoration: none !important; - outline: medium none; -} -.lg-close.lg-icon { - /* background-color: #ffffff; */ - /* border-radius: 2px 2px 0 0; */ - /* color: #999; */ - /* cursor: pointer; */ - font-size: 30px; - height: 39px; - line-height: 27px; - padding: 5px 0; - position: absolute; - right: 20px; - text-align: center; - top: 20px; - width: 50px; - /* border: 1px solid #e0e0e0; */ - /* border-bottom: none; */ -} - -.lg-toolbar .lg-icon:hover { - color: #404040; -} -.lg-toolbar .lg-close:after { - content: "\e070"; -} -.lg-toolbar .lg-download:after { - content: "\e0f2"; -} - -.lg-sub-html { - /*background-color: rgba(0, 0, 0, 0.45);*/ - bottom: 0; - color: #404040; - font-size: 16px; - left: 0; - padding: 10px 40px; - position: fixed; - right: 0; - text-align: center; - z-index: 1080; -} -.lg-sub-html h4 { - margin: 0; - font-size: 13px; - font-weight: bold; -} -.lg-sub-html p { - font-size: 12px; - margin: 5px 0 0; -} - -#lg-counter { - color: #999; - display: inline-block; - font-size: 16px; - padding-left: 20px; - padding-top: 12px; - vertical-align: middle; -} - -.lg-toolbar, .lg-prev, .lg-next { - opacity: 1; - -moz-transition: -moz-transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s; - transition: -webkit-transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s; - transition: transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s; -} - -.lg-hide-items .lg-prev { - opacity: 0; - -webkit-transform: translate3d(-10px, 0, 0); - -moz-transform: translate3d(-10px, 0, 0); - transform: translate3d(-10px, 0, 0); -} -.lg-hide-items .lg-next { - opacity: 0; - -webkit-transform: translate3d(10px, 0, 0); - -moz-transform: translate3d(10px, 0, 0); - transform: translate3d(10px, 0, 0); -} -.lg-hide-items .lg-toolbar { - opacity: 0; - -webkit-transform: translate3d(0, -10px, 0); - -moz-transform: translate3d(0, -10px, 0); - transform: translate3d(0, -10px, 0); -} - -body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-object { - -webkit-transform: scale3d(0.5, 0.5, 0.5); - -moz-transform: scale3d(0.5, 0.5, 0.5); - transform: scale3d(0.5, 0.5, 0.5); - opacity: 0; - -moz-transition: -moz-transform 250ms ease 0s, opacity 250ms !important; - transition: -webkit-transform 250ms ease 0s, opacity 250ms !important; - transition: transform 250ms ease 0s, opacity 250ms !important; - -webkit-transform-origin: 50% 50%; - -moz-transform-origin: 50% 50%; - -ms-transform-origin: 50% 50%; - transform-origin: 50% 50%; -} -body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item.lg-complete .lg-object { - -webkit-transform: scale3d(1, 1, 1); - -moz-transform: scale3d(1, 1, 1); - transform: scale3d(1, 1, 1); - opacity: 1; -} - -.lg-outer .lg-thumb-outer { - background-color: #ffffff; - border-top: 1px solid #e0e0e0; - bottom: 0; - position: absolute; - width: 100%; - z-index: 1080; - max-height: 350px; - -webkit-transform: translate3d(0, 100%, 0); - -moz-transform: translate3d(0, 100%, 0); - transform: translate3d(0, 100%, 0); - -moz-transition: -moz-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; - transition: -webkit-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; - transition: transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; -} -.lg-outer .lg-thumb-outer.lg-grab .lg-thumb-item { - cursor: -webkit-grab; - cursor: -moz-grab; - cursor: -o-grab; - cursor: -ms-grab; - cursor: grab; -} -.lg-outer .lg-thumb-outer.lg-grabbing .lg-thumb-item { - cursor: move; - cursor: -webkit-grabbing; - cursor: -moz-grabbing; - cursor: -o-grabbing; - cursor: -ms-grabbing; - cursor: grabbing; -} -.lg-outer .lg-thumb-outer.lg-dragging .lg-thumb { - -moz-transition-duration: 0s !important; - transition-duration: 0s !important; -} -.lg-outer.lg-thumb-open .lg-thumb-outer { - -webkit-transform: translate3d(0, 0%, 0); - -moz-transform: translate3d(0, 0%, 0); - transform: translate3d(0, 0%, 0); -} -.lg-outer .lg-thumb { - padding: 10px 0; - height: 100%; - margin-bottom: -5px; - margin-right: auto; - margin-left: auto; -} -.lg-outer .lg-thumb-item { - cursor: pointer; - float: left; - overflow: hidden; - height: 100%; - /*border: 2px solid #FFF;*/ - /*border-radius: 4px;*/ - margin-bottom: 5px; - opacity: 0.3; - position: relative; - background: transparent; - -moz-transition: opacity 0.1s ease; - transition: opacity 0.1s ease; -} -@media (min-width: 1025px) { - .lg-outer .lg-thumb-item { - -moz-transition: border-color 0.25s ease, opacity 0.1s ease; - transition: border-color 0.25s ease, opacity 0.1s ease; - } -} -.lg-outer .lg-thumb-item.active, .lg-outer .lg-thumb-item:hover { - opacity: 1; - /*border-color: #a90707;*/ -} -.lg-outer .lg-thumb-item img { - /*width: 100%; - height: 100%;*/ - width: auto; - height: auto; - max-width: 100%; - max-height: 100%; - margin: auto; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; -} -.lg-outer.lg-has-thumb .lg-item { - padding-bottom: 120px; -} -.lg-outer.lg-can-toggle .lg-item { - padding-bottom: 0; -} -.lg-outer.lg-pull-caption-up .lg-sub-html { - -moz-transition: bottom 0.25s ease; - transition: bottom 0.25s ease; -} -.lg-outer.lg-pull-caption-up.lg-thumb-open .lg-sub-html { - bottom: 100px; -} -.lg-outer .lg-toogle-thumb { - background-color: #ffffff; - border-radius: 2px 2px 0 0; - color: #bfbfbf; - cursor: pointer; - font-size: 24px; - height: 39px; - line-height: 27px; - padding: 5px 0; - position: absolute; - right: 20px; - text-align: center; - top: -39px; - width: 50px; - border: 1px solid #e0e0e0; - border-bottom: none; -} -.lg-outer .lg-toogle-thumb:after { - content: "\e1ff"; -} -.lg-outer .lg-toogle-thumb:hover { - color: #404040; -} - -.lg-outer .lg-video-cont { - display: inline-block; - vertical-align: middle; - max-width: 1140px; - max-height: 100%; - width: 100%; - padding: 0 5px; - z-index: 1; - position: relative; -} -.lg-outer .lg-video { - width: 100%; - height: 0; - padding-bottom: 56.25%; - overflow: hidden; - position: relative; -} -.lg-outer .lg-video .lg-object { - display: inline-block; - position: absolute; - top: 0; - left: 0; - width: 100% !important; - height: 100% !important; -} -.lg-outer .lg-video .lg-video-play { - width: 84px; - height: 59px; - position: absolute; - left: 50%; - top: 50%; - margin-left: -42px; - margin-top: -30px; - z-index: 1080; - cursor: pointer; -} -.lg-outer .lg-has-vimeo .lg-video-play { - background: url("../images/vimeo-play.png") no-repeat scroll 0 0 transparent; -} -.lg-outer .lg-has-vimeo:hover .lg-video-play { - background: url("../images/vimeo-play.png") no-repeat scroll 0 -58px transparent; -} -.lg-outer .lg-has-html5 .lg-video-play { - background: transparent url("../images/video-play.png") no-repeat scroll 0 0; - height: 64px; - margin-left: -32px; - margin-top: -32px; - width: 64px; - opacity: 0.8; -} -.lg-outer .lg-has-html5:hover .lg-video-play { - opacity: 1; -} -.lg-outer .lg-has-youtube .lg-video-play { - background: url("../images/youtube-play.png") no-repeat scroll 0 0 transparent; -} -.lg-outer .lg-has-youtube:hover .lg-video-play { - background: url("../images/youtube-play.png") no-repeat scroll 0 -60px transparent; -} -.lg-outer .lg-video-object { - width: 100% !important; - height: 100% !important; - position: absolute; - top: 0; - left: 0; -} -.lg-outer .lg-has-video .lg-video-object { - visibility: hidden; -} -.lg-outer .lg-has-video.lg-video-palying .lg-object, .lg-outer .lg-has-video.lg-video-palying .lg-video-play { - display: none; -} -.lg-outer .lg-has-video.lg-video-palying .lg-video-object { - visibility: visible; -} - -.lg-progress-bar { - background-color: #333; - height: 5px; - left: 0; - position: absolute; - top: 0; - width: 100%; - z-index: 1080; - opacity: 0; - -moz-transition: opacity 0.08s ease 0s; - transition: opacity 0.08s ease 0s; -} -.lg-progress-bar .lg-progress { - background-color: #a90707; - height: 5px; - width: 0; -} -.lg-progress-bar.lg-start .lg-progress { - width: 100%; -} -.lg-show-autoplay .lg-progress-bar { - opacity: 1; -} - -.lg-autoplay-button:after { - content: "\e01d"; -} -.lg-show-autoplay .lg-autoplay-button:after { - content: "\e01a"; -} - -.lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-img-wrap, .lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-image { - -moz-transition-duration: 0s; - transition-duration: 0s; -} -.lg-outer .lg-item.lg-complete.lg-zoomable .lg-img-wrap { - -moz-transition: -moz-transform 0.3s ease 0s; - transition: -webkit-transform 0.3s ease 0s; - transition: transform 0.3s ease 0s; - -webkit-transform: translate3d(0, 0, 0); - -moz-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - -webkit-backface-visibility: hidden; - -moz-backface-visibility: hidden; - backface-visibility: hidden; -} -.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image { - -webkit-transform: scale3d(1, 1, 1); - -moz-transform: scale3d(1, 1, 1); - transform: scale3d(1, 1, 1); - -moz-transition: -moz-transform 0.3s ease 0s, opacity 0.15s !important; - transition: -webkit-transform 0.3s ease 0s, opacity 0.15s !important; - transition: transform 0.3s ease 0s, opacity 0.15s !important; - -webkit-transform-origin: 0 0; - -moz-transform-origin: 0 0; - -ms-transform-origin: 0 0; - transform-origin: 0 0; - -webkit-backface-visibility: hidden; - -moz-backface-visibility: hidden; - backface-visibility: hidden; -} - -#lg-zoom-in:after { - content: "\e311"; -} - -#lg-zoom-out { - opacity: 0.5; - pointer-events: none; -} -#lg-zoom-out:after { - content: "\e312"; -} -.lg-zoomed #lg-zoom-out { - opacity: 1; - pointer-events: auto; -} - -.lg-outer .lg-pager-outer { - bottom: 60px; - left: 0; - position: absolute; - right: 0; - text-align: center; - z-index: 1080; - height: 10px; -} -.lg-outer .lg-pager-outer.lg-pager-hover .lg-pager-cont { - overflow: visible; -} -.lg-outer .lg-pager-cont { - cursor: pointer; - display: inline-block; - overflow: hidden; - position: relative; - vertical-align: top; - margin: 0 5px; -} -.lg-outer .lg-pager-cont:hover .lg-pager-thumb-cont { - opacity: 1; - -webkit-transform: translate3d(0, 0, 0); - -moz-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); -} -.lg-outer .lg-pager-cont.lg-pager-active .lg-pager { - box-shadow: 0 0 0 2px white inset; -} -.lg-outer .lg-pager-thumb-cont { - background-color: #fff; - color: #FFF; - bottom: 100%; - height: 83px; - left: 0; - margin-bottom: 20px; - margin-left: -60px; - opacity: 0; - padding: 5px; - position: absolute; - width: 120px; - border-radius: 3px; - -moz-transition: opacity 0.15s ease 0s, -moz-transform 0.15s ease 0s; - transition: opacity 0.15s ease 0s, -webkit-transform 0.15s ease 0s; - transition: opacity 0.15s ease 0s, transform 0.15s ease 0s; - -webkit-transform: translate3d(0, 5px, 0); - -moz-transform: translate3d(0, 5px, 0); - transform: translate3d(0, 5px, 0); -} -.lg-outer .lg-pager-thumb-cont img { - width: 100%; - height: 100%; -} -.lg-outer .lg-pager { - background-color: rgba(255, 255, 255, 0.5); - border-radius: 50%; - box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.7) inset; - display: block; - height: 12px; - -moz-transition: box-shadow 0.3s ease 0s; - transition: box-shadow 0.3s ease 0s; - width: 12px; -} -.lg-outer .lg-pager:hover, .lg-outer .lg-pager:focus { - box-shadow: 0 0 0 8px white inset; -} -.lg-outer .lg-caret { - border-left: 10px solid transparent; - border-right: 10px solid transparent; - border-top: 10px dashed; - bottom: -10px; - display: inline-block; - height: 0; - left: 50%; - margin-left: -5px; - position: absolute; - vertical-align: middle; - width: 0; -} - -.lg-fullscreen:after { - content: "\e20c"; -} -.lg-fullscreen-on .lg-fullscreen:after { - content: "\e20d"; -} - -.group { - *zoom: 1; -} - -.group:before, .group:after { - display: table; - content: ""; - line-height: 0; -} - -.group:after { - clear: both; -} - -.lg-outer { - width: 100%; - height: 100%; - position: fixed; - top: 0; - left: 0; - z-index: 1050; - opacity: 0; - -moz-transition: opacity 0.15s ease 0s; - transition: opacity 0.15s ease 0s; -} -@media(max-width: 959px){ - .lg-outer { - cursor: pointer; - } -} -.lg-outer * { - -moz-box-sizing: border-box; - box-sizing: border-box; -} -.lg-outer.lg-visible { - opacity: 1; -} -.lg-outer.lg-css3 .lg-item.lg-prev-slide, .lg-outer.lg-css3 .lg-item.lg-next-slide, .lg-outer.lg-css3 .lg-item.lg-current { - -moz-transition-duration: inherit !important; - transition-duration: inherit !important; - -moz-transition-timing-function: inherit !important; - transition-timing-function: inherit !important; -} -.lg-outer.lg-css3.lg-dragging .lg-item.lg-prev-slide, .lg-outer.lg-css3.lg-dragging .lg-item.lg-next-slide, .lg-outer.lg-css3.lg-dragging .lg-item.lg-current { - -moz-transition-duration: 0s !important; - transition-duration: 0s !important; - opacity: 1; -} -.lg-outer.lg-grab img.lg-object { - cursor: -webkit-grab; - cursor: -moz-grab; - cursor: -o-grab; - cursor: -ms-grab; - cursor: grab; -} -.lg-outer.lg-grabbing img.lg-object { - cursor: move; - cursor: -webkit-grabbing; - cursor: -moz-grabbing; - cursor: -o-grabbing; - cursor: -ms-grabbing; - cursor: grabbing; -} -.lg-outer .lg { - height: 100%; - width: 100%; - position: relative; - overflow: hidden; - margin-left: auto; - margin-right: auto; - max-width: 100%; - max-height: 100%; -} -.lg-outer .lg-inner { - width: 100%; - height: calc(100% - 100px); - position: absolute; - left: 0; - top: 0; - white-space: nowrap; -} -.owl-carousel .owl-nav [class*='owl-']:hover svg { - fill: black; -} -.lg-outer .lg-item { - /*background: url("../images/loading.gif") no-repeat scroll center center transparent;*/ - display: none !important; - -} -.lg-outer .lg-item:after { - content: ''; - position: absolute; - top: 50%; - left: 50%; - margin-top: -16px; - margin-left: -16px; - width: 32px; - height: 32px; - background: transparent; - border-width: 2px; - border-style: solid; - border-color: #ffd300; - border-bottom-color: transparent; - border-radius: 100%; - -webkit-animation: ball-clip-rotate 0.75s linear infinite; - -moz-animation: ball-clip-rotate 0.75s linear infinite; - animation: ball-clip-rotate 0.75s linear infinite; - z-index: 0; -} -.lg-outer.lg-css3 .lg-prev-slide, .lg-outer.lg-css3 .lg-current, .lg-outer.lg-css3 .lg-next-slide { - display: inline-block !important; -} -.lg-outer.lg-css .lg-current { - display: inline-block !important; -} -.lg-outer .lg-item, .lg-outer .lg-img-wrap { - display: inline-block; - text-align: center; - position: absolute; - width: 100%; - height: 100%; - z-index: 1; - background-color: white; -} -.lg-outer .lg-item:before, .lg-outer .lg-img-wrap:before { - content: ""; - display: inline-block; - height: 50%; - width: 1px; - margin-right: -1px; -} -.lg-outer .lg-img-wrap { - top: 0; - bottom: 0; - left: 0; - right: 0; - padding: 10px 5px 40px; -} -.lg-outer .lg-item.lg-complete { - background-image: none; -} -.lg-outer .lg-item.lg-current { - z-index: 1060; -} -.lg-outer .lg-image { - display: inline-block; - vertical-align: middle; - max-width: 100%; - max-height: 100%; - width: auto !important; - height: auto !important; -} -.lg-outer.lg-show-after-load .lg-item .lg-object, .lg-outer.lg-show-after-load .lg-item .lg-video-play { - opacity: 0; - -moz-transition: opacity 0.15s ease 0s; - transition: opacity 0.15s ease 0s; -} -.lg-outer.lg-show-after-load .lg-item.lg-complete .lg-object, .lg-outer.lg-show-after-load .lg-item.lg-complete .lg-video-play { - opacity: 1; -} -.lg-outer .lg-empty-html { - display: none; -} -.lg-outer.lg-hide-download #lg-download { - display: none; -} - -.lg-backdrop { - position: fixed; - top: 0; - left: 0; - right: 0; - bottom: 0; - z-index: 1040; - background-color: #ffffff; - opacity: 0; - -moz-transition: opacity 0.15s ease 0s; - transition: opacity 0.15s ease 0s; -} -.lg-backdrop.in { - opacity: 1; -} - -.lg-css3.lg-no-trans .lg-prev-slide, .lg-css3.lg-no-trans .lg-next-slide, .lg-css3.lg-no-trans .lg-current { - -moz-transition: none 0s ease 0s !important; - transition: none 0s ease 0s !important; -} -.lg-css3.lg-use-css3 .lg-item { - -webkit-backface-visibility: hidden; - -moz-backface-visibility: hidden; - backface-visibility: hidden; -} -.lg-css3.lg-use-left .lg-item { - -webkit-backface-visibility: hidden; - -moz-backface-visibility: hidden; - backface-visibility: hidden; -} -.lg-css3.lg-fade .lg-item { - opacity: 0; -} -.lg-css3.lg-fade .lg-item.lg-current { - opacity: 1; -} -.lg-css3.lg-fade .lg-item.lg-prev-slide, .lg-css3.lg-fade .lg-item.lg-next-slide, .lg-css3.lg-fade .lg-item.lg-current { - -moz-transition: opacity 0.1s ease 0s; - transition: opacity 0.1s ease 0s; -} -.lg-css3.lg-slide.lg-use-css3 .lg-item { - opacity: 0; -} -.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide { - -webkit-transform: translate3d(-100%, 0, 0); - -moz-transform: translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0); -} -.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide { - -webkit-transform: translate3d(100%, 0, 0); - -moz-transform: translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0); -} -.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current { - -webkit-transform: translate3d(0, 0, 0); - -moz-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - opacity: 1; -} -.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide, .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide, .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current { - -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; - transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; - transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; -} -.lg-css3.lg-slide.lg-use-left .lg-item { - opacity: 0; - position: absolute; - left: 0; -} -.lg-css3.lg-slide.lg-use-left .lg-item.lg-prev-slide { - left: -100%; -} -.lg-css3.lg-slide.lg-use-left .lg-item.lg-next-slide { - left: 100%; -} -.lg-css3.lg-slide.lg-use-left .lg-item.lg-current { - left: 0; - opacity: 1; -} -.lg-css3.lg-slide.lg-use-left .lg-item.lg-prev-slide, .lg-css3.lg-slide.lg-use-left .lg-item.lg-next-slide, .lg-css3.lg-slide.lg-use-left .lg-item.lg-current { - -moz-transition: left 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; - transition: left 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; -} -.default-gallery img, .clients-gallery img, .clients-gallery .clients-gallery--img { - -webkit-filter: grayscale(100%); - -moz-filter: grayscale(100%); - -ms-filter: grayscale(100%); - -o-filter: grayscale(100%); - filter: grayscale(100%); - filter: gray; /* IE 6-9 */ -} -.default-gallery img:hover, .clients-gallery img:hover, .clients-gallery .clients-gallery--img:hover { - -webkit-filter: none; - -moz-filter: none; - -ms-filter: none; - -o-filter: none; - filter: none; - filter: none; /* IE 6-9 */ -} - diff --git a/assets/lightGallery/lightGallery.js b/assets/lightGallery/lightGallery.js deleted file mode 100644 index 05fbac4..0000000 --- a/assets/lightGallery/lightGallery.js +++ /dev/null @@ -1,1823 +0,0 @@ -/** @module lightGallery */ -__PluginManager__.register('lightGallery',function(require, exports, module, global) { - - var $ = require('jQuery'); - - /** - * @memberOf kit - */ - /** ! lightgallery - v1.6.5 - 2017-11-16 - * http://sachinchoolur.github.io/lightGallery/ - * Copyright (c) 2017 Sachin N; Licensed GPLv3 - */ - (function() { - 'use strict'; - - var defaults = { - - mode: 'lg-slide', - - // Ex : 'ease' - cssEasing: 'ease', - - //'for jquery animation' - easing: 'linear', - speed: 600, - height: '100%', - width: '100%', - addClass: '', - startClass: 'lg-start-zoom', - backdropDuration: 150, - hideBarsDelay: 6000, - - useLeft: false, - - closable: true, - loop: true, - escKey: true, - keyPress: true, - controls: true, - slideEndAnimatoin: true, - hideControlOnEnd: false, - mousewheel: true, - - getCaptionFromTitleOrAlt: true, - - // .lg-item || '.lg-sub-html' - appendSubHtmlTo: '.lg-sub-html', - - subHtmlSelectorRelative: false, - - /** - * @desc number of preload slides - * will exicute only after the current slide is fully loaded. - * - * @ex you clicked on 4th image and if preload = 1 then 3rd slide and 5th - * slide will be loaded in the background after the 4th slide is fully loaded.. - * if preload is 2 then 2nd 3rd 5th 6th slides will be preloaded.. ... ... - * - */ - preload: 1, - showAfterLoad: true, - selector: '', - selectWithin: '', - nextHtml: '', - prevHtml: '', - - // 0, 1 - index: false, - - iframeMaxWidth: '100%', - - download: true, - counter: true, - appendCounterTo: '.lg-toolbar', - - swipeThreshold: 50, - enableSwipe: true, - enableDrag: true, - - dynamic: false, - dynamicEl: [], - galleryId: 1 - }; - - /** - * @memberOf {kit.$} - * @memberOf {}kit.$ - */ - function Plugin(element, options) { - - // Current lightGallery element - this.el = element; - - // Current jquery element - this.$el = $(element); - - // lightGallery settings - this.s = $.extend({}, defaults, options); - - // When using dynamic mode, ensure dynamicEl is an array - if (this.s.dynamic && this.s.dynamicEl !== 'undefined' && this.s.dynamicEl.constructor === Array && !this.s.dynamicEl.length) { - throw ('When using dynamic mode, you must also define dynamicEl as an Array.'); - } - - // lightGallery modules - this.modules = {}; - - // false when lightgallery complete first slide; - this.lGalleryOn = false; - - this.lgBusy = false; - - // Timeout function for hiding controls; - this.hideBartimeout = false; - - // To determine browser supports for touch events; - this.isTouch = ('ontouchstart' in document.documentElement); - - // Disable hideControlOnEnd if sildeEndAnimation is true - if (this.s.slideEndAnimatoin) { - this.s.hideControlOnEnd = false; - } - - // Gallery items - if (this.s.dynamic) { - this.$items = this.s.dynamicEl; - } else { - if (this.s.selector === 'this') { - this.$items = this.$el; - } else if (this.s.selector !== '') { - if (this.s.selectWithin) { - this.$items = $(this.s.selectWithin).find(this.s.selector); - } else { - this.$items = this.$el.find($(this.s.selector)); - } - } else { - this.$items = this.$el.children(); - } - } - - // .lg-item - this.$slide = ''; - - // .lg-outer - this.$outer = ''; - - this.init(); - - return this; - } - - Plugin.prototype.init = function() { - - var _this = this; - - // s.preload should not be more than $item.length - if (_this.s.preload > _this.$items.length) { - _this.s.preload = _this.$items.length; - } - - // if dynamic option is enabled execute immediately - var _hash = window.location.hash; - if (_hash.indexOf('lg=' + this.s.galleryId) > 0) { - - _this.index = parseInt(_hash.split('&slide=')[1], 10); - - $('body').addClass('lg-from-hash'); - if (!$('body').hasClass('lg-on')) { - setTimeout(function() { - _this.build(_this.index); - }); - - $('body').addClass('lg-on'); - } - } - - if (_this.s.dynamic) { - - _this.$el.trigger('onBeforeOpen.lg'); - - _this.index = _this.s.index || 0; - - // prevent accidental double execution - if (!$('body').hasClass('lg-on')) { - setTimeout(function() { - _this.build(_this.index); - $('body').addClass('lg-on'); - }); - } - } else { - - // Using different namespace for click because click event should not unbind if selector is same object('this') - _this.$items.on('click.lgcustom', function(event) { - - // For IE8 - try { - event.preventDefault(); - event.preventDefault(); - } catch (er) { - event.returnValue = false; - } - - _this.$el.trigger('onBeforeOpen.lg'); - - _this.index = _this.s.index || _this.$items.index(this); - - // prevent accidental double execution - if (!$('body').hasClass('lg-on')) { - _this.build(_this.index); - $('body').addClass('lg-on'); - } - }); - } - - }; - - Plugin.prototype.build = function(index) { - - var _this = this; - - _this.structure(); - - // module constructor - $.each($.fn.lightGallery.modules, function(key) { - _this.modules[key] = new $.fn.lightGallery.modules[key](_this.el); - }); - - // initiate slide function - _this.slide(index, false, false, false); - - if (_this.s.keyPress) { - _this.keyPress(); - } - - if (_this.$items.length > 1) { - - _this.arrow(); - - setTimeout(function() { - _this.enableDrag(); - _this.enableSwipe(); - }, 50); - - if (_this.s.mousewheel) { - _this.mousewheel(); - } - } else { - _this.$slide.on('click.lg', function() { - _this.$el.trigger('onSlideClick.lg'); - }); - } - - _this.counter(); - - _this.closeGallery(); - - _this.$el.trigger('onAfterOpen.lg'); - - // Hide controllers if mouse doesn't move for some period - _this.$outer.on('mousemove.lg click.lg touchstart.lg', function() { - - _this.$outer.removeClass('lg-hide-items'); - - clearTimeout(_this.hideBartimeout); - - // Timeout will be cleared on each slide movement also - _this.hideBartimeout = setTimeout(function() { - _this.$outer.addClass('lg-hide-items'); - }, _this.s.hideBarsDelay); - - }); - - _this.$outer.trigger('mousemove.lg'); - - }; - - Plugin.prototype.structure = function() { - var list = ''; - var controls = ''; - var i = 0; - var subHtmlCont = ''; - var template; - var _this = this; - - $('body').append('
'); - $('.lg-backdrop').css('transition-duration', this.s.backdropDuration + 'ms'); - - // Create gallery items - for (i = 0; i < this.$items.length; i++) { - list += '
'; - } - - // Create controlls - if (this.s.controls && this.$items.length > 1) { - controls = '
' + - '' + - '' + - '
'; - } - - if (this.s.appendSubHtmlTo === '.lg-sub-html') { - subHtmlCont = '
'; - } - - template = '
' + - '
' + - '
' + list + '
' + - '
' + - '' + - '
' + - controls + - subHtmlCont + - '
' + - '
'; - - $('body').append(template); - this.$outer = $('.lg-outer'); - this.$slide = this.$outer.find('.lg-item'); - - if (this.s.useLeft) { - this.$outer.addClass('lg-use-left'); - - // Set mode lg-slide if use left is true; - this.s.mode = 'lg-slide'; - } else { - this.$outer.addClass('lg-use-css3'); - } - - // For fixed height gallery - _this.setTop(); - $(window).on('resize.lg orientationchange.lg', function() { - setTimeout(function() { - _this.setTop(); - }, 100); - }); - - // add class lg-current to remove initial transition - this.$slide.eq(this.index).addClass('lg-current'); - - // add Class for css support and transition mode - if (this.doCss()) { - this.$outer.addClass('lg-css3'); - } else { - this.$outer.addClass('lg-css'); - - // Set speed 0 because no animation will happen if browser doesn't support css3 - this.s.speed = 0; - } - - this.$outer.addClass(this.s.mode); - - if (this.s.enableDrag && this.$items.length > 1) { - this.$outer.addClass('lg-grab'); - } - - if (this.s.showAfterLoad) { - this.$outer.addClass('lg-show-after-load'); - } - - if (this.doCss()) { - var $inner = this.$outer.find('.lg-inner'); - $inner.css('transition-timing-function', this.s.cssEasing); - $inner.css('transition-duration', this.s.speed + 'ms'); - } - - setTimeout(function() { - $('.lg-backdrop').addClass('in'); - }); - - setTimeout(function() { - _this.$outer.addClass('lg-visible'); - }, this.s.backdropDuration); - - if (this.s.download) { - this.$outer.find('.lg-toolbar').append(''); - } - - // Store the current scroll top value to scroll back after closing the gallery.. - this.prevScrollTop = $(window).scrollTop(); - }; - - // For fixed height gallery - Plugin.prototype.setTop = function() { - if (this.s.height !== '100%') { - var wH = $(window).height(); - var top = (wH - parseInt(this.s.height, 10)) / 2; - var $lGallery = this.$outer.find('.lg'); - if (wH >= parseInt(this.s.height, 10)) { - $lGallery.css('top', top + 'px'); - } else { - $lGallery.css('top', '0px'); - } - } - }; - - // Find css3 support - Plugin.prototype.doCss = function() { - // check for css animation support - var support = function() { - var transition = ['transition', 'MozTransition', 'WebkitTransition', 'OTransition', 'msTransition', 'KhtmlTransition']; - var root = document.documentElement; - var i = 0; - for (i = 0; i < transition.length; i++) { - if (transition[i] in root.style) { - return true; - } - } - }; - - if (support()) { - return true; - } - - return false; - }; - - /** - * @desc Check the given src is video - * @param {String} src - * @return {Object} video type - * Ex:{ youtube : ["//www.youtube.com/watch?v=c0asJgSyxcY", "c0asJgSyxcY"] } - */ - Plugin.prototype.isVideo = function(src, index) { - - var html; - if (this.s.dynamic) { - html = this.s.dynamicEl[index].html; - } else { - html = this.$items.eq(index).attr('data-html'); - } - - if (!src) { - if(html) { - return { - html5: true - }; - } else { - 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'); - return false; - } - } - - var youtube = src.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i); - var vimeo = src.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i); - var dailymotion = src.match(/\/\/(?:www\.)?dai.ly\/([0-9a-z\-_]+)/i); - var vk = src.match(/\/\/(?:www\.)?(?:vk\.com|vkontakte\.ru)\/(?:video_ext\.php\?)(.*)/i); - - if (youtube) { - return { - youtube: youtube - }; - } else if (vimeo) { - return { - vimeo: vimeo - }; - } else if (dailymotion) { - return { - dailymotion: dailymotion - }; - } else if (vk) { - return { - vk: vk - }; - } - }; - - /** - * @desc Create image counter - * Ex: 1/10 - */ - Plugin.prototype.counter = function() { - if (this.s.counter) { - $(this.s.appendCounterTo).append('
' + (parseInt(this.index, 10) + 1) + ' / ' + this.$items.length + '
'); - } - }; - - /** - * @desc add sub-html into the slide - * @param {Number} index - index of the slide - */ - Plugin.prototype.addHtml = function(index) { - var subHtml = null; - var subHtmlUrl; - var $currentEle; - if (this.s.dynamic) { - if (this.s.dynamicEl[index].subHtmlUrl) { - subHtmlUrl = this.s.dynamicEl[index].subHtmlUrl; - } else { - subHtml = this.s.dynamicEl[index].subHtml; - } - } else { - $currentEle = this.$items.eq(index); - if ($currentEle.attr('data-sub-html-url')) { - subHtmlUrl = $currentEle.attr('data-sub-html-url'); - } else { - subHtml = $currentEle.attr('data-sub-html'); - if (this.s.getCaptionFromTitleOrAlt && !subHtml) { - subHtml = $currentEle.attr('title') || $currentEle.find('img').first().attr('alt'); - } - } - } - - if (!subHtmlUrl) { - if (typeof subHtml !== 'undefined' && subHtml !== null) { - - // get first letter of subhtml - // if first letter starts with . or # get the html form the jQuery object - var fL = subHtml.substring(0, 1); - if (fL === '.' || fL === '#') { - if (this.s.subHtmlSelectorRelative && !this.s.dynamic) { - subHtml = $currentEle.find(subHtml).html(); - } else { - subHtml = $(subHtml).html(); - } - } - } else { - subHtml = ''; - } - } - - if (this.s.appendSubHtmlTo === '.lg-sub-html') { - - if (subHtmlUrl) { - this.$outer.find(this.s.appendSubHtmlTo).load(subHtmlUrl); - } else { - this.$outer.find(this.s.appendSubHtmlTo).html(subHtml); - } - - } else { - - if (subHtmlUrl) { - this.$slide.eq(index).load(subHtmlUrl); - } else { - this.$slide.eq(index).append(subHtml); - } - } - - // Add lg-empty-html class if title doesn't exist - if (typeof subHtml !== 'undefined' && subHtml !== null) { - if (subHtml === '') { - this.$outer.find(this.s.appendSubHtmlTo).addClass('lg-empty-html'); - } else { - this.$outer.find(this.s.appendSubHtmlTo).removeClass('lg-empty-html'); - } - } - - this.$el.trigger('onAfterAppendSubHtml.lg', [index]); - }; - - /** - * @desc Preload slides - * @param {Number} index - index of the slide - */ - Plugin.prototype.preload = function(index) { - var i = 1; - var j = 1; - for (i = 1; i <= this.s.preload; i++) { - if (i >= this.$items.length - index) { - break; - } - - this.loadContent(index + i, false, 0); - } - - for (j = 1; j <= this.s.preload; j++) { - if (index - j < 0) { - break; - } - - this.loadContent(index - j, false, 0); - } - }; - - /** - * @desc Load slide content into slide. - * @param {Number} index - index of the slide. - * @param {Boolean} rec - if true call loadcontent() function again. - * @param {Boolean} delay - delay for adding complete class. it is 0 except first time. - */ - Plugin.prototype.loadContent = function(index, rec, delay) { - - var _this = this; - var _hasPoster = false; - var _$img; - var _src; - var _poster; - var _srcset; - var _sizes; - var _html; - var getResponsiveSrc = function(srcItms) { - var rsWidth = []; - var rsSrc = []; - for (var i = 0; i < srcItms.length; i++) { - var __src = srcItms[i].split(' '); - - // Manage empty space - if (__src[0] === '') { - __src.splice(0, 1); - } - - rsSrc.push(__src[0]); - rsWidth.push(__src[1]); - } - - var wWidth = $(window).width(); - for (var j = 0; j < rsWidth.length; j++) { - if (parseInt(rsWidth[j], 10) > wWidth) { - _src = rsSrc[j]; - break; - } - } - }; - - if (_this.s.dynamic) { - - if (_this.s.dynamicEl[index].poster) { - _hasPoster = true; - _poster = _this.s.dynamicEl[index].poster; - } - - _html = _this.s.dynamicEl[index].html; - _src = _this.s.dynamicEl[index].src; - - if (_this.s.dynamicEl[index].responsive) { - var srcDyItms = _this.s.dynamicEl[index].responsive.split(','); - getResponsiveSrc(srcDyItms); - } - - _srcset = _this.s.dynamicEl[index].srcset; - _sizes = _this.s.dynamicEl[index].sizes; - - } else { - - if (_this.$items.eq(index).attr('data-poster')) { - _hasPoster = true; - _poster = _this.$items.eq(index).attr('data-poster'); - } - - _html = _this.$items.eq(index).attr('data-html'); - _src = _this.$items.eq(index).attr('href') || _this.$items.eq(index).attr('data-src'); - - if (_this.$items.eq(index).attr('data-responsive')) { - var srcItms = _this.$items.eq(index).attr('data-responsive').split(','); - getResponsiveSrc(srcItms); - } - - _srcset = _this.$items.eq(index).attr('data-srcset'); - _sizes = _this.$items.eq(index).attr('data-sizes'); - - } - - //if (_src || _srcset || _sizes || _poster) { - - var iframe = false; - if (_this.s.dynamic) { - if (_this.s.dynamicEl[index].iframe) { - iframe = true; - } - } else { - if (_this.$items.eq(index).attr('data-iframe') === 'true') { - iframe = true; - } - } - - var _isVideo = _this.isVideo(_src, index); - if (!_this.$slide.eq(index).hasClass('lg-loaded')) { - if (iframe) { - _this.$slide.eq(index).prepend('
'); - } else if (_hasPoster) { - var videoClass = ''; - if (_isVideo && _isVideo.youtube) { - videoClass = 'lg-has-youtube'; - } else if (_isVideo && _isVideo.vimeo) { - videoClass = 'lg-has-vimeo'; - } else { - videoClass = 'lg-has-html5'; - } - - _this.$slide.eq(index).prepend('
'); - - } else if (_isVideo) { - _this.$slide.eq(index).prepend('
'); - _this.$el.trigger('hasVideo.lg', [index, _src, _html]); - } else { - _this.$slide.eq(index).prepend('
'); - } - - _this.$el.trigger('onAferAppendSlide.lg', [index]); - - _$img = _this.$slide.eq(index).find('.lg-object'); - if (_sizes) { - _$img.attr('sizes', _sizes); - } - - if (_srcset) { - _$img.attr('srcset', _srcset); - try { - picturefill({ - elements: [_$img[0]] - }); - } catch (e) { - console.warn('lightGallery :- If you want srcset to be supported for older browser please include picturefil version 2 javascript library in your document.'); - } - } - - if (this.s.appendSubHtmlTo !== '.lg-sub-html') { - _this.addHtml(index); - } - - _this.$slide.eq(index).addClass('lg-loaded'); - } - - _this.$slide.eq(index).find('.lg-object').on('load.lg error.lg', function() { - - // For first time add some delay for displaying the start animation. - var _speed = 0; - - // Do not change the delay value because it is required for zoom plugin. - // If gallery opened from direct url (hash) speed value should be 0 - if (delay && !$('body').hasClass('lg-from-hash')) { - _speed = delay; - } - - setTimeout(function() { - _this.$slide.eq(index).addClass('lg-complete'); - _this.$el.trigger('onSlideItemLoad.lg', [index, delay || 0]); - }, _speed); - - }); - - // @todo check load state for html5 videos - if (_isVideo && _isVideo.html5 && !_hasPoster) { - _this.$slide.eq(index).addClass('lg-complete'); - } - - if (rec === true) { - if (!_this.$slide.eq(index).hasClass('lg-complete')) { - _this.$slide.eq(index).find('.lg-object').on('load.lg error.lg', function() { - _this.preload(index); - }); - } else { - _this.preload(index); - } - } - - //} - }; - - /** - * @desc slide function for lightgallery - ** Slide() gets call on start - ** ** Set lg.on true once slide() function gets called. - ** Call loadContent() on slide() function inside setTimeout - ** ** On first slide we do not want any animation like slide of fade - ** ** So on first slide( if lg.on if false that is first slide) loadContent() should start loading immediately - ** ** Else loadContent() should wait for the transition to complete. - ** ** So set timeout s.speed + 50 - <=> ** loadContent() will load slide content in to the particular slide - ** ** It has recursion (rec) parameter. if rec === true loadContent() will call preload() function. - ** ** preload will execute only when the previous slide is fully loaded (images iframe) - ** ** avoid simultaneous image load - <=> ** Preload() will check for s.preload value and call loadContent() again accoring to preload value - ** loadContent() <====> Preload(); - - * @param {Number} index - index of the slide - * @param {Boolean} fromTouch - true if slide function called via touch event or mouse drag - * @param {Boolean} fromThumb - true if slide function called via thumbnail click - * @param {String} direction - Direction of the slide(next/prev) - */ - Plugin.prototype.slide = function(index, fromTouch, fromThumb, direction) { - - var _prevIndex = this.$outer.find('.lg-current').index(); - var _this = this; - - // Prevent if multiple call - // Required for hsh plugin - if (_this.lGalleryOn && (_prevIndex === index)) { - return; - } - - var _length = this.$slide.length; - var _time = _this.lGalleryOn ? this.s.speed : 0; - - if (!_this.lgBusy) { - - if (this.s.download) { - var _src; - if (_this.s.dynamic) { - _src = _this.s.dynamicEl[index].downloadUrl !== false && (_this.s.dynamicEl[index].downloadUrl || _this.s.dynamicEl[index].src); - } else { - _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')); - - } - - if (_src) { - $('#lg-download').attr('href', _src); - _this.$outer.removeClass('lg-hide-download'); - } else { - _this.$outer.addClass('lg-hide-download'); - } - } - - this.$el.trigger('onBeforeSlide.lg', [_prevIndex, index, fromTouch, fromThumb]); - - _this.lgBusy = true; - - clearTimeout(_this.hideBartimeout); - - // Add title if this.s.appendSubHtmlTo === lg-sub-html - if (this.s.appendSubHtmlTo === '.lg-sub-html') { - - // wait for slide animation to complete - setTimeout(function() { - _this.addHtml(index); - }, _time); - } - - this.arrowDisable(index); - - if (!direction) { - if (index < _prevIndex) { - direction = 'prev'; - } else if (index > _prevIndex) { - direction = 'next'; - } - } - - if (!fromTouch) { - - // remove all transitions - _this.$outer.addClass('lg-no-trans'); - - this.$slide.removeClass('lg-prev-slide lg-next-slide'); - - if (direction === 'prev') { - - //prevslide - this.$slide.eq(index).addClass('lg-prev-slide'); - this.$slide.eq(_prevIndex).addClass('lg-next-slide'); - } else { - - // next slide - this.$slide.eq(index).addClass('lg-next-slide'); - this.$slide.eq(_prevIndex).addClass('lg-prev-slide'); - } - - // give 50 ms for browser to add/remove class - setTimeout(function() { - _this.$slide.removeClass('lg-current'); - - //_this.$slide.eq(_prevIndex).removeClass('lg-current'); - _this.$slide.eq(index).addClass('lg-current'); - - // reset all transitions - _this.$outer.removeClass('lg-no-trans'); - }, 50); - } else { - - this.$slide.removeClass('lg-prev-slide lg-current lg-next-slide'); - var touchPrev; - var touchNext; - if (_length > 2) { - touchPrev = index - 1; - touchNext = index + 1; - - if ((index === 0) && (_prevIndex === _length - 1)) { - - // next slide - touchNext = 0; - touchPrev = _length - 1; - } else if ((index === _length - 1) && (_prevIndex === 0)) { - - // prev slide - touchNext = 0; - touchPrev = _length - 1; - } - - } else { - touchPrev = 0; - touchNext = 1; - } - - if (direction === 'prev') { - _this.$slide.eq(touchNext).addClass('lg-next-slide'); - } else { - _this.$slide.eq(touchPrev).addClass('lg-prev-slide'); - } - - _this.$slide.eq(index).addClass('lg-current'); - } - - if (_this.lGalleryOn) { - setTimeout(function() { - _this.loadContent(index, true, 0); - }, this.s.speed + 50); - - setTimeout(function() { - _this.lgBusy = false; - _this.$el.trigger('onAfterSlide.lg', [_prevIndex, index, fromTouch, fromThumb]); - }, this.s.speed); - - } else { - _this.loadContent(index, true, _this.s.backdropDuration); - - _this.lgBusy = false; - _this.$el.trigger('onAfterSlide.lg', [_prevIndex, index, fromTouch, fromThumb]); - } - - _this.lGalleryOn = true; - - if (this.s.counter) { - $('#lg-counter-current').text(index + 1); - } - - } - _this.index = index; - - }; - - /** - * @desc Go to next slide - * @param {Boolean} fromTouch - true if slide function called via touch event - */ - Plugin.prototype.goToNextSlide = function(fromTouch) { - var _this = this; - var _loop = _this.s.loop; - if (fromTouch && _this.$slide.length < 3) { - _loop = false; - } - - if (!_this.lgBusy) { - if ((_this.index + 1) < _this.$slide.length) { - _this.index++; - _this.$el.trigger('onBeforeNextSlide.lg', [_this.index]); - _this.slide(_this.index, fromTouch, false, 'next'); - } else { - if (_loop) { - _this.index = 0; - _this.$el.trigger('onBeforeNextSlide.lg', [_this.index]); - _this.slide(_this.index, fromTouch, false, 'next'); - } else if (_this.s.slideEndAnimatoin && !fromTouch) { - _this.$outer.addClass('lg-right-end'); - setTimeout(function() { - _this.$outer.removeClass('lg-right-end'); - }, 400); - } - } - } - }; - - /** - * @desc Go to previous slide - * @param {Boolean} fromTouch - true if slide function called via touch event - */ - Plugin.prototype.goToPrevSlide = function(fromTouch) { - var _this = this; - var _loop = _this.s.loop; - if (fromTouch && _this.$slide.length < 3) { - _loop = false; - } - - if (!_this.lgBusy) { - if (_this.index > 0) { - _this.index--; - _this.$el.trigger('onBeforePrevSlide.lg', [_this.index, fromTouch]); - _this.slide(_this.index, fromTouch, false, 'prev'); - } else { - if (_loop) { - _this.index = _this.$items.length - 1; - _this.$el.trigger('onBeforePrevSlide.lg', [_this.index, fromTouch]); - _this.slide(_this.index, fromTouch, false, 'prev'); - } else if (_this.s.slideEndAnimatoin && !fromTouch) { - _this.$outer.addClass('lg-left-end'); - setTimeout(function() { - _this.$outer.removeClass('lg-left-end'); - }, 400); - } - } - } - }; - - Plugin.prototype.keyPress = function() { - var _this = this; - if (this.$items.length > 1) { - $(window).on('keyup.lg', function(e) { - if (_this.$items.length > 1) { - if (e.keyCode === 37) { - e.preventDefault(); - _this.goToPrevSlide(); - } - - if (e.keyCode === 39) { - e.preventDefault(); - _this.goToNextSlide(); - } - } - }); - } - - $(window).on('keydown.lg', function(e) { - if (_this.s.escKey === true && e.keyCode === 27) { - e.preventDefault(); - if (!_this.$outer.hasClass('lg-thumb-open')) { - _this.destroy(); - } else { - _this.$outer.removeClass('lg-thumb-open'); - } - } - }); - }; - - Plugin.prototype.arrow = function() { - var _this = this; - this.$outer.find('.lg-prev').on('click.lg', function() { - _this.goToPrevSlide(); - }); - - this.$outer.find('.lg-next').on('click.lg', function() { - _this.goToNextSlide(); - }); - }; - - Plugin.prototype.arrowDisable = function(index) { - - // Disable arrows if s.hideControlOnEnd is true - if (!this.s.loop && this.s.hideControlOnEnd) { - if ((index + 1) < this.$slide.length) { - this.$outer.find('.lg-next').removeAttr('disabled').removeClass('disabled'); - } else { - this.$outer.find('.lg-next').attr('disabled', 'disabled').addClass('disabled'); - } - - if (index > 0) { - this.$outer.find('.lg-prev').removeAttr('disabled').removeClass('disabled'); - } else { - this.$outer.find('.lg-prev').attr('disabled', 'disabled').addClass('disabled'); - } - } - }; - - Plugin.prototype.setTranslate = function($el, xValue, yValue) { - // jQuery supports Automatic CSS prefixing since jQuery 1.8.0 - if (this.s.useLeft) { - $el.css('left', xValue); - } else { - $el.css({ - transform: 'translate3d(' + (xValue) + 'px, ' + yValue + 'px, 0px)' - }); - } - }; - - Plugin.prototype.touchMove = function(startCoords, endCoords) { - - var distance = endCoords - startCoords; - - if (Math.abs(distance) > 15) { - // reset opacity and transition duration - this.$outer.addClass('lg-dragging'); - - // move current slide - this.setTranslate(this.$slide.eq(this.index), distance, 0); - - // move next and prev slide with current slide - this.setTranslate($('.lg-prev-slide'), -this.$slide.eq(this.index).width() + distance, 0); - this.setTranslate($('.lg-next-slide'), this.$slide.eq(this.index).width() + distance, 0); - } - }; - - Plugin.prototype.touchEnd = function(distance) { - var _this = this; - - // keep slide animation for any mode while dragg/swipe - if (_this.s.mode !== 'lg-slide') { - _this.$outer.addClass('lg-slide'); - } - - this.$slide.not('.lg-current, .lg-prev-slide, .lg-next-slide').css('opacity', '0'); - - // set transition duration - setTimeout(function() { - _this.$outer.removeClass('lg-dragging'); - if ((distance < 0) && (Math.abs(distance) > _this.s.swipeThreshold)) { - _this.goToNextSlide(true); - } else if ((distance > 0) && (Math.abs(distance) > _this.s.swipeThreshold)) { - _this.goToPrevSlide(true); - } else if (Math.abs(distance) < 5) { - - // Trigger click if distance is less than 5 pix - _this.$el.trigger('onSlideClick.lg'); - } - - _this.$slide.removeAttr('style'); - }); - - // remove slide class once drag/swipe is completed if mode is not slide - setTimeout(function() { - if (!_this.$outer.hasClass('lg-dragging') && _this.s.mode !== 'lg-slide') { - _this.$outer.removeClass('lg-slide'); - } - }, _this.s.speed + 100); - - }; - - Plugin.prototype.enableSwipe = function() { - var _this = this; - var startCoords = 0; - var endCoords = 0; - var isMoved = false; - - if (_this.s.enableSwipe && _this.doCss()) { - - _this.$slide.on('touchstart.lg', function(e) { - if (!_this.$outer.hasClass('lg-zoomed') && !_this.lgBusy) { - e.preventDefault(); - _this.manageSwipeClass(); - startCoords = e.originalEvent.targetTouches[0].pageX; - } - }); - - _this.$slide.on('touchmove.lg', function(e) { - if (!_this.$outer.hasClass('lg-zoomed')) { - e.preventDefault(); - endCoords = e.originalEvent.targetTouches[0].pageX; - _this.touchMove(startCoords, endCoords); - isMoved = true; - } - }); - - _this.$slide.on('touchend.lg', function() { - if (!_this.$outer.hasClass('lg-zoomed')) { - if (isMoved) { - isMoved = false; - _this.touchEnd(endCoords - startCoords); - } else { - _this.$el.trigger('onSlideClick.lg'); - } - } - }); - } - - }; - - Plugin.prototype.enableDrag = function() { - var _this = this; - var startCoords = 0; - var endCoords = 0; - var isDraging = false; - var isMoved = false; - if (_this.s.enableDrag && _this.doCss()) { - _this.$slide.on('mousedown.lg', function(e) { - // execute only on .lg-object - if (!_this.$outer.hasClass('lg-zoomed')) { - if ($(e.target).hasClass('lg-object') || $(e.target).hasClass('lg-video-play')) { - e.preventDefault(); - - if (!_this.lgBusy) { - _this.manageSwipeClass(); - startCoords = e.pageX; - isDraging = true; - - // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723 - _this.$outer.scrollLeft += 1; - _this.$outer.scrollLeft -= 1; - - // * - - _this.$outer.removeClass('lg-grab').addClass('lg-grabbing'); - - _this.$el.trigger('onDragstart.lg'); - } - - } - } - }); - - $(window).on('mousemove.lg', function(e) { - if (isDraging) { - isMoved = true; - endCoords = e.pageX; - _this.touchMove(startCoords, endCoords); - _this.$el.trigger('onDragmove.lg'); - } - }); - - $(window).on('mouseup.lg', function(e) { - if (isMoved) { - isMoved = false; - _this.touchEnd(endCoords - startCoords); - _this.$el.trigger('onDragend.lg'); - } else if ($(e.target).hasClass('lg-object') || $(e.target).hasClass('lg-video-play')) { - _this.$el.trigger('onSlideClick.lg'); - } - - // Prevent execution on click - if (isDraging) { - isDraging = false; - _this.$outer.removeClass('lg-grabbing').addClass('lg-grab'); - } - }); - - } - }; - - Plugin.prototype.manageSwipeClass = function() { - var _touchNext = this.index + 1; - var _touchPrev = this.index - 1; - if (this.s.loop && this.$slide.length > 2) { - if (this.index === 0) { - _touchPrev = this.$slide.length - 1; - } else if (this.index === this.$slide.length - 1) { - _touchNext = 0; - } - } - - this.$slide.removeClass('lg-next-slide lg-prev-slide'); - if (_touchPrev > -1) { - this.$slide.eq(_touchPrev).addClass('lg-prev-slide'); - } - - this.$slide.eq(_touchNext).addClass('lg-next-slide'); - }; - - Plugin.prototype.mousewheel = function() { - var _this = this; - _this.$outer.on('mousewheel.lg', function(e) { - - if (!e.deltaY) { - return; - } - - if (e.deltaY > 0) { - _this.goToPrevSlide(); - } else { - _this.goToNextSlide(); - } - - e.preventDefault(); - }); - - }; - - Plugin.prototype.closeGallery = function() { - - var _this = this; - var mousedown = false; - this.$outer.find('.lg-close').on('click.lg', function() { - _this.destroy(); - }); - - if (_this.s.closable) { - - // If you drag the slide and release outside gallery gets close on chrome - // for preventing this check mousedown and mouseup happened on .lg-item or lg-outer - _this.$outer.on('mousedown.lg', function(e) { - - if ($(e.target).is('.lg-outer') || $(e.target).is('.lg-item ') || $(e.target).is('.lg-img-wrap')) { - mousedown = true; - } else { - mousedown = false; - } - - }); - - _this.$outer.on('mouseup.lg', function(e) { - - if ($(e.target).is('.lg-outer') || $(e.target).is('.lg-item ') || $(e.target).is('.lg-img-wrap') && mousedown) { - if (!_this.$outer.hasClass('lg-dragging')) { - _this.destroy(); - } - } - - }); - - } - - }; - - Plugin.prototype.destroy = function(d) { - - var _this = this; - - if (!d) { - _this.$el.trigger('onBeforeClose.lg'); - $(window).scrollTop(_this.prevScrollTop); - } - - - /** - * if d is false or undefined destroy will only close the gallery - * plugins instance remains with the element - * - * if d is true destroy will completely remove the plugin - */ - - if (d) { - if (!_this.s.dynamic) { - // only when not using dynamic mode is $items a jquery collection - this.$items.off('click.lg click.lgcustom'); - } - - $.removeData(_this.el, 'lightGallery'); - } - - // Unbind all events added by lightGallery - this.$el.off('.lg.tm'); - - // Distroy all lightGallery modules - $.each($.fn.lightGallery.modules, function(key) { - if (_this.modules[key]) { - _this.modules[key].destroy(); - } - }); - - this.lGalleryOn = false; - - clearTimeout(_this.hideBartimeout); - this.hideBartimeout = false; - $(window).off('.lg'); - $('body').removeClass('lg-on lg-from-hash'); - - if (_this.$outer) { - _this.$outer.removeClass('lg-visible'); - } - - $('.lg-backdrop').removeClass('in'); - - setTimeout(function() { - if (_this.$outer) { - _this.$outer.remove(); - } - - $('.lg-backdrop').remove(); - - if (!d) { - _this.$el.trigger('onCloseAfter.lg'); - } - - }, _this.s.backdropDuration + 50); - }; - - $.fn.lightGallery = function(options) { - return this.each(function() { - if (!$.data(this, 'lightGallery')) { - $.data(this, 'lightGallery', new Plugin(this, options)); - } else { - try { - $(this).data('lightGallery').init(); - } catch (err) { - console.error('lightGallery has not initiated properly'); - } - } - }); - }; - - $.fn.lightGallery.modules = {}; - - })(); - - - /** ! lg-thumbnail - v1.1.0 - 2017-08-08 - * http://sachinchoolur.github.io/lightGallery - * Copyright (c) 2017 Sachin N; Licensed GPLv3 - */ - - (function() { - - 'use strict'; - - var defaults = { - thumbnail: true, - - animateThumb: true, - currentPagerPosition: 'middle', - - thumbWidth: 100, - thumbHeight: '80px', - thumbContHeight: 100, - thumbMargin: 5, - - exThumbImage: false, - showThumbByDefault: true, - toogleThumb: true, - pullCaptionUp: true, - - enableThumbDrag: true, - enableThumbSwipe: true, - swipeThreshold: 50, - - loadYoutubeThumbnail: true, - youtubeThumbSize: 1, - - loadVimeoThumbnail: true, - vimeoThumbSize: 'thumbnail_small', - - loadDailymotionThumbnail: true - }; - - var Thumbnail = function(element) { - - // get lightGallery core plugin data - this.core = $(element).data('lightGallery'); - - // extend module default settings with lightGallery core settings - this.core.s = $.extend({}, defaults, this.core.s); - - this.$el = $(element); - this.$thumbOuter = null; - this.thumbOuterWidth = 0; - this.thumbTotalWidth = (this.core.$items.length * (this.core.s.thumbWidth + this.core.s.thumbMargin)); - this.thumbIndex = this.core.index; - - if (this.core.s.animateThumb) { - this.core.s.thumbHeight = '100%'; - } - - // Thumbnail animation value - this.left = 0; - - this.init(); - - return this; - }; - - Thumbnail.prototype.init = function() { - var _this = this; - if (this.core.s.thumbnail && this.core.$items.length > 1) { - if (this.core.s.showThumbByDefault) { - setTimeout(function(){ - _this.core.$outer.addClass('lg-thumb-open'); - }, 700); - } - - if (this.core.s.pullCaptionUp) { - this.core.$outer.addClass('lg-pull-caption-up'); - } - - this.build(); - if (this.core.s.animateThumb && this.core.doCss()) { - if (this.core.s.enableThumbDrag) { - this.enableThumbDrag(); - } - - if (this.core.s.enableThumbSwipe) { - this.enableThumbSwipe(); - } - - this.thumbClickable = false; - } else { - this.thumbClickable = true; - } - - this.toogle(); - this.thumbkeyPress(); - } - }; - - Thumbnail.prototype.build = function() { - var _this = this; - var thumbList = ''; - var vimeoErrorThumbSize = ''; - var $thumb; - var html = '
' + - '
' + - '
' + - '
'; - - switch (this.core.s.vimeoThumbSize) { - case 'thumbnail_large': - vimeoErrorThumbSize = '640'; - break; - case 'thumbnail_medium': - vimeoErrorThumbSize = '200x150'; - break; - case 'thumbnail_small': - vimeoErrorThumbSize = '100x75'; - } - - _this.core.$outer.addClass('lg-has-thumb'); - - _this.core.$outer.find('.lg').append(html); - - _this.$thumbOuter = _this.core.$outer.find('.lg-thumb-outer'); - _this.thumbOuterWidth = _this.$thumbOuter.width(); - - if (_this.core.s.animateThumb) { - _this.core.$outer.find('.lg-thumb').css({ - width: _this.thumbTotalWidth + 'px', - position: 'relative' - }); - } - - if (this.core.s.animateThumb) { - _this.$thumbOuter.css('height', _this.core.s.thumbContHeight + 'px'); - } - - function getThumb(src, thumb, index) { - var isVideo = _this.core.isVideo(src, index) || {}; - var thumbImg; - var vimeoId = ''; - - if (isVideo.youtube || isVideo.vimeo || isVideo.dailymotion) { - if (isVideo.youtube) { - if (_this.core.s.loadYoutubeThumbnail) { - thumbImg = '//img.youtube.com/vi/' + isVideo.youtube[1] + '/' + _this.core.s.youtubeThumbSize + '.jpg'; - } else { - thumbImg = thumb; - } - } else if (isVideo.vimeo) { - if (_this.core.s.loadVimeoThumbnail) { - thumbImg = '//i.vimeocdn.com/video/error_' + vimeoErrorThumbSize + '.jpg'; - vimeoId = isVideo.vimeo[1]; - } else { - thumbImg = thumb; - } - } else if (isVideo.dailymotion) { - if (_this.core.s.loadDailymotionThumbnail) { - thumbImg = '//www.dailymotion.com/thumbnail/video/' + isVideo.dailymotion[1]; - } else { - thumbImg = thumb; - } - } - } else { - thumbImg = thumb; - } - - thumbList += '
'; - vimeoId = ''; - } - - if (_this.core.s.dynamic) { - for (var i = 0; i < _this.core.s.dynamicEl.length; i++) { - getThumb(_this.core.s.dynamicEl[i].src, _this.core.s.dynamicEl[i].thumb, i); - } - } else { - _this.core.$items.each(function(i) { - - if (!_this.core.s.exThumbImage) { - getThumb($(this).attr('href') || $(this).attr('data-src'), $(this).find('img').attr('data-src') || $(this).find('img').attr('src'), i); - } else { - getThumb($(this).attr('href') || $(this).attr('data-src'), $(this).attr(_this.core.s.exThumbImage), i); - } - - }); - } - - _this.core.$outer.find('.lg-thumb').html(thumbList); - - $thumb = _this.core.$outer.find('.lg-thumb-item'); - - // Load vimeo thumbnails - $thumb.each(function() { - var $this = $(this); - var vimeoVideoId = $this.attr('data-vimeo-id'); - - if (vimeoVideoId) { - $.getJSON('//www.vimeo.com/api/v2/video/' + vimeoVideoId + '.json?callback=?', { - format: 'json' - }, function(data) { - $this.find('img').attr('src', data[0][_this.core.s.vimeoThumbSize]); - }); - } - }); - - // manage active class for thumbnail - $thumb.eq(_this.core.index).addClass('active'); - _this.core.$el.on('onBeforeSlide.lg.tm', function() { - $thumb.removeClass('active'); - $thumb.eq(_this.core.index).addClass('active'); - }); - - $thumb.on('click.lg touchend.lg', function() { - var _$this = $(this); - setTimeout(function() { - - // In IE9 and bellow touch does not support - // Go to slide if browser does not support css transitions - if ((_this.thumbClickable && !_this.core.lgBusy) || !_this.core.doCss()) { - _this.core.index = _$this.index(); - _this.core.slide(_this.core.index, false, true, false); - } - }, 50); - }); - - _this.core.$el.on('onBeforeSlide.lg.tm', function() { - _this.animateThumb(_this.core.index); - }); - - $(window).on('resize.lg.thumb orientationchange.lg.thumb', function() { - setTimeout(function() { - _this.animateThumb(_this.core.index); - _this.thumbOuterWidth = _this.$thumbOuter.width(); - }, 200); - }); - - }; - - Thumbnail.prototype.setTranslate = function(value) { - // jQuery supports Automatic CSS prefixing since jQuery 1.8.0 - this.core.$outer.find('.lg-thumb').css({ - transform: 'translate3d(-' + (value) + 'px, 0px, 0px)' - }); - }; - - Thumbnail.prototype.animateThumb = function(index) { - var $thumb = this.core.$outer.find('.lg-thumb'); - if (this.core.s.animateThumb) { - var position; - switch (this.core.s.currentPagerPosition) { - case 'left': - position = 0; - break; - case 'middle': - position = (this.thumbOuterWidth / 2) - (this.core.s.thumbWidth / 2); - break; - case 'right': - position = this.thumbOuterWidth - this.core.s.thumbWidth; - } - this.left = ((this.core.s.thumbWidth + this.core.s.thumbMargin) * index - 1) - position; - if (this.left > (this.thumbTotalWidth - this.thumbOuterWidth)) { - this.left = this.thumbTotalWidth - this.thumbOuterWidth; - } - - if (this.left < 0) { - this.left = 0; - } - - if (this.core.lGalleryOn) { - if (!$thumb.hasClass('on')) { - this.core.$outer.find('.lg-thumb').css('transition-duration', this.core.s.speed + 'ms'); - } - - if (!this.core.doCss()) { - $thumb.animate({ - left: -this.left + 'px' - }, this.core.s.speed); - } - } else { - if (!this.core.doCss()) { - $thumb.css('left', -this.left + 'px'); - } - } - - this.setTranslate(this.left); - - } - }; - - // Enable thumbnail dragging and swiping - Thumbnail.prototype.enableThumbDrag = function() { - - var _this = this; - var startCoords = 0; - var endCoords = 0; - var isDraging = false; - var isMoved = false; - var tempLeft = 0; - - _this.$thumbOuter.addClass('lg-grab'); - - _this.core.$outer.find('.lg-thumb').on('mousedown.lg.thumb', function(e) { - if (_this.thumbTotalWidth > _this.thumbOuterWidth) { - // execute only on .lg-object - e.preventDefault(); - startCoords = e.pageX; - isDraging = true; - - // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723 - _this.core.$outer.scrollLeft += 1; - _this.core.$outer.scrollLeft -= 1; - - // * - _this.thumbClickable = false; - _this.$thumbOuter.removeClass('lg-grab').addClass('lg-grabbing'); - } - }); - - $(window).on('mousemove.lg.thumb', function(e) { - if (isDraging) { - tempLeft = _this.left; - isMoved = true; - endCoords = e.pageX; - - _this.$thumbOuter.addClass('lg-dragging'); - - tempLeft = tempLeft - (endCoords - startCoords); - - if (tempLeft > (_this.thumbTotalWidth - _this.thumbOuterWidth)) { - tempLeft = _this.thumbTotalWidth - _this.thumbOuterWidth; - } - - if (tempLeft < 0) { - tempLeft = 0; - } - - // move current slide - _this.setTranslate(tempLeft); - - } - }); - - $(window).on('mouseup.lg.thumb', function() { - if (isMoved) { - isMoved = false; - _this.$thumbOuter.removeClass('lg-dragging'); - - _this.left = tempLeft; - - if (Math.abs(endCoords - startCoords) < _this.core.s.swipeThreshold) { - _this.thumbClickable = true; - } - - } else { - _this.thumbClickable = true; - } - - if (isDraging) { - isDraging = false; - _this.$thumbOuter.removeClass('lg-grabbing').addClass('lg-grab'); - } - }); - - }; - - Thumbnail.prototype.enableThumbSwipe = function() { - var _this = this; - var startCoords = 0; - var endCoords = 0; - var isMoved = false; - var tempLeft = 0; - - _this.core.$outer.find('.lg-thumb').on('touchstart.lg', function(e) { - if (_this.thumbTotalWidth > _this.thumbOuterWidth) { - e.preventDefault(); - startCoords = e.originalEvent.targetTouches[0].pageX; - _this.thumbClickable = false; - } - }); - - _this.core.$outer.find('.lg-thumb').on('touchmove.lg', function(e) { - if (_this.thumbTotalWidth > _this.thumbOuterWidth) { - e.preventDefault(); - endCoords = e.originalEvent.targetTouches[0].pageX; - isMoved = true; - - _this.$thumbOuter.addClass('lg-dragging'); - - tempLeft = _this.left; - - tempLeft = tempLeft - (endCoords - startCoords); - - if (tempLeft > (_this.thumbTotalWidth - _this.thumbOuterWidth)) { - tempLeft = _this.thumbTotalWidth - _this.thumbOuterWidth; - } - - if (tempLeft < 0) { - tempLeft = 0; - } - - // move current slide - _this.setTranslate(tempLeft); - - } - }); - - _this.core.$outer.find('.lg-thumb').on('touchend.lg', function() { - if (_this.thumbTotalWidth > _this.thumbOuterWidth) { - - if (isMoved) { - isMoved = false; - _this.$thumbOuter.removeClass('lg-dragging'); - if (Math.abs(endCoords - startCoords) < _this.core.s.swipeThreshold) { - _this.thumbClickable = true; - } - - _this.left = tempLeft; - } else { - _this.thumbClickable = true; - } - } else { - _this.thumbClickable = true; - } - }); - - }; - - Thumbnail.prototype.toogle = function() { - var _this = this; - if (_this.core.s.toogleThumb) { - _this.core.$outer.addClass('lg-can-toggle'); - _this.$thumbOuter.append(''); - _this.core.$outer.find('.lg-toogle-thumb').on('click.lg', function() { - _this.core.$outer.toggleClass('lg-thumb-open'); - }); - } - }; - - Thumbnail.prototype.thumbkeyPress = function() { - var _this = this; - $(window).on('keydown.lg.thumb', function(e) { - if (e.keyCode === 38) { - e.preventDefault(); - _this.core.$outer.addClass('lg-thumb-open'); - } else if (e.keyCode === 40) { - e.preventDefault(); - _this.core.$outer.removeClass('lg-thumb-open'); - } - }); - }; - - Thumbnail.prototype.destroy = function() { - if (this.core.s.thumbnail && this.core.$items.length > 1) { - $(window).off('resize.lg.thumb orientationchange.lg.thumb keydown.lg.thumb'); - this.$thumbOuter.remove(); - this.core.$outer.removeClass('lg-has-thumb'); - } - }; - - $.fn.lightGallery.modules.Thumbnail = Thumbnail; - - })(); - - return module.exports = $.fn.lightGallery; -}); diff --git a/assets/lightGallery/lightgallery-2.9.0.tgz b/assets/lightGallery/lightgallery-2.9.0.tgz new file mode 100644 index 0000000..d0ed422 Binary files /dev/null and b/assets/lightGallery/lightgallery-2.9.0.tgz differ diff --git a/assets/lightGallery/lightgallery.d.ts b/assets/lightGallery/lightgallery.d.ts new file mode 100644 index 0000000..b213d71 --- /dev/null +++ b/assets/lightGallery/lightgallery.d.ts @@ -0,0 +1,305 @@ +import { LightGalleryAllSettings, LightGallerySettings } from './lg-settings'; +import { GalleryItem, ImageSize } from './lg-utils'; +import { lgQuery } from './lgQuery'; +import { Coords, MediaContainerPosition, SlideDirection } from './types'; +export declare class LightGallery { + settings: LightGalleryAllSettings; + galleryItems: GalleryItem[]; + lgId: number; + el: HTMLElement; + LGel: lgQuery; + lgOpened: boolean; + index: number; + plugins: any[]; + lGalleryOn: boolean; + lgBusy: boolean; + touchAction?: 'swipe' | 'zoomSwipe' | 'pinch'; + swipeDirection?: 'horizontal' | 'vertical'; + hideBarTimeout: any; + currentItemsInDom: string[]; + outer: lgQuery; + items: any; + $backdrop: lgQuery; + $lgComponents: lgQuery; + $container: lgQuery; + $inner: lgQuery; + $content: lgQuery; + $toolbar: lgQuery; + prevScrollTop: number; + bodyPaddingRight: number; + private zoomFromOrigin; + private currentImageSize?; + private isDummyImageRemoved; + private dragOrSwipeEnabled; + mediaContainerPosition: { + top: number; + bottom: number; + }; + constructor(element: HTMLElement, options?: LightGallerySettings); + private generateSettings; + private normalizeSettings; + init(): void; + openGalleryOnItemClick(): void; + /** + * Module constructor + * Modules are build incrementally. + * Gallery should be opened only once all the modules are initialized. + * use moduleBuildTimeout to make sure this + */ + buildModules(): void; + validateLicense(): void; + getSlideItem(index: number): lgQuery; + getSlideItemId(index: number): string; + getIdName(id: string): string; + getElementById(id: string): lgQuery; + manageSingleSlideClassName(): void; + buildStructure(): void; + refreshOnResize(): void; + resizeVideoSlide(index: number, imageSize?: ImageSize): void; + /** + * Update slides dynamically. + * Add, edit or delete slides dynamically when lightGallery is opened. + * Modify the current gallery items and pass it via updateSlides method + * @note + * - Do not mutate existing lightGallery items directly. + * - Always pass new list of gallery items + * - You need to take care of thumbnails outside the gallery if any + * - user this method only if you want to update slides when the gallery is opened. Otherwise, use `refresh()` method. + * @param items Gallery items + * @param index After the update operation, which slide gallery should navigate to + * @category lGPublicMethods + * @example + * const plugin = lightGallery(); + * + * // Adding slides dynamically + * let galleryItems = [ + * // Access existing lightGallery items + * // galleryItems are automatically generated internally from the gallery HTML markup + * // or directly from galleryItems when dynamic gallery is used + * ...plugin.galleryItems, + * ...[ + * { + * src: 'img/img-1.png', + * thumb: 'img/thumb1.png', + * }, + * ], + * ]; + * plugin.updateSlides( + * galleryItems, + * plugin.index, + * ); + * + * + * // Remove slides dynamically + * galleryItems = JSON.parse( + * JSON.stringify(updateSlideInstance.galleryItems), + * ); + * galleryItems.shift(); + * updateSlideInstance.updateSlides(galleryItems, 1); + * @see Demo + */ + updateSlides(items: GalleryItem[], index: number): void; + getItems(): GalleryItem[]; + shouldHideScrollbar(): boolean; + hideScrollbar(): void; + resetScrollBar(): void; + /** + * Open lightGallery. + * Open gallery with specific slide by passing index of the slide as parameter. + * @category lGPublicMethods + * @param {Number} index - index of the slide + * @param {HTMLElement} element - Which image lightGallery should zoom from + * + * @example + * const $dynamicGallery = document.getElementById('dynamic-gallery-demo'); + * const dynamicGallery = lightGallery($dynamicGallery, { + * dynamic: true, + * dynamicEl: [ + * { + * src: 'img/1.jpg', + * thumb: 'img/thumb-1.jpg', + * subHtml: '

Image 1 title

Image 1 descriptions.

', + * }, + * ... + * ], + * }); + * $dynamicGallery.addEventListener('click', function () { + * // Starts with third item.(Optional). + * // This is useful if you want use dynamic mode with + * // custom thumbnails (thumbnails outside gallery), + * dynamicGallery.openGallery(2); + * }); + * + */ + openGallery(index?: number, element?: HTMLElement): void; + /** + * Note - Changing the position of the media on every slide transition creates a flickering effect. + * Therefore, The height of the caption is calculated dynamically, only once based on the first slide caption. + * if you have dynamic captions for each media, + * you can provide an appropriate height for the captions via allowMediaOverlap option + */ + getMediaContainerPosition(): MediaContainerPosition; + private setMediaContainerPosition; + hideBars(): void; + initPictureFill($img: lgQuery): void; + /** + * @desc Create image counter + * Ex: 1/10 + */ + counter(): void; + /** + * @desc add sub-html into the slide + * @param {Number} index - index of the slide + */ + addHtml(index: number): void; + /** + * @desc Preload slides + * @param {Number} index - index of the slide + * @todo preload not working for the first slide, Also, should work for the first and last slide as well + */ + preload(index: number): void; + getDummyImgStyles(imageSize?: ImageSize): string; + getVideoContStyle(imageSize?: ImageSize): string; + getDummyImageContent($currentSlide: lgQuery, index: number, alt: string): HTMLImageElement | string; + setImgMarkup(src: string, $currentSlide: lgQuery, index: number): void; + onSlideObjectLoad($slide: lgQuery, isHTML5VideoWithoutPoster: boolean, onLoad: () => void, onError: () => void): void; + /** + * + * @param $el Current slide item + * @param index + * @param delay Delay is 0 except first time + * @param speed Speed is same as delay, except it is 0 if gallery is opened via hash plugin + * @param isFirstSlide + */ + onLgObjectLoad(currentSlide: lgQuery, index: number, delay: number, speed: number, isFirstSlide: boolean, isHTML5VideoWithoutPoster: boolean): void; + triggerSlideItemLoad($currentSlide: lgQuery, index: number, delay: number, speed: number, isFirstSlide: boolean): void; + isFirstSlideWithZoomAnimation(): boolean; + addSlideVideoInfo(items: GalleryItem[]): void; + /** + * Load slide content into slide. + * This is used to load content into slides that is not visible too + * @param {Number} index - index of the slide. + * @param {Boolean} rec - if true call loadcontent() function again. + */ + loadContent(index: number, rec: boolean): void; + /** + * @desc Remove dummy image content and load next slides + * Called only for the first time if zoomFromOrigin animation is enabled + * @param index + * @param $currentSlide + * @param speed + */ + loadContentOnFirstSlideLoad(index: number, $currentSlide: lgQuery, speed: number): void; + getItemsToBeInsertedToDom(index: number, prevIndex: number, numberOfItems?: number): string[]; + organizeSlideItems(index: number, prevIndex: number): string[]; + /** + * Get previous index of the slide + */ + getPreviousSlideIndex(): number; + setDownloadValue(index: number): void; + makeSlideAnimation(direction: 'next' | 'prev', currentSlideItem: lgQuery, previousSlideItem: lgQuery): void; + /** + * Goto a specific slide. + * @param {Number} index - index of the slide + * @param {Boolean} fromTouch - true if slide function called via touch event or mouse drag + * @param {Boolean} fromThumb - true if slide function called via thumbnail click + * @param {String} direction - Direction of the slide(next/prev) + * @category lGPublicMethods + * @example + * const plugin = lightGallery(); + * // to go to 3rd slide + * plugin.slide(2); + * + */ + slide(index: number, fromTouch?: boolean, fromThumb?: boolean, direction?: SlideDirection | false): void; + updateCurrentCounter(index: number): void; + updateCounterTotal(): void; + getSlideType(item: GalleryItem): 'video' | 'iframe' | 'image'; + touchMove(startCoords: Coords, endCoords: Coords, e?: TouchEvent): void; + touchEnd(endCoords: Coords, startCoords: Coords, event: TouchEvent): void; + enableSwipe(): void; + enableDrag(): void; + triggerPosterClick(): void; + manageSwipeClass(): void; + /** + * Go to next slide + * @param {Boolean} fromTouch - true if slide function called via touch event + * @category lGPublicMethods + * @example + * const plugin = lightGallery(); + * plugin.goToNextSlide(); + * @see Demo + */ + goToNextSlide(fromTouch?: boolean): void; + /** + * Go to previous slides + * @param {Boolean} fromTouch - true if slide function called via touch event + * @category lGPublicMethods + * @example + * const plugin = lightGallery({}); + * plugin.goToPrevSlide(); + * @see Demo + * + */ + goToPrevSlide(fromTouch?: boolean): void; + keyPress(): void; + arrow(): void; + arrowDisable(index: number): void; + setTranslate($el: lgQuery, xValue: number, yValue: number, scaleX?: number, scaleY?: number): void; + mousewheel(): void; + isSlideElement(target: lgQuery): boolean; + isPosterElement(target: lgQuery): boolean; + /** + * Maximize minimize inline gallery. + * @category lGPublicMethods + */ + toggleMaximize(): void; + invalidateItems(): void; + trapFocus(): void; + manageCloseGallery(): void; + /** + * Close lightGallery if it is opened. + * + * @description If closable is false in the settings, you need to pass true via closeGallery method to force close gallery + * @return returns the estimated time to close gallery completely including the close animation duration + * @category lGPublicMethods + * @example + * const plugin = lightGallery(); + * plugin.closeGallery(); + * + */ + closeGallery(force?: boolean): number; + initModules(): void; + destroyModules(destroy?: true): void; + /** + * Refresh lightGallery with new set of children. + * + * @description This is useful to update the gallery when the child elements are changed without calling destroy method. + * + * If you are using dynamic mode, you can pass the modified array of dynamicEl as the first parameter to refresh the dynamic gallery + * @see Demo + * @category lGPublicMethods + * @example + * const plugin = lightGallery(); + * // Delete or add children, then call + * plugin.refresh(); + * + */ + refresh(galleryItems?: GalleryItem[]): void; + updateControls(): void; + private destroyGallery; + /** + * Destroy lightGallery. + * Destroy lightGallery and its plugin instances completely + * + * @description This method also calls CloseGallery function internally. Returns the time takes to completely close and destroy the instance. + * In case if you want to re-initialize lightGallery right after destroying it, initialize it only once the destroy process is completed. + * You can use refresh method most of the times. + * @category lGPublicMethods + * @example + * const plugin = lightGallery(); + * plugin.destroy(); + * + */ + destroy(): number; +} diff --git a/assets/lightGallery/lightgallery.es5.js b/assets/lightGallery/lightgallery.es5.js new file mode 100644 index 0000000..2c305f3 --- /dev/null +++ b/assets/lightGallery/lightgallery.es5.js @@ -0,0 +1,2786 @@ +/*! + * lightgallery | 2.9.0 | October 1st 2025 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; + +function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +} + +/** + * List of lightGallery events + * All events should be documented here + * Below interfaces are used to build the website documentations + * */ +var lGEvents = { + afterAppendSlide: 'lgAfterAppendSlide', + init: 'lgInit', + hasVideo: 'lgHasVideo', + containerResize: 'lgContainerResize', + updateSlides: 'lgUpdateSlides', + afterAppendSubHtml: 'lgAfterAppendSubHtml', + beforeOpen: 'lgBeforeOpen', + afterOpen: 'lgAfterOpen', + slideItemLoad: 'lgSlideItemLoad', + beforeSlide: 'lgBeforeSlide', + afterSlide: 'lgAfterSlide', + posterClick: 'lgPosterClick', + dragStart: 'lgDragStart', + dragMove: 'lgDragMove', + dragEnd: 'lgDragEnd', + beforeNextSlide: 'lgBeforeNextSlide', + beforePrevSlide: 'lgBeforePrevSlide', + beforeClose: 'lgBeforeClose', + afterClose: 'lgAfterClose', + rotateLeft: 'lgRotateLeft', + rotateRight: 'lgRotateRight', + flipHorizontal: 'lgFlipHorizontal', + flipVertical: 'lgFlipVertical', + autoplay: 'lgAutoplay', + autoplayStart: 'lgAutoplayStart', + autoplayStop: 'lgAutoplayStop', +}; + +var lightGalleryCoreSettings = { + mode: 'lg-slide', + easing: 'ease', + speed: 400, + licenseKey: '0000-0000-000-0000', + height: '100%', + width: '100%', + addClass: '', + startClass: 'lg-start-zoom', + backdropDuration: 300, + container: '', + startAnimationDuration: 400, + zoomFromOrigin: true, + hideBarsDelay: 0, + showBarsAfter: 10000, + slideDelay: 0, + supportLegacyBrowser: true, + allowMediaOverlap: false, + videoMaxSize: '1280-720', + loadYouTubePoster: true, + defaultCaptionHeight: 0, + ariaLabelledby: '', + ariaDescribedby: '', + resetScrollPosition: true, + hideScrollbar: false, + closable: true, + swipeToClose: true, + closeOnTap: true, + showCloseIcon: true, + showMaximizeIcon: false, + loop: true, + escKey: true, + keyPress: true, + trapFocus: true, + controls: true, + slideEndAnimation: true, + hideControlOnEnd: false, + mousewheel: false, + getCaptionFromTitleOrAlt: true, + appendSubHtmlTo: '.lg-sub-html', + subHtmlSelectorRelative: false, + preload: 2, + numberOfSlideItemsInDom: 10, + selector: '', + selectWithin: '', + nextHtml: '', + prevHtml: '', + index: 0, + iframeWidth: '100%', + iframeHeight: '100%', + iframeMaxWidth: '100%', + iframeMaxHeight: '100%', + download: true, + counter: true, + appendCounterTo: '.lg-toolbar', + swipeThreshold: 50, + enableSwipe: true, + enableDrag: true, + dynamic: false, + dynamicEl: [], + extraProps: [], + exThumbImage: '', + isMobile: undefined, + mobileSettings: { + controls: false, + showCloseIcon: false, + download: false, + }, + plugins: [], + strings: { + closeGallery: 'Close gallery', + toggleMaximize: 'Toggle maximize', + previousSlide: 'Previous slide', + nextSlide: 'Next slide', + download: 'Download', + playVideo: 'Play video', + mediaLoadingFailed: 'Oops... Failed to load content...', + }, +}; + +function initLgPolyfills() { + (function () { + if (typeof window.CustomEvent === 'function') + return false; + function CustomEvent(event, params) { + params = params || { + bubbles: false, + cancelable: false, + detail: null, + }; + var evt = document.createEvent('CustomEvent'); + evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); + return evt; + } + window.CustomEvent = CustomEvent; + })(); + (function () { + if (!Element.prototype.matches) { + Element.prototype.matches = + Element.prototype.msMatchesSelector || + Element.prototype.webkitMatchesSelector; + } + })(); +} +var lgQuery = /** @class */ (function () { + function lgQuery(selector) { + this.cssVenderPrefixes = [ + 'TransitionDuration', + 'TransitionTimingFunction', + 'Transform', + 'Transition', + ]; + this.selector = this._getSelector(selector); + this.firstElement = this._getFirstEl(); + return this; + } + lgQuery.generateUUID = function () { + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { + var r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8; + return v.toString(16); + }); + }; + lgQuery.prototype._getSelector = function (selector, context) { + if (context === void 0) { context = document; } + if (typeof selector !== 'string') { + return selector; + } + context = context || document; + var fl = selector.substring(0, 1); + if (fl === '#') { + return context.querySelector(selector); + } + else { + return context.querySelectorAll(selector); + } + }; + lgQuery.prototype._each = function (func) { + if (!this.selector) { + return this; + } + if (this.selector.length !== undefined) { + [].forEach.call(this.selector, func); + } + else { + func(this.selector, 0); + } + return this; + }; + lgQuery.prototype._setCssVendorPrefix = function (el, cssProperty, value) { + // prettier-ignore + var property = cssProperty.replace(/-([a-z])/gi, function (s, group1) { + return group1.toUpperCase(); + }); + if (this.cssVenderPrefixes.indexOf(property) !== -1) { + el.style[property.charAt(0).toLowerCase() + property.slice(1)] = value; + el.style['webkit' + property] = value; + el.style['moz' + property] = value; + el.style['ms' + property] = value; + el.style['o' + property] = value; + } + else { + el.style[property] = value; + } + }; + lgQuery.prototype._getFirstEl = function () { + if (this.selector && this.selector.length !== undefined) { + return this.selector[0]; + } + else { + return this.selector; + } + }; + lgQuery.prototype.isEventMatched = function (event, eventName) { + var eventNamespace = eventName.split('.'); + return event + .split('.') + .filter(function (e) { return e; }) + .every(function (e) { + return eventNamespace.indexOf(e) !== -1; + }); + }; + lgQuery.prototype.attr = function (attr, value) { + if (value === undefined) { + if (!this.firstElement) { + return ''; + } + return this.firstElement.getAttribute(attr); + } + this._each(function (el) { + el.setAttribute(attr, value); + }); + return this; + }; + lgQuery.prototype.find = function (selector) { + return $LG(this._getSelector(selector, this.selector)); + }; + lgQuery.prototype.first = function () { + if (this.selector && this.selector.length !== undefined) { + return $LG(this.selector[0]); + } + else { + return $LG(this.selector); + } + }; + lgQuery.prototype.eq = function (index) { + return $LG(this.selector[index]); + }; + lgQuery.prototype.parent = function () { + return $LG(this.selector.parentElement); + }; + lgQuery.prototype.get = function () { + return this._getFirstEl(); + }; + lgQuery.prototype.removeAttr = function (attributes) { + var attrs = attributes.split(' '); + this._each(function (el) { + attrs.forEach(function (attr) { return el.removeAttribute(attr); }); + }); + return this; + }; + lgQuery.prototype.wrap = function (className) { + if (!this.firstElement) { + return this; + } + var wrapper = document.createElement('div'); + wrapper.className = className; + this.firstElement.parentNode.insertBefore(wrapper, this.firstElement); + this.firstElement.parentNode.removeChild(this.firstElement); + wrapper.appendChild(this.firstElement); + return this; + }; + lgQuery.prototype.addClass = function (classNames) { + if (classNames === void 0) { classNames = ''; } + this._each(function (el) { + // IE doesn't support multiple arguments + classNames.split(' ').forEach(function (className) { + if (className) { + el.classList.add(className); + } + }); + }); + return this; + }; + lgQuery.prototype.removeClass = function (classNames) { + this._each(function (el) { + // IE doesn't support multiple arguments + classNames.split(' ').forEach(function (className) { + if (className) { + el.classList.remove(className); + } + }); + }); + return this; + }; + lgQuery.prototype.hasClass = function (className) { + if (!this.firstElement) { + return false; + } + return this.firstElement.classList.contains(className); + }; + lgQuery.prototype.hasAttribute = function (attribute) { + if (!this.firstElement) { + return false; + } + return this.firstElement.hasAttribute(attribute); + }; + lgQuery.prototype.toggleClass = function (className) { + if (!this.firstElement) { + return this; + } + if (this.hasClass(className)) { + this.removeClass(className); + } + else { + this.addClass(className); + } + return this; + }; + lgQuery.prototype.css = function (property, value) { + var _this = this; + this._each(function (el) { + _this._setCssVendorPrefix(el, property, value); + }); + return this; + }; + // Need to pass separate namespaces for separate elements + lgQuery.prototype.on = function (events, listener) { + var _this = this; + if (!this.selector) { + return this; + } + events.split(' ').forEach(function (event) { + if (!Array.isArray(lgQuery.eventListeners[event])) { + lgQuery.eventListeners[event] = []; + } + lgQuery.eventListeners[event].push(listener); + _this.selector.addEventListener(event.split('.')[0], listener); + }); + return this; + }; + // @todo - test this + lgQuery.prototype.once = function (event, listener) { + var _this = this; + this.on(event, function () { + _this.off(event); + listener(event); + }); + return this; + }; + lgQuery.prototype.off = function (event) { + var _this = this; + if (!this.selector) { + return this; + } + Object.keys(lgQuery.eventListeners).forEach(function (eventName) { + if (_this.isEventMatched(event, eventName)) { + lgQuery.eventListeners[eventName].forEach(function (listener) { + _this.selector.removeEventListener(eventName.split('.')[0], listener); + }); + lgQuery.eventListeners[eventName] = []; + } + }); + return this; + }; + lgQuery.prototype.trigger = function (event, detail) { + if (!this.firstElement) { + return this; + } + var customEvent = new CustomEvent(event.split('.')[0], { + detail: detail || null, + }); + this.firstElement.dispatchEvent(customEvent); + return this; + }; + // Does not support IE + lgQuery.prototype.load = function (url) { + var _this = this; + fetch(url) + .then(function (res) { return res.text(); }) + .then(function (html) { + _this.selector.innerHTML = html; + }); + return this; + }; + lgQuery.prototype.html = function (html) { + if (html === undefined) { + if (!this.firstElement) { + return ''; + } + return this.firstElement.innerHTML; + } + this._each(function (el) { + el.innerHTML = html; + }); + return this; + }; + lgQuery.prototype.append = function (html) { + this._each(function (el) { + if (typeof html === 'string') { + el.insertAdjacentHTML('beforeend', html); + } + else { + el.appendChild(html); + } + }); + return this; + }; + lgQuery.prototype.prepend = function (html) { + this._each(function (el) { + if (typeof html === 'string') { + el.insertAdjacentHTML('afterbegin', html); + } + else if (html instanceof HTMLElement) { + el.insertBefore(html.cloneNode(true), el.firstChild); + } + }); + return this; + }; + lgQuery.prototype.remove = function () { + this._each(function (el) { + el.parentNode.removeChild(el); + }); + return this; + }; + lgQuery.prototype.empty = function () { + this._each(function (el) { + el.innerHTML = ''; + }); + return this; + }; + lgQuery.prototype.scrollTop = function (scrollTop) { + if (scrollTop !== undefined) { + document.body.scrollTop = scrollTop; + document.documentElement.scrollTop = scrollTop; + return this; + } + else { + return (window.pageYOffset || + document.documentElement.scrollTop || + document.body.scrollTop || + 0); + } + }; + lgQuery.prototype.scrollLeft = function (scrollLeft) { + if (scrollLeft !== undefined) { + document.body.scrollLeft = scrollLeft; + document.documentElement.scrollLeft = scrollLeft; + return this; + } + else { + return (window.pageXOffset || + document.documentElement.scrollLeft || + document.body.scrollLeft || + 0); + } + }; + lgQuery.prototype.offset = function () { + if (!this.firstElement) { + return { + left: 0, + top: 0, + }; + } + var rect = this.firstElement.getBoundingClientRect(); + var bodyMarginLeft = $LG('body').style().marginLeft; + // Minus body margin - https://stackoverflow.com/questions/30711548/is-getboundingclientrect-left-returning-a-wrong-value + return { + left: rect.left - parseFloat(bodyMarginLeft) + this.scrollLeft(), + top: rect.top + this.scrollTop(), + }; + }; + lgQuery.prototype.style = function () { + if (!this.firstElement) { + return {}; + } + return (this.firstElement.currentStyle || + window.getComputedStyle(this.firstElement)); + }; + // Width without padding and border even if box-sizing is used. + lgQuery.prototype.width = function () { + var style = this.style(); + return (this.firstElement.clientWidth - + parseFloat(style.paddingLeft) - + parseFloat(style.paddingRight)); + }; + // Height without padding and border even if box-sizing is used. + lgQuery.prototype.height = function () { + var style = this.style(); + return (this.firstElement.clientHeight - + parseFloat(style.paddingTop) - + parseFloat(style.paddingBottom)); + }; + lgQuery.eventListeners = {}; + return lgQuery; +}()); +function $LG(selector) { + initLgPolyfills(); + return new lgQuery(selector); +} + +var defaultDynamicOptions = [ + 'src', + 'sources', + 'subHtml', + 'subHtmlUrl', + 'html', + 'video', + 'poster', + 'slideName', + 'responsive', + 'srcset', + 'sizes', + 'iframe', + 'downloadUrl', + 'download', + 'width', + 'facebookShareUrl', + 'tweetText', + 'iframeTitle', + 'twitterShareUrl', + 'pinterestShareUrl', + 'pinterestText', + 'fbHtml', + 'disqusIdentifier', + 'disqusUrl', +]; +// Convert html data-attribute to camalcase +function convertToData(attr) { + // FInd a way for lgsize + if (attr === 'href') { + return 'src'; + } + attr = attr.replace('data-', ''); + attr = attr.charAt(0).toLowerCase() + attr.slice(1); + attr = attr.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); }); + return attr; +} +var utils = { + /** + * Fetches HTML content from a given URL and inserts it into a specified element. + * + * @param url - The URL to fetch the HTML content from. + * @param element - The DOM element (jQuery object) to insert the HTML content into. + * @param insertMethod - The method to insert the HTML ('append' or 'replace'). + */ + fetchCaptionFromUrl: function (url, element, insertMethod) { + // Fetch content from the URL + fetch(url) + .then(function (response) { return response.text(); }) + .then(function (htmlContent) { + if (insertMethod === 'append') { + var contentDiv = "
" + htmlContent + "
"; + element.append(contentDiv); + } + else { + element.html(htmlContent); + } + }); + }, + /** + * get possible width and height from the lgSize attribute. Used for ZoomFromOrigin option + */ + getSize: function (el, container, spacing, defaultLgSize) { + if (spacing === void 0) { spacing = 0; } + var LGel = $LG(el); + var lgSize = LGel.attr('data-lg-size') || defaultLgSize; + if (!lgSize) { + return; + } + var isResponsiveSizes = lgSize.split(','); + // if at-least two viewport sizes are available + if (isResponsiveSizes[1]) { + var wWidth = window.innerWidth; + for (var i = 0; i < isResponsiveSizes.length; i++) { + var size_1 = isResponsiveSizes[i]; + var responsiveWidth = parseInt(size_1.split('-')[2], 10); + if (responsiveWidth > wWidth) { + lgSize = size_1; + break; + } + // take last item as last option + if (i === isResponsiveSizes.length - 1) { + lgSize = size_1; + } + } + } + var size = lgSize.split('-'); + var width = parseInt(size[0], 10); + var height = parseInt(size[1], 10); + var cWidth = container.width(); + var cHeight = container.height() - spacing; + var maxWidth = Math.min(cWidth, width); + var maxHeight = Math.min(cHeight, height); + var ratio = Math.min(maxWidth / width, maxHeight / height); + return { width: width * ratio, height: height * ratio }; + }, + /** + * @desc Get transform value based on the imageSize. Used for ZoomFromOrigin option + * @param {jQuery Element} + * @returns {String} Transform CSS string + */ + getTransform: function (el, container, top, bottom, imageSize) { + if (!imageSize) { + return; + } + var LGel = $LG(el).find('img').first(); + if (!LGel.get()) { + return; + } + var containerRect = container.get().getBoundingClientRect(); + var wWidth = containerRect.width; + // using innerWidth to include mobile safari bottom bar + var wHeight = container.height() - (top + bottom); + var elWidth = LGel.width(); + var elHeight = LGel.height(); + var elStyle = LGel.style(); + var x = (wWidth - elWidth) / 2 - + LGel.offset().left + + (parseFloat(elStyle.paddingLeft) || 0) + + (parseFloat(elStyle.borderLeft) || 0) + + $LG(window).scrollLeft() + + containerRect.left; + var y = (wHeight - elHeight) / 2 - + LGel.offset().top + + (parseFloat(elStyle.paddingTop) || 0) + + (parseFloat(elStyle.borderTop) || 0) + + $LG(window).scrollTop() + + top; + var scX = elWidth / imageSize.width; + var scY = elHeight / imageSize.height; + var transform = 'translate3d(' + + (x *= -1) + + 'px, ' + + (y *= -1) + + 'px, 0) scale3d(' + + scX + + ', ' + + scY + + ', 1)'; + return transform; + }, + getIframeMarkup: function (iframeWidth, iframeHeight, iframeMaxWidth, iframeMaxHeight, src, iframeTitle) { + var title = iframeTitle ? 'title="' + iframeTitle + '"' : ''; + return "
\n \n
"; + }, + getImgMarkup: function (index, src, altAttr, srcset, sizes, sources) { + var srcsetAttr = srcset ? "srcset=\"" + srcset + "\"" : ''; + var sizesAttr = sizes ? "sizes=\"" + sizes + "\"" : ''; + var imgMarkup = ""; + var sourceTag = ''; + if (sources) { + var sourceObj = typeof sources === 'string' ? JSON.parse(sources) : sources; + sourceTag = sourceObj.map(function (source) { + var attrs = ''; + Object.keys(source).forEach(function (key) { + // Do not remove the first space as it is required to separate the attributes + attrs += " " + key + "=\"" + source[key] + "\""; + }); + return ""; + }); + } + return "" + sourceTag + imgMarkup; + }, + // Get src from responsive src + getResponsiveSrc: function (srcItms) { + var rsWidth = []; + var rsSrc = []; + var src = ''; + for (var i = 0; i < srcItms.length; i++) { + var _src = srcItms[i].split(' '); + // Manage empty space + if (_src[0] === '') { + _src.splice(0, 1); + } + rsSrc.push(_src[0]); + rsWidth.push(_src[1]); + } + var wWidth = window.innerWidth; + for (var j = 0; j < rsWidth.length; j++) { + if (parseInt(rsWidth[j], 10) > wWidth) { + src = rsSrc[j]; + break; + } + } + return src; + }, + isImageLoaded: function (img) { + if (!img) + return false; + // During the onload event, IE correctly identifies any images that + // weren’t downloaded as not complete. Others should too. Gecko-based + // browsers act like NS4 in that they report this incorrectly. + if (!img.complete) { + return false; + } + // However, they do have two very useful properties: naturalWidth and + // naturalHeight. These give the true size of the image. If it failed + // to load, either of these should be zero. + if (img.naturalWidth === 0) { + return false; + } + // No other way of checking: assume it’s ok. + return true; + }, + getVideoPosterMarkup: function (_poster, dummyImg, videoContStyle, playVideoString, _isVideo) { + var videoClass = ''; + if (_isVideo && _isVideo.youtube) { + videoClass = 'lg-has-youtube'; + } + else if (_isVideo && _isVideo.vimeo) { + videoClass = 'lg-has-vimeo'; + } + else { + videoClass = 'lg-has-html5'; + } + var _dummy = dummyImg; + if (typeof dummyImg !== 'string') { + _dummy = dummyImg.outerHTML; + } + return "
\n
\n \n " + playVideoString + "\n \n \n \n \n \n \n \n
\n " + _dummy + "\n \n
"; + }, + getFocusableElements: function (container) { + var elements = container.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])'); + var visibleElements = [].filter.call(elements, function (element) { + var style = window.getComputedStyle(element); + return style.display !== 'none' && style.visibility !== 'hidden'; + }); + return visibleElements; + }, + /** + * @desc Create dynamic elements array from gallery items when dynamic option is false + * It helps to avoid frequent DOM interaction + * and avoid multiple checks for dynamic elments + * + * @returns {Array} dynamicEl + */ + getDynamicOptions: function (items, extraProps, getCaptionFromTitleOrAlt, exThumbImage) { + var dynamicElements = []; + var availableDynamicOptions = __spreadArrays(defaultDynamicOptions, extraProps); + [].forEach.call(items, function (item) { + var dynamicEl = {}; + for (var i = 0; i < item.attributes.length; i++) { + var attr = item.attributes[i]; + if (attr.specified) { + var dynamicAttr = convertToData(attr.name); + var label = ''; + if (availableDynamicOptions.indexOf(dynamicAttr) > -1) { + label = dynamicAttr; + } + if (label) { + dynamicEl[label] = attr.value; + } + } + } + var currentItem = $LG(item); + var alt = currentItem.find('img').first().attr('alt'); + var title = currentItem.attr('title'); + var thumb = exThumbImage + ? currentItem.attr(exThumbImage) + : currentItem.find('img').first().attr('src'); + dynamicEl.thumb = thumb; + if (getCaptionFromTitleOrAlt && !dynamicEl.subHtml) { + dynamicEl.subHtml = title || alt || ''; + } + dynamicEl.alt = alt || title || ''; + dynamicElements.push(dynamicEl); + }); + return dynamicElements; + }, + isMobile: function () { + return /iPhone|iPad|iPod|Android/i.test(navigator.userAgent); + }, + /** + * @desc Check the given src is video + * @param {String} src + * @return {Object} video type + * Ex:{ youtube : ["//www.youtube.com/watch?v=c0asJgSyxcY", "c0asJgSyxcY"] } + * + * @todo - this information can be moved to dynamicEl to avoid frequent calls + */ + isVideo: function (src, isHTML5VIdeo, index) { + if (!src) { + if (isHTML5VIdeo) { + return { + html5: true, + }; + } + else { + console.error('lightGallery :- data-src is not provided on slide item ' + + (index + 1) + + '. Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/'); + return; + } + } + var youtube = src.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)([\&|?][\S]*)*/i); + var vimeo = src.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)(.*)?/i); + var wistia = src.match(/https?:\/\/(.+)?(wistia\.com|wi\.st)\/(medias|embed)\/([0-9a-z\-_]+)(.*)/); + if (youtube) { + return { + youtube: youtube, + }; + } + else if (vimeo) { + return { + vimeo: vimeo, + }; + } + else if (wistia) { + return { + wistia: wistia, + }; + } + }, +}; + +// @ref - https://stackoverflow.com/questions/3971841/how-to-resize-images-proportionally-keeping-the-aspect-ratio +// @ref - https://2ality.com/2017/04/setting-up-multi-platform-packages.html +// Unique id for each gallery +var lgId = 0; +var LightGallery = /** @class */ (function () { + function LightGallery(element, options) { + this.lgOpened = false; + this.index = 0; + // lightGallery modules + this.plugins = []; + // false when lightGallery load first slide content; + this.lGalleryOn = false; + // True when a slide animation is in progress + this.lgBusy = false; + this.currentItemsInDom = []; + // Scroll top value before lightGallery is opened + this.prevScrollTop = 0; + this.bodyPaddingRight = 0; + this.isDummyImageRemoved = false; + this.dragOrSwipeEnabled = false; + this.mediaContainerPosition = { + top: 0, + bottom: 0, + }; + if (!element) { + return this; + } + lgId++; + this.lgId = lgId; + this.el = element; + this.LGel = $LG(element); + this.generateSettings(options); + this.buildModules(); + // When using dynamic mode, ensure dynamicEl is an array + if (this.settings.dynamic && + this.settings.dynamicEl !== undefined && + !Array.isArray(this.settings.dynamicEl)) { + throw 'When using dynamic mode, you must also define dynamicEl as an Array.'; + } + this.galleryItems = this.getItems(); + this.normalizeSettings(); + // Gallery items + this.init(); + this.validateLicense(); + return this; + } + LightGallery.prototype.generateSettings = function (options) { + // lightGallery settings + this.settings = __assign(__assign({}, lightGalleryCoreSettings), options); + if (this.settings.isMobile && + typeof this.settings.isMobile === 'function' + ? this.settings.isMobile() + : utils.isMobile()) { + var mobileSettings = __assign(__assign({}, this.settings.mobileSettings), this.settings.mobileSettings); + this.settings = __assign(__assign({}, this.settings), mobileSettings); + } + }; + LightGallery.prototype.normalizeSettings = function () { + if (this.settings.slideEndAnimation) { + this.settings.hideControlOnEnd = false; + } + if (!this.settings.closable) { + this.settings.swipeToClose = false; + } + // And reset it on close to get the correct value next time + this.zoomFromOrigin = this.settings.zoomFromOrigin; + // At the moment, Zoom from image doesn't support dynamic options + // @todo add zoomFromOrigin support for dynamic images + if (this.settings.dynamic) { + this.zoomFromOrigin = false; + } + if (this.settings.container) { + var container = this.settings.container; + if (typeof container === 'function') { + this.settings.container = container(); + } + else if (typeof container === 'string') { + var el = document.querySelector(container); + this.settings.container = el !== null && el !== void 0 ? el : document.body; + } + } + else { + this.settings.container = document.body; + } + // settings.preload should not be grater than $item.length + this.settings.preload = Math.min(this.settings.preload, this.galleryItems.length); + }; + LightGallery.prototype.init = function () { + var _this = this; + this.addSlideVideoInfo(this.galleryItems); + this.buildStructure(); + this.LGel.trigger(lGEvents.init, { + instance: this, + }); + if (this.settings.keyPress) { + this.keyPress(); + } + setTimeout(function () { + _this.enableDrag(); + _this.enableSwipe(); + _this.triggerPosterClick(); + }, 50); + this.arrow(); + if (this.settings.mousewheel) { + this.mousewheel(); + } + if (!this.settings.dynamic) { + this.openGalleryOnItemClick(); + } + }; + LightGallery.prototype.openGalleryOnItemClick = function () { + var _this = this; + var _loop_1 = function (index) { + var element = this_1.items[index]; + var $element = $LG(element); + // Using different namespace for click because click event should not unbind if selector is same object('this') + // @todo manage all event listners - should have namespace that represent element + var uuid = lgQuery.generateUUID(); + $element + .attr('data-lg-id', uuid) + .on("click.lgcustom-item-" + uuid, function (e) { + e.preventDefault(); + var currentItemIndex = _this.settings.index || index; + _this.openGallery(currentItemIndex, element); + }); + }; + var this_1 = this; + // Using for loop instead of using bubbling as the items can be any html element. + for (var index = 0; index < this.items.length; index++) { + _loop_1(index); + } + }; + /** + * Module constructor + * Modules are build incrementally. + * Gallery should be opened only once all the modules are initialized. + * use moduleBuildTimeout to make sure this + */ + LightGallery.prototype.buildModules = function () { + var _this = this; + this.settings.plugins.forEach(function (plugin) { + _this.plugins.push(new plugin(_this, $LG)); + }); + }; + LightGallery.prototype.validateLicense = function () { + if (!this.settings.licenseKey) { + console.error('Please provide a valid license key'); + } + else if (this.settings.licenseKey === '0000-0000-000-0000') { + console.warn("lightGallery: " + this.settings.licenseKey + " license key is not valid for production use"); + } + }; + LightGallery.prototype.getSlideItem = function (index) { + return $LG(this.getSlideItemId(index)); + }; + LightGallery.prototype.getSlideItemId = function (index) { + return "#lg-item-" + this.lgId + "-" + index; + }; + LightGallery.prototype.getIdName = function (id) { + return id + "-" + this.lgId; + }; + LightGallery.prototype.getElementById = function (id) { + return $LG("#" + this.getIdName(id)); + }; + LightGallery.prototype.manageSingleSlideClassName = function () { + if (this.galleryItems.length < 2) { + this.outer.addClass('lg-single-item'); + } + else { + this.outer.removeClass('lg-single-item'); + } + }; + LightGallery.prototype.buildStructure = function () { + var _this = this; + var container = this.$container && this.$container.get(); + if (container) { + return; + } + var controls = ''; + var subHtmlCont = ''; + // Create controls + if (this.settings.controls) { + controls = "\n "; + } + if (this.settings.appendSubHtmlTo !== '.lg-item') { + subHtmlCont = + '
'; + } + var addClasses = ''; + if (this.settings.allowMediaOverlap) { + // Do not remove space before last single quote + addClasses += 'lg-media-overlap '; + } + var ariaLabelledby = this.settings.ariaLabelledby + ? 'aria-labelledby="' + this.settings.ariaLabelledby + '"' + : ''; + var ariaDescribedby = this.settings.ariaDescribedby + ? 'aria-describedby="' + this.settings.ariaDescribedby + '"' + : ''; + var containerClassName = "lg-container " + this.settings.addClass + " " + (document.body !== this.settings.container ? 'lg-inline' : ''); + var closeIcon = this.settings.closable && this.settings.showCloseIcon + ? "" + : ''; + var maximizeIcon = this.settings.showMaximizeIcon + ? "" + : ''; + var template = "\n
\n
\n\n
\n\n
\n
\n
\n " + controls + "\n
\n
\n " + maximizeIcon + "\n " + closeIcon + "\n
\n " + (this.settings.appendSubHtmlTo === '.lg-outer' + ? subHtmlCont + : '') + "\n
\n " + (this.settings.appendSubHtmlTo === '.lg-sub-html' + ? subHtmlCont + : '') + "\n
\n
\n
\n "; + $LG(this.settings.container).append(template); + if (document.body !== this.settings.container) { + $LG(this.settings.container).css('position', 'relative'); + } + this.outer = this.getElementById('lg-outer'); + this.$lgComponents = this.getElementById('lg-components'); + this.$backdrop = this.getElementById('lg-backdrop'); + this.$container = this.getElementById('lg-container'); + this.$inner = this.getElementById('lg-inner'); + this.$content = this.getElementById('lg-content'); + this.$toolbar = this.getElementById('lg-toolbar'); + this.$backdrop.css('transition-duration', this.settings.backdropDuration + 'ms'); + var outerClassNames = this.settings.mode + " "; + this.manageSingleSlideClassName(); + if (this.settings.enableDrag) { + outerClassNames += 'lg-grab '; + } + this.outer.addClass(outerClassNames); + this.$inner.css('transition-timing-function', this.settings.easing); + this.$inner.css('transition-duration', this.settings.speed + 'ms'); + if (this.settings.download) { + this.$toolbar.append(""); + } + this.counter(); + $LG(window).on("resize.lg.global" + this.lgId + " orientationchange.lg.global" + this.lgId, function () { + _this.refreshOnResize(); + }); + this.hideBars(); + this.manageCloseGallery(); + this.toggleMaximize(); + this.initModules(); + }; + LightGallery.prototype.refreshOnResize = function () { + if (this.lgOpened) { + var currentGalleryItem = this.galleryItems[this.index]; + var __slideVideoInfo = currentGalleryItem.__slideVideoInfo; + this.mediaContainerPosition = this.getMediaContainerPosition(); + var _a = this.mediaContainerPosition, top_1 = _a.top, bottom = _a.bottom; + this.currentImageSize = utils.getSize(this.items[this.index], this.outer, top_1 + bottom, __slideVideoInfo && this.settings.videoMaxSize); + if (__slideVideoInfo) { + this.resizeVideoSlide(this.index, this.currentImageSize); + } + if (this.zoomFromOrigin && !this.isDummyImageRemoved) { + var imgStyle = this.getDummyImgStyles(this.currentImageSize); + this.outer + .find('.lg-current .lg-dummy-img') + .first() + .attr('style', imgStyle); + } + this.LGel.trigger(lGEvents.containerResize); + } + }; + LightGallery.prototype.resizeVideoSlide = function (index, imageSize) { + var lgVideoStyle = this.getVideoContStyle(imageSize); + var currentSlide = this.getSlideItem(index); + currentSlide.find('.lg-video-cont').attr('style', lgVideoStyle); + }; + /** + * Update slides dynamically. + * Add, edit or delete slides dynamically when lightGallery is opened. + * Modify the current gallery items and pass it via updateSlides method + * @note + * - Do not mutate existing lightGallery items directly. + * - Always pass new list of gallery items + * - You need to take care of thumbnails outside the gallery if any + * - user this method only if you want to update slides when the gallery is opened. Otherwise, use `refresh()` method. + * @param items Gallery items + * @param index After the update operation, which slide gallery should navigate to + * @category lGPublicMethods + * @example + * const plugin = lightGallery(); + * + * // Adding slides dynamically + * let galleryItems = [ + * // Access existing lightGallery items + * // galleryItems are automatically generated internally from the gallery HTML markup + * // or directly from galleryItems when dynamic gallery is used + * ...plugin.galleryItems, + * ...[ + * { + * src: 'img/img-1.png', + * thumb: 'img/thumb1.png', + * }, + * ], + * ]; + * plugin.updateSlides( + * galleryItems, + * plugin.index, + * ); + * + * + * // Remove slides dynamically + * galleryItems = JSON.parse( + * JSON.stringify(updateSlideInstance.galleryItems), + * ); + * galleryItems.shift(); + * updateSlideInstance.updateSlides(galleryItems, 1); + * @see Demo + */ + LightGallery.prototype.updateSlides = function (items, index) { + if (this.index > items.length - 1) { + this.index = items.length - 1; + } + if (items.length === 1) { + this.index = 0; + } + if (!items.length) { + this.closeGallery(); + return; + } + var currentSrc = this.galleryItems[index].src; + this.galleryItems = items; + this.updateControls(); + this.$inner.empty(); + this.currentItemsInDom = []; + var _index = 0; + // Find the current index based on source value of the slide + this.galleryItems.some(function (galleryItem, itemIndex) { + if (galleryItem.src === currentSrc) { + _index = itemIndex; + return true; + } + return false; + }); + this.currentItemsInDom = this.organizeSlideItems(_index, -1); + this.loadContent(_index, true); + this.getSlideItem(_index).addClass('lg-current'); + this.index = _index; + this.updateCurrentCounter(_index); + this.LGel.trigger(lGEvents.updateSlides); + }; + // Get gallery items based on multiple conditions + LightGallery.prototype.getItems = function () { + // Gallery items + this.items = []; + if (!this.settings.dynamic) { + if (this.settings.selector === 'this') { + this.items.push(this.el); + } + else if (this.settings.selector) { + if (typeof this.settings.selector === 'string') { + if (this.settings.selectWithin) { + var selectWithin = $LG(this.settings.selectWithin); + this.items = selectWithin + .find(this.settings.selector) + .get(); + } + else { + this.items = this.el.querySelectorAll(this.settings.selector); + } + } + else { + this.items = this.settings.selector; + } + } + else { + this.items = this.el.children; + } + return utils.getDynamicOptions(this.items, this.settings.extraProps, this.settings.getCaptionFromTitleOrAlt, this.settings.exThumbImage); + } + else { + return this.settings.dynamicEl || []; + } + }; + LightGallery.prototype.shouldHideScrollbar = function () { + return (this.settings.hideScrollbar && + document.body === this.settings.container); + }; + LightGallery.prototype.hideScrollbar = function () { + if (!this.shouldHideScrollbar()) { + return; + } + this.bodyPaddingRight = parseFloat($LG('body').style().paddingRight); + var bodyRect = document.documentElement.getBoundingClientRect(); + var scrollbarWidth = window.innerWidth - bodyRect.width; + $LG(document.body).css('padding-right', scrollbarWidth + this.bodyPaddingRight + 'px'); + $LG(document.body).addClass('lg-overlay-open'); + }; + LightGallery.prototype.resetScrollBar = function () { + if (!this.shouldHideScrollbar()) { + return; + } + $LG(document.body).css('padding-right', this.bodyPaddingRight + 'px'); + $LG(document.body).removeClass('lg-overlay-open'); + }; + /** + * Open lightGallery. + * Open gallery with specific slide by passing index of the slide as parameter. + * @category lGPublicMethods + * @param {Number} index - index of the slide + * @param {HTMLElement} element - Which image lightGallery should zoom from + * + * @example + * const $dynamicGallery = document.getElementById('dynamic-gallery-demo'); + * const dynamicGallery = lightGallery($dynamicGallery, { + * dynamic: true, + * dynamicEl: [ + * { + * src: 'img/1.jpg', + * thumb: 'img/thumb-1.jpg', + * subHtml: '

Image 1 title

Image 1 descriptions.

', + * }, + * ... + * ], + * }); + * $dynamicGallery.addEventListener('click', function () { + * // Starts with third item.(Optional). + * // This is useful if you want use dynamic mode with + * // custom thumbnails (thumbnails outside gallery), + * dynamicGallery.openGallery(2); + * }); + * + */ + LightGallery.prototype.openGallery = function (index, element) { + var _this = this; + if (index === void 0) { index = this.settings.index; } + // prevent accidental double execution + if (this.lgOpened) + return; + this.lgOpened = true; + this.outer.removeClass('lg-hide-items'); + this.hideScrollbar(); + // Add display block, but still has opacity 0 + this.$container.addClass('lg-show'); + var itemsToBeInsertedToDom = this.getItemsToBeInsertedToDom(index, index); + this.currentItemsInDom = itemsToBeInsertedToDom; + var items = ''; + itemsToBeInsertedToDom.forEach(function (item) { + items = items + ("
"); + }); + this.$inner.append(items); + this.addHtml(index); + var transform = ''; + this.mediaContainerPosition = this.getMediaContainerPosition(); + var _a = this.mediaContainerPosition, top = _a.top, bottom = _a.bottom; + if (!this.settings.allowMediaOverlap) { + this.setMediaContainerPosition(top, bottom); + } + var __slideVideoInfo = this.galleryItems[index].__slideVideoInfo; + if (this.zoomFromOrigin && element) { + this.currentImageSize = utils.getSize(element, this.outer, top + bottom, __slideVideoInfo && this.settings.videoMaxSize); + transform = utils.getTransform(element, this.outer, top, bottom, this.currentImageSize); + } + if (!this.zoomFromOrigin || !transform) { + this.outer.addClass(this.settings.startClass); + this.getSlideItem(index).removeClass('lg-complete'); + } + var timeout = this.settings.zoomFromOrigin + ? 100 + : this.settings.backdropDuration; + setTimeout(function () { + _this.outer.addClass('lg-components-open'); + }, timeout); + this.index = index; + this.LGel.trigger(lGEvents.beforeOpen); + // add class lg-current to remove initial transition + this.getSlideItem(index).addClass('lg-current'); + this.lGalleryOn = false; + // Store the current scroll top value to scroll back after closing the gallery.. + this.prevScrollTop = $LG(window).scrollTop(); + setTimeout(function () { + // Need to check both zoomFromOrigin and transform values as we need to set set the + // default opening animation if user missed to add the lg-size attribute + if (_this.zoomFromOrigin && transform) { + var currentSlide_1 = _this.getSlideItem(index); + currentSlide_1.css('transform', transform); + setTimeout(function () { + currentSlide_1 + .addClass('lg-start-progress lg-start-end-progress') + .css('transition-duration', _this.settings.startAnimationDuration + 'ms'); + _this.outer.addClass('lg-zoom-from-image'); + }); + setTimeout(function () { + currentSlide_1.css('transform', 'translate3d(0, 0, 0)'); + }, 100); + } + setTimeout(function () { + _this.$backdrop.addClass('in'); + _this.$container.addClass('lg-show-in'); + }, 10); + setTimeout(function () { + if (_this.settings.trapFocus && + document.body === _this.settings.container) { + _this.trapFocus(); + } + }, _this.settings.backdropDuration + 50); + // lg-visible class resets gallery opacity to 1 + if (!_this.zoomFromOrigin || !transform) { + setTimeout(function () { + _this.outer.addClass('lg-visible'); + }, _this.settings.backdropDuration); + } + // initiate slide function + _this.slide(index, false, false, false); + _this.LGel.trigger(lGEvents.afterOpen); + }); + if (document.body === this.settings.container) { + $LG('html').addClass('lg-on'); + } + }; + /** + * Note - Changing the position of the media on every slide transition creates a flickering effect. + * Therefore, The height of the caption is calculated dynamically, only once based on the first slide caption. + * if you have dynamic captions for each media, + * you can provide an appropriate height for the captions via allowMediaOverlap option + */ + LightGallery.prototype.getMediaContainerPosition = function () { + if (this.settings.allowMediaOverlap) { + return { + top: 0, + bottom: 0, + }; + } + var top = this.$toolbar.get().clientHeight || 0; + var subHtml = this.outer.find('.lg-components .lg-sub-html').get(); + var captionHeight = this.settings.defaultCaptionHeight || + (subHtml && subHtml.clientHeight) || + 0; + var thumbContainer = this.outer.find('.lg-thumb-outer').get(); + var thumbHeight = thumbContainer ? thumbContainer.clientHeight : 0; + var bottom = thumbHeight + captionHeight; + return { + top: top, + bottom: bottom, + }; + }; + LightGallery.prototype.setMediaContainerPosition = function (top, bottom) { + if (top === void 0) { top = 0; } + if (bottom === void 0) { bottom = 0; } + this.$content.css('top', top + 'px').css('bottom', bottom + 'px'); + }; + LightGallery.prototype.hideBars = function () { + var _this = this; + // Hide controllers if mouse doesn't move for some period + setTimeout(function () { + _this.outer.removeClass('lg-hide-items'); + if (_this.settings.hideBarsDelay > 0) { + _this.outer.on('mousemove.lg click.lg touchstart.lg', function () { + _this.outer.removeClass('lg-hide-items'); + clearTimeout(_this.hideBarTimeout); + // Timeout will be cleared on each slide movement also + _this.hideBarTimeout = setTimeout(function () { + _this.outer.addClass('lg-hide-items'); + }, _this.settings.hideBarsDelay); + }); + _this.outer.trigger('mousemove.lg'); + } + }, this.settings.showBarsAfter); + }; + LightGallery.prototype.initPictureFill = function ($img) { + if (this.settings.supportLegacyBrowser) { + try { + picturefill({ + elements: [$img.get()], + }); + } + catch (e) { + console.warn('lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document.'); + } + } + }; + /** + * @desc Create image counter + * Ex: 1/10 + */ + LightGallery.prototype.counter = function () { + if (this.settings.counter) { + var counterHtml = "
\n " + (this.index + 1) + " /\n " + this.galleryItems.length + "
"; + this.outer.find(this.settings.appendCounterTo).append(counterHtml); + } + }; + /** + * @desc add sub-html into the slide + * @param {Number} index - index of the slide + */ + LightGallery.prototype.addHtml = function (index) { + var subHtml; + var subHtmlUrl; + if (this.galleryItems[index].subHtmlUrl) { + subHtmlUrl = this.galleryItems[index].subHtmlUrl; + } + else { + subHtml = this.galleryItems[index].subHtml; + } + if (!subHtmlUrl) { + if (subHtml) { + // get first letter of sub-html + // if first letter starts with . or # get the html form the jQuery object + var fL = subHtml.substring(0, 1); + if (fL === '.' || fL === '#') { + try { + if (this.settings.subHtmlSelectorRelative && + !this.settings.dynamic) { + subHtml = $LG(this.items) + .eq(index) + .find(subHtml) + .first() + .html(); + } + else { + subHtml = $LG(subHtml).first().html(); + } + } + catch (error) { + console.warn("Error processing subHtml selector \"" + subHtml + "\""); + subHtml = ''; + } + } + } + else { + subHtml = ''; + } + } + if (this.settings.appendSubHtmlTo !== '.lg-item') { + if (subHtmlUrl) { + utils.fetchCaptionFromUrl(subHtmlUrl, this.outer.find('.lg-sub-html'), 'replace'); + } + else { + this.outer.find('.lg-sub-html').html(subHtml); + } + } + else { + var currentSlide = $LG(this.getSlideItemId(index)); + if (subHtmlUrl) { + utils.fetchCaptionFromUrl(subHtmlUrl, currentSlide, 'append'); + } + else { + currentSlide.append("
" + subHtml + "
"); + } + } + // Add lg-empty-html class if title doesn't exist + if (typeof subHtml !== 'undefined' && subHtml !== null) { + if (subHtml === '') { + this.outer + .find(this.settings.appendSubHtmlTo) + .addClass('lg-empty-html'); + } + else { + this.outer + .find(this.settings.appendSubHtmlTo) + .removeClass('lg-empty-html'); + } + } + this.LGel.trigger(lGEvents.afterAppendSubHtml, { + index: index, + }); + }; + /** + * @desc Preload slides + * @param {Number} index - index of the slide + * @todo preload not working for the first slide, Also, should work for the first and last slide as well + */ + LightGallery.prototype.preload = function (index) { + for (var i = 1; i <= this.settings.preload; i++) { + if (i >= this.galleryItems.length - index) { + break; + } + this.loadContent(index + i, false); + } + for (var j = 1; j <= this.settings.preload; j++) { + if (index - j < 0) { + break; + } + this.loadContent(index - j, false); + } + }; + LightGallery.prototype.getDummyImgStyles = function (imageSize) { + if (!imageSize) + return ''; + return "width:" + imageSize.width + "px;\n margin-left: -" + imageSize.width / 2 + "px;\n margin-top: -" + imageSize.height / 2 + "px;\n height:" + imageSize.height + "px"; + }; + LightGallery.prototype.getVideoContStyle = function (imageSize) { + if (!imageSize) + return ''; + return "width:" + imageSize.width + "px;\n height:" + imageSize.height + "px"; + }; + LightGallery.prototype.getDummyImageContent = function ($currentSlide, index, alt) { + var $currentItem; + if (!this.settings.dynamic) { + $currentItem = $LG(this.items).eq(index); + } + if ($currentItem) { + var _dummyImgSrc = void 0; + if (!this.settings.exThumbImage) { + _dummyImgSrc = $currentItem.find('img').first().attr('src'); + } + else { + _dummyImgSrc = $currentItem.attr(this.settings.exThumbImage); + } + if (!_dummyImgSrc) + return ''; + var imgStyle = this.getDummyImgStyles(this.currentImageSize); + var dummyImgContentImg = document.createElement('img'); + dummyImgContentImg.alt = alt || ''; + dummyImgContentImg.src = _dummyImgSrc; + dummyImgContentImg.className = "lg-dummy-img"; + dummyImgContentImg.style.cssText = imgStyle; + $currentSlide.addClass('lg-first-slide'); + this.outer.addClass('lg-first-slide-loading'); + return dummyImgContentImg; + } + return ''; + }; + LightGallery.prototype.setImgMarkup = function (src, $currentSlide, index) { + var currentGalleryItem = this.galleryItems[index]; + var alt = currentGalleryItem.alt, srcset = currentGalleryItem.srcset, sizes = currentGalleryItem.sizes, sources = currentGalleryItem.sources; + // Use the thumbnail as dummy image which will be resized to actual image size and + // displayed on top of actual image + var imgContent = ''; + var altAttr = alt ? 'alt="' + alt + '"' : ''; + if (this.isFirstSlideWithZoomAnimation()) { + imgContent = this.getDummyImageContent($currentSlide, index, altAttr); + } + else { + imgContent = utils.getImgMarkup(index, src, altAttr, srcset, sizes, sources); + } + var picture = document.createElement('picture'); + picture.className = 'lg-img-wrap'; + $LG(picture).append(imgContent); + $currentSlide.prepend(picture); + }; + LightGallery.prototype.onSlideObjectLoad = function ($slide, isHTML5VideoWithoutPoster, onLoad, onError) { + var mediaObject = $slide.find('.lg-object').first(); + if (utils.isImageLoaded(mediaObject.get()) || + isHTML5VideoWithoutPoster) { + onLoad(); + } + else { + mediaObject.on('load.lg error.lg', function () { + onLoad && onLoad(); + }); + mediaObject.on('error.lg', function () { + onError && onError(); + }); + } + }; + /** + * + * @param $el Current slide item + * @param index + * @param delay Delay is 0 except first time + * @param speed Speed is same as delay, except it is 0 if gallery is opened via hash plugin + * @param isFirstSlide + */ + LightGallery.prototype.onLgObjectLoad = function (currentSlide, index, delay, speed, isFirstSlide, isHTML5VideoWithoutPoster) { + var _this = this; + this.onSlideObjectLoad(currentSlide, isHTML5VideoWithoutPoster, function () { + _this.triggerSlideItemLoad(currentSlide, index, delay, speed, isFirstSlide); + }, function () { + currentSlide.addClass('lg-complete lg-complete_'); + currentSlide.html('' + + _this.settings.strings['mediaLoadingFailed'] + + ''); + }); + }; + LightGallery.prototype.triggerSlideItemLoad = function ($currentSlide, index, delay, speed, isFirstSlide) { + var _this = this; + var currentGalleryItem = this.galleryItems[index]; + // Adding delay for video slides without poster for better performance and user experience + // Videos should start playing once once the gallery is completely loaded + var _speed = isFirstSlide && + this.getSlideType(currentGalleryItem) === 'video' && + !currentGalleryItem.poster + ? speed + : 0; + setTimeout(function () { + $currentSlide.addClass('lg-complete lg-complete_'); + _this.LGel.trigger(lGEvents.slideItemLoad, { + index: index, + delay: delay || 0, + isFirstSlide: isFirstSlide, + }); + }, _speed); + }; + LightGallery.prototype.isFirstSlideWithZoomAnimation = function () { + return !!(!this.lGalleryOn && + this.zoomFromOrigin && + this.currentImageSize); + }; + // Add video slideInfo + LightGallery.prototype.addSlideVideoInfo = function (items) { + var _this = this; + items.forEach(function (element, index) { + element.__slideVideoInfo = utils.isVideo(element.src, !!element.video, index); + if (element.__slideVideoInfo && + _this.settings.loadYouTubePoster && + !element.poster && + element.__slideVideoInfo.youtube) { + element.poster = "//img.youtube.com/vi/" + element.__slideVideoInfo.youtube[1] + "/maxresdefault.jpg"; + } + }); + }; + /** + * Load slide content into slide. + * This is used to load content into slides that is not visible too + * @param {Number} index - index of the slide. + * @param {Boolean} rec - if true call loadcontent() function again. + */ + LightGallery.prototype.loadContent = function (index, rec) { + var _this = this; + var currentGalleryItem = this.galleryItems[index]; + var $currentSlide = $LG(this.getSlideItemId(index)); + var poster = currentGalleryItem.poster, srcset = currentGalleryItem.srcset, sizes = currentGalleryItem.sizes, sources = currentGalleryItem.sources; + var src = currentGalleryItem.src; + var video = currentGalleryItem.video; + var _html5Video = video && typeof video === 'string' ? JSON.parse(video) : video; + if (currentGalleryItem.responsive) { + var srcDyItms = currentGalleryItem.responsive.split(','); + src = utils.getResponsiveSrc(srcDyItms) || src; + } + var videoInfo = currentGalleryItem.__slideVideoInfo; + var lgVideoStyle = ''; + var iframe = !!currentGalleryItem.iframe; + var isFirstSlide = !this.lGalleryOn; + // delay for adding complete class. it is 0 except first time. + var delay = 0; + if (isFirstSlide) { + if (this.zoomFromOrigin && this.currentImageSize) { + delay = this.settings.startAnimationDuration + 10; + } + else { + delay = this.settings.backdropDuration + 10; + } + } + if (!$currentSlide.hasClass('lg-loaded')) { + if (videoInfo) { + var _a = this.mediaContainerPosition, top_2 = _a.top, bottom = _a.bottom; + var videoSize = utils.getSize(this.items[index], this.outer, top_2 + bottom, videoInfo && this.settings.videoMaxSize); + lgVideoStyle = this.getVideoContStyle(videoSize); + } + if (iframe) { + var markup = utils.getIframeMarkup(this.settings.iframeWidth, this.settings.iframeHeight, this.settings.iframeMaxWidth, this.settings.iframeMaxHeight, src, currentGalleryItem.iframeTitle); + $currentSlide.prepend(markup); + } + else if (poster) { + var dummyImg = ''; + var hasStartAnimation = isFirstSlide && + this.zoomFromOrigin && + this.currentImageSize; + if (hasStartAnimation) { + dummyImg = this.getDummyImageContent($currentSlide, index, ''); + } + var markup = utils.getVideoPosterMarkup(poster, dummyImg || '', lgVideoStyle, this.settings.strings['playVideo'], videoInfo); + $currentSlide.prepend(markup); + } + else if (videoInfo) { + var markup = "
"; + $currentSlide.prepend(markup); + } + else { + this.setImgMarkup(src, $currentSlide, index); + if (srcset || sources) { + var $img = $currentSlide.find('.lg-object'); + this.initPictureFill($img); + } + } + if (poster || videoInfo) { + this.LGel.trigger(lGEvents.hasVideo, { + index: index, + src: src, + html5Video: _html5Video, + hasPoster: !!poster, + }); + } + this.LGel.trigger(lGEvents.afterAppendSlide, { index: index }); + if (this.lGalleryOn && + this.settings.appendSubHtmlTo === '.lg-item') { + this.addHtml(index); + } + } + // For first time add some delay for displaying the start animation. + var _speed = 0; + // Do not change the delay value because it is required for zoom plugin. + // If gallery opened from direct url (hash) speed value should be 0 + if (delay && !$LG(document.body).hasClass('lg-from-hash')) { + _speed = delay; + } + // Only for first slide and zoomFromOrigin is enabled + if (this.isFirstSlideWithZoomAnimation()) { + setTimeout(function () { + $currentSlide + .removeClass('lg-start-end-progress lg-start-progress') + .removeAttr('style'); + }, this.settings.startAnimationDuration + 100); + if (!$currentSlide.hasClass('lg-loaded')) { + setTimeout(function () { + if (_this.getSlideType(currentGalleryItem) === 'image') { + var alt = currentGalleryItem.alt; + var altAttr = alt ? 'alt="' + alt + '"' : ''; + $currentSlide + .find('.lg-img-wrap') + .append(utils.getImgMarkup(index, src, altAttr, srcset, sizes, currentGalleryItem.sources)); + if (srcset || sources) { + var $img = $currentSlide.find('.lg-object'); + _this.initPictureFill($img); + } + } + if (_this.getSlideType(currentGalleryItem) === 'image' || + (_this.getSlideType(currentGalleryItem) === 'video' && + poster)) { + _this.onLgObjectLoad($currentSlide, index, delay, _speed, true, false); + // load remaining slides once the slide is completely loaded + _this.onSlideObjectLoad($currentSlide, !!(videoInfo && videoInfo.html5 && !poster), function () { + _this.loadContentOnFirstSlideLoad(index, $currentSlide, _speed); + }, function () { + _this.loadContentOnFirstSlideLoad(index, $currentSlide, _speed); + }); + } + }, this.settings.startAnimationDuration + 100); + } + } + // SLide content has been added to dom + $currentSlide.addClass('lg-loaded'); + if (!this.isFirstSlideWithZoomAnimation() || + (this.getSlideType(currentGalleryItem) === 'video' && !poster)) { + this.onLgObjectLoad($currentSlide, index, delay, _speed, isFirstSlide, !!(videoInfo && videoInfo.html5 && !poster)); + } + // When gallery is opened once content is loaded (second time) need to add lg-complete class for css styling + if ((!this.zoomFromOrigin || !this.currentImageSize) && + $currentSlide.hasClass('lg-complete_') && + !this.lGalleryOn) { + setTimeout(function () { + $currentSlide.addClass('lg-complete'); + }, this.settings.backdropDuration); + } + // Content loaded + // Need to set lGalleryOn before calling preload function + this.lGalleryOn = true; + if (rec === true) { + if (!$currentSlide.hasClass('lg-complete_')) { + $currentSlide + .find('.lg-object') + .first() + .on('load.lg error.lg', function () { + _this.preload(index); + }); + } + else { + this.preload(index); + } + } + }; + /** + * @desc Remove dummy image content and load next slides + * Called only for the first time if zoomFromOrigin animation is enabled + * @param index + * @param $currentSlide + * @param speed + */ + LightGallery.prototype.loadContentOnFirstSlideLoad = function (index, $currentSlide, speed) { + var _this = this; + setTimeout(function () { + $currentSlide.find('.lg-dummy-img').remove(); + $currentSlide.removeClass('lg-first-slide'); + _this.outer.removeClass('lg-first-slide-loading'); + _this.isDummyImageRemoved = true; + _this.preload(index); + }, speed + 300); + }; + LightGallery.prototype.getItemsToBeInsertedToDom = function (index, prevIndex, numberOfItems) { + var _this = this; + if (numberOfItems === void 0) { numberOfItems = 0; } + var itemsToBeInsertedToDom = []; + // Minimum 2 items should be there + var possibleNumberOfItems = Math.max(numberOfItems, 3); + possibleNumberOfItems = Math.min(possibleNumberOfItems, this.galleryItems.length); + var prevIndexItem = "lg-item-" + this.lgId + "-" + prevIndex; + if (this.galleryItems.length <= 3) { + this.galleryItems.forEach(function (_element, index) { + itemsToBeInsertedToDom.push("lg-item-" + _this.lgId + "-" + index); + }); + return itemsToBeInsertedToDom; + } + if (index < (this.galleryItems.length - 1) / 2) { + for (var idx = index; idx > index - possibleNumberOfItems / 2 && idx >= 0; idx--) { + itemsToBeInsertedToDom.push("lg-item-" + this.lgId + "-" + idx); + } + var numberOfExistingItems = itemsToBeInsertedToDom.length; + for (var idx = 0; idx < possibleNumberOfItems - numberOfExistingItems; idx++) { + itemsToBeInsertedToDom.push("lg-item-" + this.lgId + "-" + (index + idx + 1)); + } + } + else { + for (var idx = index; idx <= this.galleryItems.length - 1 && + idx < index + possibleNumberOfItems / 2; idx++) { + itemsToBeInsertedToDom.push("lg-item-" + this.lgId + "-" + idx); + } + var numberOfExistingItems = itemsToBeInsertedToDom.length; + for (var idx = 0; idx < possibleNumberOfItems - numberOfExistingItems; idx++) { + itemsToBeInsertedToDom.push("lg-item-" + this.lgId + "-" + (index - idx - 1)); + } + } + if (this.settings.loop) { + if (index === this.galleryItems.length - 1) { + itemsToBeInsertedToDom.push("lg-item-" + this.lgId + "-" + 0); + } + else if (index === 0) { + itemsToBeInsertedToDom.push("lg-item-" + this.lgId + "-" + (this.galleryItems.length - 1)); + } + } + if (itemsToBeInsertedToDom.indexOf(prevIndexItem) === -1) { + itemsToBeInsertedToDom.push("lg-item-" + this.lgId + "-" + prevIndex); + } + return itemsToBeInsertedToDom; + }; + LightGallery.prototype.organizeSlideItems = function (index, prevIndex) { + var _this = this; + var itemsToBeInsertedToDom = this.getItemsToBeInsertedToDom(index, prevIndex, this.settings.numberOfSlideItemsInDom); + itemsToBeInsertedToDom.forEach(function (item) { + if (_this.currentItemsInDom.indexOf(item) === -1) { + _this.$inner.append("
"); + } + }); + this.currentItemsInDom.forEach(function (item) { + if (itemsToBeInsertedToDom.indexOf(item) === -1) { + $LG("#" + item).remove(); + } + }); + return itemsToBeInsertedToDom; + }; + /** + * Get previous index of the slide + */ + LightGallery.prototype.getPreviousSlideIndex = function () { + var prevIndex = 0; + try { + var currentItemId = this.outer + .find('.lg-current') + .first() + .attr('id'); + prevIndex = parseInt(currentItemId.split('-')[3]) || 0; + } + catch (error) { + prevIndex = 0; + } + return prevIndex; + }; + LightGallery.prototype.setDownloadValue = function (index) { + if (this.settings.download) { + var currentGalleryItem = this.galleryItems[index]; + var hideDownloadBtn = currentGalleryItem.downloadUrl === false || + currentGalleryItem.downloadUrl === 'false'; + if (hideDownloadBtn) { + this.outer.addClass('lg-hide-download'); + } + else { + var $download = this.getElementById('lg-download'); + this.outer.removeClass('lg-hide-download'); + $download.attr('href', currentGalleryItem.downloadUrl || + currentGalleryItem.src); + if (currentGalleryItem.download) { + $download.attr('download', currentGalleryItem.download); + } + } + } + }; + LightGallery.prototype.makeSlideAnimation = function (direction, currentSlideItem, previousSlideItem) { + var _this = this; + if (this.lGalleryOn) { + previousSlideItem.addClass('lg-slide-progress'); + } + setTimeout(function () { + // remove all transitions + _this.outer.addClass('lg-no-trans'); + _this.outer + .find('.lg-item') + .removeClass('lg-prev-slide lg-next-slide'); + if (direction === 'prev') { + //prevslide + currentSlideItem.addClass('lg-prev-slide'); + previousSlideItem.addClass('lg-next-slide'); + } + else { + // next slide + currentSlideItem.addClass('lg-next-slide'); + previousSlideItem.addClass('lg-prev-slide'); + } + // give 50 ms for browser to add/remove class + setTimeout(function () { + _this.outer.find('.lg-item').removeClass('lg-current'); + currentSlideItem.addClass('lg-current'); + // reset all transitions + _this.outer.removeClass('lg-no-trans'); + }, 50); + }, this.lGalleryOn ? this.settings.slideDelay : 0); + }; + /** + * Goto a specific slide. + * @param {Number} index - index of the slide + * @param {Boolean} fromTouch - true if slide function called via touch event or mouse drag + * @param {Boolean} fromThumb - true if slide function called via thumbnail click + * @param {String} direction - Direction of the slide(next/prev) + * @category lGPublicMethods + * @example + * const plugin = lightGallery(); + * // to go to 3rd slide + * plugin.slide(2); + * + */ + LightGallery.prototype.slide = function (index, fromTouch, fromThumb, direction) { + var _this = this; + var prevIndex = this.getPreviousSlideIndex(); + this.currentItemsInDom = this.organizeSlideItems(index, prevIndex); + // Prevent multiple call, Required for hsh plugin + if (this.lGalleryOn && prevIndex === index) { + return; + } + var numberOfGalleryItems = this.galleryItems.length; + if (!this.lgBusy) { + if (this.settings.counter) { + this.updateCurrentCounter(index); + } + var currentSlideItem = this.getSlideItem(index); + var previousSlideItem_1 = this.getSlideItem(prevIndex); + var currentGalleryItem = this.galleryItems[index]; + var videoInfo = currentGalleryItem.__slideVideoInfo; + this.outer.attr('data-lg-slide-type', this.getSlideType(currentGalleryItem)); + this.setDownloadValue(index); + if (videoInfo) { + var _a = this.mediaContainerPosition, top_3 = _a.top, bottom = _a.bottom; + var videoSize = utils.getSize(this.items[index], this.outer, top_3 + bottom, videoInfo && this.settings.videoMaxSize); + this.resizeVideoSlide(index, videoSize); + } + this.LGel.trigger(lGEvents.beforeSlide, { + prevIndex: prevIndex, + index: index, + fromTouch: !!fromTouch, + fromThumb: !!fromThumb, + }); + this.lgBusy = true; + clearTimeout(this.hideBarTimeout); + this.arrowDisable(index); + if (!direction) { + if (index < prevIndex) { + direction = 'prev'; + } + else if (index > prevIndex) { + direction = 'next'; + } + } + if (!fromTouch) { + this.makeSlideAnimation(direction, currentSlideItem, previousSlideItem_1); + } + else { + this.outer + .find('.lg-item') + .removeClass('lg-prev-slide lg-current lg-next-slide'); + var touchPrev = void 0; + var touchNext = void 0; + if (numberOfGalleryItems > 2) { + touchPrev = index - 1; + touchNext = index + 1; + if (index === 0 && prevIndex === numberOfGalleryItems - 1) { + // next slide + touchNext = 0; + touchPrev = numberOfGalleryItems - 1; + } + else if (index === numberOfGalleryItems - 1 && + prevIndex === 0) { + // prev slide + touchNext = 0; + touchPrev = numberOfGalleryItems - 1; + } + } + else { + touchPrev = 0; + touchNext = 1; + } + if (direction === 'prev') { + this.getSlideItem(touchNext).addClass('lg-next-slide'); + } + else { + this.getSlideItem(touchPrev).addClass('lg-prev-slide'); + } + currentSlideItem.addClass('lg-current'); + } + // Do not put load content in set timeout as it needs to load immediately when the gallery is opened + if (!this.lGalleryOn) { + this.loadContent(index, true); + } + else { + setTimeout(function () { + _this.loadContent(index, true); + // Add title if this.settings.appendSubHtmlTo === lg-sub-html + if (_this.settings.appendSubHtmlTo !== '.lg-item') { + _this.addHtml(index); + } + }, this.settings.speed + 50 + (fromTouch ? 0 : this.settings.slideDelay)); + } + setTimeout(function () { + _this.lgBusy = false; + previousSlideItem_1.removeClass('lg-slide-progress'); + _this.LGel.trigger(lGEvents.afterSlide, { + prevIndex: prevIndex, + index: index, + fromTouch: fromTouch, + fromThumb: fromThumb, + }); + }, (this.lGalleryOn ? this.settings.speed + 100 : 100) + (fromTouch ? 0 : this.settings.slideDelay)); + } + this.index = index; + }; + LightGallery.prototype.updateCurrentCounter = function (index) { + this.getElementById('lg-counter-current').html(index + 1 + ''); + }; + LightGallery.prototype.updateCounterTotal = function () { + this.getElementById('lg-counter-all').html(this.galleryItems.length + ''); + }; + LightGallery.prototype.getSlideType = function (item) { + if (item.__slideVideoInfo) { + return 'video'; + } + else if (item.iframe) { + return 'iframe'; + } + else { + return 'image'; + } + }; + LightGallery.prototype.touchMove = function (startCoords, endCoords, e) { + var distanceX = endCoords.pageX - startCoords.pageX; + var distanceY = endCoords.pageY - startCoords.pageY; + var allowSwipe = false; + if (this.swipeDirection) { + allowSwipe = true; + } + else { + if (Math.abs(distanceX) > 15) { + this.swipeDirection = 'horizontal'; + allowSwipe = true; + } + else if (Math.abs(distanceY) > 15) { + this.swipeDirection = 'vertical'; + allowSwipe = true; + } + } + if (!allowSwipe) { + return; + } + var $currentSlide = this.getSlideItem(this.index); + if (this.swipeDirection === 'horizontal') { + e === null || e === void 0 ? void 0 : e.preventDefault(); + // reset opacity and transition duration + this.outer.addClass('lg-dragging'); + // move current slide + this.setTranslate($currentSlide, distanceX, 0); + // move next and prev slide with current slide + var width = $currentSlide.get().offsetWidth; + var slideWidthAmount = (width * 15) / 100; + var gutter = slideWidthAmount - Math.abs((distanceX * 10) / 100); + this.setTranslate(this.outer.find('.lg-prev-slide').first(), -width + distanceX - gutter, 0); + this.setTranslate(this.outer.find('.lg-next-slide').first(), width + distanceX + gutter, 0); + } + else if (this.swipeDirection === 'vertical') { + if (this.settings.swipeToClose) { + e === null || e === void 0 ? void 0 : e.preventDefault(); + this.$container.addClass('lg-dragging-vertical'); + var opacity = 1 - Math.abs(distanceY) / window.innerHeight; + this.$backdrop.css('opacity', opacity); + var scale = 1 - Math.abs(distanceY) / (window.innerWidth * 2); + this.setTranslate($currentSlide, 0, distanceY, scale, scale); + if (Math.abs(distanceY) > 100) { + this.outer + .addClass('lg-hide-items') + .removeClass('lg-components-open'); + } + } + } + }; + LightGallery.prototype.touchEnd = function (endCoords, startCoords, event) { + var _this = this; + var distance; + // keep slide animation for any mode while dragg/swipe + if (this.settings.mode !== 'lg-slide') { + this.outer.addClass('lg-slide'); + } + // set transition duration + setTimeout(function () { + _this.$container.removeClass('lg-dragging-vertical'); + _this.outer + .removeClass('lg-dragging lg-hide-items') + .addClass('lg-components-open'); + var triggerClick = true; + if (_this.swipeDirection === 'horizontal') { + distance = endCoords.pageX - startCoords.pageX; + var distanceAbs = Math.abs(endCoords.pageX - startCoords.pageX); + if (distance < 0 && + distanceAbs > _this.settings.swipeThreshold) { + _this.goToNextSlide(true); + triggerClick = false; + } + else if (distance > 0 && + distanceAbs > _this.settings.swipeThreshold) { + _this.goToPrevSlide(true); + triggerClick = false; + } + } + else if (_this.swipeDirection === 'vertical') { + distance = Math.abs(endCoords.pageY - startCoords.pageY); + if (_this.settings.closable && + _this.settings.swipeToClose && + distance > 100) { + _this.closeGallery(); + return; + } + else { + _this.$backdrop.css('opacity', 1); + } + } + _this.outer.find('.lg-item').removeAttr('style'); + if (triggerClick && + Math.abs(endCoords.pageX - startCoords.pageX) < 5) { + // Trigger click if distance is less than 5 pix + var target = $LG(event.target); + if (_this.isPosterElement(target)) { + _this.LGel.trigger(lGEvents.posterClick); + } + } + _this.swipeDirection = undefined; + }); + // remove slide class once drag/swipe is completed if mode is not slide + setTimeout(function () { + if (!_this.outer.hasClass('lg-dragging') && + _this.settings.mode !== 'lg-slide') { + _this.outer.removeClass('lg-slide'); + } + }, this.settings.speed + 100); + }; + LightGallery.prototype.enableSwipe = function () { + var _this = this; + var startCoords = {}; + var endCoords = {}; + var isMoved = false; + var isSwiping = false; + if (this.settings.enableSwipe) { + this.$inner.on('touchstart.lg', function (e) { + _this.dragOrSwipeEnabled = true; + var $item = _this.getSlideItem(_this.index); + if (($LG(e.target).hasClass('lg-item') || + $item.get().contains(e.target)) && + !_this.outer.hasClass('lg-zoomed') && + !_this.lgBusy && + e.touches.length === 1) { + isSwiping = true; + _this.touchAction = 'swipe'; + _this.manageSwipeClass(); + startCoords = { + pageX: e.touches[0].pageX, + pageY: e.touches[0].pageY, + }; + } + }); + this.$inner.on('touchmove.lg', function (e) { + if (isSwiping && + _this.touchAction === 'swipe' && + e.touches.length === 1) { + endCoords = { + pageX: e.touches[0].pageX, + pageY: e.touches[0].pageY, + }; + _this.touchMove(startCoords, endCoords, e); + isMoved = true; + } + }); + this.$inner.on('touchend.lg', function (event) { + if (_this.touchAction === 'swipe') { + if (isMoved) { + isMoved = false; + _this.touchEnd(endCoords, startCoords, event); + } + else if (isSwiping) { + var target = $LG(event.target); + if (_this.isPosterElement(target)) { + _this.LGel.trigger(lGEvents.posterClick); + } + } + _this.touchAction = undefined; + isSwiping = false; + } + }); + } + }; + LightGallery.prototype.enableDrag = function () { + var _this = this; + var startCoords = {}; + var endCoords = {}; + var isDraging = false; + var isMoved = false; + if (this.settings.enableDrag) { + this.outer.on('mousedown.lg', function (e) { + _this.dragOrSwipeEnabled = true; + var $item = _this.getSlideItem(_this.index); + if ($LG(e.target).hasClass('lg-item') || + $item.get().contains(e.target)) { + if (!_this.outer.hasClass('lg-zoomed') && !_this.lgBusy) { + e.preventDefault(); + if (!_this.lgBusy) { + _this.manageSwipeClass(); + startCoords = { + pageX: e.pageX, + pageY: e.pageY, + }; + isDraging = true; + // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723 + _this.outer.get().scrollLeft += 1; + _this.outer.get().scrollLeft -= 1; + // * + _this.outer + .removeClass('lg-grab') + .addClass('lg-grabbing'); + _this.LGel.trigger(lGEvents.dragStart); + } + } + } + }); + $LG(window).on("mousemove.lg.global" + this.lgId, function (e) { + if (isDraging && _this.lgOpened) { + isMoved = true; + endCoords = { + pageX: e.pageX, + pageY: e.pageY, + }; + _this.touchMove(startCoords, endCoords); + _this.LGel.trigger(lGEvents.dragMove); + } + }); + $LG(window).on("mouseup.lg.global" + this.lgId, function (event) { + if (!_this.lgOpened) { + return; + } + var target = $LG(event.target); + if (isMoved) { + isMoved = false; + _this.touchEnd(endCoords, startCoords, event); + _this.LGel.trigger(lGEvents.dragEnd); + } + else if (_this.isPosterElement(target)) { + _this.LGel.trigger(lGEvents.posterClick); + } + // Prevent execution on click + if (isDraging) { + isDraging = false; + _this.outer.removeClass('lg-grabbing').addClass('lg-grab'); + } + }); + } + }; + LightGallery.prototype.triggerPosterClick = function () { + var _this = this; + this.$inner.on('click.lg', function (event) { + if (!_this.dragOrSwipeEnabled && + _this.isPosterElement($LG(event.target))) { + _this.LGel.trigger(lGEvents.posterClick); + } + }); + }; + LightGallery.prototype.manageSwipeClass = function () { + var _touchNext = this.index + 1; + var _touchPrev = this.index - 1; + if (this.settings.loop && this.galleryItems.length > 2) { + if (this.index === 0) { + _touchPrev = this.galleryItems.length - 1; + } + else if (this.index === this.galleryItems.length - 1) { + _touchNext = 0; + } + } + this.outer.find('.lg-item').removeClass('lg-next-slide lg-prev-slide'); + if (_touchPrev > -1) { + this.getSlideItem(_touchPrev).addClass('lg-prev-slide'); + } + this.getSlideItem(_touchNext).addClass('lg-next-slide'); + }; + /** + * Go to next slide + * @param {Boolean} fromTouch - true if slide function called via touch event + * @category lGPublicMethods + * @example + * const plugin = lightGallery(); + * plugin.goToNextSlide(); + * @see Demo + */ + LightGallery.prototype.goToNextSlide = function (fromTouch) { + var _this = this; + var _loop = this.settings.loop; + if (fromTouch && this.galleryItems.length < 3) { + _loop = false; + } + if (!this.lgBusy) { + if (this.index + 1 < this.galleryItems.length) { + this.index++; + this.LGel.trigger(lGEvents.beforeNextSlide, { + index: this.index, + }); + this.slide(this.index, !!fromTouch, false, 'next'); + } + else { + if (_loop) { + this.index = 0; + this.LGel.trigger(lGEvents.beforeNextSlide, { + index: this.index, + }); + this.slide(this.index, !!fromTouch, false, 'next'); + } + else if (this.settings.slideEndAnimation && !fromTouch) { + this.outer.addClass('lg-right-end'); + setTimeout(function () { + _this.outer.removeClass('lg-right-end'); + }, 400); + } + } + } + }; + /** + * Go to previous slides + * @param {Boolean} fromTouch - true if slide function called via touch event + * @category lGPublicMethods + * @example + * const plugin = lightGallery({}); + * plugin.goToPrevSlide(); + * @see Demo + * + */ + LightGallery.prototype.goToPrevSlide = function (fromTouch) { + var _this = this; + var _loop = this.settings.loop; + if (fromTouch && this.galleryItems.length < 3) { + _loop = false; + } + if (!this.lgBusy) { + if (this.index > 0) { + this.index--; + this.LGel.trigger(lGEvents.beforePrevSlide, { + index: this.index, + fromTouch: fromTouch, + }); + this.slide(this.index, !!fromTouch, false, 'prev'); + } + else { + if (_loop) { + this.index = this.galleryItems.length - 1; + this.LGel.trigger(lGEvents.beforePrevSlide, { + index: this.index, + fromTouch: fromTouch, + }); + this.slide(this.index, !!fromTouch, false, 'prev'); + } + else if (this.settings.slideEndAnimation && !fromTouch) { + this.outer.addClass('lg-left-end'); + setTimeout(function () { + _this.outer.removeClass('lg-left-end'); + }, 400); + } + } + } + }; + LightGallery.prototype.keyPress = function () { + var _this = this; + $LG(window).on("keydown.lg.global" + this.lgId, function (e) { + if (_this.lgOpened && + _this.settings.escKey === true && + e.keyCode === 27) { + e.preventDefault(); + if (_this.settings.allowMediaOverlap && + _this.outer.hasClass('lg-can-toggle') && + _this.outer.hasClass('lg-components-open')) { + _this.outer.removeClass('lg-components-open'); + } + else { + _this.closeGallery(); + } + } + if (_this.lgOpened && _this.galleryItems.length > 1) { + if (e.keyCode === 37) { + e.preventDefault(); + _this.goToPrevSlide(); + } + if (e.keyCode === 39) { + e.preventDefault(); + _this.goToNextSlide(); + } + } + }); + }; + LightGallery.prototype.arrow = function () { + var _this = this; + this.getElementById('lg-prev').on('click.lg', function () { + _this.goToPrevSlide(); + }); + this.getElementById('lg-next').on('click.lg', function () { + _this.goToNextSlide(); + }); + }; + LightGallery.prototype.arrowDisable = function (index) { + // Disable arrows if settings.hideControlOnEnd is true + if (!this.settings.loop && this.settings.hideControlOnEnd) { + var $prev = this.getElementById('lg-prev'); + var $next = this.getElementById('lg-next'); + if (index + 1 === this.galleryItems.length) { + $next.attr('disabled', 'disabled').addClass('disabled'); + } + else { + $next.removeAttr('disabled').removeClass('disabled'); + } + if (index === 0) { + $prev.attr('disabled', 'disabled').addClass('disabled'); + } + else { + $prev.removeAttr('disabled').removeClass('disabled'); + } + } + }; + LightGallery.prototype.setTranslate = function ($el, xValue, yValue, scaleX, scaleY) { + if (scaleX === void 0) { scaleX = 1; } + if (scaleY === void 0) { scaleY = 1; } + $el.css('transform', 'translate3d(' + + xValue + + 'px, ' + + yValue + + 'px, 0px) scale3d(' + + scaleX + + ', ' + + scaleY + + ', 1)'); + }; + LightGallery.prototype.mousewheel = function () { + var _this = this; + var lastCall = 0; + this.outer.on('wheel.lg', function (e) { + if (!e.deltaY || _this.galleryItems.length < 2) { + return; + } + e.preventDefault(); + var now = new Date().getTime(); + if (now - lastCall < 1000) { + return; + } + lastCall = now; + if (e.deltaY > 0) { + _this.goToNextSlide(); + } + else if (e.deltaY < 0) { + _this.goToPrevSlide(); + } + }); + }; + LightGallery.prototype.isSlideElement = function (target) { + return (target.hasClass('lg-outer') || + target.hasClass('lg-item') || + target.hasClass('lg-img-wrap') || + target.hasClass('lg-img-rotate')); + }; + LightGallery.prototype.isPosterElement = function (target) { + var playButton = this.getSlideItem(this.index) + .find('.lg-video-play-button') + .get(); + return (target.hasClass('lg-video-poster') || + target.hasClass('lg-video-play-button') || + (playButton && playButton.contains(target.get()))); + }; + /** + * Maximize minimize inline gallery. + * @category lGPublicMethods + */ + LightGallery.prototype.toggleMaximize = function () { + var _this = this; + this.getElementById('lg-maximize').on('click.lg', function () { + _this.$container.toggleClass('lg-inline'); + _this.refreshOnResize(); + }); + }; + LightGallery.prototype.invalidateItems = function () { + for (var index = 0; index < this.items.length; index++) { + var element = this.items[index]; + var $element = $LG(element); + $element.off("click.lgcustom-item-" + $element.attr('data-lg-id')); + } + }; + LightGallery.prototype.trapFocus = function () { + var _this = this; + this.$container.get().focus({ + preventScroll: true, + }); + $LG(window).on("keydown.lg.global" + this.lgId, function (e) { + if (!_this.lgOpened) { + return; + } + var isTabPressed = e.key === 'Tab' || e.keyCode === 9; + if (!isTabPressed) { + return; + } + var focusableEls = utils.getFocusableElements(_this.$container.get()); + var firstFocusableEl = focusableEls[0]; + var lastFocusableEl = focusableEls[focusableEls.length - 1]; + if (e.shiftKey) { + if (document.activeElement === firstFocusableEl) { + lastFocusableEl.focus(); + e.preventDefault(); + } + } + else { + if (document.activeElement === lastFocusableEl) { + firstFocusableEl.focus(); + e.preventDefault(); + } + } + }); + }; + LightGallery.prototype.manageCloseGallery = function () { + var _this = this; + if (!this.settings.closable) + return; + var mousedown = false; + this.getElementById('lg-close').on('click.lg', function () { + _this.closeGallery(); + }); + if (this.settings.closeOnTap) { + // If you drag the slide and release outside gallery gets close on chrome + // for preventing this check mousedown and mouseup happened on .lg-item or lg-outer + this.outer.on('mousedown.lg', function (e) { + var target = $LG(e.target); + if (_this.isSlideElement(target)) { + mousedown = true; + } + else { + mousedown = false; + } + }); + this.outer.on('mousemove.lg', function () { + mousedown = false; + }); + this.outer.on('mouseup.lg', function (e) { + var target = $LG(e.target); + if (_this.isSlideElement(target) && mousedown) { + if (!_this.outer.hasClass('lg-dragging')) { + _this.closeGallery(); + } + } + }); + } + }; + /** + * Close lightGallery if it is opened. + * + * @description If closable is false in the settings, you need to pass true via closeGallery method to force close gallery + * @return returns the estimated time to close gallery completely including the close animation duration + * @category lGPublicMethods + * @example + * const plugin = lightGallery(); + * plugin.closeGallery(); + * + */ + LightGallery.prototype.closeGallery = function (force) { + var _this = this; + if (!this.lgOpened || (!this.settings.closable && !force)) { + return 0; + } + this.LGel.trigger(lGEvents.beforeClose); + if (this.settings.resetScrollPosition && !this.settings.hideScrollbar) { + $LG(window).scrollTop(this.prevScrollTop); + } + var currentItem = this.items[this.index]; + var transform; + if (this.zoomFromOrigin && currentItem) { + var _a = this.mediaContainerPosition, top_4 = _a.top, bottom = _a.bottom; + var _b = this.galleryItems[this.index], __slideVideoInfo = _b.__slideVideoInfo, poster = _b.poster; + var imageSize = utils.getSize(currentItem, this.outer, top_4 + bottom, __slideVideoInfo && poster && this.settings.videoMaxSize); + transform = utils.getTransform(currentItem, this.outer, top_4, bottom, imageSize); + } + if (this.zoomFromOrigin && transform) { + this.outer.addClass('lg-closing lg-zoom-from-image'); + this.getSlideItem(this.index) + .addClass('lg-start-end-progress') + .css('transition-duration', this.settings.startAnimationDuration + 'ms') + .css('transform', transform); + } + else { + this.outer.addClass('lg-hide-items'); + // lg-zoom-from-image is used for setting the opacity to 1 if zoomFromOrigin is true + // If the closing item doesn't have the lg-size attribute, remove this class to avoid the closing css conflicts + this.outer.removeClass('lg-zoom-from-image'); + } + // Unbind all events added by lightGallery + // @todo + //this.$el.off('.lg.tm'); + this.destroyModules(); + this.lGalleryOn = false; + this.isDummyImageRemoved = false; + this.zoomFromOrigin = this.settings.zoomFromOrigin; + clearTimeout(this.hideBarTimeout); + this.hideBarTimeout = false; + $LG('html').removeClass('lg-on'); + this.outer.removeClass('lg-visible lg-components-open'); + // Resetting opacity to 0 isd required as vertical swipe to close function adds inline opacity. + this.$backdrop.removeClass('in').css('opacity', 0); + var removeTimeout = this.zoomFromOrigin && transform + ? Math.max(this.settings.startAnimationDuration, this.settings.backdropDuration) + : this.settings.backdropDuration; + this.$container.removeClass('lg-show-in'); + // Once the closign animation is completed and gallery is invisible + setTimeout(function () { + if (_this.zoomFromOrigin && transform) { + _this.outer.removeClass('lg-zoom-from-image'); + } + _this.$container.removeClass('lg-show'); + // Reset scrollbar + _this.resetScrollBar(); + // Need to remove inline opacity as it is used in the stylesheet as well + _this.$backdrop + .removeAttr('style') + .css('transition-duration', _this.settings.backdropDuration + 'ms'); + _this.outer.removeClass("lg-closing " + _this.settings.startClass); + _this.getSlideItem(_this.index).removeClass('lg-start-end-progress'); + _this.$inner.empty(); + if (_this.lgOpened) { + _this.LGel.trigger(lGEvents.afterClose, { + instance: _this, + }); + } + if (_this.$container.get()) { + _this.$container.get().blur(); + } + _this.lgOpened = false; + }, removeTimeout + 100); + return removeTimeout + 100; + }; + LightGallery.prototype.initModules = function () { + this.plugins.forEach(function (module) { + try { + module.init(); + } + catch (err) { + console.warn("lightGallery:- make sure lightGallery module is properly initiated"); + } + }); + }; + LightGallery.prototype.destroyModules = function (destroy) { + this.plugins.forEach(function (module) { + try { + if (destroy) { + module.destroy(); + } + else { + module.closeGallery && module.closeGallery(); + } + } + catch (err) { + console.warn("lightGallery:- make sure lightGallery module is properly destroyed"); + } + }); + }; + /** + * Refresh lightGallery with new set of children. + * + * @description This is useful to update the gallery when the child elements are changed without calling destroy method. + * + * If you are using dynamic mode, you can pass the modified array of dynamicEl as the first parameter to refresh the dynamic gallery + * @see Demo + * @category lGPublicMethods + * @example + * const plugin = lightGallery(); + * // Delete or add children, then call + * plugin.refresh(); + * + */ + LightGallery.prototype.refresh = function (galleryItems) { + if (!this.settings.dynamic) { + this.invalidateItems(); + } + if (galleryItems) { + this.galleryItems = galleryItems; + } + else { + this.galleryItems = this.getItems(); + } + this.updateControls(); + this.openGalleryOnItemClick(); + this.LGel.trigger(lGEvents.updateSlides); + }; + LightGallery.prototype.updateControls = function () { + this.addSlideVideoInfo(this.galleryItems); + this.updateCounterTotal(); + this.manageSingleSlideClassName(); + }; + LightGallery.prototype.destroyGallery = function () { + this.destroyModules(true); + if (!this.settings.dynamic) { + this.invalidateItems(); + } + $LG(window).off(".lg.global" + this.lgId); + this.LGel.off('.lg'); + this.$container.remove(); + }; + /** + * Destroy lightGallery. + * Destroy lightGallery and its plugin instances completely + * + * @description This method also calls CloseGallery function internally. Returns the time takes to completely close and destroy the instance. + * In case if you want to re-initialize lightGallery right after destroying it, initialize it only once the destroy process is completed. + * You can use refresh method most of the times. + * @category lGPublicMethods + * @example + * const plugin = lightGallery(); + * plugin.destroy(); + * + */ + LightGallery.prototype.destroy = function () { + var closeTimeout = this.closeGallery(true); + if (closeTimeout) { + setTimeout(this.destroyGallery.bind(this), closeTimeout); + } + else { + this.destroyGallery(); + } + return closeTimeout; + }; + return LightGallery; +}()); + +function lightGallery(el, options) { + return new LightGallery(el, options); +} + +export default lightGallery; +//# sourceMappingURL=lightgallery.es5.js.map diff --git a/assets/lightGallery/lightgallery.es5.js.map b/assets/lightGallery/lightgallery.es5.js.map new file mode 100644 index 0000000..49fb518 --- /dev/null +++ b/assets/lightGallery/lightgallery.es5.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lightgallery.es5.js","sources":["../src/lg-events.ts","../src/lg-settings.ts","../src/lgQuery.ts","../src/lg-utils.ts","../src/lightgallery.ts","../src/index.ts"],"sourcesContent":["import { LightGallery } from './lightgallery';\nimport { VideoSource } from './plugins/video/types';\n\n/**\n * List of lightGallery events\n * All events should be documented here\n * Below interfaces are used to build the website documentations\n * */\nexport const lGEvents: {\n [key: string]: string;\n} = {\n afterAppendSlide: 'lgAfterAppendSlide',\n init: 'lgInit',\n hasVideo: 'lgHasVideo',\n containerResize: 'lgContainerResize',\n updateSlides: 'lgUpdateSlides',\n afterAppendSubHtml: 'lgAfterAppendSubHtml',\n beforeOpen: 'lgBeforeOpen',\n afterOpen: 'lgAfterOpen',\n slideItemLoad: 'lgSlideItemLoad',\n beforeSlide: 'lgBeforeSlide',\n afterSlide: 'lgAfterSlide',\n posterClick: 'lgPosterClick',\n dragStart: 'lgDragStart',\n dragMove: 'lgDragMove',\n dragEnd: 'lgDragEnd',\n beforeNextSlide: 'lgBeforeNextSlide',\n beforePrevSlide: 'lgBeforePrevSlide',\n beforeClose: 'lgBeforeClose',\n afterClose: 'lgAfterClose',\n rotateLeft: 'lgRotateLeft',\n rotateRight: 'lgRotateRight',\n flipHorizontal: 'lgFlipHorizontal',\n flipVertical: 'lgFlipVertical',\n autoplay: 'lgAutoplay',\n autoplayStart: 'lgAutoplayStart',\n autoplayStop: 'lgAutoplayStop',\n};\n\n// Follow the below format for the event documentation\n// @method is the method name when event is used with Angular/React components\n\n/**\n * Fired only once when lightGallery is initialized\n * @name lgInit\n * @method onInit\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action on lightGallery initialization.\n * // Init event returns the plugin instance that can be used to call any lightGalley public method\n * let pluginInstance = null;\n * lg.addEventListener('lgInit', (event) => {\n * pluginInstance = event.detail.instance;\n * });\n * lightGallery(lg);\n * @see Methods\n */\nexport interface InitDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired when the slide content has been inserted into it's slide container.\n * @name lgAfterAppendSlide\n * @method onAfterAppendSlide\n */\nexport interface AfterAppendSlideEventDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired immediately before opening the gallery\n * @name lgBeforeOpen\n * @method onBeforeOpen\n */\nexport interface BeforeOpenDetail {}\n\n/**\n * Fired immediately after opening the gallery\n * @name lgAfterOpen\n * @method onAfterOpen\n */\nexport interface AfterOpenDetail {}\n\n/**\n * Fired once the media inside the slide has been completely loaded .\n * @name lgSlideItemLoad\n * @method onSlideItemLoad\n */\nexport interface SlideItemLoadDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * For the first slide, lightGallery adds some delay for displaying the loaded slide item.\n * This delay is required for the transition effect when the slide item is displayed\n * Respect the delay when you use this event\n */\n delay: number;\n\n // Will be true for the first slide\n isFirstSlide: boolean;\n}\n\n/**\n * Fired immediately before each slide transition.\n * @name lgBeforeSlide\n * @method onBeforeSlide\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action before each slide transition\n * lg.addEventListener('lgBeforeSlide', (event) => {\n * const { index, prevIndex } = event.detail;\n * alert(index, prevIndex);\n * });\n * lightGallery(lg);\n */\nexport interface BeforeSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired immediately after each slide transition.\n * @name lgAfterSlide\n * @method onAfterSlide\n */\nexport interface AfterSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired when the video poster is clicked.\n * @name lgPosterClick\n * @method onPosterClick\n */\nexport interface PosterClickDetail {}\n\n/**\n * Fired when the drag event to move to different slide starts.\n * @name lgDragStart\n * @method onDragStart\n */\nexport interface DragStartDetail {}\n\n/**\n * Fired periodically during the drag operation.\n * @name lgDragMove\n * @method onDragMove\n */\nexport interface DragMoveDetail {}\n\n/**\n * Fired when the user has finished the drag operation\n * @name lgDragEnd\n * @method onDragEnd\n */\nexport interface DragEndDetail {}\n\n/**\n * Fired immediately before the start of the close process.\n * @name lgBeforeClose\n * @method onBeforeClose\n */\nexport interface BeforeCloseDetail {}\n\n/**\n * Fired immediately once lightGallery is closed.\n * @name lgAfterClose\n * @method onAfterClose\n */\nexport interface AfterCloseDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired immediately before each \"next\" slide transition\n * @name lgBeforeNextSlide\n * @method onBeforeNextSlide\n */\nexport interface BeforeNextSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired immediately before each \"prev\" slide transition\n * @name lgBeforePrevSlide\n * @method onBeforePrevSlide\n */\nexport interface BeforePrevSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired when the sub-html content (ex : title/ description) has been appended into the slide.\n * @name lgAfterAppendSubHtml\n * @method onAfterAppendSubHtml\n */\nexport interface AfterAppendSubHtmlDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the lightGallery container has been resized.\n * @name lgContainerResize\n * @method onContainerResize\n */\nexport interface ContainerResizeDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when lightGallery detects video slide\n * @name lgHasVideo\n * @method onHasVideo\n */\nexport interface HasVideoDetail {\n /**\n * Index of the slide,\n */\n index: number;\n /**\n * Video source\n */\n src: string;\n /**\n * HTML5 video source if available\n *

\n HTML5 video source = source: {\n src: string;\n type: string;\n }[];\n attributes: HTMLVideoElement;\n *

\n */\n html5Video: VideoSource;\n /**\n * True if video has poster\n */\n hasPoster: boolean;\n}\n\n/**\n * Fired when the image is rotated in anticlockwise direction\n * @name lgRotateLeft\n * @method onRotateLeft\n */\nexport interface RotateLeftDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is rotated in clockwise direction\n * @name lgRotateRight\n * @method onRotateRight\n */\nexport interface RotateRightDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped horizontally\n * @name lgFlipHorizontal\n * @method onFlipHorizontal\n */\nexport interface FlipHorizontalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped vertically\n * @name lgFlipVertical\n * @method onFlipVertical\n */\nexport interface FlipVerticalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n","import { GalleryItem } from './lg-utils';\nimport { LgQuery } from './lgQuery';\nimport { LightGallery } from './lightgallery';\nimport { AutoplaySettings } from './plugins/autoplay/lg-autoplay-settings';\nimport { CommentSettings } from './plugins/comment/lg-comment-settings';\nimport { FullscreenSettings } from './plugins/fullscreen/lg-fullscreen-settings';\nimport { HashSettings } from './plugins/hash/lg-hash-settings';\nimport { MediumZoomSettings } from './plugins/mediumZoom/lg-medium-zoom-settings';\nimport { PagerSettings } from './plugins/pager/lg-pager-settings';\nimport { RotateSettings } from './plugins/rotate/lg-rotate-settings';\nimport { ShareSettings } from './plugins/share/lg-share-settings';\nimport { ThumbnailsSettings } from './plugins/thumbnail/lg-thumbnail-settings';\nimport { VideoSettings } from './plugins/video/lg-video-settings';\nimport { ZoomSettings } from './plugins/zoom/lg-zoom-settings';\n\ntype LightGalleryCoreMobileSettings = Exclude<\n LightGalleryCoreSettings,\n 'mobileSettings'\n>;\n\n// @todo use separate mobile settings for plugins\nexport interface MobileSettings\n extends LightGalleryCoreMobileSettings,\n Partial,\n Partial,\n Partial,\n Partial,\n Partial,\n Partial,\n Partial,\n Partial,\n Partial,\n Partial {}\n\nexport interface LightGalleryCoreStrings {\n closeGallery: string;\n toggleMaximize: string;\n previousSlide: string;\n nextSlide: string;\n download: string;\n playVideo: string;\n mediaLoadingFailed: string;\n}\n\nexport type LightGalleryAllSettings = LightGalleryCoreSettings &\n ZoomSettings &\n ThumbnailsSettings &\n VideoSettings &\n AutoplaySettings &\n CommentSettings &\n FullscreenSettings &\n HashSettings &\n PagerSettings &\n RotateSettings &\n ShareSettings &\n MediumZoomSettings;\n\nexport type LightGallerySettings = Partial;\n\nexport interface LightGalleryCoreSettings {\n /**\n * Type of transition between images.\n */\n mode:\n | 'lg-slide'\n | 'lg-fade'\n | 'lg-zoom-in'\n | 'lg-zoom-in-big'\n | 'lg-zoom-out'\n | 'lg-zoom-out-big'\n | 'lg-zoom-out-in'\n | 'lg-zoom-in-out'\n | 'lg-soft-zoom'\n | 'lg-scale-up'\n | 'lg-slide-circular'\n | 'lg-slide-circular-vertical'\n | 'lg-slide-vertical'\n | 'lg-slide-vertical-growth'\n | 'lg-slide-skew-only'\n | 'lg-slide-skew-only-rev'\n | 'lg-slide-skew-only-y'\n | 'lg-slide-skew-only-y-rev'\n | 'lg-slide-skew'\n | 'lg-slide-skew-rev'\n | 'lg-slide-skew-cross'\n | 'lg-slide-skew-cross-rev'\n | 'lg-slide-skew-ver'\n | 'lg-slide-skew-ver-rev'\n | 'lg-slide-skew-ver-cross'\n | 'lg-slide-skew-ver-cross-rev'\n | 'lg-lollipop'\n | 'lg-lollipop-rev'\n | 'lg-rotate'\n | 'lg-rotate-rev'\n | 'lg-tube';\n\n /**\n * Slide animation CSS easing property\n */\n easing: string;\n\n /**\n *Transition duration (in ms).\n */\n speed: number;\n\n /**\n * If you are using lightGallery for commercial projects, you need to purchase a commercial license\n * to get the license key. For projects that are compatible with GPLv3 license,\n * please contact us for getting a license key at
contact@lightgalleryjs.com.\n * If you want to test lightGallery before purchasing a commercial license, you can\n * use `0000-0000-000-0000` as a temporary license key\n */\n\n licenseKey: string;\n\n /**\n * Height of the gallery.\n * example '100%' , '300px'\n */\n height: string;\n\n /**\n * Width of the gallery.\n * example '100%' , '300px'\n */\n width: string;\n\n /**\n * Add custom class for gallery container\n * This can be used to set different style for different galleries\n */\n addClass: string;\n\n /**\n * Start animation class for the gallery.\n * @description\n *
    \n *
  • startClass will be empty zoomFromOrigin is true.
  • \n *
  • This can be used to change the starting effect when the image is loaded
  • \n *
  • This is also applied when navigating to new slides
  • \n *
\n */\n startClass: string;\n\n /**\n * Enable zoom from origin effect.\n * @description You need to know the original image size upfront and provide it via data-lg-size attribute as data-lg-size=\"1920-1280\"\n *\n * If you don't know, the size of a few images in the list, you can skip the data-lg-size attribute for the particular slides,\n * lightGallery will show the default animation if data-lg-size is not available\n *\n * If you are using responsive images,\n * you can pass a comma separated list of sizes combined with a max-width (up to what size the particular image should be used)\n *\n * example -\n * data-lg-size=\"240-160-375, 400-267-480, 1600-1067\"\n * data-responsive=\"img-240.jpg 375, img-400.jpg 480\"\n * data-src=\"img-1600.jpg\" \n *\n * In the above example, upto 375 width img.240.jpg and lg-size 240-160 will be used.\n * Similarly, upto 480 pixel width size 400-267 and img-400.jpg will be used\n * And above 480, lg-size 1600-1067 and img-1600.jpg will be used\n *\n *
    \n *
  • At the moment, zoomFromOrigin options is supported only for image slides.
  • \n *
  • Will be false if dynamic option is enabled or galleryID found in the URL.
  • \n *
  • startClass will be empty if zoomFromOrigin is true to avoid css conflicts.
  • \n *
\n */\n zoomFromOrigin: boolean;\n\n /**\n * Zoom from image animation duration\n */\n startAnimationDuration: number;\n\n /**\n * Backdrop transition duration.\n * Note - Do not change the value of backdrop via css.\n */\n backdropDuration: number;\n\n /**\n * Configure where the gallery should be appended.\n * Useful to create inline galleries and more\n * It is an empty string in the default settings and later assigned to document.body to avoid accessing document for SSR\n */\n container: HTMLElement | (() => HTMLElement | null) | (string | null);\n\n /**\n * Delay for hiding gallery controls in ms.\n * Pass 0 if you don't want to hide the controls\n */\n hideBarsDelay: number;\n\n /**\n * Delay in hiding controls for the first time when gallery is opened\n */\n showBarsAfter: number;\n\n /**\n * Delay slide transitions.\n * @description This is useful if you want to do any action in the current slide before moving to next slide.\n *
\n * For example, fading out the captions before going to next slide.\n * .lg-slide-progress class name is added to the current slide immediately after calling the slide method.\n * But transition begins only after the delay\n *
\n */\n slideDelay: number;\n\n /**\n * Support legacy browsers\n * @description Currently this is used only for adding support to srcset attribute via picturefill library\n * If true lightGallery will show warning message to include picturefill library\n */\n supportLegacyBrowser: boolean;\n\n /**\n * If true, toolbar, captions and thumbnails will not overlap with media element\n * This will not effect thumbnails if animateThumb is false\n * Also, toggle thumbnails button is not displayed if allowMediaOverlap is false\n *
\n * Note - Changing the position of the media on every slide transition creates a flickering effect.\n * Therefore, the height of the caption is calculated dynamically, only once based on the first slide caption.\n *
\n *
\n * if you have dynamic captions for each media,\n * you can provide an appropriate height for the captions via allowMediaOverlap option\n *
\n */\n allowMediaOverlap: boolean;\n\n /**\n * Video max size.\n * @description This can be over-written by passing specific size via data-lg-size attribute\n * Recommended video resolution and & aspect ratios https://support.google.com/youtube/answer/6375112\n */\n videoMaxSize: string;\n\n /**\n * Automatically load poster image for YouTube videos\n */\n loadYouTubePoster: boolean;\n\n /**\n * Height of the caption for calculating allowMediaOverlap positions\n * Note - this is only used to find the position of media item if allowMediaOverlap is true.\n * Not for setting height of the captions\n * Set 0 if you want to calculate the height of captions dynamically\n */\n defaultCaptionHeight: number;\n\n /**\n * aria-labelledby attribute fot gallery\n */\n ariaLabelledby: string;\n\n /**\n * aria-describedby attribute for gallery\n */\n ariaDescribedby: string;\n\n /**\n * Hide scrollbar when gallery is opened\n * @version V2.5.0\n */\n hideScrollbar: boolean;\n\n /**\n * Reset to previous scrollPosition when lightGallery is closed\n * @description By default, lightGallery doesn't hide the scrollbar for a smooth opening transition.\n * If a user changes the scroll position, lightGallery resets it to the previous value\n * @version V2.5.0\n */\n resetScrollPosition: boolean;\n\n /**\n * If false user won't be able to close the gallery at all\n * This is useful for creating inline galleries.\n */\n closable: boolean;\n\n /**\n * allows vertical drag/swipe to close gallery\n * false if option closable is false\n */\n swipeToClose: boolean;\n /**\n * allows clicks on black area to close gallery.\n */\n closeOnTap: boolean;\n\n /**\n * If false, close button won't be displayed.\n * Useful for creating inline galleries.\n */\n showCloseIcon: boolean;\n\n /**\n * Show maximize icon.\n * Useful for creating inline galleries.\n */\n showMaximizeIcon: boolean;\n\n /**\n * If false, will disable the ability to loop back to the beginning of the gallery from the last slide.\n */\n loop: boolean;\n\n /**\n * Whether the LightGallery could be closed by pressing the \"Esc\" key.\n */\n escKey: boolean;\n\n /**\n * Enable keyboard navigation\n */\n keyPress: boolean;\n\n /**\n * Trap focus within the lightGallery\n * @version V2.5.0\n */\n trapFocus: boolean;\n\n /**\n * If false, prev/next buttons will not be displayed.\n */\n controls: boolean;\n\n /**\n * Enable slideEnd animation\n */\n slideEndAnimation: boolean;\n\n /**\n * If true, prev/next button will be hidden on first/last image.\n * @description Note - this option will be ignored if loop or slideEndAnimation is set to true\n */\n hideControlOnEnd: boolean;\n\n /**\n * ability to navigate to next/prev slides on mousewheel\n */\n mousewheel: boolean;\n\n /**\n * Option to get captions from alt or title tags.\n */\n getCaptionFromTitleOrAlt: boolean;\n\n /**\n * control where the sub-html should be appended.\n * If you choose '.lg-outer', you are responsible for placing the div at the right position.\n * '.lg-outer' is useful if you want show custom HTML outside the normal gallery\n */\n appendSubHtmlTo: '.lg-sub-html' | '.lg-item' | '.lg-outer';\n\n /**\n * Set to true if the selector in \"data-sub-html\" should use the current item as its origin.\n */\n subHtmlSelectorRelative: boolean;\n\n /**\n * number of preload slides\n * @description will exicute only after the current slide is fully loaded.\n * for example, if you click 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 preload: number;\n\n /**\n * Control how many slide items should be kept in dom at a time\n * @description To improve performance by reducing number of gallery items in the dom,\n * lightGallery keeps only the lowest possible number of slides in the dom at a time.\n * This has a minimum value of 3\n */\n numberOfSlideItemsInDom: number;\n\n /**\n * Custom selector property instead of direct children.\n * @description Based on your markup structure, you can specify custom selectors to fetch media data for the gallery\n * Pass \"this\" to select same element\n * You can also pass HTMLCollection directly\n * Example - '.my-selector' | '#my-selector' | this | document.querySelectorAll('.my-selector')\n */\n selector: string | HTMLCollection[];\n\n /**\n * By default selector element relative to the current gallery.\n * Instead of that you can tell lightGallery to select element relative to another element.\n * Example - '.my-selector-container' | '#my-selector-container'\n * In the code this become selector = document.querySelector(this.s.selectWithin ).querySelectorAll(this.s.selector);\n */\n selectWithin: string;\n\n /**\n * Custom html for next control\n */\n nextHtml: string;\n\n /**\n * Custom html for prev control\n */\n prevHtml: string;\n\n /**\n * specify which slide should load initially\n */\n index: number;\n\n /**\n * Set width for iframe.\n */\n iframeWidth: string;\n\n /**\n * Set height for iframe.\n */\n iframeHeight: string;\n\n /**\n * Set max width for iframe.\n */\n iframeMaxWidth: string;\n\n /**\n * Set max height for iframe.\n */\n iframeMaxHeight: string;\n\n /**\n * Enable download button.\n * @description By default download url will be taken from data-src/href attribute but it supports only for modern browsers.\n * If you want you can provide another url for download via data-download-url.\n * pass false in data-download-url if you want to hide download button for the particular slide.\n */\n download: boolean;\n\n /**\n * Whether to show total number of images and index number of currently displayed image.\n */\n counter: boolean;\n\n /**\n * Where the counter should be appended\n */\n appendCounterTo: string;\n\n /**\n * By setting the swipeThreshold (in px) you can set how far the user must swipe for the next/prev image.\n */\n swipeThreshold: number;\n\n /**\n * Enables swipe support for touch devices\n */\n enableSwipe: boolean;\n\n /**\n * Enables desktop mouse drag support\n */\n enableDrag: boolean;\n\n /**\n * LightGallery can be instantiated and launched programmatically by setting this option to true and populating dynamicEl option (see below) with the definitions of images.\n */\n dynamic: boolean;\n\n /**\n * An array of objects (src, iframe, subHtml, thumb, poster, responsive, srcset sizes) representing gallery elements.\n */\n dynamicEl: GalleryItem[];\n\n /**\n * Fetch custom properties from the selector\n * @description this is useful for plugin development\n * By default lightGallery fetches and store all the props selectors to\n * reduce frequent dom interaction for fetching props every time.\n *\n * If you need any addition data to be fetched and stored in the galleryItems variable,\n * you can do this just by passing the prop names via extraProps\n * @example\n * HTML:\n *
\n * \n * \n *
\n * JS:\n * lightGallery(document.getElementById('lightGallery'), {\n * extraProps: ['customProp']\n * })\n * // Note - If you are using dynamic mode, you can pass any custom prop in the galleryItem\n * lightGallery(document.getElementById('lightGallery'), {\n * dynamic: true,\n * dynamicEl: [{\n * src: 'img/img1.jpg',\n * customProp:'abc',\n * }]\n * })\n *\n */\n extraProps: string[];\n\n /**\n * Option to fetch different thumbnail image other than first image\n * @description If you want to use external image for thumbnail,\n * add the path of that image inside \"data-\" attribute\n * and set value of this option to the name of your custom attribute.\n *\n * @example\n *
\n * \n *
\n *\n * lightGallery(document.getElementById('lightGallery'), {\n * exThumbImage: 'data-external-thumb-image'\n * })\n */\n exThumbImage: string;\n\n /**\n * Function to detect mobile devices\n */\n isMobile?: () => boolean;\n\n /**\n * Separate settings for mobile devices\n * @description Note - this is applied only at the time of loading\n * by default controls and close buttons are disabled on mobile devices.\n * use this options if you want to enable them or change any other settings for mobile devices\n * Note - mobileSettings does not merge default values, You need to provide all mobileSettings including default values\n */\n mobileSettings: Partial;\n\n /**\n * Customize string.\n * @description This can be useful if you want to localize the lightGallery strings to other languages.\n * Use your own service to translate the strings and pass it via settings.strings\n * You can find dedicated strings option for all lightGallery modules in their respective documentation.\n * Note - You need to provide values for all the strings. For example, even if you just want to change the closeGallery string, you need to provide all the other strings as well.\n */\n strings: LightGalleryCoreStrings;\n\n plugins: (new (instance: LightGallery, $LG: LgQuery) => any)[];\n}\n\nexport const lightGalleryCoreSettings: LightGalleryCoreSettings = {\n mode: 'lg-slide',\n easing: 'ease',\n speed: 400,\n licenseKey: '0000-0000-000-0000',\n height: '100%',\n width: '100%',\n addClass: '',\n startClass: 'lg-start-zoom',\n backdropDuration: 300,\n container: '',\n startAnimationDuration: 400,\n zoomFromOrigin: true,\n hideBarsDelay: 0,\n showBarsAfter: 10000,\n slideDelay: 0,\n supportLegacyBrowser: true,\n allowMediaOverlap: false,\n videoMaxSize: '1280-720',\n loadYouTubePoster: true,\n defaultCaptionHeight: 0,\n ariaLabelledby: '',\n ariaDescribedby: '',\n resetScrollPosition: true,\n hideScrollbar: false,\n closable: true,\n swipeToClose: true,\n closeOnTap: true,\n showCloseIcon: true,\n showMaximizeIcon: false,\n loop: true,\n escKey: true,\n keyPress: true,\n trapFocus: true,\n controls: true,\n slideEndAnimation: true,\n hideControlOnEnd: false,\n mousewheel: false,\n getCaptionFromTitleOrAlt: true,\n appendSubHtmlTo: '.lg-sub-html',\n subHtmlSelectorRelative: false,\n preload: 2,\n numberOfSlideItemsInDom: 10,\n selector: '',\n selectWithin: '',\n nextHtml: '',\n prevHtml: '',\n index: 0,\n iframeWidth: '100%',\n iframeHeight: '100%',\n iframeMaxWidth: '100%',\n iframeMaxHeight: '100%',\n download: true,\n counter: true,\n appendCounterTo: '.lg-toolbar',\n swipeThreshold: 50,\n enableSwipe: true,\n enableDrag: true,\n dynamic: false,\n dynamicEl: [],\n extraProps: [],\n exThumbImage: '',\n isMobile: undefined,\n mobileSettings: {\n controls: false,\n showCloseIcon: false,\n download: false,\n } as MobileSettings,\n plugins: [],\n strings: {\n closeGallery: 'Close gallery',\n toggleMaximize: 'Toggle maximize',\n previousSlide: 'Previous slide',\n nextSlide: 'Next slide',\n download: 'Download',\n playVideo: 'Play video',\n mediaLoadingFailed: 'Oops... Failed to load content...',\n } as LightGalleryCoreStrings,\n};\n","interface Offset {\n left: number;\n top: number;\n}\n\nfunction initLgPolyfills() {\n (function () {\n if (typeof window.CustomEvent === 'function') return false;\n\n function CustomEvent(event: string, params: any) {\n params = params || {\n bubbles: false,\n cancelable: false,\n detail: null,\n };\n const evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(\n event,\n params.bubbles,\n params.cancelable,\n params.detail,\n );\n return evt;\n }\n\n window.CustomEvent = CustomEvent as any;\n })();\n (function () {\n if (!Element.prototype.matches) {\n Element.prototype.matches =\n (Element.prototype as any).msMatchesSelector ||\n Element.prototype.webkitMatchesSelector;\n }\n })();\n}\n\nexport type LgQuery = (selector: any) => lgQuery;\nexport class lgQuery {\n static eventListeners: { [key: string]: any[] } = {};\n static generateUUID(): string {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(\n /[xy]/g,\n function (c) {\n const r = (Math.random() * 16) | 0,\n v = c == 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n },\n );\n }\n\n private selector: any;\n private firstElement: any;\n private cssVenderPrefixes: string[] = [\n 'TransitionDuration',\n 'TransitionTimingFunction',\n 'Transform',\n 'Transition',\n ];\n constructor(selector: string | Element) {\n this.selector = this._getSelector(selector);\n this.firstElement = this._getFirstEl();\n return this;\n }\n\n private _getSelector(\n selector: string | Element,\n context: Element | Document = document,\n ): Element | null | NodeListOf {\n if (typeof selector !== 'string') {\n return selector;\n }\n context = context || document;\n const fl = selector.substring(0, 1);\n if (fl === '#') {\n return context.querySelector(selector);\n } else {\n return context.querySelectorAll(selector);\n }\n }\n\n private _each(\n func: (\n elements: Element | NodeListOf | null,\n index: number,\n ) => void,\n ): this {\n if (!this.selector) {\n return this;\n }\n if (this.selector.length !== undefined) {\n [].forEach.call(this.selector, func);\n } else {\n func(this.selector, 0);\n }\n return this;\n }\n\n private _setCssVendorPrefix(\n el: any,\n cssProperty: string,\n value?: string | number,\n ): void {\n // prettier-ignore\n const property = cssProperty.replace(/-([a-z])/gi, function (\n s,\n group1,\n ) {\n return group1.toUpperCase();\n });\n if (this.cssVenderPrefixes.indexOf(property) !== -1) {\n el.style[\n property.charAt(0).toLowerCase() + property.slice(1)\n ] = 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 } else {\n el.style[property] = value;\n }\n }\n\n private _getFirstEl() {\n if (this.selector && this.selector.length !== undefined) {\n return this.selector[0];\n } else {\n return this.selector;\n }\n }\n\n private isEventMatched(event: string, eventName: string): boolean {\n const eventNamespace = eventName.split('.');\n return event\n .split('.')\n .filter((e) => e)\n .every((e) => {\n return eventNamespace.indexOf(e) !== -1;\n });\n }\n\n attr(attr: string): string;\n attr(attr: string, value: string | number | boolean): this;\n attr(attr: string, value?: string | number | boolean): string | this {\n if (value === undefined) {\n if (!this.firstElement) {\n return '';\n }\n return this.firstElement.getAttribute(attr);\n }\n this._each((el: any) => {\n el.setAttribute(attr, value);\n });\n return this;\n }\n\n find(selector: any): lgQuery {\n return $LG(this._getSelector(selector, this.selector));\n }\n\n first(): lgQuery {\n if (this.selector && this.selector.length !== undefined) {\n return $LG(this.selector[0]);\n } else {\n return $LG(this.selector);\n }\n }\n\n eq(index: number): lgQuery {\n return $LG(this.selector[index]);\n }\n\n parent(): lgQuery {\n return $LG(this.selector.parentElement);\n }\n\n get(): HTMLElement {\n return this._getFirstEl();\n }\n\n removeAttr(attributes: string): this {\n const attrs = attributes.split(' ');\n this._each((el: any) => {\n attrs.forEach((attr: string) => el.removeAttribute(attr));\n });\n return this;\n }\n\n wrap(className: string): this {\n if (!this.firstElement) {\n return this;\n }\n const wrapper = document.createElement('div');\n wrapper.className = className;\n this.firstElement.parentNode.insertBefore(wrapper, this.firstElement);\n this.firstElement.parentNode.removeChild(this.firstElement);\n wrapper.appendChild(this.firstElement);\n return this;\n }\n\n addClass(classNames = ''): this {\n this._each((el: any) => {\n // IE doesn't support multiple arguments\n classNames.split(' ').forEach((className) => {\n if (className) {\n el.classList.add(className);\n }\n });\n });\n return this;\n }\n\n removeClass(classNames: string): this {\n this._each((el: any) => {\n // IE doesn't support multiple arguments\n classNames.split(' ').forEach((className) => {\n if (className) {\n el.classList.remove(className);\n }\n });\n });\n return this;\n }\n\n hasClass(className: string): boolean {\n if (!this.firstElement) {\n return false;\n }\n return this.firstElement.classList.contains(className);\n }\n hasAttribute(attribute: string): boolean {\n if (!this.firstElement) {\n return false;\n }\n return this.firstElement.hasAttribute(attribute);\n }\n toggleClass(className: string): this {\n if (!this.firstElement) {\n return this;\n }\n if (this.hasClass(className)) {\n this.removeClass(className);\n } else {\n this.addClass(className);\n }\n return this;\n }\n\n css(property: string, value?: string | number): this {\n this._each((el: any) => {\n this._setCssVendorPrefix(el, property, value);\n });\n return this;\n }\n // Need to pass separate namespaces for separate elements\n on(events: string, listener: (e: any) => void): this {\n if (!this.selector) {\n return this;\n }\n events.split(' ').forEach((event: string) => {\n if (!Array.isArray(lgQuery.eventListeners[event])) {\n lgQuery.eventListeners[event] = [];\n }\n lgQuery.eventListeners[event].push(listener);\n this.selector.addEventListener(event.split('.')[0], listener);\n });\n\n return this;\n }\n // @todo - test this\n once(event: string, listener: (e: any) => void): this {\n this.on(event, () => {\n this.off(event);\n listener(event);\n });\n return this;\n }\n off(event: string): this {\n if (!this.selector) {\n return this;\n }\n Object.keys(lgQuery.eventListeners).forEach((eventName) => {\n if (this.isEventMatched(event, eventName)) {\n lgQuery.eventListeners[eventName].forEach((listener) => {\n this.selector.removeEventListener(\n eventName.split('.')[0],\n listener,\n );\n });\n lgQuery.eventListeners[eventName] = [];\n }\n });\n\n return this;\n }\n trigger(event: string, detail?: Detail): this {\n if (!this.firstElement) {\n return this;\n }\n\n const customEvent = new CustomEvent(event.split('.')[0], {\n detail: detail || null,\n });\n this.firstElement.dispatchEvent(customEvent);\n return this;\n }\n\n // Does not support IE\n load(url: string): this {\n fetch(url)\n .then((res) => res.text())\n .then((html) => {\n this.selector.innerHTML = html;\n });\n return this;\n }\n\n html(): string;\n html(html: string): this;\n html(html?: string): string | this {\n if (html === undefined) {\n if (!this.firstElement) {\n return '';\n }\n return this.firstElement.innerHTML;\n }\n this._each((el: any) => {\n el.innerHTML = html;\n });\n return this;\n }\n append(html: string | HTMLElement): this {\n this._each((el: any) => {\n if (typeof html === 'string') {\n el.insertAdjacentHTML('beforeend', html);\n } else {\n el.appendChild(html);\n }\n });\n return this;\n }\n prepend(html: string | HTMLElement): this {\n this._each((el: any) => {\n if (typeof html === 'string') {\n el.insertAdjacentHTML('afterbegin', html);\n } else if (html instanceof HTMLElement) {\n el.insertBefore(html.cloneNode(true), el.firstChild);\n }\n });\n return this;\n }\n remove(): this {\n this._each((el: any) => {\n el.parentNode.removeChild(el);\n });\n return this;\n }\n empty(): this {\n this._each((el: any) => {\n el.innerHTML = '';\n });\n return this;\n }\n // Supports only window\n scrollTop(): number;\n scrollTop(scrollTop: number): this;\n scrollTop(scrollTop?: number): number | this {\n if (scrollTop !== undefined) {\n document.body.scrollTop = scrollTop;\n document.documentElement.scrollTop = scrollTop;\n return this;\n } else {\n return (\n window.pageYOffset ||\n document.documentElement.scrollTop ||\n document.body.scrollTop ||\n 0\n );\n }\n }\n // Supports only window\n scrollLeft(): number;\n scrollLeft(scrollLeft?: number): this;\n scrollLeft(scrollLeft?: number): number | this {\n if (scrollLeft !== undefined) {\n document.body.scrollLeft = scrollLeft;\n document.documentElement.scrollLeft = scrollLeft;\n return this;\n } else {\n return (\n window.pageXOffset ||\n document.documentElement.scrollLeft ||\n document.body.scrollLeft ||\n 0\n );\n }\n }\n offset(): Offset {\n if (!this.firstElement) {\n return {\n left: 0,\n top: 0,\n };\n }\n const rect = this.firstElement.getBoundingClientRect();\n const bodyMarginLeft = $LG('body').style().marginLeft;\n\n // Minus body margin - https://stackoverflow.com/questions/30711548/is-getboundingclientrect-left-returning-a-wrong-value\n return {\n left: rect.left - parseFloat(bodyMarginLeft) + this.scrollLeft(),\n top: rect.top + this.scrollTop(),\n };\n }\n style(): CSSStyleDeclaration {\n if (!this.firstElement) {\n return {} as CSSStyleDeclaration;\n }\n return (\n this.firstElement.currentStyle ||\n window.getComputedStyle(this.firstElement)\n );\n }\n // Width without padding and border even if box-sizing is used.\n width(): number {\n const style = this.style();\n return (\n this.firstElement.clientWidth -\n parseFloat(style.paddingLeft) -\n parseFloat(style.paddingRight)\n );\n }\n // Height without padding and border even if box-sizing is used.\n height(): number {\n const style = this.style();\n return (\n this.firstElement.clientHeight -\n parseFloat(style.paddingTop) -\n parseFloat(style.paddingBottom)\n );\n }\n}\n\nexport function $LG(selector: any): lgQuery {\n initLgPolyfills();\n return new lgQuery(selector);\n}\n","import { $LG, lgQuery } from './lgQuery';\nimport { VideoSource } from './plugins/video/types';\nimport { VideoInfo } from './types';\n\nexport interface ImageSize {\n width: number;\n height: number;\n}\n\nexport interface ImageSources {\n media?: string;\n srcset: string;\n sizes?: string;\n type?: string;\n}\n\nexport interface GalleryItem {\n /**\n * url of the media\n * @data-attr data-src\n */\n src?: string;\n\n /**\n * Source attributes for the picture element\n * @data-attr data-sources\n */\n sources?: ImageSources[];\n\n /**\n * Thumbnail url\n * @description By default lightGallery uses the image inside gallery selector as thumbnail.\n * But, If you want to use external image for thumbnail,\n * pass the thumbnail url via any data attribute and\n * pass the attribute name via exThumbImage option\n * @example\n *
\n * \n *
\n *\n * lightGallery(document.getElementById('lightGallery'), {\n * exThumbImage: 'data-external-thumb-image'\n * })\n * @data-attr data-*\n */\n thumb?: string;\n\n /**\n * alt attribute for the image\n * @data-attr alt\n */\n alt?: string;\n\n /**\n * Title attribute for the video\n * @data-attr title\n */\n title?: string;\n\n /**\n * Title for iframe\n * @data-attr data-iframe-title\n */\n iframeTitle?: string;\n\n /**\n * Caption for the slide\n * @description You can either pass the HTML markup or the ID or class name of the element which contains the captions\n * @data-attr data-sub-html\n */\n subHtml?: string;\n\n /**\n * url of the file which contain the sub html.\n * @description Note - Does not support Internet Explorer browser\n * @data-attr data-sub-html-url\n */\n subHtmlUrl?: string;\n\n /**\n * Video source\n * @data-attr data-video\n */\n video?: VideoSource;\n\n /**\n * Poster url\n * @data-attr data-poster\n */\n poster?: string;\n\n /**\n * Custom slide name to use in the url when hash plugin is enabled\n * @data-attr data-slide-name\n */\n slideName?: string;\n\n /**\n * List of images and viewport's max width separated by comma.\n * @description Ex?: img/1-375.jpg 375, img/1-480.jpg 480, img/1-757.jpg 757.\n * @data-attr data-responsive\n */\n responsive?: string;\n\n /**\n * srcset attribute values for the main image\n * @data-attr data-srcset\n */\n srcset?: string;\n\n /**\n * srcset sizes attribute for the main image\n * @data-attr data-sizes\n */\n sizes?: string;\n\n /**\n * Set true is you want to open your url in an iframe\n * @data-attr data-iframe\n */\n iframe?: boolean;\n\n /**\n * Download url for your image/video.\n * @description Pass false if you want to disable the download button.\n * @data-attr data-download-url\n */\n downloadUrl?: string | boolean;\n\n /**\n * Name of the file after it is downloaded.\n * @description The HTML value of the download attribute.\n * There are no restrictions on allowed values, and the browser will automatically\n * detect the correct file extension and add it to the file (.img, .pdf, .txt, .html, etc.).\n * More info\n * @data-attr data-download\n */\n download?: string | boolean;\n\n /**\n * Actual size of the image in px.\n * @description This is used in zoom plugin to see the actual size of the image when double taped on the image.\n * @data-attr data-width\n */\n width?: string;\n\n /**\n * Facebook share URL.\n * @description Specify only if you want to provide separate share URL for the specific slide. By default, current browser URL is taken.\n * @data-attr data-facebook-share-url\n */\n facebookShareUrl?: string;\n\n /**\n * Tweet text\n * @data-attr data-tweet-text\n */\n tweetText?: string;\n\n /**\n * Twitter share URL.\n * @description Specify only if you want to provide separate share URL for the specific slide. By default, current browser URL will be taken.\n * @data-attr data-twitter-share-url\n */\n twitterShareUrl?: string;\n\n /**\n * Pinterest share URL.\n * @description Specify only if you want to provide separate share URL for the specific slide. By default, current browser URL will be taken.\n * Note?: Pinterest requires absolute URL\n * @data-attr data-pinterest-share-url\n */\n pinterestShareUrl?: string;\n\n /**\n * Description for Pinterest post.\n * @data-attr data-pinterest-text\n */\n pinterestText?: string;\n\n /**\n * Facebook comments body html\n * @description Please refer facebook official documentation for generating the HTML markup\n * @example\n * \n * \n * @data-attr data-fb-html\n */\n fbHtml?: string;\n\n /**\n * Disqus page identifier\n * @description Please refer official disqus documentation for more info\n * @data-attr data-disqus-identifier\n */\n disqusIdentifier?: string;\n\n /**\n * Disqus page url\n * @description Please refer official disqus documentation for more info\n * @data-attr data-disqus-url\n */\n disqusUrl?: string;\n\n __slideVideoInfo?: VideoInfo;\n [key: string]: any;\n}\n\nconst defaultDynamicOptions = [\n 'src',\n 'sources',\n 'subHtml',\n 'subHtmlUrl',\n 'html',\n 'video',\n 'poster',\n 'slideName',\n 'responsive',\n 'srcset',\n 'sizes',\n 'iframe',\n 'downloadUrl',\n 'download',\n 'width',\n 'facebookShareUrl',\n 'tweetText',\n 'iframeTitle',\n 'twitterShareUrl',\n 'pinterestShareUrl',\n 'pinterestText',\n 'fbHtml',\n 'disqusIdentifier',\n 'disqusUrl',\n];\n\n// Convert html data-attribute to camalcase\nexport function convertToData(attr: string): string {\n // FInd a way for lgsize\n if (attr === 'href') {\n return 'src';\n }\n attr = attr.replace('data-', '');\n attr = attr.charAt(0).toLowerCase() + attr.slice(1);\n attr = attr.replace(/-([a-z])/g, (g) => g[1].toUpperCase());\n\n return attr;\n}\n\nconst utils = {\n /**\n * Fetches HTML content from a given URL and inserts it into a specified element.\n *\n * @param url - The URL to fetch the HTML content from.\n * @param element - The DOM element (jQuery object) to insert the HTML content into.\n * @param insertMethod - The method to insert the HTML ('append' or 'replace').\n */\n fetchCaptionFromUrl(\n url: string,\n element: lgQuery,\n insertMethod: 'append' | 'replace',\n ): void {\n // Fetch content from the URL\n fetch(url)\n .then((response) => response.text())\n .then((htmlContent) => {\n if (insertMethod === 'append') {\n const contentDiv = `
${htmlContent}
`;\n element.append(contentDiv);\n } else {\n element.html(htmlContent);\n }\n });\n },\n /**\n * get possible width and height from the lgSize attribute. Used for ZoomFromOrigin option\n */\n getSize(\n el: HTMLElement,\n container: lgQuery,\n spacing = 0,\n defaultLgSize?: string,\n ): ImageSize | undefined {\n const LGel = $LG(el);\n let lgSize = LGel.attr('data-lg-size') || defaultLgSize;\n\n if (!lgSize) {\n return;\n }\n\n const isResponsiveSizes = lgSize.split(',');\n // if at-least two viewport sizes are available\n if (isResponsiveSizes[1]) {\n const wWidth = window.innerWidth;\n for (let i = 0; i < isResponsiveSizes.length; i++) {\n const size = isResponsiveSizes[i];\n const responsiveWidth = parseInt(size.split('-')[2], 10);\n if (responsiveWidth > wWidth) {\n lgSize = size;\n break;\n }\n\n // take last item as last option\n if (i === isResponsiveSizes.length - 1) {\n lgSize = size;\n }\n }\n }\n\n const size = lgSize.split('-');\n\n const width = parseInt(size[0], 10);\n const height = parseInt(size[1], 10);\n\n const cWidth = container.width();\n const cHeight = container.height() - spacing;\n\n const maxWidth = Math.min(cWidth, width);\n const maxHeight = Math.min(cHeight, height);\n\n const ratio = Math.min(maxWidth / width, maxHeight / height);\n\n return { width: width * ratio, height: height * ratio };\n },\n\n /**\n * @desc Get transform value based on the imageSize. Used for ZoomFromOrigin option\n * @param {jQuery Element}\n * @returns {String} Transform CSS string\n */\n getTransform(\n el: HTMLElement,\n container: lgQuery,\n top: number,\n bottom: number,\n imageSize?: ImageSize,\n ): string | undefined {\n if (!imageSize) {\n return;\n }\n const LGel = $LG(el).find('img').first();\n if (!LGel.get()) {\n return;\n }\n\n const containerRect = container.get().getBoundingClientRect();\n\n const wWidth = containerRect.width;\n\n // using innerWidth to include mobile safari bottom bar\n const wHeight = container.height() - (top + bottom);\n\n const elWidth = LGel.width();\n const elHeight = LGel.height();\n\n const elStyle = LGel.style();\n let x =\n (wWidth - elWidth) / 2 -\n LGel.offset().left +\n (parseFloat(elStyle.paddingLeft) || 0) +\n (parseFloat(elStyle.borderLeft) || 0) +\n $LG(window).scrollLeft() +\n containerRect.left;\n let y =\n (wHeight - elHeight) / 2 -\n LGel.offset().top +\n (parseFloat(elStyle.paddingTop) || 0) +\n (parseFloat(elStyle.borderTop) || 0) +\n $LG(window).scrollTop() +\n top;\n\n const scX = elWidth / imageSize.width;\n const scY = elHeight / imageSize.height;\n\n const transform =\n 'translate3d(' +\n (x *= -1) +\n 'px, ' +\n (y *= -1) +\n 'px, 0) scale3d(' +\n scX +\n ', ' +\n scY +\n ', 1)';\n return transform;\n },\n\n getIframeMarkup(\n iframeWidth: string,\n iframeHeight: string,\n iframeMaxWidth: string,\n iframeMaxHeight: string,\n src?: string,\n iframeTitle?: string,\n ): string {\n const title = iframeTitle ? 'title=\"' + iframeTitle + '\"' : '';\n return `
\n \n
`;\n },\n\n getImgMarkup(\n index: number,\n src: string,\n altAttr: string,\n srcset?: string,\n sizes?: string,\n sources?: ImageSources[],\n ): string {\n const srcsetAttr = srcset ? `srcset=\"${srcset}\"` : '';\n const sizesAttr = sizes ? `sizes=\"${sizes}\"` : '';\n const imgMarkup = ``;\n let sourceTag = '';\n if (sources) {\n const sourceObj =\n typeof sources === 'string' ? JSON.parse(sources) : sources;\n\n sourceTag = sourceObj.map((source: any) => {\n let attrs = '';\n Object.keys(source).forEach((key) => {\n // Do not remove the first space as it is required to separate the attributes\n attrs += ` ${key}=\"${source[key]}\"`;\n });\n return ``;\n });\n }\n return `${sourceTag}${imgMarkup}`;\n },\n\n // Get src from responsive src\n getResponsiveSrc(srcItms: string[]): string {\n const rsWidth = [];\n const rsSrc = [];\n let src = '';\n for (let i = 0; i < srcItms.length; i++) {\n const _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 const wWidth = window.innerWidth;\n for (let j = 0; j < rsWidth.length; j++) {\n if (parseInt(rsWidth[j], 10) > wWidth) {\n src = rsSrc[j];\n break;\n }\n }\n return src;\n },\n\n isImageLoaded(img: HTMLImageElement): boolean {\n if (!img) return false;\n // During the onload event, IE correctly identifies any images that\n // weren’t downloaded as not complete. Others should too. Gecko-based\n // browsers act like NS4 in that they report this incorrectly.\n if (!img.complete) {\n return false;\n }\n\n // However, they do have two very useful properties: naturalWidth and\n // naturalHeight. These give the true size of the image. If it failed\n // to load, either of these should be zero.\n if (img.naturalWidth === 0) {\n return false;\n }\n\n // No other way of checking: assume it’s ok.\n return true;\n },\n\n getVideoPosterMarkup(\n _poster: string,\n dummyImg: string | HTMLElement,\n videoContStyle: string,\n playVideoString: string,\n _isVideo?: VideoInfo,\n ): string {\n let 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 let _dummy = dummyImg;\n if (typeof dummyImg !== 'string') {\n _dummy = dummyImg.outerHTML;\n }\n return `
\n
\n \n ${playVideoString}\n \n \n \n \n \n \n \n
\n ${_dummy}\n \n
`;\n },\n\n getFocusableElements(container: HTMLElement): NodeListOf {\n const elements = container.querySelectorAll(\n 'a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type=\"text\"]:not([disabled]), input[type=\"radio\"]:not([disabled]), input[type=\"checkbox\"]:not([disabled]), select:not([disabled])',\n );\n const visibleElements = [].filter.call(elements, (element) => {\n const style = window.getComputedStyle(element);\n return style.display !== 'none' && style.visibility !== 'hidden';\n });\n return (visibleElements as unknown) as NodeListOf;\n },\n\n /**\n * @desc Create dynamic elements array from gallery items when dynamic option is false\n * It helps to avoid frequent DOM interaction\n * and avoid multiple checks for dynamic elments\n *\n * @returns {Array} dynamicEl\n */\n getDynamicOptions(\n items: any,\n extraProps: string[],\n getCaptionFromTitleOrAlt: boolean,\n exThumbImage: string,\n ): GalleryItem[] {\n const dynamicElements: GalleryItem[] = [];\n const availableDynamicOptions = [\n ...defaultDynamicOptions,\n ...extraProps,\n ];\n [].forEach.call(items, (item: HTMLElement) => {\n const dynamicEl: GalleryItem = {} as GalleryItem;\n for (let i = 0; i < item.attributes.length; i++) {\n const attr = item.attributes[i];\n if (attr.specified) {\n const dynamicAttr = convertToData(attr.name);\n let label = '';\n if (availableDynamicOptions.indexOf(dynamicAttr) > -1) {\n label = dynamicAttr;\n }\n if (label) {\n (dynamicEl as any)[label] = attr.value;\n }\n }\n }\n const currentItem = $LG(item);\n const alt = currentItem.find('img').first().attr('alt');\n const title = currentItem.attr('title');\n\n const thumb = exThumbImage\n ? currentItem.attr(exThumbImage)\n : currentItem.find('img').first().attr('src');\n dynamicEl.thumb = thumb;\n\n if (getCaptionFromTitleOrAlt && !dynamicEl.subHtml) {\n dynamicEl.subHtml = title || alt || '';\n }\n dynamicEl.alt = alt || title || '';\n dynamicElements.push(dynamicEl);\n });\n return dynamicElements;\n },\n isMobile(): boolean {\n return /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);\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 * @todo - this information can be moved to dynamicEl to avoid frequent calls\n */\n\n isVideo(\n src: string,\n isHTML5VIdeo: boolean,\n index: number,\n ): VideoInfo | undefined {\n if (!src) {\n if (isHTML5VIdeo) {\n return {\n html5: true,\n };\n } else {\n console.error(\n 'lightGallery :- data-src is not provided on slide item ' +\n (index + 1) +\n '. Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/',\n );\n return;\n }\n }\n\n const youtube = src.match(\n /\\/\\/(?:www\\.)?youtu(?:\\.be|be\\.com|be-nocookie\\.com)\\/(?:watch\\?v=|embed\\/)?([a-z0-9\\-\\_\\%]+)([\\&|?][\\S]*)*/i,\n );\n const vimeo = src.match(\n /\\/\\/(?:www\\.)?(?:player\\.)?vimeo.com\\/(?:video\\/)?([0-9a-z\\-_]+)(.*)?/i,\n );\n const wistia = src.match(\n /https?:\\/\\/(.+)?(wistia\\.com|wi\\.st)\\/(medias|embed)\\/([0-9a-z\\-_]+)(.*)/,\n );\n\n if (youtube) {\n return {\n youtube,\n };\n } else if (vimeo) {\n return {\n vimeo,\n };\n } else if (wistia) {\n return {\n wistia,\n };\n }\n },\n};\n\nexport default utils;\n","import {\n AfterAppendSlideEventDetail,\n AfterAppendSubHtmlDetail,\n BeforeSlideDetail,\n lGEvents,\n SlideItemLoadDetail,\n} from './lg-events';\nimport {\n LightGalleryAllSettings,\n lightGalleryCoreSettings,\n LightGallerySettings,\n} from './lg-settings';\nimport utils, { GalleryItem, ImageSize } from './lg-utils';\nimport { $LG, lgQuery } from './lgQuery';\nimport {\n Coords,\n MediaContainerPosition,\n SlideDirection,\n VideoInfo,\n} from './types';\n\ndeclare let picturefill: any;\n\n// @ref - https://stackoverflow.com/questions/3971841/how-to-resize-images-proportionally-keeping-the-aspect-ratio\n// @ref - https://2ality.com/2017/04/setting-up-multi-platform-packages.html\n\n// Unique id for each gallery\nlet lgId = 0;\n\nexport class LightGallery {\n public settings!: LightGalleryAllSettings;\n public galleryItems!: GalleryItem[];\n\n // Current gallery item\n public lgId!: number;\n\n public el!: HTMLElement;\n public LGel!: lgQuery;\n public lgOpened = false;\n\n public index = 0;\n\n // lightGallery modules\n public plugins: any[] = [];\n\n // false when lightGallery load first slide content;\n public lGalleryOn = false;\n\n // True when a slide animation is in progress\n public lgBusy = false;\n\n // Type of touch action - {swipe, zoomSwipe, pinch}\n public touchAction?: 'swipe' | 'zoomSwipe' | 'pinch';\n\n // Direction of swipe/drag - {horizontal, vertical}\n public swipeDirection?: 'horizontal' | 'vertical';\n\n // Timeout function for hiding controls;\n public hideBarTimeout: any;\n\n public currentItemsInDom: string[] = [];\n\n public outer!: lgQuery;\n\n public items: any;\n\n public $backdrop!: lgQuery;\n public $lgComponents!: lgQuery;\n\n public $container!: lgQuery;\n\n public $inner!: lgQuery;\n public $content!: lgQuery;\n public $toolbar!: lgQuery;\n\n // Scroll top value before lightGallery is opened\n public prevScrollTop = 0;\n\n public bodyPaddingRight = 0;\n\n private zoomFromOrigin!: boolean;\n\n private currentImageSize?: ImageSize;\n\n private isDummyImageRemoved = false;\n\n private dragOrSwipeEnabled = false;\n\n public mediaContainerPosition = {\n top: 0,\n bottom: 0,\n };\n\n constructor(element: HTMLElement, options?: LightGallerySettings) {\n if (!element) {\n return this;\n }\n lgId++;\n this.lgId = lgId;\n\n this.el = element;\n this.LGel = $LG(element);\n\n this.generateSettings(options);\n\n this.buildModules();\n\n // When using dynamic mode, ensure dynamicEl is an array\n if (\n this.settings.dynamic &&\n this.settings.dynamicEl !== undefined &&\n !Array.isArray(this.settings.dynamicEl)\n ) {\n throw 'When using dynamic mode, you must also define dynamicEl as an Array.';\n }\n\n this.galleryItems = this.getItems();\n this.normalizeSettings();\n\n // Gallery items\n\n this.init();\n\n this.validateLicense();\n\n return this;\n }\n\n private generateSettings(options?: LightGallerySettings) {\n // lightGallery settings\n this.settings = {\n ...lightGalleryCoreSettings,\n ...options,\n } as LightGalleryAllSettings;\n if (\n this.settings.isMobile &&\n typeof this.settings.isMobile === 'function'\n ? this.settings.isMobile()\n : utils.isMobile()\n ) {\n const mobileSettings = {\n ...this.settings.mobileSettings,\n ...this.settings.mobileSettings,\n };\n this.settings = { ...this.settings, ...mobileSettings };\n }\n }\n\n private normalizeSettings() {\n if (this.settings.slideEndAnimation) {\n this.settings.hideControlOnEnd = false;\n }\n if (!this.settings.closable) {\n this.settings.swipeToClose = false;\n }\n\n // And reset it on close to get the correct value next time\n this.zoomFromOrigin = this.settings.zoomFromOrigin;\n\n // At the moment, Zoom from image doesn't support dynamic options\n // @todo add zoomFromOrigin support for dynamic images\n if (this.settings.dynamic) {\n this.zoomFromOrigin = false;\n }\n\n if (this.settings.container) {\n const { container } = this.settings;\n if (typeof container === 'function') {\n this.settings.container = container();\n } else if (typeof container === 'string') {\n const el = document.querySelector(container);\n this.settings.container = el ?? document.body;\n }\n } else {\n this.settings.container = document.body;\n }\n\n // settings.preload should not be grater than $item.length\n this.settings.preload = Math.min(\n this.settings.preload,\n this.galleryItems.length,\n );\n }\n\n init(): void {\n this.addSlideVideoInfo(this.galleryItems);\n\n this.buildStructure();\n\n this.LGel.trigger(lGEvents.init, {\n instance: this,\n });\n\n if (this.settings.keyPress) {\n this.keyPress();\n }\n\n setTimeout(() => {\n this.enableDrag();\n this.enableSwipe();\n this.triggerPosterClick();\n }, 50);\n\n this.arrow();\n if (this.settings.mousewheel) {\n this.mousewheel();\n }\n\n if (!this.settings.dynamic) {\n this.openGalleryOnItemClick();\n }\n }\n\n openGalleryOnItemClick(): void {\n // Using for loop instead of using bubbling as the items can be any html element.\n for (let index = 0; index < this.items.length; index++) {\n const element = this.items[index];\n const $element = $LG(element);\n // Using different namespace for click because click event should not unbind if selector is same object('this')\n // @todo manage all event listners - should have namespace that represent element\n const uuid = lgQuery.generateUUID();\n $element\n .attr('data-lg-id', uuid)\n .on(`click.lgcustom-item-${uuid}`, (e) => {\n e.preventDefault();\n const currentItemIndex = this.settings.index || index;\n this.openGallery(currentItemIndex, element);\n });\n }\n }\n\n /**\n * Module constructor\n * Modules are build incrementally.\n * Gallery should be opened only once all the modules are initialized.\n * use moduleBuildTimeout to make sure this\n */\n buildModules(): void {\n this.settings.plugins.forEach((plugin) => {\n this.plugins.push(new plugin(this, $LG));\n });\n }\n\n validateLicense(): void {\n if (!this.settings.licenseKey) {\n console.error('Please provide a valid license key');\n } else if (this.settings.licenseKey === '0000-0000-000-0000') {\n console.warn(\n `lightGallery: ${this.settings.licenseKey} license key is not valid for production use`,\n );\n }\n }\n\n getSlideItem(index: number): lgQuery {\n return $LG(this.getSlideItemId(index));\n }\n\n getSlideItemId(index: number): string {\n return `#lg-item-${this.lgId}-${index}`;\n }\n\n getIdName(id: string): string {\n return `${id}-${this.lgId}`;\n }\n getElementById(id: string): lgQuery {\n return $LG(`#${this.getIdName(id)}`);\n }\n\n manageSingleSlideClassName(): void {\n if (this.galleryItems.length < 2) {\n this.outer.addClass('lg-single-item');\n } else {\n this.outer.removeClass('lg-single-item');\n }\n }\n\n buildStructure(): void {\n const container = this.$container && this.$container.get();\n if (container) {\n return;\n }\n let controls = '';\n let subHtmlCont = '';\n\n // Create controls\n if (this.settings.controls) {\n controls = `\n `;\n }\n\n if (this.settings.appendSubHtmlTo !== '.lg-item') {\n subHtmlCont =\n '
';\n }\n\n let addClasses = '';\n\n if (this.settings.allowMediaOverlap) {\n // Do not remove space before last single quote\n addClasses += 'lg-media-overlap ';\n }\n\n const ariaLabelledby = this.settings.ariaLabelledby\n ? 'aria-labelledby=\"' + this.settings.ariaLabelledby + '\"'\n : '';\n const ariaDescribedby = this.settings.ariaDescribedby\n ? 'aria-describedby=\"' + this.settings.ariaDescribedby + '\"'\n : '';\n\n const containerClassName = `lg-container ${this.settings.addClass} ${\n document.body !== this.settings.container ? 'lg-inline' : ''\n }`;\n const closeIcon =\n this.settings.closable && this.settings.showCloseIcon\n ? ``\n : '';\n const maximizeIcon = this.settings.showMaximizeIcon\n ? ``\n : '';\n const template = `\n
\n
\n\n
\n\n
\n
\n
\n ${controls}\n
\n
\n ${maximizeIcon}\n ${closeIcon}\n
\n ${\n this.settings.appendSubHtmlTo === '.lg-outer'\n ? subHtmlCont\n : ''\n }\n
\n ${\n this.settings.appendSubHtmlTo === '.lg-sub-html'\n ? subHtmlCont\n : ''\n }\n
\n
\n
\n `;\n\n $LG(this.settings.container).append(template);\n\n if (document.body !== this.settings.container) {\n $LG(this.settings.container).css('position', 'relative');\n }\n\n this.outer = this.getElementById('lg-outer');\n this.$lgComponents = this.getElementById('lg-components');\n this.$backdrop = this.getElementById('lg-backdrop');\n this.$container = this.getElementById('lg-container');\n this.$inner = this.getElementById('lg-inner');\n this.$content = this.getElementById('lg-content');\n this.$toolbar = this.getElementById('lg-toolbar');\n\n this.$backdrop.css(\n 'transition-duration',\n this.settings.backdropDuration + 'ms',\n );\n\n let outerClassNames = `${this.settings.mode} `;\n\n this.manageSingleSlideClassName();\n\n if (this.settings.enableDrag) {\n outerClassNames += 'lg-grab ';\n }\n\n this.outer.addClass(outerClassNames);\n\n this.$inner.css('transition-timing-function', this.settings.easing);\n this.$inner.css('transition-duration', this.settings.speed + 'ms');\n\n if (this.settings.download) {\n this.$toolbar.append(\n ``,\n );\n }\n\n this.counter();\n\n $LG(window).on(\n `resize.lg.global${this.lgId} orientationchange.lg.global${this.lgId}`,\n () => {\n this.refreshOnResize();\n },\n );\n\n this.hideBars();\n\n this.manageCloseGallery();\n this.toggleMaximize();\n\n this.initModules();\n }\n\n refreshOnResize(): void {\n if (this.lgOpened) {\n const currentGalleryItem = this.galleryItems[this.index];\n const { __slideVideoInfo } = currentGalleryItem;\n\n this.mediaContainerPosition = this.getMediaContainerPosition();\n const { top, bottom } = this.mediaContainerPosition;\n this.currentImageSize = utils.getSize(\n this.items[this.index],\n this.outer,\n top + bottom,\n __slideVideoInfo && this.settings.videoMaxSize,\n );\n if (__slideVideoInfo) {\n this.resizeVideoSlide(this.index, this.currentImageSize);\n }\n if (this.zoomFromOrigin && !this.isDummyImageRemoved) {\n const imgStyle = this.getDummyImgStyles(this.currentImageSize);\n this.outer\n .find('.lg-current .lg-dummy-img')\n .first()\n .attr('style', imgStyle);\n }\n this.LGel.trigger(lGEvents.containerResize);\n }\n }\n\n resizeVideoSlide(index: number, imageSize?: ImageSize): void {\n const lgVideoStyle = this.getVideoContStyle(imageSize);\n const currentSlide = this.getSlideItem(index);\n currentSlide.find('.lg-video-cont').attr('style', lgVideoStyle);\n }\n\n /**\n * Update slides dynamically.\n * Add, edit or delete slides dynamically when lightGallery is opened.\n * Modify the current gallery items and pass it via updateSlides method\n * @note\n * - Do not mutate existing lightGallery items directly.\n * - Always pass new list of gallery items\n * - You need to take care of thumbnails outside the gallery if any\n * - user this method only if you want to update slides when the gallery is opened. Otherwise, use `refresh()` method.\n * @param items Gallery items\n * @param index After the update operation, which slide gallery should navigate to\n * @category lGPublicMethods\n * @example\n * const plugin = lightGallery();\n *\n * // Adding slides dynamically\n * let galleryItems = [\n * // Access existing lightGallery items\n * // galleryItems are automatically generated internally from the gallery HTML markup\n * // or directly from galleryItems when dynamic gallery is used\n * ...plugin.galleryItems,\n * ...[\n * {\n * src: 'img/img-1.png',\n * thumb: 'img/thumb1.png',\n * },\n * ],\n * ];\n * plugin.updateSlides(\n * galleryItems,\n * plugin.index,\n * );\n *\n *\n * // Remove slides dynamically\n * galleryItems = JSON.parse(\n * JSON.stringify(updateSlideInstance.galleryItems),\n * );\n * galleryItems.shift();\n * updateSlideInstance.updateSlides(galleryItems, 1);\n * @see Demo\n */\n updateSlides(items: GalleryItem[], index: number): void {\n if (this.index > items.length - 1) {\n this.index = items.length - 1;\n }\n if (items.length === 1) {\n this.index = 0;\n }\n if (!items.length) {\n this.closeGallery();\n return;\n }\n const currentSrc = this.galleryItems[index].src;\n this.galleryItems = items;\n this.updateControls();\n this.$inner.empty();\n this.currentItemsInDom = [];\n\n let _index = 0;\n // Find the current index based on source value of the slide\n this.galleryItems.some((galleryItem, itemIndex) => {\n if (galleryItem.src === currentSrc) {\n _index = itemIndex;\n return true;\n }\n return false;\n });\n\n this.currentItemsInDom = this.organizeSlideItems(_index, -1);\n this.loadContent(_index, true);\n this.getSlideItem(_index).addClass('lg-current');\n\n this.index = _index;\n this.updateCurrentCounter(_index);\n this.LGel.trigger(lGEvents.updateSlides);\n }\n\n // Get gallery items based on multiple conditions\n getItems(): GalleryItem[] {\n // Gallery items\n this.items = [];\n if (!this.settings.dynamic) {\n if (this.settings.selector === 'this') {\n this.items.push(this.el);\n } else if (this.settings.selector) {\n if (typeof this.settings.selector === 'string') {\n if (this.settings.selectWithin) {\n const selectWithin = $LG(this.settings.selectWithin);\n this.items = selectWithin\n .find(this.settings.selector)\n .get();\n } else {\n this.items = this.el.querySelectorAll(\n this.settings.selector,\n );\n }\n } else {\n this.items = this.settings.selector;\n }\n } else {\n this.items = this.el.children;\n }\n return utils.getDynamicOptions(\n this.items,\n this.settings.extraProps,\n this.settings.getCaptionFromTitleOrAlt,\n this.settings.exThumbImage,\n );\n } else {\n return this.settings.dynamicEl || [];\n }\n }\n\n shouldHideScrollbar(): boolean {\n return (\n this.settings.hideScrollbar &&\n document.body === this.settings.container\n );\n }\n\n hideScrollbar(): void {\n if (!this.shouldHideScrollbar()) {\n return;\n }\n this.bodyPaddingRight = parseFloat($LG('body').style().paddingRight);\n const bodyRect = document.documentElement.getBoundingClientRect();\n const scrollbarWidth = window.innerWidth - bodyRect.width;\n\n $LG(document.body).css(\n 'padding-right',\n scrollbarWidth + this.bodyPaddingRight + 'px',\n );\n $LG(document.body).addClass('lg-overlay-open');\n }\n\n resetScrollBar(): void {\n if (!this.shouldHideScrollbar()) {\n return;\n }\n $LG(document.body).css('padding-right', this.bodyPaddingRight + 'px');\n $LG(document.body).removeClass('lg-overlay-open');\n }\n\n /**\n * Open lightGallery.\n * Open gallery with specific slide by passing index of the slide as parameter.\n * @category lGPublicMethods\n * @param {Number} index - index of the slide\n * @param {HTMLElement} element - Which image lightGallery should zoom from\n *\n * @example\n * const $dynamicGallery = document.getElementById('dynamic-gallery-demo');\n * const dynamicGallery = lightGallery($dynamicGallery, {\n * dynamic: true,\n * dynamicEl: [\n * {\n * src: 'img/1.jpg',\n * thumb: 'img/thumb-1.jpg',\n * subHtml: '

Image 1 title

Image 1 descriptions.

',\n * },\n * ...\n * ],\n * });\n * $dynamicGallery.addEventListener('click', function () {\n * // Starts with third item.(Optional).\n * // This is useful if you want use dynamic mode with\n * // custom thumbnails (thumbnails outside gallery),\n * dynamicGallery.openGallery(2);\n * });\n *\n */\n openGallery(index = this.settings.index, element?: HTMLElement): void {\n // prevent accidental double execution\n if (this.lgOpened) return;\n this.lgOpened = true;\n this.outer.removeClass('lg-hide-items');\n\n this.hideScrollbar();\n\n // Add display block, but still has opacity 0\n this.$container.addClass('lg-show');\n\n const itemsToBeInsertedToDom = this.getItemsToBeInsertedToDom(\n index,\n index,\n );\n this.currentItemsInDom = itemsToBeInsertedToDom;\n\n let items = '';\n itemsToBeInsertedToDom.forEach((item) => {\n items = items + `
`;\n });\n\n this.$inner.append(items);\n this.addHtml(index);\n let transform: string | undefined = '';\n this.mediaContainerPosition = this.getMediaContainerPosition();\n const { top, bottom } = this.mediaContainerPosition;\n if (!this.settings.allowMediaOverlap) {\n this.setMediaContainerPosition(top, bottom);\n }\n const { __slideVideoInfo } = this.galleryItems[index];\n if (this.zoomFromOrigin && element) {\n this.currentImageSize = utils.getSize(\n element,\n this.outer,\n top + bottom,\n __slideVideoInfo && this.settings.videoMaxSize,\n );\n transform = utils.getTransform(\n element,\n this.outer,\n top,\n bottom,\n this.currentImageSize,\n );\n }\n if (!this.zoomFromOrigin || !transform) {\n this.outer.addClass(this.settings.startClass);\n this.getSlideItem(index).removeClass('lg-complete');\n }\n const timeout = this.settings.zoomFromOrigin\n ? 100\n : this.settings.backdropDuration;\n setTimeout(() => {\n this.outer.addClass('lg-components-open');\n }, timeout);\n this.index = index;\n this.LGel.trigger(lGEvents.beforeOpen);\n\n // add class lg-current to remove initial transition\n this.getSlideItem(index).addClass('lg-current');\n\n this.lGalleryOn = false;\n // Store the current scroll top value to scroll back after closing the gallery..\n this.prevScrollTop = $LG(window).scrollTop();\n\n setTimeout(() => {\n // Need to check both zoomFromOrigin and transform values as we need to set set the\n // default opening animation if user missed to add the lg-size attribute\n\n if (this.zoomFromOrigin && transform) {\n const currentSlide = this.getSlideItem(index);\n currentSlide.css('transform', transform);\n setTimeout(() => {\n currentSlide\n .addClass('lg-start-progress lg-start-end-progress')\n .css(\n 'transition-duration',\n this.settings.startAnimationDuration + 'ms',\n );\n this.outer.addClass('lg-zoom-from-image');\n });\n setTimeout(() => {\n currentSlide.css('transform', 'translate3d(0, 0, 0)');\n }, 100);\n }\n\n setTimeout(() => {\n this.$backdrop.addClass('in');\n this.$container.addClass('lg-show-in');\n }, 10);\n\n setTimeout(() => {\n if (\n this.settings.trapFocus &&\n document.body === this.settings.container\n ) {\n this.trapFocus();\n }\n }, this.settings.backdropDuration + 50);\n\n // lg-visible class resets gallery opacity to 1\n if (!this.zoomFromOrigin || !transform) {\n setTimeout(() => {\n this.outer.addClass('lg-visible');\n }, this.settings.backdropDuration);\n }\n\n // initiate slide function\n this.slide(index, false, false, false);\n\n this.LGel.trigger(lGEvents.afterOpen);\n });\n\n if (document.body === this.settings.container) {\n $LG('html').addClass('lg-on');\n }\n }\n\n /**\n * Note - Changing the position of the media on every slide transition creates a flickering effect.\n * Therefore, The height of the caption is calculated dynamically, only once based on the first slide caption.\n * if you have dynamic captions for each media,\n * you can provide an appropriate height for the captions via allowMediaOverlap option\n */\n public getMediaContainerPosition(): MediaContainerPosition {\n if (this.settings.allowMediaOverlap) {\n return {\n top: 0,\n bottom: 0,\n };\n }\n const top = this.$toolbar.get().clientHeight || 0;\n const subHtml = this.outer.find('.lg-components .lg-sub-html').get();\n const captionHeight =\n this.settings.defaultCaptionHeight ||\n (subHtml && subHtml.clientHeight) ||\n 0;\n const thumbContainer = this.outer.find('.lg-thumb-outer').get();\n const thumbHeight = thumbContainer ? thumbContainer.clientHeight : 0;\n const bottom = thumbHeight + captionHeight;\n return {\n top,\n bottom,\n };\n }\n\n private setMediaContainerPosition(top = 0, bottom = 0): void {\n this.$content.css('top', top + 'px').css('bottom', bottom + 'px');\n }\n\n hideBars(): void {\n // Hide controllers if mouse doesn't move for some period\n setTimeout(() => {\n this.outer.removeClass('lg-hide-items');\n if (this.settings.hideBarsDelay > 0) {\n this.outer.on('mousemove.lg click.lg touchstart.lg', () => {\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(() => {\n this.outer.addClass('lg-hide-items');\n }, this.settings.hideBarsDelay);\n });\n this.outer.trigger('mousemove.lg');\n }\n }, this.settings.showBarsAfter);\n }\n\n initPictureFill($img: lgQuery): void {\n if (this.settings.supportLegacyBrowser) {\n try {\n picturefill({\n elements: [$img.get()],\n });\n } catch (e) {\n console.warn(\n 'lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document.',\n );\n }\n }\n }\n\n /**\n * @desc Create image counter\n * Ex: 1/10\n */\n counter(): void {\n if (this.settings.counter) {\n const counterHtml = `
\n ${this.index + 1} /\n ${\n this.galleryItems.length\n }
`;\n this.outer.find(this.settings.appendCounterTo).append(counterHtml);\n }\n }\n\n /**\n * @desc add sub-html into the slide\n * @param {Number} index - index of the slide\n */\n addHtml(index: number): void {\n let subHtml;\n let subHtmlUrl;\n if (this.galleryItems[index].subHtmlUrl) {\n subHtmlUrl = this.galleryItems[index].subHtmlUrl;\n } else {\n subHtml = this.galleryItems[index].subHtml;\n }\n\n if (!subHtmlUrl) {\n if (subHtml) {\n // get first letter of sub-html\n // if first letter starts with . or # get the html form the jQuery object\n const fL = subHtml.substring(0, 1);\n if (fL === '.' || fL === '#') {\n try {\n if (\n this.settings.subHtmlSelectorRelative &&\n !this.settings.dynamic\n ) {\n subHtml = $LG(this.items)\n .eq(index)\n .find(subHtml)\n .first()\n .html();\n } else {\n subHtml = $LG(subHtml).first().html();\n }\n } catch (error) {\n console.warn(\n `Error processing subHtml selector \"${subHtml}\"`,\n );\n subHtml = '';\n }\n }\n } else {\n subHtml = '';\n }\n }\n\n if (this.settings.appendSubHtmlTo !== '.lg-item') {\n if (subHtmlUrl) {\n utils.fetchCaptionFromUrl(\n subHtmlUrl,\n this.outer.find('.lg-sub-html'),\n 'replace',\n );\n } else {\n this.outer.find('.lg-sub-html').html(subHtml as string);\n }\n } else {\n const currentSlide = $LG(this.getSlideItemId(index));\n if (subHtmlUrl) {\n utils.fetchCaptionFromUrl(subHtmlUrl, currentSlide, 'append');\n } else {\n currentSlide.append(\n `
${subHtml}
`,\n );\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\n .find(this.settings.appendSubHtmlTo)\n .addClass('lg-empty-html');\n } else {\n this.outer\n .find(this.settings.appendSubHtmlTo)\n .removeClass('lg-empty-html');\n }\n }\n\n this.LGel.trigger(\n lGEvents.afterAppendSubHtml,\n {\n index,\n },\n );\n }\n\n /**\n * @desc Preload slides\n * @param {Number} index - index of the slide\n * @todo preload not working for the first slide, Also, should work for the first and last slide as well\n */\n preload(index: number): void {\n for (let i = 1; i <= this.settings.preload; i++) {\n if (i >= this.galleryItems.length - index) {\n break;\n }\n\n this.loadContent(index + i, false);\n }\n\n for (let j = 1; j <= this.settings.preload; j++) {\n if (index - j < 0) {\n break;\n }\n\n this.loadContent(index - j, false);\n }\n }\n\n getDummyImgStyles(imageSize?: ImageSize): string {\n if (!imageSize) return '';\n return `width:${imageSize.width}px;\n margin-left: -${imageSize.width / 2}px;\n margin-top: -${imageSize.height / 2}px;\n height:${imageSize.height}px`;\n }\n getVideoContStyle(imageSize?: ImageSize): string {\n if (!imageSize) return '';\n return `width:${imageSize.width}px;\n height:${imageSize.height}px`;\n }\n\n getDummyImageContent(\n $currentSlide: lgQuery,\n index: number,\n alt: string,\n ): HTMLImageElement | string {\n let $currentItem;\n if (!this.settings.dynamic) {\n $currentItem = $LG(this.items).eq(index);\n }\n if ($currentItem) {\n let _dummyImgSrc;\n if (!this.settings.exThumbImage) {\n _dummyImgSrc = $currentItem.find('img').first().attr('src');\n } else {\n _dummyImgSrc = $currentItem.attr(this.settings.exThumbImage);\n }\n if (!_dummyImgSrc) return '';\n const imgStyle = this.getDummyImgStyles(this.currentImageSize);\n const dummyImgContentImg = document.createElement('img');\n dummyImgContentImg.alt = alt || '';\n dummyImgContentImg.src = _dummyImgSrc;\n dummyImgContentImg.className = `lg-dummy-img`;\n dummyImgContentImg.style.cssText = imgStyle;\n\n $currentSlide.addClass('lg-first-slide');\n this.outer.addClass('lg-first-slide-loading');\n\n return dummyImgContentImg;\n }\n return '';\n }\n\n setImgMarkup(src: string, $currentSlide: lgQuery, index: number): void {\n const currentGalleryItem = this.galleryItems[index];\n const { alt, srcset, sizes, sources } = currentGalleryItem;\n\n // Use the thumbnail as dummy image which will be resized to actual image size and\n // displayed on top of actual image\n let imgContent: string | HTMLImageElement = '';\n const altAttr = alt ? 'alt=\"' + alt + '\"' : '';\n\n if (this.isFirstSlideWithZoomAnimation()) {\n imgContent = this.getDummyImageContent(\n $currentSlide,\n index,\n altAttr,\n );\n } else {\n imgContent = utils.getImgMarkup(\n index,\n src,\n altAttr,\n srcset,\n sizes,\n sources,\n );\n }\n const picture = document.createElement('picture');\n picture.className = 'lg-img-wrap';\n $LG(picture).append(imgContent);\n $currentSlide.prepend(picture);\n }\n\n onSlideObjectLoad(\n $slide: lgQuery,\n isHTML5VideoWithoutPoster: boolean,\n onLoad: () => void,\n onError: () => void,\n ): void {\n const mediaObject = $slide.find('.lg-object').first();\n if (\n utils.isImageLoaded(mediaObject.get() as HTMLImageElement) ||\n isHTML5VideoWithoutPoster\n ) {\n onLoad();\n } else {\n mediaObject.on('load.lg error.lg', () => {\n onLoad && onLoad();\n });\n mediaObject.on('error.lg', () => {\n onError && onError();\n });\n }\n }\n\n /**\n *\n * @param $el Current slide item\n * @param index\n * @param delay Delay is 0 except first time\n * @param speed Speed is same as delay, except it is 0 if gallery is opened via hash plugin\n * @param isFirstSlide\n */\n onLgObjectLoad(\n currentSlide: lgQuery,\n index: number,\n delay: number,\n speed: number,\n isFirstSlide: boolean,\n isHTML5VideoWithoutPoster: boolean,\n ): void {\n this.onSlideObjectLoad(\n currentSlide,\n isHTML5VideoWithoutPoster,\n () => {\n this.triggerSlideItemLoad(\n currentSlide,\n index,\n delay,\n speed,\n isFirstSlide,\n );\n },\n () => {\n currentSlide.addClass('lg-complete lg-complete_');\n currentSlide.html(\n '' +\n this.settings.strings['mediaLoadingFailed'] +\n '',\n );\n },\n );\n }\n\n triggerSlideItemLoad(\n $currentSlide: lgQuery,\n index: number,\n delay: number,\n speed: number,\n isFirstSlide: boolean,\n ): void {\n const currentGalleryItem = this.galleryItems[index];\n\n // Adding delay for video slides without poster for better performance and user experience\n // Videos should start playing once once the gallery is completely loaded\n const _speed =\n isFirstSlide &&\n this.getSlideType(currentGalleryItem) === 'video' &&\n !currentGalleryItem.poster\n ? speed\n : 0;\n setTimeout(() => {\n $currentSlide.addClass('lg-complete lg-complete_');\n this.LGel.trigger(lGEvents.slideItemLoad, {\n index,\n delay: delay || 0,\n isFirstSlide,\n });\n }, _speed);\n }\n\n isFirstSlideWithZoomAnimation(): boolean {\n return !!(\n !this.lGalleryOn &&\n this.zoomFromOrigin &&\n this.currentImageSize\n );\n }\n\n // Add video slideInfo\n addSlideVideoInfo(items: GalleryItem[]): void {\n items.forEach((element, index) => {\n element.__slideVideoInfo = utils.isVideo(\n element.src as string,\n !!element.video,\n index,\n );\n if (\n element.__slideVideoInfo &&\n this.settings.loadYouTubePoster &&\n !element.poster &&\n element.__slideVideoInfo.youtube\n ) {\n element.poster = `//img.youtube.com/vi/${element.__slideVideoInfo.youtube[1]}/maxresdefault.jpg`;\n }\n });\n }\n\n /**\n * Load slide content into slide.\n * This is used to load content into slides that is not visible too\n * @param {Number} index - index of the slide.\n * @param {Boolean} rec - if true call loadcontent() function again.\n */\n loadContent(index: number, rec: boolean): void {\n const currentGalleryItem = this.galleryItems[index];\n const $currentSlide = $LG(this.getSlideItemId(index));\n\n const { poster, srcset, sizes, sources } = currentGalleryItem;\n let { src } = currentGalleryItem;\n\n const video = currentGalleryItem.video;\n\n const _html5Video =\n video && typeof video === 'string' ? JSON.parse(video) : video;\n\n if (currentGalleryItem.responsive) {\n const srcDyItms = currentGalleryItem.responsive.split(',');\n src = utils.getResponsiveSrc(srcDyItms) || src;\n }\n\n const videoInfo = currentGalleryItem.__slideVideoInfo;\n let lgVideoStyle = '';\n\n const iframe = !!currentGalleryItem.iframe;\n\n const isFirstSlide = !this.lGalleryOn;\n\n // delay for adding complete class. it is 0 except first time.\n let delay = 0;\n if (isFirstSlide) {\n if (this.zoomFromOrigin && this.currentImageSize) {\n delay = this.settings.startAnimationDuration + 10;\n } else {\n delay = this.settings.backdropDuration + 10;\n }\n }\n\n if (!$currentSlide.hasClass('lg-loaded')) {\n if (videoInfo) {\n const { top, bottom } = this.mediaContainerPosition;\n const videoSize = utils.getSize(\n this.items[index],\n this.outer,\n top + bottom,\n videoInfo && this.settings.videoMaxSize,\n );\n lgVideoStyle = this.getVideoContStyle(videoSize);\n }\n if (iframe) {\n const markup = utils.getIframeMarkup(\n this.settings.iframeWidth,\n this.settings.iframeHeight,\n this.settings.iframeMaxWidth,\n this.settings.iframeMaxHeight,\n src,\n currentGalleryItem.iframeTitle,\n );\n $currentSlide.prepend(markup);\n } else if (poster) {\n let dummyImg: string | HTMLImageElement = '';\n const hasStartAnimation =\n isFirstSlide &&\n this.zoomFromOrigin &&\n this.currentImageSize;\n if (hasStartAnimation) {\n dummyImg = this.getDummyImageContent(\n $currentSlide,\n index,\n '',\n );\n }\n\n const markup = utils.getVideoPosterMarkup(\n poster,\n dummyImg || '',\n lgVideoStyle,\n this.settings.strings['playVideo'],\n videoInfo,\n );\n $currentSlide.prepend(markup);\n } else if (videoInfo) {\n const markup = `
`;\n $currentSlide.prepend(markup);\n } else {\n this.setImgMarkup(src as string, $currentSlide, index);\n if (srcset || sources) {\n const $img = $currentSlide.find('.lg-object');\n this.initPictureFill($img);\n }\n }\n if (poster || videoInfo) {\n this.LGel.trigger(lGEvents.hasVideo, {\n index,\n src: src,\n html5Video: _html5Video,\n hasPoster: !!poster,\n });\n }\n\n this.LGel.trigger(\n lGEvents.afterAppendSlide,\n { index },\n );\n\n if (\n this.lGalleryOn &&\n this.settings.appendSubHtmlTo === '.lg-item'\n ) {\n this.addHtml(index);\n }\n }\n\n // For first time add some delay for displaying the start animation.\n let _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 && !$LG(document.body).hasClass('lg-from-hash')) {\n _speed = delay;\n }\n\n // Only for first slide and zoomFromOrigin is enabled\n if (this.isFirstSlideWithZoomAnimation()) {\n setTimeout(() => {\n $currentSlide\n .removeClass('lg-start-end-progress lg-start-progress')\n .removeAttr('style');\n }, this.settings.startAnimationDuration + 100);\n if (!$currentSlide.hasClass('lg-loaded')) {\n setTimeout(() => {\n if (this.getSlideType(currentGalleryItem) === 'image') {\n const { alt } = currentGalleryItem;\n const altAttr = alt ? 'alt=\"' + alt + '\"' : '';\n\n $currentSlide\n .find('.lg-img-wrap')\n .append(\n utils.getImgMarkup(\n index,\n src as string,\n altAttr,\n srcset,\n sizes,\n currentGalleryItem.sources,\n ),\n );\n if (srcset || sources) {\n const $img = $currentSlide.find('.lg-object');\n this.initPictureFill($img);\n }\n }\n if (\n this.getSlideType(currentGalleryItem) === 'image' ||\n (this.getSlideType(currentGalleryItem) === 'video' &&\n poster)\n ) {\n this.onLgObjectLoad(\n $currentSlide,\n index,\n delay,\n _speed,\n true,\n false,\n );\n\n // load remaining slides once the slide is completely loaded\n this.onSlideObjectLoad(\n $currentSlide,\n !!(videoInfo && videoInfo.html5 && !poster),\n () => {\n this.loadContentOnFirstSlideLoad(\n index,\n $currentSlide,\n _speed,\n );\n },\n () => {\n this.loadContentOnFirstSlideLoad(\n index,\n $currentSlide,\n _speed,\n );\n },\n );\n }\n }, this.settings.startAnimationDuration + 100);\n }\n }\n\n // SLide content has been added to dom\n $currentSlide.addClass('lg-loaded');\n\n if (\n !this.isFirstSlideWithZoomAnimation() ||\n (this.getSlideType(currentGalleryItem) === 'video' && !poster)\n ) {\n this.onLgObjectLoad(\n $currentSlide,\n index,\n delay,\n _speed,\n isFirstSlide,\n !!(videoInfo && videoInfo.html5 && !poster),\n );\n }\n\n // When gallery is opened once content is loaded (second time) need to add lg-complete class for css styling\n if (\n (!this.zoomFromOrigin || !this.currentImageSize) &&\n $currentSlide.hasClass('lg-complete_') &&\n !this.lGalleryOn\n ) {\n setTimeout(() => {\n $currentSlide.addClass('lg-complete');\n }, this.settings.backdropDuration);\n }\n\n // Content loaded\n // Need to set lGalleryOn before calling preload function\n this.lGalleryOn = true;\n\n if (rec === true) {\n if (!$currentSlide.hasClass('lg-complete_')) {\n $currentSlide\n .find('.lg-object')\n .first()\n .on('load.lg error.lg', () => {\n this.preload(index);\n });\n } else {\n this.preload(index);\n }\n }\n }\n\n /**\n * @desc Remove dummy image content and load next slides\n * Called only for the first time if zoomFromOrigin animation is enabled\n * @param index\n * @param $currentSlide\n * @param speed\n */\n loadContentOnFirstSlideLoad(\n index: number,\n $currentSlide: lgQuery,\n speed: number,\n ): void {\n setTimeout(() => {\n $currentSlide.find('.lg-dummy-img').remove();\n $currentSlide.removeClass('lg-first-slide');\n this.outer.removeClass('lg-first-slide-loading');\n this.isDummyImageRemoved = true;\n this.preload(index);\n }, speed + 300);\n }\n\n getItemsToBeInsertedToDom(\n index: number,\n prevIndex: number,\n numberOfItems = 0,\n ): string[] {\n const itemsToBeInsertedToDom: string[] = [];\n // Minimum 2 items should be there\n let possibleNumberOfItems = Math.max(numberOfItems, 3);\n possibleNumberOfItems = Math.min(\n possibleNumberOfItems,\n this.galleryItems.length,\n );\n const prevIndexItem = `lg-item-${this.lgId}-${prevIndex}`;\n if (this.galleryItems.length <= 3) {\n this.galleryItems.forEach((_element, index) => {\n itemsToBeInsertedToDom.push(`lg-item-${this.lgId}-${index}`);\n });\n return itemsToBeInsertedToDom;\n }\n\n if (index < (this.galleryItems.length - 1) / 2) {\n for (\n let idx = index;\n idx > index - possibleNumberOfItems / 2 && idx >= 0;\n idx--\n ) {\n itemsToBeInsertedToDom.push(`lg-item-${this.lgId}-${idx}`);\n }\n const numberOfExistingItems = itemsToBeInsertedToDom.length;\n for (\n let idx = 0;\n idx < possibleNumberOfItems - numberOfExistingItems;\n idx++\n ) {\n itemsToBeInsertedToDom.push(\n `lg-item-${this.lgId}-${index + idx + 1}`,\n );\n }\n } else {\n for (\n let idx = index;\n idx <= this.galleryItems.length - 1 &&\n idx < index + possibleNumberOfItems / 2;\n idx++\n ) {\n itemsToBeInsertedToDom.push(`lg-item-${this.lgId}-${idx}`);\n }\n const numberOfExistingItems = itemsToBeInsertedToDom.length;\n for (\n let idx = 0;\n idx < possibleNumberOfItems - numberOfExistingItems;\n idx++\n ) {\n itemsToBeInsertedToDom.push(\n `lg-item-${this.lgId}-${index - idx - 1}`,\n );\n }\n }\n if (this.settings.loop) {\n if (index === this.galleryItems.length - 1) {\n itemsToBeInsertedToDom.push(`lg-item-${this.lgId}-${0}`);\n } else if (index === 0) {\n itemsToBeInsertedToDom.push(\n `lg-item-${this.lgId}-${this.galleryItems.length - 1}`,\n );\n }\n }\n if (itemsToBeInsertedToDom.indexOf(prevIndexItem) === -1) {\n itemsToBeInsertedToDom.push(`lg-item-${this.lgId}-${prevIndex}`);\n }\n\n return itemsToBeInsertedToDom;\n }\n\n organizeSlideItems(index: number, prevIndex: number): string[] {\n const itemsToBeInsertedToDom = this.getItemsToBeInsertedToDom(\n index,\n prevIndex,\n this.settings.numberOfSlideItemsInDom,\n );\n\n itemsToBeInsertedToDom.forEach((item) => {\n if (this.currentItemsInDom.indexOf(item) === -1) {\n this.$inner.append(`
`);\n }\n });\n\n this.currentItemsInDom.forEach((item) => {\n if (itemsToBeInsertedToDom.indexOf(item) === -1) {\n $LG(`#${item}`).remove();\n }\n });\n return itemsToBeInsertedToDom;\n }\n\n /**\n * Get previous index of the slide\n */\n getPreviousSlideIndex(): number {\n let prevIndex = 0;\n try {\n const currentItemId = this.outer\n .find('.lg-current')\n .first()\n .attr('id');\n prevIndex = parseInt(currentItemId.split('-')[3]) || 0;\n } catch (error) {\n prevIndex = 0;\n }\n return prevIndex;\n }\n\n setDownloadValue(index: number): void {\n if (this.settings.download) {\n const currentGalleryItem = this.galleryItems[index];\n const hideDownloadBtn =\n currentGalleryItem.downloadUrl === false ||\n currentGalleryItem.downloadUrl === 'false';\n if (hideDownloadBtn) {\n this.outer.addClass('lg-hide-download');\n } else {\n const $download = this.getElementById('lg-download');\n this.outer.removeClass('lg-hide-download');\n $download.attr(\n 'href',\n currentGalleryItem.downloadUrl ||\n (currentGalleryItem.src as string),\n );\n if (currentGalleryItem.download) {\n $download.attr('download', currentGalleryItem.download);\n }\n }\n }\n }\n\n makeSlideAnimation(\n direction: 'next' | 'prev',\n currentSlideItem: lgQuery,\n previousSlideItem: lgQuery,\n ): void {\n if (this.lGalleryOn) {\n previousSlideItem.addClass('lg-slide-progress');\n }\n setTimeout(\n () => {\n // remove all transitions\n this.outer.addClass('lg-no-trans');\n\n this.outer\n .find('.lg-item')\n .removeClass('lg-prev-slide lg-next-slide');\n\n if (direction === 'prev') {\n //prevslide\n currentSlideItem.addClass('lg-prev-slide');\n previousSlideItem.addClass('lg-next-slide');\n } else {\n // next slide\n currentSlideItem.addClass('lg-next-slide');\n previousSlideItem.addClass('lg-prev-slide');\n }\n\n // give 50 ms for browser to add/remove class\n setTimeout(() => {\n this.outer.find('.lg-item').removeClass('lg-current');\n\n currentSlideItem.addClass('lg-current');\n\n // reset all transitions\n this.outer.removeClass('lg-no-trans');\n }, 50);\n },\n this.lGalleryOn ? this.settings.slideDelay : 0,\n );\n }\n\n /**\n * Goto a specific slide.\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 * @category lGPublicMethods\n * @example\n * const plugin = lightGallery();\n * // to go to 3rd slide\n * plugin.slide(2);\n *\n */\n slide(\n index: number,\n fromTouch?: boolean,\n fromThumb?: boolean,\n direction?: SlideDirection | false,\n ): void {\n const prevIndex = this.getPreviousSlideIndex();\n this.currentItemsInDom = this.organizeSlideItems(index, prevIndex);\n\n // Prevent multiple call, Required for hsh plugin\n if (this.lGalleryOn && prevIndex === index) {\n return;\n }\n\n const numberOfGalleryItems = this.galleryItems.length;\n\n if (!this.lgBusy) {\n if (this.settings.counter) {\n this.updateCurrentCounter(index);\n }\n\n const currentSlideItem = this.getSlideItem(index);\n const previousSlideItem = this.getSlideItem(prevIndex);\n\n const currentGalleryItem = this.galleryItems[index];\n const videoInfo = currentGalleryItem.__slideVideoInfo;\n\n this.outer.attr(\n 'data-lg-slide-type',\n this.getSlideType(currentGalleryItem),\n );\n this.setDownloadValue(index);\n\n if (videoInfo) {\n const { top, bottom } = this.mediaContainerPosition;\n const videoSize = utils.getSize(\n this.items[index],\n this.outer,\n top + bottom,\n videoInfo && this.settings.videoMaxSize,\n );\n this.resizeVideoSlide(index, videoSize);\n }\n\n this.LGel.trigger(lGEvents.beforeSlide, {\n prevIndex,\n index,\n fromTouch: !!fromTouch,\n fromThumb: !!fromThumb,\n });\n\n this.lgBusy = true;\n\n clearTimeout(this.hideBarTimeout);\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 this.makeSlideAnimation(\n direction as SlideDirection,\n currentSlideItem,\n previousSlideItem,\n );\n } else {\n this.outer\n .find('.lg-item')\n .removeClass('lg-prev-slide lg-current lg-next-slide');\n let touchPrev;\n let touchNext;\n if (numberOfGalleryItems > 2) {\n touchPrev = index - 1;\n touchNext = index + 1;\n\n if (index === 0 && prevIndex === numberOfGalleryItems - 1) {\n // next slide\n touchNext = 0;\n touchPrev = numberOfGalleryItems - 1;\n } else if (\n index === numberOfGalleryItems - 1 &&\n prevIndex === 0\n ) {\n // prev slide\n touchNext = 0;\n touchPrev = numberOfGalleryItems - 1;\n }\n } else {\n touchPrev = 0;\n touchNext = 1;\n }\n\n if (direction === 'prev') {\n this.getSlideItem(touchNext).addClass('lg-next-slide');\n } else {\n this.getSlideItem(touchPrev).addClass('lg-prev-slide');\n }\n\n currentSlideItem.addClass('lg-current');\n }\n\n // Do not put load content in set timeout as it needs to load immediately when the gallery is opened\n if (!this.lGalleryOn) {\n this.loadContent(index, true);\n } else {\n setTimeout(() => {\n this.loadContent(index, true);\n // Add title if this.settings.appendSubHtmlTo === lg-sub-html\n if (this.settings.appendSubHtmlTo !== '.lg-item') {\n this.addHtml(index);\n }\n }, this.settings.speed + 50 + (fromTouch ? 0 : this.settings.slideDelay));\n }\n\n setTimeout(() => {\n this.lgBusy = false;\n previousSlideItem.removeClass('lg-slide-progress');\n this.LGel.trigger(lGEvents.afterSlide, {\n prevIndex: prevIndex,\n index,\n fromTouch,\n fromThumb,\n });\n }, (this.lGalleryOn ? this.settings.speed + 100 : 100) + (fromTouch ? 0 : this.settings.slideDelay));\n }\n\n this.index = index;\n }\n\n updateCurrentCounter(index: number): void {\n this.getElementById('lg-counter-current').html(index + 1 + '');\n }\n\n updateCounterTotal(): void {\n this.getElementById('lg-counter-all').html(\n this.galleryItems.length + '',\n );\n }\n\n getSlideType(item: GalleryItem): 'video' | 'iframe' | 'image' {\n if (item.__slideVideoInfo) {\n return 'video';\n } else if (item.iframe) {\n return 'iframe';\n } else {\n return 'image';\n }\n }\n\n touchMove(startCoords: Coords, endCoords: Coords, e?: TouchEvent): void {\n const distanceX = endCoords.pageX - startCoords.pageX;\n const distanceY = endCoords.pageY - startCoords.pageY;\n let allowSwipe = false;\n\n if (this.swipeDirection) {\n allowSwipe = true;\n } else {\n if (Math.abs(distanceX) > 15) {\n this.swipeDirection = 'horizontal';\n allowSwipe = true;\n } else if (Math.abs(distanceY) > 15) {\n this.swipeDirection = 'vertical';\n allowSwipe = true;\n }\n }\n\n if (!allowSwipe) {\n return;\n }\n\n const $currentSlide = this.getSlideItem(this.index);\n\n if (this.swipeDirection === 'horizontal') {\n e?.preventDefault();\n // reset opacity and transition duration\n this.outer.addClass('lg-dragging');\n\n // move current slide\n this.setTranslate($currentSlide, distanceX, 0);\n\n // move next and prev slide with current slide\n const width = $currentSlide.get().offsetWidth;\n const slideWidthAmount = (width * 15) / 100;\n const gutter = slideWidthAmount - Math.abs((distanceX * 10) / 100);\n this.setTranslate(\n this.outer.find('.lg-prev-slide').first(),\n -width + distanceX - gutter,\n 0,\n );\n\n this.setTranslate(\n this.outer.find('.lg-next-slide').first(),\n width + distanceX + gutter,\n 0,\n );\n } else if (this.swipeDirection === 'vertical') {\n if (this.settings.swipeToClose) {\n e?.preventDefault();\n this.$container.addClass('lg-dragging-vertical');\n\n const opacity = 1 - Math.abs(distanceY) / window.innerHeight;\n this.$backdrop.css('opacity', opacity);\n\n const scale = 1 - Math.abs(distanceY) / (window.innerWidth * 2);\n this.setTranslate($currentSlide, 0, distanceY, scale, scale);\n if (Math.abs(distanceY) > 100) {\n this.outer\n .addClass('lg-hide-items')\n .removeClass('lg-components-open');\n }\n }\n }\n }\n\n touchEnd(endCoords: Coords, startCoords: Coords, event: TouchEvent): void {\n let distance;\n\n // keep slide animation for any mode while dragg/swipe\n if (this.settings.mode !== 'lg-slide') {\n this.outer.addClass('lg-slide');\n }\n\n // set transition duration\n setTimeout(() => {\n this.$container.removeClass('lg-dragging-vertical');\n this.outer\n .removeClass('lg-dragging lg-hide-items')\n .addClass('lg-components-open');\n\n let triggerClick = true;\n\n if (this.swipeDirection === 'horizontal') {\n distance = endCoords.pageX - startCoords.pageX;\n const distanceAbs = Math.abs(\n endCoords.pageX - startCoords.pageX,\n );\n if (\n distance < 0 &&\n distanceAbs > this.settings.swipeThreshold\n ) {\n this.goToNextSlide(true);\n triggerClick = false;\n } else if (\n distance > 0 &&\n distanceAbs > this.settings.swipeThreshold\n ) {\n this.goToPrevSlide(true);\n triggerClick = false;\n }\n } else if (this.swipeDirection === 'vertical') {\n distance = Math.abs(endCoords.pageY - startCoords.pageY);\n if (\n this.settings.closable &&\n this.settings.swipeToClose &&\n distance > 100\n ) {\n this.closeGallery();\n return;\n } else {\n this.$backdrop.css('opacity', 1);\n }\n }\n this.outer.find('.lg-item').removeAttr('style');\n\n if (\n triggerClick &&\n Math.abs(endCoords.pageX - startCoords.pageX) < 5\n ) {\n // Trigger click if distance is less than 5 pix\n const target = $LG(event.target);\n if (this.isPosterElement(target)) {\n this.LGel.trigger(lGEvents.posterClick);\n }\n }\n\n this.swipeDirection = undefined;\n });\n\n // remove slide class once drag/swipe is completed if mode is not slide\n setTimeout(() => {\n if (\n !this.outer.hasClass('lg-dragging') &&\n this.settings.mode !== 'lg-slide'\n ) {\n this.outer.removeClass('lg-slide');\n }\n }, this.settings.speed + 100);\n }\n\n enableSwipe(): void {\n let startCoords: Coords = {} as Coords;\n let endCoords: Coords = {} as Coords;\n let isMoved = false;\n let isSwiping = false;\n\n if (this.settings.enableSwipe) {\n this.$inner.on('touchstart.lg', (e) => {\n this.dragOrSwipeEnabled = true;\n const $item = this.getSlideItem(this.index);\n if (\n ($LG(e.target).hasClass('lg-item') ||\n $item.get().contains(e.target)) &&\n !this.outer.hasClass('lg-zoomed') &&\n !this.lgBusy &&\n e.touches.length === 1\n ) {\n isSwiping = true;\n this.touchAction = 'swipe';\n this.manageSwipeClass();\n startCoords = {\n pageX: e.touches[0].pageX,\n pageY: e.touches[0].pageY,\n };\n }\n });\n\n this.$inner.on('touchmove.lg', (e) => {\n if (\n isSwiping &&\n this.touchAction === 'swipe' &&\n e.touches.length === 1\n ) {\n endCoords = {\n pageX: e.touches[0].pageX,\n pageY: e.touches[0].pageY,\n };\n this.touchMove(startCoords, endCoords, e);\n isMoved = true;\n }\n });\n\n this.$inner.on('touchend.lg', (event: TouchEvent) => {\n if (this.touchAction === 'swipe') {\n if (isMoved) {\n isMoved = false;\n this.touchEnd(endCoords, startCoords, event);\n } else if (isSwiping) {\n const target = $LG(event.target);\n if (this.isPosterElement(target)) {\n this.LGel.trigger(lGEvents.posterClick);\n }\n }\n this.touchAction = undefined;\n isSwiping = false;\n }\n });\n }\n }\n\n enableDrag(): void {\n let startCoords: Coords = {} as Coords;\n let endCoords: Coords = {} as Coords;\n let isDraging = false;\n let isMoved = false;\n if (this.settings.enableDrag) {\n this.outer.on('mousedown.lg', (e) => {\n this.dragOrSwipeEnabled = true;\n const $item = this.getSlideItem(this.index);\n if (\n $LG(e.target).hasClass('lg-item') ||\n $item.get().contains(e.target)\n ) {\n if (!this.outer.hasClass('lg-zoomed') && !this.lgBusy) {\n e.preventDefault();\n if (!this.lgBusy) {\n this.manageSwipeClass();\n startCoords = {\n pageX: e.pageX,\n pageY: e.pageY,\n };\n isDraging = true;\n\n // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723\n this.outer.get().scrollLeft += 1;\n this.outer.get().scrollLeft -= 1;\n\n // *\n\n this.outer\n .removeClass('lg-grab')\n .addClass('lg-grabbing');\n\n this.LGel.trigger(lGEvents.dragStart);\n }\n }\n }\n });\n\n $LG(window).on(`mousemove.lg.global${this.lgId}`, (e) => {\n if (isDraging && this.lgOpened) {\n isMoved = true;\n endCoords = {\n pageX: e.pageX,\n pageY: e.pageY,\n };\n this.touchMove(startCoords, endCoords);\n this.LGel.trigger(lGEvents.dragMove);\n }\n });\n\n $LG(window).on(`mouseup.lg.global${this.lgId}`, (event) => {\n if (!this.lgOpened) {\n return;\n }\n const target = $LG(event.target);\n if (isMoved) {\n isMoved = false;\n this.touchEnd(endCoords, startCoords, event);\n this.LGel.trigger(lGEvents.dragEnd);\n } else if (this.isPosterElement(target)) {\n this.LGel.trigger(lGEvents.posterClick);\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 triggerPosterClick(): void {\n this.$inner.on('click.lg', (event) => {\n if (\n !this.dragOrSwipeEnabled &&\n this.isPosterElement($LG(event.target))\n ) {\n this.LGel.trigger(lGEvents.posterClick);\n }\n });\n }\n\n manageSwipeClass(): void {\n let _touchNext = this.index + 1;\n let _touchPrev = this.index - 1;\n if (this.settings.loop && this.galleryItems.length > 2) {\n if (this.index === 0) {\n _touchPrev = this.galleryItems.length - 1;\n } else if (this.index === this.galleryItems.length - 1) {\n _touchNext = 0;\n }\n }\n\n this.outer.find('.lg-item').removeClass('lg-next-slide lg-prev-slide');\n if (_touchPrev > -1) {\n this.getSlideItem(_touchPrev).addClass('lg-prev-slide');\n }\n\n this.getSlideItem(_touchNext).addClass('lg-next-slide');\n }\n\n /**\n * Go to next slide\n * @param {Boolean} fromTouch - true if slide function called via touch event\n * @category lGPublicMethods\n * @example\n * const plugin = lightGallery();\n * plugin.goToNextSlide();\n * @see Demo\n */\n goToNextSlide(fromTouch?: boolean): void {\n let _loop = this.settings.loop;\n if (fromTouch && this.galleryItems.length < 3) {\n _loop = false;\n }\n\n if (!this.lgBusy) {\n if (this.index + 1 < this.galleryItems.length) {\n this.index++;\n this.LGel.trigger(lGEvents.beforeNextSlide, {\n index: this.index,\n });\n this.slide(this.index, !!fromTouch, false, 'next');\n } else {\n if (_loop) {\n this.index = 0;\n this.LGel.trigger(lGEvents.beforeNextSlide, {\n index: this.index,\n });\n this.slide(this.index, !!fromTouch, false, 'next');\n } else if (this.settings.slideEndAnimation && !fromTouch) {\n this.outer.addClass('lg-right-end');\n setTimeout(() => {\n this.outer.removeClass('lg-right-end');\n }, 400);\n }\n }\n }\n }\n\n /**\n * Go to previous slides\n * @param {Boolean} fromTouch - true if slide function called via touch event\n * @category lGPublicMethods\n * @example\n * const plugin = lightGallery({});\n * plugin.goToPrevSlide();\n * @see Demo\n *\n */\n goToPrevSlide(fromTouch?: boolean): void {\n let _loop = this.settings.loop;\n if (fromTouch && this.galleryItems.length < 3) {\n _loop = false;\n }\n\n if (!this.lgBusy) {\n if (this.index > 0) {\n this.index--;\n this.LGel.trigger(lGEvents.beforePrevSlide, {\n index: this.index,\n fromTouch,\n });\n this.slide(this.index, !!fromTouch, false, 'prev');\n } else {\n if (_loop) {\n this.index = this.galleryItems.length - 1;\n this.LGel.trigger(lGEvents.beforePrevSlide, {\n index: this.index,\n fromTouch,\n });\n this.slide(this.index, !!fromTouch, false, 'prev');\n } else if (this.settings.slideEndAnimation && !fromTouch) {\n this.outer.addClass('lg-left-end');\n setTimeout(() => {\n this.outer.removeClass('lg-left-end');\n }, 400);\n }\n }\n }\n }\n\n keyPress(): void {\n $LG(window).on(`keydown.lg.global${this.lgId}`, (e) => {\n if (\n this.lgOpened &&\n this.settings.escKey === true &&\n e.keyCode === 27\n ) {\n e.preventDefault();\n if (\n this.settings.allowMediaOverlap &&\n this.outer.hasClass('lg-can-toggle') &&\n this.outer.hasClass('lg-components-open')\n ) {\n this.outer.removeClass('lg-components-open');\n } else {\n this.closeGallery();\n }\n }\n if (this.lgOpened && this.galleryItems.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 arrow(): void {\n this.getElementById('lg-prev').on('click.lg', () => {\n this.goToPrevSlide();\n });\n this.getElementById('lg-next').on('click.lg', () => {\n this.goToNextSlide();\n });\n }\n\n arrowDisable(index: number): void {\n // Disable arrows if settings.hideControlOnEnd is true\n if (!this.settings.loop && this.settings.hideControlOnEnd) {\n const $prev = this.getElementById('lg-prev');\n const $next = this.getElementById('lg-next');\n if (index + 1 === this.galleryItems.length) {\n $next.attr('disabled', 'disabled').addClass('disabled');\n } else {\n $next.removeAttr('disabled').removeClass('disabled');\n }\n\n if (index === 0) {\n $prev.attr('disabled', 'disabled').addClass('disabled');\n } else {\n $prev.removeAttr('disabled').removeClass('disabled');\n }\n }\n }\n\n setTranslate(\n $el: lgQuery,\n xValue: number,\n yValue: number,\n scaleX = 1,\n scaleY = 1,\n ): void {\n $el.css(\n 'transform',\n 'translate3d(' +\n xValue +\n 'px, ' +\n yValue +\n 'px, 0px) scale3d(' +\n scaleX +\n ', ' +\n scaleY +\n ', 1)',\n );\n }\n\n mousewheel(): void {\n let lastCall = 0;\n this.outer.on('wheel.lg', (e) => {\n if (!e.deltaY || this.galleryItems.length < 2) {\n return;\n }\n e.preventDefault();\n const now = new Date().getTime();\n if (now - lastCall < 1000) {\n return;\n }\n lastCall = now;\n if (e.deltaY > 0) {\n this.goToNextSlide();\n } else if (e.deltaY < 0) {\n this.goToPrevSlide();\n }\n });\n }\n\n isSlideElement(target: lgQuery): boolean {\n return (\n target.hasClass('lg-outer') ||\n target.hasClass('lg-item') ||\n target.hasClass('lg-img-wrap') ||\n target.hasClass('lg-img-rotate')\n );\n }\n\n isPosterElement(target: lgQuery): boolean {\n const playButton = this.getSlideItem(this.index)\n .find('.lg-video-play-button')\n .get();\n return (\n target.hasClass('lg-video-poster') ||\n target.hasClass('lg-video-play-button') ||\n (playButton && playButton.contains(target.get()))\n );\n }\n\n /**\n * Maximize minimize inline gallery.\n * @category lGPublicMethods\n */\n toggleMaximize(): void {\n this.getElementById('lg-maximize').on('click.lg', () => {\n this.$container.toggleClass('lg-inline');\n this.refreshOnResize();\n });\n }\n\n invalidateItems(): void {\n for (let index = 0; index < this.items.length; index++) {\n const element = this.items[index];\n const $element = $LG(element);\n $element.off(`click.lgcustom-item-${$element.attr('data-lg-id')}`);\n }\n }\n\n trapFocus(): void {\n this.$container.get().focus({\n preventScroll: true,\n });\n $LG(window).on(`keydown.lg.global${this.lgId}`, (e) => {\n if (!this.lgOpened) {\n return;\n }\n\n const isTabPressed = e.key === 'Tab' || e.keyCode === 9;\n if (!isTabPressed) {\n return;\n }\n const focusableEls = utils.getFocusableElements(\n this.$container.get(),\n );\n const firstFocusableEl = focusableEls[0];\n const lastFocusableEl = focusableEls[focusableEls.length - 1];\n\n if (e.shiftKey) {\n if (document.activeElement === firstFocusableEl) {\n (lastFocusableEl as HTMLElement).focus();\n e.preventDefault();\n }\n } else {\n if (document.activeElement === lastFocusableEl) {\n (firstFocusableEl as HTMLElement).focus();\n e.preventDefault();\n }\n }\n });\n }\n\n manageCloseGallery(): void {\n if (!this.settings.closable) return;\n let mousedown = false;\n this.getElementById('lg-close').on('click.lg', () => {\n this.closeGallery();\n });\n\n if (this.settings.closeOnTap) {\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', (e) => {\n const target = $LG(e.target);\n if (this.isSlideElement(target)) {\n mousedown = true;\n } else {\n mousedown = false;\n }\n });\n\n this.outer.on('mousemove.lg', () => {\n mousedown = false;\n });\n\n this.outer.on('mouseup.lg', (e) => {\n const target = $LG(e.target);\n if (this.isSlideElement(target) && mousedown) {\n if (!this.outer.hasClass('lg-dragging')) {\n this.closeGallery();\n }\n }\n });\n }\n }\n\n /**\n * Close lightGallery if it is opened.\n *\n * @description If closable is false in the settings, you need to pass true via closeGallery method to force close gallery\n * @return returns the estimated time to close gallery completely including the close animation duration\n * @category lGPublicMethods\n * @example\n * const plugin = lightGallery();\n * plugin.closeGallery();\n *\n */\n closeGallery(force?: boolean): number {\n if (!this.lgOpened || (!this.settings.closable && !force)) {\n return 0;\n }\n this.LGel.trigger(lGEvents.beforeClose);\n\n if (this.settings.resetScrollPosition && !this.settings.hideScrollbar) {\n $LG(window).scrollTop(this.prevScrollTop);\n }\n\n const currentItem = this.items[this.index];\n let transform: string | undefined;\n if (this.zoomFromOrigin && currentItem) {\n const { top, bottom } = this.mediaContainerPosition;\n const { __slideVideoInfo, poster } = this.galleryItems[this.index];\n const imageSize = utils.getSize(\n currentItem,\n this.outer,\n top + bottom,\n __slideVideoInfo && poster && this.settings.videoMaxSize,\n );\n transform = utils.getTransform(\n currentItem,\n this.outer,\n top,\n bottom,\n imageSize,\n );\n }\n if (this.zoomFromOrigin && transform) {\n this.outer.addClass('lg-closing lg-zoom-from-image');\n this.getSlideItem(this.index)\n .addClass('lg-start-end-progress')\n .css(\n 'transition-duration',\n this.settings.startAnimationDuration + 'ms',\n )\n .css('transform', transform);\n } else {\n this.outer.addClass('lg-hide-items');\n // lg-zoom-from-image is used for setting the opacity to 1 if zoomFromOrigin is true\n // If the closing item doesn't have the lg-size attribute, remove this class to avoid the closing css conflicts\n this.outer.removeClass('lg-zoom-from-image');\n }\n\n // Unbind all events added by lightGallery\n // @todo\n //this.$el.off('.lg.tm');\n\n this.destroyModules();\n\n this.lGalleryOn = false;\n this.isDummyImageRemoved = false;\n this.zoomFromOrigin = this.settings.zoomFromOrigin;\n\n clearTimeout(this.hideBarTimeout);\n this.hideBarTimeout = false;\n $LG('html').removeClass('lg-on');\n\n this.outer.removeClass('lg-visible lg-components-open');\n\n // Resetting opacity to 0 isd required as vertical swipe to close function adds inline opacity.\n this.$backdrop.removeClass('in').css('opacity', 0);\n\n const removeTimeout =\n this.zoomFromOrigin && transform\n ? Math.max(\n this.settings.startAnimationDuration,\n this.settings.backdropDuration,\n )\n : this.settings.backdropDuration;\n this.$container.removeClass('lg-show-in');\n\n // Once the closign animation is completed and gallery is invisible\n setTimeout(() => {\n if (this.zoomFromOrigin && transform) {\n this.outer.removeClass('lg-zoom-from-image');\n }\n this.$container.removeClass('lg-show');\n\n // Reset scrollbar\n this.resetScrollBar();\n\n // Need to remove inline opacity as it is used in the stylesheet as well\n this.$backdrop\n .removeAttr('style')\n .css(\n 'transition-duration',\n this.settings.backdropDuration + 'ms',\n );\n\n this.outer.removeClass(`lg-closing ${this.settings.startClass}`);\n\n this.getSlideItem(this.index).removeClass('lg-start-end-progress');\n this.$inner.empty();\n if (this.lgOpened) {\n this.LGel.trigger(lGEvents.afterClose, {\n instance: this,\n });\n }\n if (this.$container.get()) {\n this.$container.get().blur();\n }\n\n this.lgOpened = false;\n }, removeTimeout + 100);\n return removeTimeout + 100;\n }\n\n initModules(): void {\n this.plugins.forEach((module) => {\n try {\n module.init();\n } catch (err) {\n console.warn(\n `lightGallery:- make sure lightGallery module is properly initiated`,\n );\n }\n });\n }\n\n destroyModules(destroy?: true): void {\n this.plugins.forEach((module) => {\n try {\n if (destroy) {\n module.destroy();\n } else {\n module.closeGallery && module.closeGallery();\n }\n } catch (err) {\n console.warn(\n `lightGallery:- make sure lightGallery module is properly destroyed`,\n );\n }\n });\n }\n\n /**\n * Refresh lightGallery with new set of children.\n *\n * @description This is useful to update the gallery when the child elements are changed without calling destroy method.\n *\n * If you are using dynamic mode, you can pass the modified array of dynamicEl as the first parameter to refresh the dynamic gallery\n * @see Demo\n * @category lGPublicMethods\n * @example\n * const plugin = lightGallery();\n * // Delete or add children, then call\n * plugin.refresh();\n *\n */\n refresh(galleryItems?: GalleryItem[]): void {\n if (!this.settings.dynamic) {\n this.invalidateItems();\n }\n if (galleryItems) {\n this.galleryItems = galleryItems;\n } else {\n this.galleryItems = this.getItems();\n }\n this.updateControls();\n this.openGalleryOnItemClick();\n this.LGel.trigger(lGEvents.updateSlides);\n }\n\n updateControls(): void {\n this.addSlideVideoInfo(this.galleryItems);\n this.updateCounterTotal();\n this.manageSingleSlideClassName();\n }\n\n private destroyGallery(): void {\n this.destroyModules(true);\n if (!this.settings.dynamic) {\n this.invalidateItems();\n }\n $LG(window).off(`.lg.global${this.lgId}`);\n this.LGel.off('.lg');\n this.$container.remove();\n }\n\n /**\n * Destroy lightGallery.\n * Destroy lightGallery and its plugin instances completely\n *\n * @description This method also calls CloseGallery function internally. Returns the time takes to completely close and destroy the instance.\n * In case if you want to re-initialize lightGallery right after destroying it, initialize it only once the destroy process is completed.\n * You can use refresh method most of the times.\n * @category lGPublicMethods\n * @example\n * const plugin = lightGallery();\n * plugin.destroy();\n *\n */\n destroy(): number {\n const closeTimeout = this.closeGallery(true);\n if (closeTimeout) {\n setTimeout(this.destroyGallery.bind(this), closeTimeout);\n } else {\n this.destroyGallery();\n }\n return closeTimeout;\n }\n}\n","import { LightGallerySettings } from './lg-settings';\nimport { LightGallery } from './lightgallery';\n\nfunction lightGallery(\n el: HTMLElement,\n options?: LightGallerySettings,\n): LightGallery {\n return new LightGallery(el, options);\n}\nexport default lightGallery;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;;;;;AAKO,IAAM,QAAQ,GAEjB;IACA,gBAAgB,EAAE,oBAAoB;IACtC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,YAAY;IACtB,eAAe,EAAE,mBAAmB;IACpC,YAAY,EAAE,gBAAgB;IAC9B,kBAAkB,EAAE,sBAAsB;IAC1C,UAAU,EAAE,cAAc;IAC1B,SAAS,EAAE,aAAa;IACxB,aAAa,EAAE,iBAAiB;IAChC,WAAW,EAAE,eAAe;IAC5B,UAAU,EAAE,cAAc;IAC1B,WAAW,EAAE,eAAe;IAC5B,SAAS,EAAE,aAAa;IACxB,QAAQ,EAAE,YAAY;IACtB,OAAO,EAAE,WAAW;IACpB,eAAe,EAAE,mBAAmB;IACpC,eAAe,EAAE,mBAAmB;IACpC,WAAW,EAAE,eAAe;IAC5B,UAAU,EAAE,cAAc;IAC1B,UAAU,EAAE,cAAc;IAC1B,WAAW,EAAE,eAAe;IAC5B,cAAc,EAAE,kBAAkB;IAClC,YAAY,EAAE,gBAAgB;IAC9B,QAAQ,EAAE,YAAY;IACtB,aAAa,EAAE,iBAAiB;IAChC,YAAY,EAAE,gBAAg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I,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC,CAAC;SAC5D;aAAM;YACH,IAAI,CAAC,cAAc,EAAE,CAAC;SACzB;QACD,OAAO,YAAY,CAAC;KACvB;IACL,mBAAC;AAAD,CAAC;;ACt/ED,SAAS,YAAY,CACjB,EAAe,EACf,OAA8B;IAE9B,OAAO,IAAI,YAAY,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;AACzC;;"} \ No newline at end of file diff --git a/assets/lightGallery/lightgallery.min.js b/assets/lightGallery/lightgallery.min.js new file mode 100644 index 0000000..16c4a50 --- /dev/null +++ b/assets/lightGallery/lightgallery.min.js @@ -0,0 +1,8 @@ +/** + * lightgallery | 2.9.0 | October 1st 2025 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lightGallery=e()}(this,(function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,i=1,s=arguments.length;i";e.append(s)}else e.html(t)}))},E=function(t,e,i,s){void 0===i&&(i=0);var n=x(t).attr("data-lg-size")||s;if(n){var o=n.split(",");if(o[1])for(var r=window.innerWidth,l=0;lr){n=a;break}l===o.length-1&&(n=a)}var d=n.split("-"),g=parseInt(d[0],10),h=parseInt(d[1],10),c=e.width(),u=e.height()-i,m=Math.min(c,g),p=Math.min(u,h),f=Math.min(m/g,p/h);return{width:g*f,height:h*f}}},O=function(t,e,i,s,n){if(n){var o=x(t).find("img").first();if(o.get()){var r=e.get().getBoundingClientRect(),l=r.width,a=e.height()-(i+s),d=o.width(),g=o.height(),h=o.style(),c=(l-d)/2-o.offset().left+(parseFloat(h.paddingLeft)||0)+(parseFloat(h.borderLeft)||0)+x(window).scrollLeft()+r.left,u=(a-g)/2-o.offset().top+(parseFloat(h.paddingTop)||0)+(parseFloat(h.borderTop)||0)+x(window).scrollTop()+i;return"translate3d("+(c*=-1)+"px, "+(u*=-1)+"px, 0) scale3d("+d/n.width+", "+g/n.height+", 1)"}}},L=function(t,e,i,s,n,o){return'
\n \n
'},D=function(t,e,i,s,n,o){var r="',l="";o&&(l=("string"==typeof o?JSON.parse(o):o).map((function(t){var e="";return Object.keys(t).forEach((function(i){e+=" "+i+'="'+t[i]+'"'})),""})));return""+l+r},z=function(t){for(var e=[],i=[],s="",n=0;nr){s=i[l];break}return s},M=function(t){return!!t&&(!!t.complete&&0!==t.naturalWidth)},G=function(t,e,i,s,n){var o="";o=n&&n.youtube?"lg-has-youtube":n&&n.vimeo?"lg-has-vimeo":"lg-has-html5";var r=e;return"string"!=typeof e&&(r=e.outerHTML),'
\n
\n \n '+s+'\n \n \n \n \n \n \n \n
\n '+r+'\n \n
'},k=function(t){var e=t.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])');return[].filter.call(e,(function(t){var e=window.getComputedStyle(t);return"none"!==e.display&&"hidden"!==e.visibility}))},A=function(t,e,i,s){var n=[],o=function(){for(var t=0,e=0,i=arguments.length;e-1&&(d=a),d&&(e[d]=l.value)}}var g=x(t),h=g.find("img").first().attr("alt"),c=g.attr("title"),u=s?g.attr(s):g.find("img").first().attr("src");e.thumb=u,i&&!e.subHtml&&(e.subHtml=c||h||""),e.alt=h||c||"",n.push(e)})),n},B=function(){return/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)},P=function(t,e,i){if(!t)return e?{html5:!0}:void console.error("lightGallery :- data-src is not provided on slide item "+(i+1)+". Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/");var s=t.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)([\&|?][\S]*)*/i),n=t.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)(.*)?/i),o=t.match(/https?:\/\/(.+)?(wistia\.com|wi\.st)\/(medias|embed)\/([0-9a-z\-_]+)(.*)/);return s?{youtube:s}:n?{vimeo:n}:o?{wistia:o}:void 0},F=0,H=function(){function w(t,e){if(this.lgOpened=!1,this.index=0,this.plugins=[],this.lGalleryOn=!1,this.lgBusy=!1,this.currentItemsInDom=[],this.prevScrollTop=0,this.bodyPaddingRight=0,this.isDummyImageRemoved=!1,this.dragOrSwipeEnabled=!1,this.mediaContainerPosition={top:0,bottom:0},!t)return this;if(F++,this.lgId=F,this.el=t,this.LGel=x(t),this.generateSettings(e),this.buildModules(),this.settings.dynamic&&void 0!==this.settings.dynamicEl&&!Array.isArray(this.settings.dynamicEl))throw"When using dynamic mode, you must also define dynamicEl as an Array.";return this.galleryItems=this.getItems(),this.normalizeSettings(),this.init(),this.validateLicense(),this}return w.prototype.generateSettings=function(e){if(this.settings=t(t({},C),e),this.settings.isMobile&&"function"==typeof this.settings.isMobile?this.settings.isMobile():B()){var i=t(t({},this.settings.mobileSettings),this.settings.mobileSettings);this.settings=t(t({},this.settings),i)}},w.prototype.normalizeSettings=function(){if(this.settings.slideEndAnimation&&(this.settings.hideControlOnEnd=!1),this.settings.closable||(this.settings.swipeToClose=!1),this.zoomFromOrigin=this.settings.zoomFromOrigin,this.settings.dynamic&&(this.zoomFromOrigin=!1),this.settings.container){var t=this.settings.container;if("function"==typeof t)this.settings.container=t();else if("string"==typeof t){var e=document.querySelector(t);this.settings.container=null!=e?e:document.body}}else this.settings.container=document.body;this.settings.preload=Math.min(this.settings.preload,this.galleryItems.length)},w.prototype.init=function(){var t=this;this.addSlideVideoInfo(this.galleryItems),this.buildStructure(),this.LGel.trigger(i,{instance:this}),this.settings.keyPress&&this.keyPress(),setTimeout((function(){t.enableDrag(),t.enableSwipe(),t.triggerPosterClick()}),50),this.arrow(),this.settings.mousewheel&&this.mousewheel(),this.settings.dynamic||this.openGalleryOnItemClick()},w.prototype.openGalleryOnItemClick=function(){for(var t=this,e=function(e){var s=i.items[e],n=x(s),o=I.generateUUID();n.attr("data-lg-id",o).on("click.lgcustom-item-"+o,(function(i){i.preventDefault();var n=t.settings.index||e;t.openGallery(n,s)}))},i=this,s=0;s '+this.settings.prevHtml+' \n "),".lg-item"!==this.settings.appendSubHtmlTo&&(i='
');var s="";this.settings.allowMediaOverlap&&(s+="lg-media-overlap ");var n=this.settings.ariaLabelledby?'aria-labelledby="'+this.settings.ariaLabelledby+'"':"",o=this.settings.ariaDescribedby?'aria-describedby="'+this.settings.ariaDescribedby+'"':"",r="lg-container "+this.settings.addClass+" "+(document.body!==this.settings.container?"lg-inline":""),l=this.settings.closable&&this.settings.showCloseIcon?'':"",a=this.settings.showMaximizeIcon?'':"",d='\n \n ";x(this.settings.container).append(d),document.body!==this.settings.container&&x(this.settings.container).css("position","relative"),this.outer=this.getElementById("lg-outer"),this.$lgComponents=this.getElementById("lg-components"),this.$backdrop=this.getElementById("lg-backdrop"),this.$container=this.getElementById("lg-container"),this.$inner=this.getElementById("lg-inner"),this.$content=this.getElementById("lg-content"),this.$toolbar=this.getElementById("lg-toolbar"),this.$backdrop.css("transition-duration",this.settings.backdropDuration+"ms");var g=this.settings.mode+" ";this.manageSingleSlideClassName(),this.settings.enableDrag&&(g+="lg-grab "),this.outer.addClass(g),this.$inner.css("transition-timing-function",this.settings.easing),this.$inner.css("transition-duration",this.settings.speed+"ms"),this.settings.download&&this.$toolbar.append(''),this.counter(),x(window).on("resize.lg.global"+this.lgId+" orientationchange.lg.global"+this.lgId,(function(){t.refreshOnResize()})),this.hideBars(),this.manageCloseGallery(),this.toggleMaximize(),this.initModules()}},w.prototype.refreshOnResize=function(){if(this.lgOpened){var t=this.galleryItems[this.index].__slideVideoInfo;this.mediaContainerPosition=this.getMediaContainerPosition();var e=this.mediaContainerPosition,i=e.top,s=e.bottom;if(this.currentImageSize=E(this.items[this.index],this.outer,i+s,t&&this.settings.videoMaxSize),t&&this.resizeVideoSlide(this.index,this.currentImageSize),this.zoomFromOrigin&&!this.isDummyImageRemoved){var o=this.getDummyImgStyles(this.currentImageSize);this.outer.find(".lg-current .lg-dummy-img").first().attr("style",o)}this.LGel.trigger(n)}},w.prototype.resizeVideoSlide=function(t,e){var i=this.getVideoContStyle(e);this.getSlideItem(t).find(".lg-video-cont").attr("style",i)},w.prototype.updateSlides=function(t,e){if(this.index>t.length-1&&(this.index=t.length-1),1===t.length&&(this.index=0),t.length){var i=this.galleryItems[e].src;this.galleryItems=t,this.updateControls(),this.$inner.empty(),this.currentItemsInDom=[];var s=0;this.galleryItems.some((function(t,e){return t.src===i&&(s=e,!0)})),this.currentItemsInDom=this.organizeSlideItems(s,-1),this.loadContent(s,!0),this.getSlideItem(s).addClass("lg-current"),this.index=s,this.updateCurrentCounter(s),this.LGel.trigger(o)}else this.closeGallery()},w.prototype.getItems=function(){if(this.items=[],this.settings.dynamic)return this.settings.dynamicEl||[];if("this"===this.settings.selector)this.items.push(this.el);else if(this.settings.selector)if("string"==typeof this.settings.selector)if(this.settings.selectWithin){var t=x(this.settings.selectWithin);this.items=t.find(this.settings.selector).get()}else this.items=this.el.querySelectorAll(this.settings.selector);else this.items=this.settings.selector;else this.items=this.el.children;return A(this.items,this.settings.extraProps,this.settings.getCaptionFromTitleOrAlt,this.settings.exThumbImage)},w.prototype.shouldHideScrollbar=function(){return this.settings.hideScrollbar&&document.body===this.settings.container},w.prototype.hideScrollbar=function(){if(this.shouldHideScrollbar()){this.bodyPaddingRight=parseFloat(x("body").style().paddingRight);var t=document.documentElement.getBoundingClientRect(),e=window.innerWidth-t.width;x(document.body).css("padding-right",e+this.bodyPaddingRight+"px"),x(document.body).addClass("lg-overlay-open")}},w.prototype.resetScrollBar=function(){this.shouldHideScrollbar()&&(x(document.body).css("padding-right",this.bodyPaddingRight+"px"),x(document.body).removeClass("lg-overlay-open"))},w.prototype.openGallery=function(t,e){var i=this;if(void 0===t&&(t=this.settings.index),!this.lgOpened){this.lgOpened=!0,this.outer.removeClass("lg-hide-items"),this.hideScrollbar(),this.$container.addClass("lg-show");var s=this.getItemsToBeInsertedToDom(t,t);this.currentItemsInDom=s;var n="";s.forEach((function(t){n=n+'
'})),this.$inner.append(n),this.addHtml(t);var o="";this.mediaContainerPosition=this.getMediaContainerPosition();var r=this.mediaContainerPosition,d=r.top,g=r.bottom;this.settings.allowMediaOverlap||this.setMediaContainerPosition(d,g);var h=this.galleryItems[t].__slideVideoInfo;this.zoomFromOrigin&&e&&(this.currentImageSize=E(e,this.outer,d+g,h&&this.settings.videoMaxSize),o=O(e,this.outer,d,g,this.currentImageSize)),this.zoomFromOrigin&&o||(this.outer.addClass(this.settings.startClass),this.getSlideItem(t).removeClass("lg-complete"));var c=this.settings.zoomFromOrigin?100:this.settings.backdropDuration;setTimeout((function(){i.outer.addClass("lg-components-open")}),c),this.index=t,this.LGel.trigger(l),this.getSlideItem(t).addClass("lg-current"),this.lGalleryOn=!1,this.prevScrollTop=x(window).scrollTop(),setTimeout((function(){if(i.zoomFromOrigin&&o){var e=i.getSlideItem(t);e.css("transform",o),setTimeout((function(){e.addClass("lg-start-progress lg-start-end-progress").css("transition-duration",i.settings.startAnimationDuration+"ms"),i.outer.addClass("lg-zoom-from-image")})),setTimeout((function(){e.css("transform","translate3d(0, 0, 0)")}),100)}setTimeout((function(){i.$backdrop.addClass("in"),i.$container.addClass("lg-show-in")}),10),setTimeout((function(){i.settings.trapFocus&&document.body===i.settings.container&&i.trapFocus()}),i.settings.backdropDuration+50),i.zoomFromOrigin&&o||setTimeout((function(){i.outer.addClass("lg-visible")}),i.settings.backdropDuration),i.slide(t,!1,!1,!1),i.LGel.trigger(a)})),document.body===this.settings.container&&x("html").addClass("lg-on")}},w.prototype.getMediaContainerPosition=function(){if(this.settings.allowMediaOverlap)return{top:0,bottom:0};var t=this.$toolbar.get().clientHeight||0,e=this.outer.find(".lg-components .lg-sub-html").get(),i=this.settings.defaultCaptionHeight||e&&e.clientHeight||0,s=this.outer.find(".lg-thumb-outer").get();return{top:t,bottom:(s?s.clientHeight:0)+i}},w.prototype.setMediaContainerPosition=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.$content.css("top",t+"px").css("bottom",e+"px")},w.prototype.hideBars=function(){var t=this;setTimeout((function(){t.outer.removeClass("lg-hide-items"),t.settings.hideBarsDelay>0&&(t.outer.on("mousemove.lg click.lg touchstart.lg",(function(){t.outer.removeClass("lg-hide-items"),clearTimeout(t.hideBarTimeout),t.hideBarTimeout=setTimeout((function(){t.outer.addClass("lg-hide-items")}),t.settings.hideBarsDelay)})),t.outer.trigger("mousemove.lg"))}),this.settings.showBarsAfter)},w.prototype.initPictureFill=function(t){if(this.settings.supportLegacyBrowser)try{picturefill({elements:[t.get()]})}catch(t){console.warn("lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document.")}},w.prototype.counter=function(){if(this.settings.counter){var t='
\n '+(this.index+1)+' /\n '+this.galleryItems.length+"
";this.outer.find(this.settings.appendCounterTo).append(t)}},w.prototype.addHtml=function(t){var e,i;if(this.galleryItems[t].subHtmlUrl?i=this.galleryItems[t].subHtmlUrl:e=this.galleryItems[t].subHtml,!i)if(e){var s=e.substring(0,1);if("."===s||"#"===s)try{e=this.settings.subHtmlSelectorRelative&&!this.settings.dynamic?x(this.items).eq(t).find(e).first().html():x(e).first().html()}catch(t){console.warn('Error processing subHtml selector "'+e+'"'),e=""}}else e="";if(".lg-item"!==this.settings.appendSubHtmlTo)i?T(i,this.outer.find(".lg-sub-html"),"replace"):this.outer.find(".lg-sub-html").html(e);else{var n=x(this.getSlideItemId(t));i?T(i,n,"append"):n.append('
'+e+"
")}null!=e&&(""===e?this.outer.find(this.settings.appendSubHtmlTo).addClass("lg-empty-html"):this.outer.find(this.settings.appendSubHtmlTo).removeClass("lg-empty-html")),this.LGel.trigger(r,{index:t})},w.prototype.preload=function(t){for(var e=1;e<=this.settings.preload&&!(e>=this.galleryItems.length-t);e++)this.loadContent(t+e,!1);for(var i=1;i<=this.settings.preload&&!(t-i<0);i++)this.loadContent(t-i,!1)},w.prototype.getDummyImgStyles=function(t){return t?"width:"+t.width+"px;\n margin-left: -"+t.width/2+"px;\n margin-top: -"+t.height/2+"px;\n height:"+t.height+"px":""},w.prototype.getVideoContStyle=function(t){return t?"width:"+t.width+"px;\n height:"+t.height+"px":""},w.prototype.getDummyImageContent=function(t,e,i){var s;if(this.settings.dynamic||(s=x(this.items).eq(e)),s){var n=void 0;if(!(n=this.settings.exThumbImage?s.attr(this.settings.exThumbImage):s.find("img").first().attr("src")))return"";var o=this.getDummyImgStyles(this.currentImageSize),r=document.createElement("img");return r.alt=i||"",r.src=n,r.className="lg-dummy-img",r.style.cssText=o,t.addClass("lg-first-slide"),this.outer.addClass("lg-first-slide-loading"),r}return""},w.prototype.setImgMarkup=function(t,e,i){var s=this.galleryItems[i],n=s.alt,o=s.srcset,r=s.sizes,l=s.sources,a="",d=n?'alt="'+n+'"':"";a=this.isFirstSlideWithZoomAnimation()?this.getDummyImageContent(e,i,d):D(i,t,d,o,r,l);var g=document.createElement("picture");g.className="lg-img-wrap",x(g).append(a),e.prepend(g)},w.prototype.onSlideObjectLoad=function(t,e,i,s){var n=t.find(".lg-object").first();M(n.get())||e?i():(n.on("load.lg error.lg",(function(){i&&i()})),n.on("error.lg",(function(){s&&s()})))},w.prototype.onLgObjectLoad=function(t,e,i,s,n,o){var r=this;this.onSlideObjectLoad(t,o,(function(){r.triggerSlideItemLoad(t,e,i,s,n)}),(function(){t.addClass("lg-complete lg-complete_"),t.html(''+r.settings.strings.mediaLoadingFailed+"")}))},w.prototype.triggerSlideItemLoad=function(t,e,i,s,n){var o=this,r=this.galleryItems[e],l=n&&"video"===this.getSlideType(r)&&!r.poster?s:0;setTimeout((function(){t.addClass("lg-complete lg-complete_"),o.LGel.trigger(d,{index:e,delay:i||0,isFirstSlide:n})}),l)},w.prototype.isFirstSlideWithZoomAnimation=function(){return!(this.lGalleryOn||!this.zoomFromOrigin||!this.currentImageSize)},w.prototype.addSlideVideoInfo=function(t){var e=this;t.forEach((function(t,i){t.__slideVideoInfo=P(t.src,!!t.video,i),t.__slideVideoInfo&&e.settings.loadYouTubePoster&&!t.poster&&t.__slideVideoInfo.youtube&&(t.poster="//img.youtube.com/vi/"+t.__slideVideoInfo.youtube[1]+"/maxresdefault.jpg")}))},w.prototype.loadContent=function(t,i){var n=this,o=this.galleryItems[t],r=x(this.getSlideItemId(t)),l=o.poster,a=o.srcset,d=o.sizes,g=o.sources,h=o.src,c=o.video,u=c&&"string"==typeof c?JSON.parse(c):c;if(o.responsive){var m=o.responsive.split(",");h=z(m)||h}var p=o.__slideVideoInfo,f="",y=!!o.iframe,v=!this.lGalleryOn,b=0;if(v&&(b=this.zoomFromOrigin&&this.currentImageSize?this.settings.startAnimationDuration+10:this.settings.backdropDuration+10),!r.hasClass("lg-loaded")){if(p){var C=this.mediaContainerPosition,I=C.top,w=C.bottom,S=E(this.items[t],this.outer,I+w,p&&this.settings.videoMaxSize);f=this.getVideoContStyle(S)}if(y){var T=L(this.settings.iframeWidth,this.settings.iframeHeight,this.settings.iframeMaxWidth,this.settings.iframeMaxHeight,h,o.iframeTitle);r.prepend(T)}else if(l){var O="";v&&this.zoomFromOrigin&&this.currentImageSize&&(O=this.getDummyImageContent(r,t,""));T=G(l,O||"",f,this.settings.strings.playVideo,p);r.prepend(T)}else if(p){T='
';r.prepend(T)}else if(this.setImgMarkup(h,r,t),a||g){var M=r.find(".lg-object");this.initPictureFill(M)}(l||p)&&this.LGel.trigger(s,{index:t,src:h,html5Video:u,hasPoster:!!l}),this.LGel.trigger(e,{index:t}),this.lGalleryOn&&".lg-item"===this.settings.appendSubHtmlTo&&this.addHtml(t)}var k=0;b&&!x(document.body).hasClass("lg-from-hash")&&(k=b),this.isFirstSlideWithZoomAnimation()&&(setTimeout((function(){r.removeClass("lg-start-end-progress lg-start-progress").removeAttr("style")}),this.settings.startAnimationDuration+100),r.hasClass("lg-loaded")||setTimeout((function(){if("image"===n.getSlideType(o)){var e=o.alt,i=e?'alt="'+e+'"':"";if(r.find(".lg-img-wrap").append(D(t,h,i,a,d,o.sources)),a||g){var s=r.find(".lg-object");n.initPictureFill(s)}}("image"===n.getSlideType(o)||"video"===n.getSlideType(o)&&l)&&(n.onLgObjectLoad(r,t,b,k,!0,!1),n.onSlideObjectLoad(r,!(!p||!p.html5||l),(function(){n.loadContentOnFirstSlideLoad(t,r,k)}),(function(){n.loadContentOnFirstSlideLoad(t,r,k)})))}),this.settings.startAnimationDuration+100)),r.addClass("lg-loaded"),this.isFirstSlideWithZoomAnimation()&&("video"!==this.getSlideType(o)||l)||this.onLgObjectLoad(r,t,b,k,v,!(!p||!p.html5||l)),this.zoomFromOrigin&&this.currentImageSize||!r.hasClass("lg-complete_")||this.lGalleryOn||setTimeout((function(){r.addClass("lg-complete")}),this.settings.backdropDuration),this.lGalleryOn=!0,!0===i&&(r.hasClass("lg-complete_")?this.preload(t):r.find(".lg-object").first().on("load.lg error.lg",(function(){n.preload(t)})))},w.prototype.loadContentOnFirstSlideLoad=function(t,e,i){var s=this;setTimeout((function(){e.find(".lg-dummy-img").remove(),e.removeClass("lg-first-slide"),s.outer.removeClass("lg-first-slide-loading"),s.isDummyImageRemoved=!0,s.preload(t)}),i+300)},w.prototype.getItemsToBeInsertedToDom=function(t,e,i){var s=this;void 0===i&&(i=0);var n=[],o=Math.max(i,3);o=Math.min(o,this.galleryItems.length);var r="lg-item-"+this.lgId+"-"+e;if(this.galleryItems.length<=3)return this.galleryItems.forEach((function(t,e){n.push("lg-item-"+s.lgId+"-"+e)})),n;if(t<(this.galleryItems.length-1)/2){for(var l=t;l>t-o/2&&l>=0;l--)n.push("lg-item-"+this.lgId+"-"+l);var a=n.length;for(l=0;l')})),this.currentItemsInDom.forEach((function(t){-1===s.indexOf(t)&&x("#"+t).remove()})),s},w.prototype.getPreviousSlideIndex=function(){var t=0;try{var e=this.outer.find(".lg-current").first().attr("id");t=parseInt(e.split("-")[3])||0}catch(e){t=0}return t},w.prototype.setDownloadValue=function(t){if(this.settings.download){var e=this.galleryItems[t];if(!1===e.downloadUrl||"false"===e.downloadUrl)this.outer.addClass("lg-hide-download");else{var i=this.getElementById("lg-download");this.outer.removeClass("lg-hide-download"),i.attr("href",e.downloadUrl||e.src),e.download&&i.attr("download",e.download)}}},w.prototype.makeSlideAnimation=function(t,e,i){var s=this;this.lGalleryOn&&i.addClass("lg-slide-progress"),setTimeout((function(){s.outer.addClass("lg-no-trans"),s.outer.find(".lg-item").removeClass("lg-prev-slide lg-next-slide"),"prev"===t?(e.addClass("lg-prev-slide"),i.addClass("lg-next-slide")):(e.addClass("lg-next-slide"),i.addClass("lg-prev-slide")),setTimeout((function(){s.outer.find(".lg-item").removeClass("lg-current"),e.addClass("lg-current"),s.outer.removeClass("lg-no-trans")}),50)}),this.lGalleryOn?this.settings.slideDelay:0)},w.prototype.slide=function(t,e,i,s){var n=this,o=this.getPreviousSlideIndex();if(this.currentItemsInDom=this.organizeSlideItems(t,o),!this.lGalleryOn||o!==t){var r=this.galleryItems.length;if(!this.lgBusy){this.settings.counter&&this.updateCurrentCounter(t);var l=this.getSlideItem(t),a=this.getSlideItem(o),d=this.galleryItems[t],c=d.__slideVideoInfo;if(this.outer.attr("data-lg-slide-type",this.getSlideType(d)),this.setDownloadValue(t),c){var u=this.mediaContainerPosition,m=u.top,p=u.bottom,f=E(this.items[t],this.outer,m+p,c&&this.settings.videoMaxSize);this.resizeVideoSlide(t,f)}if(this.LGel.trigger(g,{prevIndex:o,index:t,fromTouch:!!e,fromThumb:!!i}),this.lgBusy=!0,clearTimeout(this.hideBarTimeout),this.arrowDisable(t),s||(to&&(s="next")),e){this.outer.find(".lg-item").removeClass("lg-prev-slide lg-current lg-next-slide");var y=void 0,v=void 0;r>2?(y=t-1,v=t+1,(0===t&&o===r-1||t===r-1&&0===o)&&(v=0,y=r-1)):(y=0,v=1),"prev"===s?this.getSlideItem(v).addClass("lg-next-slide"):this.getSlideItem(y).addClass("lg-prev-slide"),l.addClass("lg-current")}else this.makeSlideAnimation(s,l,a);this.lGalleryOn?setTimeout((function(){n.loadContent(t,!0),".lg-item"!==n.settings.appendSubHtmlTo&&n.addHtml(t)}),this.settings.speed+50+(e?0:this.settings.slideDelay)):this.loadContent(t,!0),setTimeout((function(){n.lgBusy=!1,a.removeClass("lg-slide-progress"),n.LGel.trigger(h,{prevIndex:o,index:t,fromTouch:e,fromThumb:i})}),(this.lGalleryOn?this.settings.speed+100:100)+(e?0:this.settings.slideDelay))}this.index=t}},w.prototype.updateCurrentCounter=function(t){this.getElementById("lg-counter-current").html(t+1+"")},w.prototype.updateCounterTotal=function(){this.getElementById("lg-counter-all").html(this.galleryItems.length+"")},w.prototype.getSlideType=function(t){return t.__slideVideoInfo?"video":t.iframe?"iframe":"image"},w.prototype.touchMove=function(t,e,i){var s=e.pageX-t.pageX,n=e.pageY-t.pageY,o=!1;if(this.swipeDirection?o=!0:Math.abs(s)>15?(this.swipeDirection="horizontal",o=!0):Math.abs(n)>15&&(this.swipeDirection="vertical",o=!0),o){var r=this.getSlideItem(this.index);if("horizontal"===this.swipeDirection){null==i||i.preventDefault(),this.outer.addClass("lg-dragging"),this.setTranslate(r,s,0);var l=r.get().offsetWidth,a=15*l/100-Math.abs(10*s/100);this.setTranslate(this.outer.find(".lg-prev-slide").first(),-l+s-a,0),this.setTranslate(this.outer.find(".lg-next-slide").first(),l+s+a,0)}else if("vertical"===this.swipeDirection&&this.settings.swipeToClose){null==i||i.preventDefault(),this.$container.addClass("lg-dragging-vertical");var d=1-Math.abs(n)/window.innerHeight;this.$backdrop.css("opacity",d);var g=1-Math.abs(n)/(2*window.innerWidth);this.setTranslate(r,0,n,g,g),Math.abs(n)>100&&this.outer.addClass("lg-hide-items").removeClass("lg-components-open")}}},w.prototype.touchEnd=function(t,e,i){var s,n=this;"lg-slide"!==this.settings.mode&&this.outer.addClass("lg-slide"),setTimeout((function(){n.$container.removeClass("lg-dragging-vertical"),n.outer.removeClass("lg-dragging lg-hide-items").addClass("lg-components-open");var o=!0;if("horizontal"===n.swipeDirection){s=t.pageX-e.pageX;var r=Math.abs(t.pageX-e.pageX);s<0&&r>n.settings.swipeThreshold?(n.goToNextSlide(!0),o=!1):s>0&&r>n.settings.swipeThreshold&&(n.goToPrevSlide(!0),o=!1)}else if("vertical"===n.swipeDirection){if(s=Math.abs(t.pageY-e.pageY),n.settings.closable&&n.settings.swipeToClose&&s>100)return void n.closeGallery();n.$backdrop.css("opacity",1)}if(n.outer.find(".lg-item").removeAttr("style"),o&&Math.abs(t.pageX-e.pageX)<5){var l=x(i.target);n.isPosterElement(l)&&n.LGel.trigger(c)}n.swipeDirection=void 0})),setTimeout((function(){n.outer.hasClass("lg-dragging")||"lg-slide"===n.settings.mode||n.outer.removeClass("lg-slide")}),this.settings.speed+100)},w.prototype.enableSwipe=function(){var t=this,e={},i={},s=!1,n=!1;this.settings.enableSwipe&&(this.$inner.on("touchstart.lg",(function(i){t.dragOrSwipeEnabled=!0;var s=t.getSlideItem(t.index);!x(i.target).hasClass("lg-item")&&!s.get().contains(i.target)||t.outer.hasClass("lg-zoomed")||t.lgBusy||1!==i.touches.length||(n=!0,t.touchAction="swipe",t.manageSwipeClass(),e={pageX:i.touches[0].pageX,pageY:i.touches[0].pageY})})),this.$inner.on("touchmove.lg",(function(o){n&&"swipe"===t.touchAction&&1===o.touches.length&&(i={pageX:o.touches[0].pageX,pageY:o.touches[0].pageY},t.touchMove(e,i,o),s=!0)})),this.$inner.on("touchend.lg",(function(o){if("swipe"===t.touchAction){if(s)s=!1,t.touchEnd(i,e,o);else if(n){var r=x(o.target);t.isPosterElement(r)&&t.LGel.trigger(c)}t.touchAction=void 0,n=!1}})))},w.prototype.enableDrag=function(){var t=this,e={},i={},s=!1,n=!1;this.settings.enableDrag&&(this.outer.on("mousedown.lg",(function(i){t.dragOrSwipeEnabled=!0;var n=t.getSlideItem(t.index);(x(i.target).hasClass("lg-item")||n.get().contains(i.target))&&(t.outer.hasClass("lg-zoomed")||t.lgBusy||(i.preventDefault(),t.lgBusy||(t.manageSwipeClass(),e={pageX:i.pageX,pageY:i.pageY},s=!0,t.outer.get().scrollLeft+=1,t.outer.get().scrollLeft-=1,t.outer.removeClass("lg-grab").addClass("lg-grabbing"),t.LGel.trigger(u))))})),x(window).on("mousemove.lg.global"+this.lgId,(function(o){s&&t.lgOpened&&(n=!0,i={pageX:o.pageX,pageY:o.pageY},t.touchMove(e,i),t.LGel.trigger(m))})),x(window).on("mouseup.lg.global"+this.lgId,(function(o){if(t.lgOpened){var r=x(o.target);n?(n=!1,t.touchEnd(i,e,o),t.LGel.trigger(p)):t.isPosterElement(r)&&t.LGel.trigger(c),s&&(s=!1,t.outer.removeClass("lg-grabbing").addClass("lg-grab"))}})))},w.prototype.triggerPosterClick=function(){var t=this;this.$inner.on("click.lg",(function(e){!t.dragOrSwipeEnabled&&t.isPosterElement(x(e.target))&&t.LGel.trigger(c)}))},w.prototype.manageSwipeClass=function(){var t=this.index+1,e=this.index-1;this.settings.loop&&this.galleryItems.length>2&&(0===this.index?e=this.galleryItems.length-1:this.index===this.galleryItems.length-1&&(t=0)),this.outer.find(".lg-item").removeClass("lg-next-slide lg-prev-slide"),e>-1&&this.getSlideItem(e).addClass("lg-prev-slide"),this.getSlideItem(t).addClass("lg-next-slide")},w.prototype.goToNextSlide=function(t){var e=this,i=this.settings.loop;t&&this.galleryItems.length<3&&(i=!1),this.lgBusy||(this.index+10?(this.index--,this.LGel.trigger(y,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):i?(this.index=this.galleryItems.length-1,this.LGel.trigger(y,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):this.settings.slideEndAnimation&&!t&&(this.outer.addClass("lg-left-end"),setTimeout((function(){e.outer.removeClass("lg-left-end")}),400)))},w.prototype.keyPress=function(){var t=this;x(window).on("keydown.lg.global"+this.lgId,(function(e){t.lgOpened&&!0===t.settings.escKey&&27===e.keyCode&&(e.preventDefault(),t.settings.allowMediaOverlap&&t.outer.hasClass("lg-can-toggle")&&t.outer.hasClass("lg-components-open")?t.outer.removeClass("lg-components-open"):t.closeGallery()),t.lgOpened&&t.galleryItems.length>1&&(37===e.keyCode&&(e.preventDefault(),t.goToPrevSlide()),39===e.keyCode&&(e.preventDefault(),t.goToNextSlide()))}))},w.prototype.arrow=function(){var t=this;this.getElementById("lg-prev").on("click.lg",(function(){t.goToPrevSlide()})),this.getElementById("lg-next").on("click.lg",(function(){t.goToNextSlide()}))},w.prototype.arrowDisable=function(t){if(!this.settings.loop&&this.settings.hideControlOnEnd){var e=this.getElementById("lg-prev"),i=this.getElementById("lg-next");t+1===this.galleryItems.length?i.attr("disabled","disabled").addClass("disabled"):i.removeAttr("disabled").removeClass("disabled"),0===t?e.attr("disabled","disabled").addClass("disabled"):e.removeAttr("disabled").removeClass("disabled")}},w.prototype.setTranslate=function(t,e,i,s,n){void 0===s&&(s=1),void 0===n&&(n=1),t.css("transform","translate3d("+e+"px, "+i+"px, 0px) scale3d("+s+", "+n+", 1)")},w.prototype.mousewheel=function(){var t=this,e=0;this.outer.on("wheel.lg",(function(i){if(i.deltaY&&!(t.galleryItems.length<2)){i.preventDefault();var s=(new Date).getTime();s-e<1e3||(e=s,i.deltaY>0?t.goToNextSlide():i.deltaY<0&&t.goToPrevSlide())}}))},w.prototype.isSlideElement=function(t){return t.hasClass("lg-outer")||t.hasClass("lg-item")||t.hasClass("lg-img-wrap")||t.hasClass("lg-img-rotate")},w.prototype.isPosterElement=function(t){var e=this.getSlideItem(this.index).find(".lg-video-play-button").get();return t.hasClass("lg-video-poster")||t.hasClass("lg-video-play-button")||e&&e.contains(t.get())},w.prototype.toggleMaximize=function(){var t=this;this.getElementById("lg-maximize").on("click.lg",(function(){t.$container.toggleClass("lg-inline"),t.refreshOnResize()}))},w.prototype.invalidateItems=function(){for(var t=0;t" + htmlContent + ""; + element.append(contentDiv); + } + else { + element.html(htmlContent); + } + }); + }, + /** + * get possible width and height from the lgSize attribute. Used for ZoomFromOrigin option + */ + getSize: function (el, container, spacing, defaultLgSize) { + if (spacing === void 0) { spacing = 0; } + var LGel = $LG(el); + var lgSize = LGel.attr('data-lg-size') || defaultLgSize; + if (!lgSize) { + return; + } + var isResponsiveSizes = lgSize.split(','); + // if at-least two viewport sizes are available + if (isResponsiveSizes[1]) { + var wWidth = window.innerWidth; + for (var i = 0; i < isResponsiveSizes.length; i++) { + var size_1 = isResponsiveSizes[i]; + var responsiveWidth = parseInt(size_1.split('-')[2], 10); + if (responsiveWidth > wWidth) { + lgSize = size_1; + break; + } + // take last item as last option + if (i === isResponsiveSizes.length - 1) { + lgSize = size_1; + } + } + } + var size = lgSize.split('-'); + var width = parseInt(size[0], 10); + var height = parseInt(size[1], 10); + var cWidth = container.width(); + var cHeight = container.height() - spacing; + var maxWidth = Math.min(cWidth, width); + var maxHeight = Math.min(cHeight, height); + var ratio = Math.min(maxWidth / width, maxHeight / height); + return { width: width * ratio, height: height * ratio }; + }, + /** + * @desc Get transform value based on the imageSize. Used for ZoomFromOrigin option + * @param {jQuery Element} + * @returns {String} Transform CSS string + */ + getTransform: function (el, container, top, bottom, imageSize) { + if (!imageSize) { + return; + } + var LGel = $LG(el).find('img').first(); + if (!LGel.get()) { + return; + } + var containerRect = container.get().getBoundingClientRect(); + var wWidth = containerRect.width; + // using innerWidth to include mobile safari bottom bar + var wHeight = container.height() - (top + bottom); + var elWidth = LGel.width(); + var elHeight = LGel.height(); + var elStyle = LGel.style(); + var x = (wWidth - elWidth) / 2 - + LGel.offset().left + + (parseFloat(elStyle.paddingLeft) || 0) + + (parseFloat(elStyle.borderLeft) || 0) + + $LG(window).scrollLeft() + + containerRect.left; + var y = (wHeight - elHeight) / 2 - + LGel.offset().top + + (parseFloat(elStyle.paddingTop) || 0) + + (parseFloat(elStyle.borderTop) || 0) + + $LG(window).scrollTop() + + top; + var scX = elWidth / imageSize.width; + var scY = elHeight / imageSize.height; + var transform = 'translate3d(' + + (x *= -1) + + 'px, ' + + (y *= -1) + + 'px, 0) scale3d(' + + scX + + ', ' + + scY + + ', 1)'; + return transform; + }, + getIframeMarkup: function (iframeWidth, iframeHeight, iframeMaxWidth, iframeMaxHeight, src, iframeTitle) { + var title = iframeTitle ? 'title="' + iframeTitle + '"' : ''; + return "
\n \n
"; + }, + getImgMarkup: function (index, src, altAttr, srcset, sizes, sources) { + var srcsetAttr = srcset ? "srcset=\"" + srcset + "\"" : ''; + var sizesAttr = sizes ? "sizes=\"" + sizes + "\"" : ''; + var imgMarkup = ""; + var sourceTag = ''; + if (sources) { + var sourceObj = typeof sources === 'string' ? JSON.parse(sources) : sources; + sourceTag = sourceObj.map(function (source) { + var attrs = ''; + Object.keys(source).forEach(function (key) { + // Do not remove the first space as it is required to separate the attributes + attrs += " " + key + "=\"" + source[key] + "\""; + }); + return ""; + }); + } + return "" + sourceTag + imgMarkup; + }, + // Get src from responsive src + getResponsiveSrc: function (srcItms) { + var rsWidth = []; + var rsSrc = []; + var src = ''; + for (var i = 0; i < srcItms.length; i++) { + var _src = srcItms[i].split(' '); + // Manage empty space + if (_src[0] === '') { + _src.splice(0, 1); + } + rsSrc.push(_src[0]); + rsWidth.push(_src[1]); + } + var wWidth = window.innerWidth; + for (var j = 0; j < rsWidth.length; j++) { + if (parseInt(rsWidth[j], 10) > wWidth) { + src = rsSrc[j]; + break; + } + } + return src; + }, + isImageLoaded: function (img) { + if (!img) + return false; + // During the onload event, IE correctly identifies any images that + // weren’t downloaded as not complete. Others should too. Gecko-based + // browsers act like NS4 in that they report this incorrectly. + if (!img.complete) { + return false; + } + // However, they do have two very useful properties: naturalWidth and + // naturalHeight. These give the true size of the image. If it failed + // to load, either of these should be zero. + if (img.naturalWidth === 0) { + return false; + } + // No other way of checking: assume it’s ok. + return true; + }, + getVideoPosterMarkup: function (_poster, dummyImg, videoContStyle, playVideoString, _isVideo) { + var videoClass = ''; + if (_isVideo && _isVideo.youtube) { + videoClass = 'lg-has-youtube'; + } + else if (_isVideo && _isVideo.vimeo) { + videoClass = 'lg-has-vimeo'; + } + else { + videoClass = 'lg-has-html5'; + } + var _dummy = dummyImg; + if (typeof dummyImg !== 'string') { + _dummy = dummyImg.outerHTML; + } + return "
\n
\n \n " + playVideoString + "\n \n \n \n \n \n \n \n
\n " + _dummy + "\n \n
"; + }, + getFocusableElements: function (container) { + var elements = container.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])'); + var visibleElements = [].filter.call(elements, function (element) { + var style = window.getComputedStyle(element); + return style.display !== 'none' && style.visibility !== 'hidden'; + }); + return visibleElements; + }, + /** + * @desc Create dynamic elements array from gallery items when dynamic option is false + * It helps to avoid frequent DOM interaction + * and avoid multiple checks for dynamic elments + * + * @returns {Array} dynamicEl + */ + getDynamicOptions: function (items, extraProps, getCaptionFromTitleOrAlt, exThumbImage) { + var dynamicElements = []; + var availableDynamicOptions = __spreadArrays(defaultDynamicOptions, extraProps); + [].forEach.call(items, function (item) { + var dynamicEl = {}; + for (var i = 0; i < item.attributes.length; i++) { + var attr = item.attributes[i]; + if (attr.specified) { + var dynamicAttr = convertToData(attr.name); + var label = ''; + if (availableDynamicOptions.indexOf(dynamicAttr) > -1) { + label = dynamicAttr; + } + if (label) { + dynamicEl[label] = attr.value; + } + } + } + var currentItem = $LG(item); + var alt = currentItem.find('img').first().attr('alt'); + var title = currentItem.attr('title'); + var thumb = exThumbImage + ? currentItem.attr(exThumbImage) + : currentItem.find('img').first().attr('src'); + dynamicEl.thumb = thumb; + if (getCaptionFromTitleOrAlt && !dynamicEl.subHtml) { + dynamicEl.subHtml = title || alt || ''; + } + dynamicEl.alt = alt || title || ''; + dynamicElements.push(dynamicEl); + }); + return dynamicElements; + }, + isMobile: function () { + return /iPhone|iPad|iPod|Android/i.test(navigator.userAgent); + }, + /** + * @desc Check the given src is video + * @param {String} src + * @return {Object} video type + * Ex:{ youtube : ["//www.youtube.com/watch?v=c0asJgSyxcY", "c0asJgSyxcY"] } + * + * @todo - this information can be moved to dynamicEl to avoid frequent calls + */ + isVideo: function (src, isHTML5VIdeo, index) { + if (!src) { + if (isHTML5VIdeo) { + return { + html5: true, + }; + } + else { + console.error('lightGallery :- data-src is not provided on slide item ' + + (index + 1) + + '. Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/'); + return; + } + } + var youtube = src.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)([\&|?][\S]*)*/i); + var vimeo = src.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)(.*)?/i); + var wistia = src.match(/https?:\/\/(.+)?(wistia\.com|wi\.st)\/(medias|embed)\/([0-9a-z\-_]+)(.*)/); + if (youtube) { + return { + youtube: youtube, + }; + } + else if (vimeo) { + return { + vimeo: vimeo, + }; + } + else if (wistia) { + return { + wistia: wistia, + }; + } + }, + }; + + // @ref - https://stackoverflow.com/questions/3971841/how-to-resize-images-proportionally-keeping-the-aspect-ratio + // @ref - https://2ality.com/2017/04/setting-up-multi-platform-packages.html + // Unique id for each gallery + var lgId = 0; + var LightGallery = /** @class */ (function () { + function LightGallery(element, options) { + this.lgOpened = false; + this.index = 0; + // lightGallery modules + this.plugins = []; + // false when lightGallery load first slide content; + this.lGalleryOn = false; + // True when a slide animation is in progress + this.lgBusy = false; + this.currentItemsInDom = []; + // Scroll top value before lightGallery is opened + this.prevScrollTop = 0; + this.bodyPaddingRight = 0; + this.isDummyImageRemoved = false; + this.dragOrSwipeEnabled = false; + this.mediaContainerPosition = { + top: 0, + bottom: 0, + }; + if (!element) { + return this; + } + lgId++; + this.lgId = lgId; + this.el = element; + this.LGel = $LG(element); + this.generateSettings(options); + this.buildModules(); + // When using dynamic mode, ensure dynamicEl is an array + if (this.settings.dynamic && + this.settings.dynamicEl !== undefined && + !Array.isArray(this.settings.dynamicEl)) { + throw 'When using dynamic mode, you must also define dynamicEl as an Array.'; + } + this.galleryItems = this.getItems(); + this.normalizeSettings(); + // Gallery items + this.init(); + this.validateLicense(); + return this; + } + LightGallery.prototype.generateSettings = function (options) { + // lightGallery settings + this.settings = __assign(__assign({}, lightGalleryCoreSettings), options); + if (this.settings.isMobile && + typeof this.settings.isMobile === 'function' + ? this.settings.isMobile() + : utils.isMobile()) { + var mobileSettings = __assign(__assign({}, this.settings.mobileSettings), this.settings.mobileSettings); + this.settings = __assign(__assign({}, this.settings), mobileSettings); + } + }; + LightGallery.prototype.normalizeSettings = function () { + if (this.settings.slideEndAnimation) { + this.settings.hideControlOnEnd = false; + } + if (!this.settings.closable) { + this.settings.swipeToClose = false; + } + // And reset it on close to get the correct value next time + this.zoomFromOrigin = this.settings.zoomFromOrigin; + // At the moment, Zoom from image doesn't support dynamic options + // @todo add zoomFromOrigin support for dynamic images + if (this.settings.dynamic) { + this.zoomFromOrigin = false; + } + if (this.settings.container) { + var container = this.settings.container; + if (typeof container === 'function') { + this.settings.container = container(); + } + else if (typeof container === 'string') { + var el = document.querySelector(container); + this.settings.container = el !== null && el !== void 0 ? el : document.body; + } + } + else { + this.settings.container = document.body; + } + // settings.preload should not be grater than $item.length + this.settings.preload = Math.min(this.settings.preload, this.galleryItems.length); + }; + LightGallery.prototype.init = function () { + var _this = this; + this.addSlideVideoInfo(this.galleryItems); + this.buildStructure(); + this.LGel.trigger(lGEvents.init, { + instance: this, + }); + if (this.settings.keyPress) { + this.keyPress(); + } + setTimeout(function () { + _this.enableDrag(); + _this.enableSwipe(); + _this.triggerPosterClick(); + }, 50); + this.arrow(); + if (this.settings.mousewheel) { + this.mousewheel(); + } + if (!this.settings.dynamic) { + this.openGalleryOnItemClick(); + } + }; + LightGallery.prototype.openGalleryOnItemClick = function () { + var _this = this; + var _loop_1 = function (index) { + var element = this_1.items[index]; + var $element = $LG(element); + // Using different namespace for click because click event should not unbind if selector is same object('this') + // @todo manage all event listners - should have namespace that represent element + var uuid = lgQuery.generateUUID(); + $element + .attr('data-lg-id', uuid) + .on("click.lgcustom-item-" + uuid, function (e) { + e.preventDefault(); + var currentItemIndex = _this.settings.index || index; + _this.openGallery(currentItemIndex, element); + }); + }; + var this_1 = this; + // Using for loop instead of using bubbling as the items can be any html element. + for (var index = 0; index < this.items.length; index++) { + _loop_1(index); + } + }; + /** + * Module constructor + * Modules are build incrementally. + * Gallery should be opened only once all the modules are initialized. + * use moduleBuildTimeout to make sure this + */ + LightGallery.prototype.buildModules = function () { + var _this = this; + this.settings.plugins.forEach(function (plugin) { + _this.plugins.push(new plugin(_this, $LG)); + }); + }; + LightGallery.prototype.validateLicense = function () { + if (!this.settings.licenseKey) { + console.error('Please provide a valid license key'); + } + else if (this.settings.licenseKey === '0000-0000-000-0000') { + console.warn("lightGallery: " + this.settings.licenseKey + " license key is not valid for production use"); + } + }; + LightGallery.prototype.getSlideItem = function (index) { + return $LG(this.getSlideItemId(index)); + }; + LightGallery.prototype.getSlideItemId = function (index) { + return "#lg-item-" + this.lgId + "-" + index; + }; + LightGallery.prototype.getIdName = function (id) { + return id + "-" + this.lgId; + }; + LightGallery.prototype.getElementById = function (id) { + return $LG("#" + this.getIdName(id)); + }; + LightGallery.prototype.manageSingleSlideClassName = function () { + if (this.galleryItems.length < 2) { + this.outer.addClass('lg-single-item'); + } + else { + this.outer.removeClass('lg-single-item'); + } + }; + LightGallery.prototype.buildStructure = function () { + var _this = this; + var container = this.$container && this.$container.get(); + if (container) { + return; + } + var controls = ''; + var subHtmlCont = ''; + // Create controls + if (this.settings.controls) { + controls = "\n "; + } + if (this.settings.appendSubHtmlTo !== '.lg-item') { + subHtmlCont = + '
'; + } + var addClasses = ''; + if (this.settings.allowMediaOverlap) { + // Do not remove space before last single quote + addClasses += 'lg-media-overlap '; + } + var ariaLabelledby = this.settings.ariaLabelledby + ? 'aria-labelledby="' + this.settings.ariaLabelledby + '"' + : ''; + var ariaDescribedby = this.settings.ariaDescribedby + ? 'aria-describedby="' + this.settings.ariaDescribedby + '"' + : ''; + var containerClassName = "lg-container " + this.settings.addClass + " " + (document.body !== this.settings.container ? 'lg-inline' : ''); + var closeIcon = this.settings.closable && this.settings.showCloseIcon + ? "" + : ''; + var maximizeIcon = this.settings.showMaximizeIcon + ? "" + : ''; + var template = "\n
\n
\n\n
\n\n
\n
\n
\n " + controls + "\n
\n
\n " + maximizeIcon + "\n " + closeIcon + "\n
\n " + (this.settings.appendSubHtmlTo === '.lg-outer' + ? subHtmlCont + : '') + "\n
\n " + (this.settings.appendSubHtmlTo === '.lg-sub-html' + ? subHtmlCont + : '') + "\n
\n
\n
\n "; + $LG(this.settings.container).append(template); + if (document.body !== this.settings.container) { + $LG(this.settings.container).css('position', 'relative'); + } + this.outer = this.getElementById('lg-outer'); + this.$lgComponents = this.getElementById('lg-components'); + this.$backdrop = this.getElementById('lg-backdrop'); + this.$container = this.getElementById('lg-container'); + this.$inner = this.getElementById('lg-inner'); + this.$content = this.getElementById('lg-content'); + this.$toolbar = this.getElementById('lg-toolbar'); + this.$backdrop.css('transition-duration', this.settings.backdropDuration + 'ms'); + var outerClassNames = this.settings.mode + " "; + this.manageSingleSlideClassName(); + if (this.settings.enableDrag) { + outerClassNames += 'lg-grab '; + } + this.outer.addClass(outerClassNames); + this.$inner.css('transition-timing-function', this.settings.easing); + this.$inner.css('transition-duration', this.settings.speed + 'ms'); + if (this.settings.download) { + this.$toolbar.append(""); + } + this.counter(); + $LG(window).on("resize.lg.global" + this.lgId + " orientationchange.lg.global" + this.lgId, function () { + _this.refreshOnResize(); + }); + this.hideBars(); + this.manageCloseGallery(); + this.toggleMaximize(); + this.initModules(); + }; + LightGallery.prototype.refreshOnResize = function () { + if (this.lgOpened) { + var currentGalleryItem = this.galleryItems[this.index]; + var __slideVideoInfo = currentGalleryItem.__slideVideoInfo; + this.mediaContainerPosition = this.getMediaContainerPosition(); + var _a = this.mediaContainerPosition, top_1 = _a.top, bottom = _a.bottom; + this.currentImageSize = utils.getSize(this.items[this.index], this.outer, top_1 + bottom, __slideVideoInfo && this.settings.videoMaxSize); + if (__slideVideoInfo) { + this.resizeVideoSlide(this.index, this.currentImageSize); + } + if (this.zoomFromOrigin && !this.isDummyImageRemoved) { + var imgStyle = this.getDummyImgStyles(this.currentImageSize); + this.outer + .find('.lg-current .lg-dummy-img') + .first() + .attr('style', imgStyle); + } + this.LGel.trigger(lGEvents.containerResize); + } + }; + LightGallery.prototype.resizeVideoSlide = function (index, imageSize) { + var lgVideoStyle = this.getVideoContStyle(imageSize); + var currentSlide = this.getSlideItem(index); + currentSlide.find('.lg-video-cont').attr('style', lgVideoStyle); + }; + /** + * Update slides dynamically. + * Add, edit or delete slides dynamically when lightGallery is opened. + * Modify the current gallery items and pass it via updateSlides method + * @note + * - Do not mutate existing lightGallery items directly. + * - Always pass new list of gallery items + * - You need to take care of thumbnails outside the gallery if any + * - user this method only if you want to update slides when the gallery is opened. Otherwise, use `refresh()` method. + * @param items Gallery items + * @param index After the update operation, which slide gallery should navigate to + * @category lGPublicMethods + * @example + * const plugin = lightGallery(); + * + * // Adding slides dynamically + * let galleryItems = [ + * // Access existing lightGallery items + * // galleryItems are automatically generated internally from the gallery HTML markup + * // or directly from galleryItems when dynamic gallery is used + * ...plugin.galleryItems, + * ...[ + * { + * src: 'img/img-1.png', + * thumb: 'img/thumb1.png', + * }, + * ], + * ]; + * plugin.updateSlides( + * galleryItems, + * plugin.index, + * ); + * + * + * // Remove slides dynamically + * galleryItems = JSON.parse( + * JSON.stringify(updateSlideInstance.galleryItems), + * ); + * galleryItems.shift(); + * updateSlideInstance.updateSlides(galleryItems, 1); + * @see Demo + */ + LightGallery.prototype.updateSlides = function (items, index) { + if (this.index > items.length - 1) { + this.index = items.length - 1; + } + if (items.length === 1) { + this.index = 0; + } + if (!items.length) { + this.closeGallery(); + return; + } + var currentSrc = this.galleryItems[index].src; + this.galleryItems = items; + this.updateControls(); + this.$inner.empty(); + this.currentItemsInDom = []; + var _index = 0; + // Find the current index based on source value of the slide + this.galleryItems.some(function (galleryItem, itemIndex) { + if (galleryItem.src === currentSrc) { + _index = itemIndex; + return true; + } + return false; + }); + this.currentItemsInDom = this.organizeSlideItems(_index, -1); + this.loadContent(_index, true); + this.getSlideItem(_index).addClass('lg-current'); + this.index = _index; + this.updateCurrentCounter(_index); + this.LGel.trigger(lGEvents.updateSlides); + }; + // Get gallery items based on multiple conditions + LightGallery.prototype.getItems = function () { + // Gallery items + this.items = []; + if (!this.settings.dynamic) { + if (this.settings.selector === 'this') { + this.items.push(this.el); + } + else if (this.settings.selector) { + if (typeof this.settings.selector === 'string') { + if (this.settings.selectWithin) { + var selectWithin = $LG(this.settings.selectWithin); + this.items = selectWithin + .find(this.settings.selector) + .get(); + } + else { + this.items = this.el.querySelectorAll(this.settings.selector); + } + } + else { + this.items = this.settings.selector; + } + } + else { + this.items = this.el.children; + } + return utils.getDynamicOptions(this.items, this.settings.extraProps, this.settings.getCaptionFromTitleOrAlt, this.settings.exThumbImage); + } + else { + return this.settings.dynamicEl || []; + } + }; + LightGallery.prototype.shouldHideScrollbar = function () { + return (this.settings.hideScrollbar && + document.body === this.settings.container); + }; + LightGallery.prototype.hideScrollbar = function () { + if (!this.shouldHideScrollbar()) { + return; + } + this.bodyPaddingRight = parseFloat($LG('body').style().paddingRight); + var bodyRect = document.documentElement.getBoundingClientRect(); + var scrollbarWidth = window.innerWidth - bodyRect.width; + $LG(document.body).css('padding-right', scrollbarWidth + this.bodyPaddingRight + 'px'); + $LG(document.body).addClass('lg-overlay-open'); + }; + LightGallery.prototype.resetScrollBar = function () { + if (!this.shouldHideScrollbar()) { + return; + } + $LG(document.body).css('padding-right', this.bodyPaddingRight + 'px'); + $LG(document.body).removeClass('lg-overlay-open'); + }; + /** + * Open lightGallery. + * Open gallery with specific slide by passing index of the slide as parameter. + * @category lGPublicMethods + * @param {Number} index - index of the slide + * @param {HTMLElement} element - Which image lightGallery should zoom from + * + * @example + * const $dynamicGallery = document.getElementById('dynamic-gallery-demo'); + * const dynamicGallery = lightGallery($dynamicGallery, { + * dynamic: true, + * dynamicEl: [ + * { + * src: 'img/1.jpg', + * thumb: 'img/thumb-1.jpg', + * subHtml: '

Image 1 title

Image 1 descriptions.

', + * }, + * ... + * ], + * }); + * $dynamicGallery.addEventListener('click', function () { + * // Starts with third item.(Optional). + * // This is useful if you want use dynamic mode with + * // custom thumbnails (thumbnails outside gallery), + * dynamicGallery.openGallery(2); + * }); + * + */ + LightGallery.prototype.openGallery = function (index, element) { + var _this = this; + if (index === void 0) { index = this.settings.index; } + // prevent accidental double execution + if (this.lgOpened) + return; + this.lgOpened = true; + this.outer.removeClass('lg-hide-items'); + this.hideScrollbar(); + // Add display block, but still has opacity 0 + this.$container.addClass('lg-show'); + var itemsToBeInsertedToDom = this.getItemsToBeInsertedToDom(index, index); + this.currentItemsInDom = itemsToBeInsertedToDom; + var items = ''; + itemsToBeInsertedToDom.forEach(function (item) { + items = items + ("
"); + }); + this.$inner.append(items); + this.addHtml(index); + var transform = ''; + this.mediaContainerPosition = this.getMediaContainerPosition(); + var _a = this.mediaContainerPosition, top = _a.top, bottom = _a.bottom; + if (!this.settings.allowMediaOverlap) { + this.setMediaContainerPosition(top, bottom); + } + var __slideVideoInfo = this.galleryItems[index].__slideVideoInfo; + if (this.zoomFromOrigin && element) { + this.currentImageSize = utils.getSize(element, this.outer, top + bottom, __slideVideoInfo && this.settings.videoMaxSize); + transform = utils.getTransform(element, this.outer, top, bottom, this.currentImageSize); + } + if (!this.zoomFromOrigin || !transform) { + this.outer.addClass(this.settings.startClass); + this.getSlideItem(index).removeClass('lg-complete'); + } + var timeout = this.settings.zoomFromOrigin + ? 100 + : this.settings.backdropDuration; + setTimeout(function () { + _this.outer.addClass('lg-components-open'); + }, timeout); + this.index = index; + this.LGel.trigger(lGEvents.beforeOpen); + // add class lg-current to remove initial transition + this.getSlideItem(index).addClass('lg-current'); + this.lGalleryOn = false; + // Store the current scroll top value to scroll back after closing the gallery.. + this.prevScrollTop = $LG(window).scrollTop(); + setTimeout(function () { + // Need to check both zoomFromOrigin and transform values as we need to set set the + // default opening animation if user missed to add the lg-size attribute + if (_this.zoomFromOrigin && transform) { + var currentSlide_1 = _this.getSlideItem(index); + currentSlide_1.css('transform', transform); + setTimeout(function () { + currentSlide_1 + .addClass('lg-start-progress lg-start-end-progress') + .css('transition-duration', _this.settings.startAnimationDuration + 'ms'); + _this.outer.addClass('lg-zoom-from-image'); + }); + setTimeout(function () { + currentSlide_1.css('transform', 'translate3d(0, 0, 0)'); + }, 100); + } + setTimeout(function () { + _this.$backdrop.addClass('in'); + _this.$container.addClass('lg-show-in'); + }, 10); + setTimeout(function () { + if (_this.settings.trapFocus && + document.body === _this.settings.container) { + _this.trapFocus(); + } + }, _this.settings.backdropDuration + 50); + // lg-visible class resets gallery opacity to 1 + if (!_this.zoomFromOrigin || !transform) { + setTimeout(function () { + _this.outer.addClass('lg-visible'); + }, _this.settings.backdropDuration); + } + // initiate slide function + _this.slide(index, false, false, false); + _this.LGel.trigger(lGEvents.afterOpen); + }); + if (document.body === this.settings.container) { + $LG('html').addClass('lg-on'); + } + }; + /** + * Note - Changing the position of the media on every slide transition creates a flickering effect. + * Therefore, The height of the caption is calculated dynamically, only once based on the first slide caption. + * if you have dynamic captions for each media, + * you can provide an appropriate height for the captions via allowMediaOverlap option + */ + LightGallery.prototype.getMediaContainerPosition = function () { + if (this.settings.allowMediaOverlap) { + return { + top: 0, + bottom: 0, + }; + } + var top = this.$toolbar.get().clientHeight || 0; + var subHtml = this.outer.find('.lg-components .lg-sub-html').get(); + var captionHeight = this.settings.defaultCaptionHeight || + (subHtml && subHtml.clientHeight) || + 0; + var thumbContainer = this.outer.find('.lg-thumb-outer').get(); + var thumbHeight = thumbContainer ? thumbContainer.clientHeight : 0; + var bottom = thumbHeight + captionHeight; + return { + top: top, + bottom: bottom, + }; + }; + LightGallery.prototype.setMediaContainerPosition = function (top, bottom) { + if (top === void 0) { top = 0; } + if (bottom === void 0) { bottom = 0; } + this.$content.css('top', top + 'px').css('bottom', bottom + 'px'); + }; + LightGallery.prototype.hideBars = function () { + var _this = this; + // Hide controllers if mouse doesn't move for some period + setTimeout(function () { + _this.outer.removeClass('lg-hide-items'); + if (_this.settings.hideBarsDelay > 0) { + _this.outer.on('mousemove.lg click.lg touchstart.lg', function () { + _this.outer.removeClass('lg-hide-items'); + clearTimeout(_this.hideBarTimeout); + // Timeout will be cleared on each slide movement also + _this.hideBarTimeout = setTimeout(function () { + _this.outer.addClass('lg-hide-items'); + }, _this.settings.hideBarsDelay); + }); + _this.outer.trigger('mousemove.lg'); + } + }, this.settings.showBarsAfter); + }; + LightGallery.prototype.initPictureFill = function ($img) { + if (this.settings.supportLegacyBrowser) { + try { + picturefill({ + elements: [$img.get()], + }); + } + catch (e) { + console.warn('lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document.'); + } + } + }; + /** + * @desc Create image counter + * Ex: 1/10 + */ + LightGallery.prototype.counter = function () { + if (this.settings.counter) { + var counterHtml = "
\n " + (this.index + 1) + " /\n " + this.galleryItems.length + "
"; + this.outer.find(this.settings.appendCounterTo).append(counterHtml); + } + }; + /** + * @desc add sub-html into the slide + * @param {Number} index - index of the slide + */ + LightGallery.prototype.addHtml = function (index) { + var subHtml; + var subHtmlUrl; + if (this.galleryItems[index].subHtmlUrl) { + subHtmlUrl = this.galleryItems[index].subHtmlUrl; + } + else { + subHtml = this.galleryItems[index].subHtml; + } + if (!subHtmlUrl) { + if (subHtml) { + // get first letter of sub-html + // if first letter starts with . or # get the html form the jQuery object + var fL = subHtml.substring(0, 1); + if (fL === '.' || fL === '#') { + try { + if (this.settings.subHtmlSelectorRelative && + !this.settings.dynamic) { + subHtml = $LG(this.items) + .eq(index) + .find(subHtml) + .first() + .html(); + } + else { + subHtml = $LG(subHtml).first().html(); + } + } + catch (error) { + console.warn("Error processing subHtml selector \"" + subHtml + "\""); + subHtml = ''; + } + } + } + else { + subHtml = ''; + } + } + if (this.settings.appendSubHtmlTo !== '.lg-item') { + if (subHtmlUrl) { + utils.fetchCaptionFromUrl(subHtmlUrl, this.outer.find('.lg-sub-html'), 'replace'); + } + else { + this.outer.find('.lg-sub-html').html(subHtml); + } + } + else { + var currentSlide = $LG(this.getSlideItemId(index)); + if (subHtmlUrl) { + utils.fetchCaptionFromUrl(subHtmlUrl, currentSlide, 'append'); + } + else { + currentSlide.append("
" + subHtml + "
"); + } + } + // Add lg-empty-html class if title doesn't exist + if (typeof subHtml !== 'undefined' && subHtml !== null) { + if (subHtml === '') { + this.outer + .find(this.settings.appendSubHtmlTo) + .addClass('lg-empty-html'); + } + else { + this.outer + .find(this.settings.appendSubHtmlTo) + .removeClass('lg-empty-html'); + } + } + this.LGel.trigger(lGEvents.afterAppendSubHtml, { + index: index, + }); + }; + /** + * @desc Preload slides + * @param {Number} index - index of the slide + * @todo preload not working for the first slide, Also, should work for the first and last slide as well + */ + LightGallery.prototype.preload = function (index) { + for (var i = 1; i <= this.settings.preload; i++) { + if (i >= this.galleryItems.length - index) { + break; + } + this.loadContent(index + i, false); + } + for (var j = 1; j <= this.settings.preload; j++) { + if (index - j < 0) { + break; + } + this.loadContent(index - j, false); + } + }; + LightGallery.prototype.getDummyImgStyles = function (imageSize) { + if (!imageSize) + return ''; + return "width:" + imageSize.width + "px;\n margin-left: -" + imageSize.width / 2 + "px;\n margin-top: -" + imageSize.height / 2 + "px;\n height:" + imageSize.height + "px"; + }; + LightGallery.prototype.getVideoContStyle = function (imageSize) { + if (!imageSize) + return ''; + return "width:" + imageSize.width + "px;\n height:" + imageSize.height + "px"; + }; + LightGallery.prototype.getDummyImageContent = function ($currentSlide, index, alt) { + var $currentItem; + if (!this.settings.dynamic) { + $currentItem = $LG(this.items).eq(index); + } + if ($currentItem) { + var _dummyImgSrc = void 0; + if (!this.settings.exThumbImage) { + _dummyImgSrc = $currentItem.find('img').first().attr('src'); + } + else { + _dummyImgSrc = $currentItem.attr(this.settings.exThumbImage); + } + if (!_dummyImgSrc) + return ''; + var imgStyle = this.getDummyImgStyles(this.currentImageSize); + var dummyImgContentImg = document.createElement('img'); + dummyImgContentImg.alt = alt || ''; + dummyImgContentImg.src = _dummyImgSrc; + dummyImgContentImg.className = "lg-dummy-img"; + dummyImgContentImg.style.cssText = imgStyle; + $currentSlide.addClass('lg-first-slide'); + this.outer.addClass('lg-first-slide-loading'); + return dummyImgContentImg; + } + return ''; + }; + LightGallery.prototype.setImgMarkup = function (src, $currentSlide, index) { + var currentGalleryItem = this.galleryItems[index]; + var alt = currentGalleryItem.alt, srcset = currentGalleryItem.srcset, sizes = currentGalleryItem.sizes, sources = currentGalleryItem.sources; + // Use the thumbnail as dummy image which will be resized to actual image size and + // displayed on top of actual image + var imgContent = ''; + var altAttr = alt ? 'alt="' + alt + '"' : ''; + if (this.isFirstSlideWithZoomAnimation()) { + imgContent = this.getDummyImageContent($currentSlide, index, altAttr); + } + else { + imgContent = utils.getImgMarkup(index, src, altAttr, srcset, sizes, sources); + } + var picture = document.createElement('picture'); + picture.className = 'lg-img-wrap'; + $LG(picture).append(imgContent); + $currentSlide.prepend(picture); + }; + LightGallery.prototype.onSlideObjectLoad = function ($slide, isHTML5VideoWithoutPoster, onLoad, onError) { + var mediaObject = $slide.find('.lg-object').first(); + if (utils.isImageLoaded(mediaObject.get()) || + isHTML5VideoWithoutPoster) { + onLoad(); + } + else { + mediaObject.on('load.lg error.lg', function () { + onLoad && onLoad(); + }); + mediaObject.on('error.lg', function () { + onError && onError(); + }); + } + }; + /** + * + * @param $el Current slide item + * @param index + * @param delay Delay is 0 except first time + * @param speed Speed is same as delay, except it is 0 if gallery is opened via hash plugin + * @param isFirstSlide + */ + LightGallery.prototype.onLgObjectLoad = function (currentSlide, index, delay, speed, isFirstSlide, isHTML5VideoWithoutPoster) { + var _this = this; + this.onSlideObjectLoad(currentSlide, isHTML5VideoWithoutPoster, function () { + _this.triggerSlideItemLoad(currentSlide, index, delay, speed, isFirstSlide); + }, function () { + currentSlide.addClass('lg-complete lg-complete_'); + currentSlide.html('' + + _this.settings.strings['mediaLoadingFailed'] + + ''); + }); + }; + LightGallery.prototype.triggerSlideItemLoad = function ($currentSlide, index, delay, speed, isFirstSlide) { + var _this = this; + var currentGalleryItem = this.galleryItems[index]; + // Adding delay for video slides without poster for better performance and user experience + // Videos should start playing once once the gallery is completely loaded + var _speed = isFirstSlide && + this.getSlideType(currentGalleryItem) === 'video' && + !currentGalleryItem.poster + ? speed + : 0; + setTimeout(function () { + $currentSlide.addClass('lg-complete lg-complete_'); + _this.LGel.trigger(lGEvents.slideItemLoad, { + index: index, + delay: delay || 0, + isFirstSlide: isFirstSlide, + }); + }, _speed); + }; + LightGallery.prototype.isFirstSlideWithZoomAnimation = function () { + return !!(!this.lGalleryOn && + this.zoomFromOrigin && + this.currentImageSize); + }; + // Add video slideInfo + LightGallery.prototype.addSlideVideoInfo = function (items) { + var _this = this; + items.forEach(function (element, index) { + element.__slideVideoInfo = utils.isVideo(element.src, !!element.video, index); + if (element.__slideVideoInfo && + _this.settings.loadYouTubePoster && + !element.poster && + element.__slideVideoInfo.youtube) { + element.poster = "//img.youtube.com/vi/" + element.__slideVideoInfo.youtube[1] + "/maxresdefault.jpg"; + } + }); + }; + /** + * Load slide content into slide. + * This is used to load content into slides that is not visible too + * @param {Number} index - index of the slide. + * @param {Boolean} rec - if true call loadcontent() function again. + */ + LightGallery.prototype.loadContent = function (index, rec) { + var _this = this; + var currentGalleryItem = this.galleryItems[index]; + var $currentSlide = $LG(this.getSlideItemId(index)); + var poster = currentGalleryItem.poster, srcset = currentGalleryItem.srcset, sizes = currentGalleryItem.sizes, sources = currentGalleryItem.sources; + var src = currentGalleryItem.src; + var video = currentGalleryItem.video; + var _html5Video = video && typeof video === 'string' ? JSON.parse(video) : video; + if (currentGalleryItem.responsive) { + var srcDyItms = currentGalleryItem.responsive.split(','); + src = utils.getResponsiveSrc(srcDyItms) || src; + } + var videoInfo = currentGalleryItem.__slideVideoInfo; + var lgVideoStyle = ''; + var iframe = !!currentGalleryItem.iframe; + var isFirstSlide = !this.lGalleryOn; + // delay for adding complete class. it is 0 except first time. + var delay = 0; + if (isFirstSlide) { + if (this.zoomFromOrigin && this.currentImageSize) { + delay = this.settings.startAnimationDuration + 10; + } + else { + delay = this.settings.backdropDuration + 10; + } + } + if (!$currentSlide.hasClass('lg-loaded')) { + if (videoInfo) { + var _a = this.mediaContainerPosition, top_2 = _a.top, bottom = _a.bottom; + var videoSize = utils.getSize(this.items[index], this.outer, top_2 + bottom, videoInfo && this.settings.videoMaxSize); + lgVideoStyle = this.getVideoContStyle(videoSize); + } + if (iframe) { + var markup = utils.getIframeMarkup(this.settings.iframeWidth, this.settings.iframeHeight, this.settings.iframeMaxWidth, this.settings.iframeMaxHeight, src, currentGalleryItem.iframeTitle); + $currentSlide.prepend(markup); + } + else if (poster) { + var dummyImg = ''; + var hasStartAnimation = isFirstSlide && + this.zoomFromOrigin && + this.currentImageSize; + if (hasStartAnimation) { + dummyImg = this.getDummyImageContent($currentSlide, index, ''); + } + var markup = utils.getVideoPosterMarkup(poster, dummyImg || '', lgVideoStyle, this.settings.strings['playVideo'], videoInfo); + $currentSlide.prepend(markup); + } + else if (videoInfo) { + var markup = "
"; + $currentSlide.prepend(markup); + } + else { + this.setImgMarkup(src, $currentSlide, index); + if (srcset || sources) { + var $img = $currentSlide.find('.lg-object'); + this.initPictureFill($img); + } + } + if (poster || videoInfo) { + this.LGel.trigger(lGEvents.hasVideo, { + index: index, + src: src, + html5Video: _html5Video, + hasPoster: !!poster, + }); + } + this.LGel.trigger(lGEvents.afterAppendSlide, { index: index }); + if (this.lGalleryOn && + this.settings.appendSubHtmlTo === '.lg-item') { + this.addHtml(index); + } + } + // For first time add some delay for displaying the start animation. + var _speed = 0; + // Do not change the delay value because it is required for zoom plugin. + // If gallery opened from direct url (hash) speed value should be 0 + if (delay && !$LG(document.body).hasClass('lg-from-hash')) { + _speed = delay; + } + // Only for first slide and zoomFromOrigin is enabled + if (this.isFirstSlideWithZoomAnimation()) { + setTimeout(function () { + $currentSlide + .removeClass('lg-start-end-progress lg-start-progress') + .removeAttr('style'); + }, this.settings.startAnimationDuration + 100); + if (!$currentSlide.hasClass('lg-loaded')) { + setTimeout(function () { + if (_this.getSlideType(currentGalleryItem) === 'image') { + var alt = currentGalleryItem.alt; + var altAttr = alt ? 'alt="' + alt + '"' : ''; + $currentSlide + .find('.lg-img-wrap') + .append(utils.getImgMarkup(index, src, altAttr, srcset, sizes, currentGalleryItem.sources)); + if (srcset || sources) { + var $img = $currentSlide.find('.lg-object'); + _this.initPictureFill($img); + } + } + if (_this.getSlideType(currentGalleryItem) === 'image' || + (_this.getSlideType(currentGalleryItem) === 'video' && + poster)) { + _this.onLgObjectLoad($currentSlide, index, delay, _speed, true, false); + // load remaining slides once the slide is completely loaded + _this.onSlideObjectLoad($currentSlide, !!(videoInfo && videoInfo.html5 && !poster), function () { + _this.loadContentOnFirstSlideLoad(index, $currentSlide, _speed); + }, function () { + _this.loadContentOnFirstSlideLoad(index, $currentSlide, _speed); + }); + } + }, this.settings.startAnimationDuration + 100); + } + } + // SLide content has been added to dom + $currentSlide.addClass('lg-loaded'); + if (!this.isFirstSlideWithZoomAnimation() || + (this.getSlideType(currentGalleryItem) === 'video' && !poster)) { + this.onLgObjectLoad($currentSlide, index, delay, _speed, isFirstSlide, !!(videoInfo && videoInfo.html5 && !poster)); + } + // When gallery is opened once content is loaded (second time) need to add lg-complete class for css styling + if ((!this.zoomFromOrigin || !this.currentImageSize) && + $currentSlide.hasClass('lg-complete_') && + !this.lGalleryOn) { + setTimeout(function () { + $currentSlide.addClass('lg-complete'); + }, this.settings.backdropDuration); + } + // Content loaded + // Need to set lGalleryOn before calling preload function + this.lGalleryOn = true; + if (rec === true) { + if (!$currentSlide.hasClass('lg-complete_')) { + $currentSlide + .find('.lg-object') + .first() + .on('load.lg error.lg', function () { + _this.preload(index); + }); + } + else { + this.preload(index); + } + } + }; + /** + * @desc Remove dummy image content and load next slides + * Called only for the first time if zoomFromOrigin animation is enabled + * @param index + * @param $currentSlide + * @param speed + */ + LightGallery.prototype.loadContentOnFirstSlideLoad = function (index, $currentSlide, speed) { + var _this = this; + setTimeout(function () { + $currentSlide.find('.lg-dummy-img').remove(); + $currentSlide.removeClass('lg-first-slide'); + _this.outer.removeClass('lg-first-slide-loading'); + _this.isDummyImageRemoved = true; + _this.preload(index); + }, speed + 300); + }; + LightGallery.prototype.getItemsToBeInsertedToDom = function (index, prevIndex, numberOfItems) { + var _this = this; + if (numberOfItems === void 0) { numberOfItems = 0; } + var itemsToBeInsertedToDom = []; + // Minimum 2 items should be there + var possibleNumberOfItems = Math.max(numberOfItems, 3); + possibleNumberOfItems = Math.min(possibleNumberOfItems, this.galleryItems.length); + var prevIndexItem = "lg-item-" + this.lgId + "-" + prevIndex; + if (this.galleryItems.length <= 3) { + this.galleryItems.forEach(function (_element, index) { + itemsToBeInsertedToDom.push("lg-item-" + _this.lgId + "-" + index); + }); + return itemsToBeInsertedToDom; + } + if (index < (this.galleryItems.length - 1) / 2) { + for (var idx = index; idx > index - possibleNumberOfItems / 2 && idx >= 0; idx--) { + itemsToBeInsertedToDom.push("lg-item-" + this.lgId + "-" + idx); + } + var numberOfExistingItems = itemsToBeInsertedToDom.length; + for (var idx = 0; idx < possibleNumberOfItems - numberOfExistingItems; idx++) { + itemsToBeInsertedToDom.push("lg-item-" + this.lgId + "-" + (index + idx + 1)); + } + } + else { + for (var idx = index; idx <= this.galleryItems.length - 1 && + idx < index + possibleNumberOfItems / 2; idx++) { + itemsToBeInsertedToDom.push("lg-item-" + this.lgId + "-" + idx); + } + var numberOfExistingItems = itemsToBeInsertedToDom.length; + for (var idx = 0; idx < possibleNumberOfItems - numberOfExistingItems; idx++) { + itemsToBeInsertedToDom.push("lg-item-" + this.lgId + "-" + (index - idx - 1)); + } + } + if (this.settings.loop) { + if (index === this.galleryItems.length - 1) { + itemsToBeInsertedToDom.push("lg-item-" + this.lgId + "-" + 0); + } + else if (index === 0) { + itemsToBeInsertedToDom.push("lg-item-" + this.lgId + "-" + (this.galleryItems.length - 1)); + } + } + if (itemsToBeInsertedToDom.indexOf(prevIndexItem) === -1) { + itemsToBeInsertedToDom.push("lg-item-" + this.lgId + "-" + prevIndex); + } + return itemsToBeInsertedToDom; + }; + LightGallery.prototype.organizeSlideItems = function (index, prevIndex) { + var _this = this; + var itemsToBeInsertedToDom = this.getItemsToBeInsertedToDom(index, prevIndex, this.settings.numberOfSlideItemsInDom); + itemsToBeInsertedToDom.forEach(function (item) { + if (_this.currentItemsInDom.indexOf(item) === -1) { + _this.$inner.append("
"); + } + }); + this.currentItemsInDom.forEach(function (item) { + if (itemsToBeInsertedToDom.indexOf(item) === -1) { + $LG("#" + item).remove(); + } + }); + return itemsToBeInsertedToDom; + }; + /** + * Get previous index of the slide + */ + LightGallery.prototype.getPreviousSlideIndex = function () { + var prevIndex = 0; + try { + var currentItemId = this.outer + .find('.lg-current') + .first() + .attr('id'); + prevIndex = parseInt(currentItemId.split('-')[3]) || 0; + } + catch (error) { + prevIndex = 0; + } + return prevIndex; + }; + LightGallery.prototype.setDownloadValue = function (index) { + if (this.settings.download) { + var currentGalleryItem = this.galleryItems[index]; + var hideDownloadBtn = currentGalleryItem.downloadUrl === false || + currentGalleryItem.downloadUrl === 'false'; + if (hideDownloadBtn) { + this.outer.addClass('lg-hide-download'); + } + else { + var $download = this.getElementById('lg-download'); + this.outer.removeClass('lg-hide-download'); + $download.attr('href', currentGalleryItem.downloadUrl || + currentGalleryItem.src); + if (currentGalleryItem.download) { + $download.attr('download', currentGalleryItem.download); + } + } + } + }; + LightGallery.prototype.makeSlideAnimation = function (direction, currentSlideItem, previousSlideItem) { + var _this = this; + if (this.lGalleryOn) { + previousSlideItem.addClass('lg-slide-progress'); + } + setTimeout(function () { + // remove all transitions + _this.outer.addClass('lg-no-trans'); + _this.outer + .find('.lg-item') + .removeClass('lg-prev-slide lg-next-slide'); + if (direction === 'prev') { + //prevslide + currentSlideItem.addClass('lg-prev-slide'); + previousSlideItem.addClass('lg-next-slide'); + } + else { + // next slide + currentSlideItem.addClass('lg-next-slide'); + previousSlideItem.addClass('lg-prev-slide'); + } + // give 50 ms for browser to add/remove class + setTimeout(function () { + _this.outer.find('.lg-item').removeClass('lg-current'); + currentSlideItem.addClass('lg-current'); + // reset all transitions + _this.outer.removeClass('lg-no-trans'); + }, 50); + }, this.lGalleryOn ? this.settings.slideDelay : 0); + }; + /** + * Goto a specific slide. + * @param {Number} index - index of the slide + * @param {Boolean} fromTouch - true if slide function called via touch event or mouse drag + * @param {Boolean} fromThumb - true if slide function called via thumbnail click + * @param {String} direction - Direction of the slide(next/prev) + * @category lGPublicMethods + * @example + * const plugin = lightGallery(); + * // to go to 3rd slide + * plugin.slide(2); + * + */ + LightGallery.prototype.slide = function (index, fromTouch, fromThumb, direction) { + var _this = this; + var prevIndex = this.getPreviousSlideIndex(); + this.currentItemsInDom = this.organizeSlideItems(index, prevIndex); + // Prevent multiple call, Required for hsh plugin + if (this.lGalleryOn && prevIndex === index) { + return; + } + var numberOfGalleryItems = this.galleryItems.length; + if (!this.lgBusy) { + if (this.settings.counter) { + this.updateCurrentCounter(index); + } + var currentSlideItem = this.getSlideItem(index); + var previousSlideItem_1 = this.getSlideItem(prevIndex); + var currentGalleryItem = this.galleryItems[index]; + var videoInfo = currentGalleryItem.__slideVideoInfo; + this.outer.attr('data-lg-slide-type', this.getSlideType(currentGalleryItem)); + this.setDownloadValue(index); + if (videoInfo) { + var _a = this.mediaContainerPosition, top_3 = _a.top, bottom = _a.bottom; + var videoSize = utils.getSize(this.items[index], this.outer, top_3 + bottom, videoInfo && this.settings.videoMaxSize); + this.resizeVideoSlide(index, videoSize); + } + this.LGel.trigger(lGEvents.beforeSlide, { + prevIndex: prevIndex, + index: index, + fromTouch: !!fromTouch, + fromThumb: !!fromThumb, + }); + this.lgBusy = true; + clearTimeout(this.hideBarTimeout); + this.arrowDisable(index); + if (!direction) { + if (index < prevIndex) { + direction = 'prev'; + } + else if (index > prevIndex) { + direction = 'next'; + } + } + if (!fromTouch) { + this.makeSlideAnimation(direction, currentSlideItem, previousSlideItem_1); + } + else { + this.outer + .find('.lg-item') + .removeClass('lg-prev-slide lg-current lg-next-slide'); + var touchPrev = void 0; + var touchNext = void 0; + if (numberOfGalleryItems > 2) { + touchPrev = index - 1; + touchNext = index + 1; + if (index === 0 && prevIndex === numberOfGalleryItems - 1) { + // next slide + touchNext = 0; + touchPrev = numberOfGalleryItems - 1; + } + else if (index === numberOfGalleryItems - 1 && + prevIndex === 0) { + // prev slide + touchNext = 0; + touchPrev = numberOfGalleryItems - 1; + } + } + else { + touchPrev = 0; + touchNext = 1; + } + if (direction === 'prev') { + this.getSlideItem(touchNext).addClass('lg-next-slide'); + } + else { + this.getSlideItem(touchPrev).addClass('lg-prev-slide'); + } + currentSlideItem.addClass('lg-current'); + } + // Do not put load content in set timeout as it needs to load immediately when the gallery is opened + if (!this.lGalleryOn) { + this.loadContent(index, true); + } + else { + setTimeout(function () { + _this.loadContent(index, true); + // Add title if this.settings.appendSubHtmlTo === lg-sub-html + if (_this.settings.appendSubHtmlTo !== '.lg-item') { + _this.addHtml(index); + } + }, this.settings.speed + 50 + (fromTouch ? 0 : this.settings.slideDelay)); + } + setTimeout(function () { + _this.lgBusy = false; + previousSlideItem_1.removeClass('lg-slide-progress'); + _this.LGel.trigger(lGEvents.afterSlide, { + prevIndex: prevIndex, + index: index, + fromTouch: fromTouch, + fromThumb: fromThumb, + }); + }, (this.lGalleryOn ? this.settings.speed + 100 : 100) + (fromTouch ? 0 : this.settings.slideDelay)); + } + this.index = index; + }; + LightGallery.prototype.updateCurrentCounter = function (index) { + this.getElementById('lg-counter-current').html(index + 1 + ''); + }; + LightGallery.prototype.updateCounterTotal = function () { + this.getElementById('lg-counter-all').html(this.galleryItems.length + ''); + }; + LightGallery.prototype.getSlideType = function (item) { + if (item.__slideVideoInfo) { + return 'video'; + } + else if (item.iframe) { + return 'iframe'; + } + else { + return 'image'; + } + }; + LightGallery.prototype.touchMove = function (startCoords, endCoords, e) { + var distanceX = endCoords.pageX - startCoords.pageX; + var distanceY = endCoords.pageY - startCoords.pageY; + var allowSwipe = false; + if (this.swipeDirection) { + allowSwipe = true; + } + else { + if (Math.abs(distanceX) > 15) { + this.swipeDirection = 'horizontal'; + allowSwipe = true; + } + else if (Math.abs(distanceY) > 15) { + this.swipeDirection = 'vertical'; + allowSwipe = true; + } + } + if (!allowSwipe) { + return; + } + var $currentSlide = this.getSlideItem(this.index); + if (this.swipeDirection === 'horizontal') { + e === null || e === void 0 ? void 0 : e.preventDefault(); + // reset opacity and transition duration + this.outer.addClass('lg-dragging'); + // move current slide + this.setTranslate($currentSlide, distanceX, 0); + // move next and prev slide with current slide + var width = $currentSlide.get().offsetWidth; + var slideWidthAmount = (width * 15) / 100; + var gutter = slideWidthAmount - Math.abs((distanceX * 10) / 100); + this.setTranslate(this.outer.find('.lg-prev-slide').first(), -width + distanceX - gutter, 0); + this.setTranslate(this.outer.find('.lg-next-slide').first(), width + distanceX + gutter, 0); + } + else if (this.swipeDirection === 'vertical') { + if (this.settings.swipeToClose) { + e === null || e === void 0 ? void 0 : e.preventDefault(); + this.$container.addClass('lg-dragging-vertical'); + var opacity = 1 - Math.abs(distanceY) / window.innerHeight; + this.$backdrop.css('opacity', opacity); + var scale = 1 - Math.abs(distanceY) / (window.innerWidth * 2); + this.setTranslate($currentSlide, 0, distanceY, scale, scale); + if (Math.abs(distanceY) > 100) { + this.outer + .addClass('lg-hide-items') + .removeClass('lg-components-open'); + } + } + } + }; + LightGallery.prototype.touchEnd = function (endCoords, startCoords, event) { + var _this = this; + var distance; + // keep slide animation for any mode while dragg/swipe + if (this.settings.mode !== 'lg-slide') { + this.outer.addClass('lg-slide'); + } + // set transition duration + setTimeout(function () { + _this.$container.removeClass('lg-dragging-vertical'); + _this.outer + .removeClass('lg-dragging lg-hide-items') + .addClass('lg-components-open'); + var triggerClick = true; + if (_this.swipeDirection === 'horizontal') { + distance = endCoords.pageX - startCoords.pageX; + var distanceAbs = Math.abs(endCoords.pageX - startCoords.pageX); + if (distance < 0 && + distanceAbs > _this.settings.swipeThreshold) { + _this.goToNextSlide(true); + triggerClick = false; + } + else if (distance > 0 && + distanceAbs > _this.settings.swipeThreshold) { + _this.goToPrevSlide(true); + triggerClick = false; + } + } + else if (_this.swipeDirection === 'vertical') { + distance = Math.abs(endCoords.pageY - startCoords.pageY); + if (_this.settings.closable && + _this.settings.swipeToClose && + distance > 100) { + _this.closeGallery(); + return; + } + else { + _this.$backdrop.css('opacity', 1); + } + } + _this.outer.find('.lg-item').removeAttr('style'); + if (triggerClick && + Math.abs(endCoords.pageX - startCoords.pageX) < 5) { + // Trigger click if distance is less than 5 pix + var target = $LG(event.target); + if (_this.isPosterElement(target)) { + _this.LGel.trigger(lGEvents.posterClick); + } + } + _this.swipeDirection = undefined; + }); + // remove slide class once drag/swipe is completed if mode is not slide + setTimeout(function () { + if (!_this.outer.hasClass('lg-dragging') && + _this.settings.mode !== 'lg-slide') { + _this.outer.removeClass('lg-slide'); + } + }, this.settings.speed + 100); + }; + LightGallery.prototype.enableSwipe = function () { + var _this = this; + var startCoords = {}; + var endCoords = {}; + var isMoved = false; + var isSwiping = false; + if (this.settings.enableSwipe) { + this.$inner.on('touchstart.lg', function (e) { + _this.dragOrSwipeEnabled = true; + var $item = _this.getSlideItem(_this.index); + if (($LG(e.target).hasClass('lg-item') || + $item.get().contains(e.target)) && + !_this.outer.hasClass('lg-zoomed') && + !_this.lgBusy && + e.touches.length === 1) { + isSwiping = true; + _this.touchAction = 'swipe'; + _this.manageSwipeClass(); + startCoords = { + pageX: e.touches[0].pageX, + pageY: e.touches[0].pageY, + }; + } + }); + this.$inner.on('touchmove.lg', function (e) { + if (isSwiping && + _this.touchAction === 'swipe' && + e.touches.length === 1) { + endCoords = { + pageX: e.touches[0].pageX, + pageY: e.touches[0].pageY, + }; + _this.touchMove(startCoords, endCoords, e); + isMoved = true; + } + }); + this.$inner.on('touchend.lg', function (event) { + if (_this.touchAction === 'swipe') { + if (isMoved) { + isMoved = false; + _this.touchEnd(endCoords, startCoords, event); + } + else if (isSwiping) { + var target = $LG(event.target); + if (_this.isPosterElement(target)) { + _this.LGel.trigger(lGEvents.posterClick); + } + } + _this.touchAction = undefined; + isSwiping = false; + } + }); + } + }; + LightGallery.prototype.enableDrag = function () { + var _this = this; + var startCoords = {}; + var endCoords = {}; + var isDraging = false; + var isMoved = false; + if (this.settings.enableDrag) { + this.outer.on('mousedown.lg', function (e) { + _this.dragOrSwipeEnabled = true; + var $item = _this.getSlideItem(_this.index); + if ($LG(e.target).hasClass('lg-item') || + $item.get().contains(e.target)) { + if (!_this.outer.hasClass('lg-zoomed') && !_this.lgBusy) { + e.preventDefault(); + if (!_this.lgBusy) { + _this.manageSwipeClass(); + startCoords = { + pageX: e.pageX, + pageY: e.pageY, + }; + isDraging = true; + // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723 + _this.outer.get().scrollLeft += 1; + _this.outer.get().scrollLeft -= 1; + // * + _this.outer + .removeClass('lg-grab') + .addClass('lg-grabbing'); + _this.LGel.trigger(lGEvents.dragStart); + } + } + } + }); + $LG(window).on("mousemove.lg.global" + this.lgId, function (e) { + if (isDraging && _this.lgOpened) { + isMoved = true; + endCoords = { + pageX: e.pageX, + pageY: e.pageY, + }; + _this.touchMove(startCoords, endCoords); + _this.LGel.trigger(lGEvents.dragMove); + } + }); + $LG(window).on("mouseup.lg.global" + this.lgId, function (event) { + if (!_this.lgOpened) { + return; + } + var target = $LG(event.target); + if (isMoved) { + isMoved = false; + _this.touchEnd(endCoords, startCoords, event); + _this.LGel.trigger(lGEvents.dragEnd); + } + else if (_this.isPosterElement(target)) { + _this.LGel.trigger(lGEvents.posterClick); + } + // Prevent execution on click + if (isDraging) { + isDraging = false; + _this.outer.removeClass('lg-grabbing').addClass('lg-grab'); + } + }); + } + }; + LightGallery.prototype.triggerPosterClick = function () { + var _this = this; + this.$inner.on('click.lg', function (event) { + if (!_this.dragOrSwipeEnabled && + _this.isPosterElement($LG(event.target))) { + _this.LGel.trigger(lGEvents.posterClick); + } + }); + }; + LightGallery.prototype.manageSwipeClass = function () { + var _touchNext = this.index + 1; + var _touchPrev = this.index - 1; + if (this.settings.loop && this.galleryItems.length > 2) { + if (this.index === 0) { + _touchPrev = this.galleryItems.length - 1; + } + else if (this.index === this.galleryItems.length - 1) { + _touchNext = 0; + } + } + this.outer.find('.lg-item').removeClass('lg-next-slide lg-prev-slide'); + if (_touchPrev > -1) { + this.getSlideItem(_touchPrev).addClass('lg-prev-slide'); + } + this.getSlideItem(_touchNext).addClass('lg-next-slide'); + }; + /** + * Go to next slide + * @param {Boolean} fromTouch - true if slide function called via touch event + * @category lGPublicMethods + * @example + * const plugin = lightGallery(); + * plugin.goToNextSlide(); + * @see Demo + */ + LightGallery.prototype.goToNextSlide = function (fromTouch) { + var _this = this; + var _loop = this.settings.loop; + if (fromTouch && this.galleryItems.length < 3) { + _loop = false; + } + if (!this.lgBusy) { + if (this.index + 1 < this.galleryItems.length) { + this.index++; + this.LGel.trigger(lGEvents.beforeNextSlide, { + index: this.index, + }); + this.slide(this.index, !!fromTouch, false, 'next'); + } + else { + if (_loop) { + this.index = 0; + this.LGel.trigger(lGEvents.beforeNextSlide, { + index: this.index, + }); + this.slide(this.index, !!fromTouch, false, 'next'); + } + else if (this.settings.slideEndAnimation && !fromTouch) { + this.outer.addClass('lg-right-end'); + setTimeout(function () { + _this.outer.removeClass('lg-right-end'); + }, 400); + } + } + } + }; + /** + * Go to previous slides + * @param {Boolean} fromTouch - true if slide function called via touch event + * @category lGPublicMethods + * @example + * const plugin = lightGallery({}); + * plugin.goToPrevSlide(); + * @see Demo + * + */ + LightGallery.prototype.goToPrevSlide = function (fromTouch) { + var _this = this; + var _loop = this.settings.loop; + if (fromTouch && this.galleryItems.length < 3) { + _loop = false; + } + if (!this.lgBusy) { + if (this.index > 0) { + this.index--; + this.LGel.trigger(lGEvents.beforePrevSlide, { + index: this.index, + fromTouch: fromTouch, + }); + this.slide(this.index, !!fromTouch, false, 'prev'); + } + else { + if (_loop) { + this.index = this.galleryItems.length - 1; + this.LGel.trigger(lGEvents.beforePrevSlide, { + index: this.index, + fromTouch: fromTouch, + }); + this.slide(this.index, !!fromTouch, false, 'prev'); + } + else if (this.settings.slideEndAnimation && !fromTouch) { + this.outer.addClass('lg-left-end'); + setTimeout(function () { + _this.outer.removeClass('lg-left-end'); + }, 400); + } + } + } + }; + LightGallery.prototype.keyPress = function () { + var _this = this; + $LG(window).on("keydown.lg.global" + this.lgId, function (e) { + if (_this.lgOpened && + _this.settings.escKey === true && + e.keyCode === 27) { + e.preventDefault(); + if (_this.settings.allowMediaOverlap && + _this.outer.hasClass('lg-can-toggle') && + _this.outer.hasClass('lg-components-open')) { + _this.outer.removeClass('lg-components-open'); + } + else { + _this.closeGallery(); + } + } + if (_this.lgOpened && _this.galleryItems.length > 1) { + if (e.keyCode === 37) { + e.preventDefault(); + _this.goToPrevSlide(); + } + if (e.keyCode === 39) { + e.preventDefault(); + _this.goToNextSlide(); + } + } + }); + }; + LightGallery.prototype.arrow = function () { + var _this = this; + this.getElementById('lg-prev').on('click.lg', function () { + _this.goToPrevSlide(); + }); + this.getElementById('lg-next').on('click.lg', function () { + _this.goToNextSlide(); + }); + }; + LightGallery.prototype.arrowDisable = function (index) { + // Disable arrows if settings.hideControlOnEnd is true + if (!this.settings.loop && this.settings.hideControlOnEnd) { + var $prev = this.getElementById('lg-prev'); + var $next = this.getElementById('lg-next'); + if (index + 1 === this.galleryItems.length) { + $next.attr('disabled', 'disabled').addClass('disabled'); + } + else { + $next.removeAttr('disabled').removeClass('disabled'); + } + if (index === 0) { + $prev.attr('disabled', 'disabled').addClass('disabled'); + } + else { + $prev.removeAttr('disabled').removeClass('disabled'); + } + } + }; + LightGallery.prototype.setTranslate = function ($el, xValue, yValue, scaleX, scaleY) { + if (scaleX === void 0) { scaleX = 1; } + if (scaleY === void 0) { scaleY = 1; } + $el.css('transform', 'translate3d(' + + xValue + + 'px, ' + + yValue + + 'px, 0px) scale3d(' + + scaleX + + ', ' + + scaleY + + ', 1)'); + }; + LightGallery.prototype.mousewheel = function () { + var _this = this; + var lastCall = 0; + this.outer.on('wheel.lg', function (e) { + if (!e.deltaY || _this.galleryItems.length < 2) { + return; + } + e.preventDefault(); + var now = new Date().getTime(); + if (now - lastCall < 1000) { + return; + } + lastCall = now; + if (e.deltaY > 0) { + _this.goToNextSlide(); + } + else if (e.deltaY < 0) { + _this.goToPrevSlide(); + } + }); + }; + LightGallery.prototype.isSlideElement = function (target) { + return (target.hasClass('lg-outer') || + target.hasClass('lg-item') || + target.hasClass('lg-img-wrap') || + target.hasClass('lg-img-rotate')); + }; + LightGallery.prototype.isPosterElement = function (target) { + var playButton = this.getSlideItem(this.index) + .find('.lg-video-play-button') + .get(); + return (target.hasClass('lg-video-poster') || + target.hasClass('lg-video-play-button') || + (playButton && playButton.contains(target.get()))); + }; + /** + * Maximize minimize inline gallery. + * @category lGPublicMethods + */ + LightGallery.prototype.toggleMaximize = function () { + var _this = this; + this.getElementById('lg-maximize').on('click.lg', function () { + _this.$container.toggleClass('lg-inline'); + _this.refreshOnResize(); + }); + }; + LightGallery.prototype.invalidateItems = function () { + for (var index = 0; index < this.items.length; index++) { + var element = this.items[index]; + var $element = $LG(element); + $element.off("click.lgcustom-item-" + $element.attr('data-lg-id')); + } + }; + LightGallery.prototype.trapFocus = function () { + var _this = this; + this.$container.get().focus({ + preventScroll: true, + }); + $LG(window).on("keydown.lg.global" + this.lgId, function (e) { + if (!_this.lgOpened) { + return; + } + var isTabPressed = e.key === 'Tab' || e.keyCode === 9; + if (!isTabPressed) { + return; + } + var focusableEls = utils.getFocusableElements(_this.$container.get()); + var firstFocusableEl = focusableEls[0]; + var lastFocusableEl = focusableEls[focusableEls.length - 1]; + if (e.shiftKey) { + if (document.activeElement === firstFocusableEl) { + lastFocusableEl.focus(); + e.preventDefault(); + } + } + else { + if (document.activeElement === lastFocusableEl) { + firstFocusableEl.focus(); + e.preventDefault(); + } + } + }); + }; + LightGallery.prototype.manageCloseGallery = function () { + var _this = this; + if (!this.settings.closable) + return; + var mousedown = false; + this.getElementById('lg-close').on('click.lg', function () { + _this.closeGallery(); + }); + if (this.settings.closeOnTap) { + // If you drag the slide and release outside gallery gets close on chrome + // for preventing this check mousedown and mouseup happened on .lg-item or lg-outer + this.outer.on('mousedown.lg', function (e) { + var target = $LG(e.target); + if (_this.isSlideElement(target)) { + mousedown = true; + } + else { + mousedown = false; + } + }); + this.outer.on('mousemove.lg', function () { + mousedown = false; + }); + this.outer.on('mouseup.lg', function (e) { + var target = $LG(e.target); + if (_this.isSlideElement(target) && mousedown) { + if (!_this.outer.hasClass('lg-dragging')) { + _this.closeGallery(); + } + } + }); + } + }; + /** + * Close lightGallery if it is opened. + * + * @description If closable is false in the settings, you need to pass true via closeGallery method to force close gallery + * @return returns the estimated time to close gallery completely including the close animation duration + * @category lGPublicMethods + * @example + * const plugin = lightGallery(); + * plugin.closeGallery(); + * + */ + LightGallery.prototype.closeGallery = function (force) { + var _this = this; + if (!this.lgOpened || (!this.settings.closable && !force)) { + return 0; + } + this.LGel.trigger(lGEvents.beforeClose); + if (this.settings.resetScrollPosition && !this.settings.hideScrollbar) { + $LG(window).scrollTop(this.prevScrollTop); + } + var currentItem = this.items[this.index]; + var transform; + if (this.zoomFromOrigin && currentItem) { + var _a = this.mediaContainerPosition, top_4 = _a.top, bottom = _a.bottom; + var _b = this.galleryItems[this.index], __slideVideoInfo = _b.__slideVideoInfo, poster = _b.poster; + var imageSize = utils.getSize(currentItem, this.outer, top_4 + bottom, __slideVideoInfo && poster && this.settings.videoMaxSize); + transform = utils.getTransform(currentItem, this.outer, top_4, bottom, imageSize); + } + if (this.zoomFromOrigin && transform) { + this.outer.addClass('lg-closing lg-zoom-from-image'); + this.getSlideItem(this.index) + .addClass('lg-start-end-progress') + .css('transition-duration', this.settings.startAnimationDuration + 'ms') + .css('transform', transform); + } + else { + this.outer.addClass('lg-hide-items'); + // lg-zoom-from-image is used for setting the opacity to 1 if zoomFromOrigin is true + // If the closing item doesn't have the lg-size attribute, remove this class to avoid the closing css conflicts + this.outer.removeClass('lg-zoom-from-image'); + } + // Unbind all events added by lightGallery + // @todo + //this.$el.off('.lg.tm'); + this.destroyModules(); + this.lGalleryOn = false; + this.isDummyImageRemoved = false; + this.zoomFromOrigin = this.settings.zoomFromOrigin; + clearTimeout(this.hideBarTimeout); + this.hideBarTimeout = false; + $LG('html').removeClass('lg-on'); + this.outer.removeClass('lg-visible lg-components-open'); + // Resetting opacity to 0 isd required as vertical swipe to close function adds inline opacity. + this.$backdrop.removeClass('in').css('opacity', 0); + var removeTimeout = this.zoomFromOrigin && transform + ? Math.max(this.settings.startAnimationDuration, this.settings.backdropDuration) + : this.settings.backdropDuration; + this.$container.removeClass('lg-show-in'); + // Once the closign animation is completed and gallery is invisible + setTimeout(function () { + if (_this.zoomFromOrigin && transform) { + _this.outer.removeClass('lg-zoom-from-image'); + } + _this.$container.removeClass('lg-show'); + // Reset scrollbar + _this.resetScrollBar(); + // Need to remove inline opacity as it is used in the stylesheet as well + _this.$backdrop + .removeAttr('style') + .css('transition-duration', _this.settings.backdropDuration + 'ms'); + _this.outer.removeClass("lg-closing " + _this.settings.startClass); + _this.getSlideItem(_this.index).removeClass('lg-start-end-progress'); + _this.$inner.empty(); + if (_this.lgOpened) { + _this.LGel.trigger(lGEvents.afterClose, { + instance: _this, + }); + } + if (_this.$container.get()) { + _this.$container.get().blur(); + } + _this.lgOpened = false; + }, removeTimeout + 100); + return removeTimeout + 100; + }; + LightGallery.prototype.initModules = function () { + this.plugins.forEach(function (module) { + try { + module.init(); + } + catch (err) { + console.warn("lightGallery:- make sure lightGallery module is properly initiated"); + } + }); + }; + LightGallery.prototype.destroyModules = function (destroy) { + this.plugins.forEach(function (module) { + try { + if (destroy) { + module.destroy(); + } + else { + module.closeGallery && module.closeGallery(); + } + } + catch (err) { + console.warn("lightGallery:- make sure lightGallery module is properly destroyed"); + } + }); + }; + /** + * Refresh lightGallery with new set of children. + * + * @description This is useful to update the gallery when the child elements are changed without calling destroy method. + * + * If you are using dynamic mode, you can pass the modified array of dynamicEl as the first parameter to refresh the dynamic gallery + * @see Demo + * @category lGPublicMethods + * @example + * const plugin = lightGallery(); + * // Delete or add children, then call + * plugin.refresh(); + * + */ + LightGallery.prototype.refresh = function (galleryItems) { + if (!this.settings.dynamic) { + this.invalidateItems(); + } + if (galleryItems) { + this.galleryItems = galleryItems; + } + else { + this.galleryItems = this.getItems(); + } + this.updateControls(); + this.openGalleryOnItemClick(); + this.LGel.trigger(lGEvents.updateSlides); + }; + LightGallery.prototype.updateControls = function () { + this.addSlideVideoInfo(this.galleryItems); + this.updateCounterTotal(); + this.manageSingleSlideClassName(); + }; + LightGallery.prototype.destroyGallery = function () { + this.destroyModules(true); + if (!this.settings.dynamic) { + this.invalidateItems(); + } + $LG(window).off(".lg.global" + this.lgId); + this.LGel.off('.lg'); + this.$container.remove(); + }; + /** + * Destroy lightGallery. + * Destroy lightGallery and its plugin instances completely + * + * @description This method also calls CloseGallery function internally. Returns the time takes to completely close and destroy the instance. + * In case if you want to re-initialize lightGallery right after destroying it, initialize it only once the destroy process is completed. + * You can use refresh method most of the times. + * @category lGPublicMethods + * @example + * const plugin = lightGallery(); + * plugin.destroy(); + * + */ + LightGallery.prototype.destroy = function () { + var closeTimeout = this.closeGallery(true); + if (closeTimeout) { + setTimeout(this.destroyGallery.bind(this), closeTimeout); + } + else { + this.destroyGallery(); + } + return closeTimeout; + }; + return LightGallery; + }()); + + function lightGallery(el, options) { + return new LightGallery(el, options); + } + + return lightGallery; + +}))); +//# sourceMappingURL=lightgallery.umd.js.map diff --git a/assets/lightGallery/lightgallery.umd.js.map b/assets/lightGallery/lightgallery.umd.js.map new file mode 100644 index 0000000..c7c0b48 --- /dev/null +++ b/assets/lightGallery/lightgallery.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lightgallery.umd.js","sources":["../src/lg-events.ts","../src/lg-settings.ts","../src/lgQuery.ts","../src/lg-utils.ts","../src/lightgallery.ts","../src/index.ts"],"sourcesContent":["import { LightGallery } from './lightgallery';\nimport { VideoSource } from './plugins/video/types';\n\n/**\n * List of lightGallery events\n * All events should be documented here\n * Below interfaces are used to build the website documentations\n * */\nexport const lGEvents: {\n [key: string]: string;\n} = {\n afterAppendSlide: 'lgAfterAppendSlide',\n init: 'lgInit',\n hasVideo: 'lgHasVideo',\n containerResize: 'lgContainerResize',\n updateSlides: 'lgUpdateSlides',\n afterAppendSubHtml: 'lgAfterAppendSubHtml',\n beforeOpen: 'lgBeforeOpen',\n afterOpen: 'lgAfterOpen',\n slideItemLoad: 'lgSlideItemLoad',\n beforeSlide: 'lgBeforeSlide',\n afterSlide: 'lgAfterSlide',\n posterClick: 'lgPosterClick',\n dragStart: 'lgDragStart',\n dragMove: 'lgDragMove',\n dragEnd: 'lgDragEnd',\n beforeNextSlide: 'lgBeforeNextSlide',\n beforePrevSlide: 'lgBeforePrevSlide',\n beforeClose: 'lgBeforeClose',\n afterClose: 'lgAfterClose',\n rotateLeft: 'lgRotateLeft',\n rotateRight: 'lgRotateRight',\n flipHorizontal: 'lgFlipHorizontal',\n flipVertical: 'lgFlipVertical',\n autoplay: 'lgAutoplay',\n autoplayStart: 'lgAutoplayStart',\n autoplayStop: 'lgAutoplayStop',\n};\n\n// Follow the below format for the event documentation\n// @method is the method name when event is used with Angular/React components\n\n/**\n * Fired only once when lightGallery is initialized\n * @name lgInit\n * @method onInit\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action on lightGallery initialization.\n * // Init event returns the plugin instance that can be used to call any lightGalley public method\n * let pluginInstance = null;\n * lg.addEventListener('lgInit', (event) => {\n * pluginInstance = event.detail.instance;\n * });\n * lightGallery(lg);\n * @see Methods\n */\nexport interface InitDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired when the slide content has been inserted into it's slide container.\n * @name lgAfterAppendSlide\n * @method onAfterAppendSlide\n */\nexport interface AfterAppendSlideEventDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired immediately before opening the gallery\n * @name lgBeforeOpen\n * @method onBeforeOpen\n */\nexport interface BeforeOpenDetail {}\n\n/**\n * Fired immediately after opening the gallery\n * @name lgAfterOpen\n * @method onAfterOpen\n */\nexport interface AfterOpenDetail {}\n\n/**\n * Fired once the media inside the slide has been completely loaded .\n * @name lgSlideItemLoad\n * @method onSlideItemLoad\n */\nexport interface SlideItemLoadDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * For the first slide, lightGallery adds some delay for displaying the loaded slide item.\n * This delay is required for the transition effect when the slide item is displayed\n * Respect the delay when you use this event\n */\n delay: number;\n\n // Will be true for the first slide\n isFirstSlide: boolean;\n}\n\n/**\n * Fired immediately before each slide transition.\n * @name lgBeforeSlide\n * @method onBeforeSlide\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action before each slide transition\n * lg.addEventListener('lgBeforeSlide', (event) => {\n * const { index, prevIndex } = event.detail;\n * alert(index, prevIndex);\n * });\n * lightGallery(lg);\n */\nexport interface BeforeSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired immediately after each slide transition.\n * @name lgAfterSlide\n * @method onAfterSlide\n */\nexport interface AfterSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired when the video poster is clicked.\n * @name lgPosterClick\n * @method onPosterClick\n */\nexport interface PosterClickDetail {}\n\n/**\n * Fired when the drag event to move to different slide starts.\n * @name lgDragStart\n * @method onDragStart\n */\nexport interface DragStartDetail {}\n\n/**\n * Fired periodically during the drag operation.\n * @name lgDragMove\n * @method onDragMove\n */\nexport interface DragMoveDetail {}\n\n/**\n * Fired when the user has finished the drag operation\n * @name lgDragEnd\n * @method onDragEnd\n */\nexport interface DragEndDetail {}\n\n/**\n * Fired immediately before the start of the close process.\n * @name lgBeforeClose\n * @method onBeforeClose\n */\nexport interface BeforeCloseDetail {}\n\n/**\n * Fired immediately once lightGallery is closed.\n * @name lgAfterClose\n * @method onAfterClose\n */\nexport interface AfterCloseDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired immediately before each \"next\" slide transition\n * @name lgBeforeNextSlide\n * @method onBeforeNextSlide\n */\nexport interface BeforeNextSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired immediately before each \"prev\" slide transition\n * @name lgBeforePrevSlide\n * @method onBeforePrevSlide\n */\nexport interface BeforePrevSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired when the sub-html content (ex : title/ description) has been appended into the slide.\n * @name lgAfterAppendSubHtml\n * @method onAfterAppendSubHtml\n */\nexport interface AfterAppendSubHtmlDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the lightGallery container has been resized.\n * @name lgContainerResize\n * @method onContainerResize\n */\nexport interface ContainerResizeDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when lightGallery detects video slide\n * @name lgHasVideo\n * @method onHasVideo\n */\nexport interface HasVideoDetail {\n /**\n * Index of the slide,\n */\n index: number;\n /**\n * Video source\n */\n src: string;\n /**\n * HTML5 video source if available\n *

\n HTML5 video source = source: {\n src: string;\n type: string;\n }[];\n attributes: HTMLVideoElement;\n *

\n */\n html5Video: VideoSource;\n /**\n * True if video has poster\n */\n hasPoster: boolean;\n}\n\n/**\n * Fired when the image is rotated in anticlockwise direction\n * @name lgRotateLeft\n * @method onRotateLeft\n */\nexport interface RotateLeftDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is rotated in clockwise direction\n * @name lgRotateRight\n * @method onRotateRight\n */\nexport interface RotateRightDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped horizontally\n * @name lgFlipHorizontal\n * @method onFlipHorizontal\n */\nexport interface FlipHorizontalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped vertically\n * @name lgFlipVertical\n * @method onFlipVertical\n */\nexport interface FlipVerticalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n","import { GalleryItem } from './lg-utils';\nimport { LgQuery } from './lgQuery';\nimport { LightGallery } from './lightgallery';\nimport { AutoplaySettings } from './plugins/autoplay/lg-autoplay-settings';\nimport { CommentSettings } from './plugins/comment/lg-comment-settings';\nimport { FullscreenSettings } from './plugins/fullscreen/lg-fullscreen-settings';\nimport { HashSettings } from './plugins/hash/lg-hash-settings';\nimport { MediumZoomSettings } from './plugins/mediumZoom/lg-medium-zoom-settings';\nimport { PagerSettings } from './plugins/pager/lg-pager-settings';\nimport { RotateSettings } from './plugins/rotate/lg-rotate-settings';\nimport { ShareSettings } from './plugins/share/lg-share-settings';\nimport { ThumbnailsSettings } from './plugins/thumbnail/lg-thumbnail-settings';\nimport { VideoSettings } from './plugins/video/lg-video-settings';\nimport { ZoomSettings } from './plugins/zoom/lg-zoom-settings';\n\ntype LightGalleryCoreMobileSettings = Exclude<\n LightGalleryCoreSettings,\n 'mobileSettings'\n>;\n\n// @todo use separate mobile settings for plugins\nexport interface MobileSettings\n extends LightGalleryCoreMobileSettings,\n Partial,\n Partial,\n Partial,\n Partial,\n Partial,\n Partial,\n Partial,\n Partial,\n Partial,\n Partial {}\n\nexport interface LightGalleryCoreStrings {\n closeGallery: string;\n toggleMaximize: string;\n previousSlide: string;\n nextSlide: string;\n download: string;\n playVideo: string;\n mediaLoadingFailed: string;\n}\n\nexport type LightGalleryAllSettings = LightGalleryCoreSettings &\n ZoomSettings &\n ThumbnailsSettings &\n VideoSettings &\n AutoplaySettings &\n CommentSettings &\n FullscreenSettings &\n HashSettings &\n PagerSettings &\n RotateSettings &\n ShareSettings &\n MediumZoomSettings;\n\nexport type LightGallerySettings = Partial;\n\nexport interface LightGalleryCoreSettings {\n /**\n * Type of transition between images.\n */\n mode:\n | 'lg-slide'\n | 'lg-fade'\n | 'lg-zoom-in'\n | 'lg-zoom-in-big'\n | 'lg-zoom-out'\n | 'lg-zoom-out-big'\n | 'lg-zoom-out-in'\n | 'lg-zoom-in-out'\n | 'lg-soft-zoom'\n | 'lg-scale-up'\n | 'lg-slide-circular'\n | 'lg-slide-circular-vertical'\n | 'lg-slide-vertical'\n | 'lg-slide-vertical-growth'\n | 'lg-slide-skew-only'\n | 'lg-slide-skew-only-rev'\n | 'lg-slide-skew-only-y'\n | 'lg-slide-skew-only-y-rev'\n | 'lg-slide-skew'\n | 'lg-slide-skew-rev'\n | 'lg-slide-skew-cross'\n | 'lg-slide-skew-cross-rev'\n | 'lg-slide-skew-ver'\n | 'lg-slide-skew-ver-rev'\n | 'lg-slide-skew-ver-cross'\n | 'lg-slide-skew-ver-cross-rev'\n | 'lg-lollipop'\n | 'lg-lollipop-rev'\n | 'lg-rotate'\n | 'lg-rotate-rev'\n | 'lg-tube';\n\n /**\n * Slide animation CSS easing property\n */\n easing: string;\n\n /**\n *Transition duration (in ms).\n */\n speed: number;\n\n /**\n * If you are using lightGallery for commercial projects, you need to purchase a commercial license\n * to get the license key. For projects that are compatible with GPLv3 license,\n * please contact us for getting a license key at
contact@lightgalleryjs.com.\n * If you want to test lightGallery before purchasing a commercial license, you can\n * use `0000-0000-000-0000` as a temporary license key\n */\n\n licenseKey: string;\n\n /**\n * Height of the gallery.\n * example '100%' , '300px'\n */\n height: string;\n\n /**\n * Width of the gallery.\n * example '100%' , '300px'\n */\n width: string;\n\n /**\n * Add custom class for gallery container\n * This can be used to set different style for different galleries\n */\n addClass: string;\n\n /**\n * Start animation class for the gallery.\n * @description\n *
    \n *
  • startClass will be empty zoomFromOrigin is true.
  • \n *
  • This can be used to change the starting effect when the image is loaded
  • \n *
  • This is also applied when navigating to new slides
  • \n *
\n */\n startClass: string;\n\n /**\n * Enable zoom from origin effect.\n * @description You need to know the original image size upfront and provide it via data-lg-size attribute as data-lg-size=\"1920-1280\"\n *\n * If you don't know, the size of a few images in the list, you can skip the data-lg-size attribute for the particular slides,\n * lightGallery will show the default animation if data-lg-size is not available\n *\n * If you are using responsive images,\n * you can pass a comma separated list of sizes combined with a max-width (up to what size the particular image should be used)\n *\n * example -\n * data-lg-size=\"240-160-375, 400-267-480, 1600-1067\"\n * data-responsive=\"img-240.jpg 375, img-400.jpg 480\"\n * data-src=\"img-1600.jpg\" \n *\n * In the above example, upto 375 width img.240.jpg and lg-size 240-160 will be used.\n * Similarly, upto 480 pixel width size 400-267 and img-400.jpg will be used\n * And above 480, lg-size 1600-1067 and img-1600.jpg will be used\n *\n *
    \n *
  • At the moment, zoomFromOrigin options is supported only for image slides.
  • \n *
  • Will be false if dynamic option is enabled or galleryID found in the URL.
  • \n *
  • startClass will be empty if zoomFromOrigin is true to avoid css conflicts.
  • \n *
\n */\n zoomFromOrigin: boolean;\n\n /**\n * Zoom from image animation duration\n */\n startAnimationDuration: number;\n\n /**\n * Backdrop transition duration.\n * Note - Do not change the value of backdrop via css.\n */\n backdropDuration: number;\n\n /**\n * Configure where the gallery should be appended.\n * Useful to create inline galleries and more\n * It is an empty string in the default settings and later assigned to document.body to avoid accessing document for SSR\n */\n container: HTMLElement | (() => HTMLElement | null) | (string | null);\n\n /**\n * Delay for hiding gallery controls in ms.\n * Pass 0 if you don't want to hide the controls\n */\n hideBarsDelay: number;\n\n /**\n * Delay in hiding controls for the first time when gallery is opened\n */\n showBarsAfter: number;\n\n /**\n * Delay slide transitions.\n * @description This is useful if you want to do any action in the current slide before moving to next slide.\n *
\n * For example, fading out the captions before going to next slide.\n * .lg-slide-progress class name is added to the current slide immediately after calling the slide method.\n * But transition begins only after the delay\n *
\n */\n slideDelay: number;\n\n /**\n * Support legacy browsers\n * @description Currently this is used only for adding support to srcset attribute via picturefill library\n * If true lightGallery will show warning message to include picturefill library\n */\n supportLegacyBrowser: boolean;\n\n /**\n * If true, toolbar, captions and thumbnails will not overlap with media element\n * This will not effect thumbnails if animateThumb is false\n * Also, toggle thumbnails button is not displayed if allowMediaOverlap is false\n *
\n * Note - Changing the position of the media on every slide transition creates a flickering effect.\n * Therefore, the height of the caption is calculated dynamically, only once based on the first slide caption.\n *
\n *
\n * if you have dynamic captions for each media,\n * you can provide an appropriate height for the captions via allowMediaOverlap option\n *
\n */\n allowMediaOverlap: boolean;\n\n /**\n * Video max size.\n * @description This can be over-written by passing specific size via data-lg-size attribute\n * Recommended video resolution and & aspect ratios https://support.google.com/youtube/answer/6375112\n */\n videoMaxSize: string;\n\n /**\n * Automatically load poster image for YouTube videos\n */\n loadYouTubePoster: boolean;\n\n /**\n * Height of the caption for calculating allowMediaOverlap positions\n * Note - this is only used to find the position of media item if allowMediaOverlap is true.\n * Not for setting height of the captions\n * Set 0 if you want to calculate the height of captions dynamically\n */\n defaultCaptionHeight: number;\n\n /**\n * aria-labelledby attribute fot gallery\n */\n ariaLabelledby: string;\n\n /**\n * aria-describedby attribute for gallery\n */\n ariaDescribedby: string;\n\n /**\n * Hide scrollbar when gallery is opened\n * @version V2.5.0\n */\n hideScrollbar: boolean;\n\n /**\n * Reset to previous scrollPosition when lightGallery is closed\n * @description By default, lightGallery doesn't hide the scrollbar for a smooth opening transition.\n * If a user changes the scroll position, lightGallery resets it to the previous value\n * @version V2.5.0\n */\n resetScrollPosition: boolean;\n\n /**\n * If false user won't be able to close the gallery at all\n * This is useful for creating inline galleries.\n */\n closable: boolean;\n\n /**\n * allows vertical drag/swipe to close gallery\n * false if option closable is false\n */\n swipeToClose: boolean;\n /**\n * allows clicks on black area to close gallery.\n */\n closeOnTap: boolean;\n\n /**\n * If false, close button won't be displayed.\n * Useful for creating inline galleries.\n */\n showCloseIcon: boolean;\n\n /**\n * Show maximize icon.\n * Useful for creating inline galleries.\n */\n showMaximizeIcon: boolean;\n\n /**\n * If false, will disable the ability to loop back to the beginning of the gallery from the last slide.\n */\n loop: boolean;\n\n /**\n * Whether the LightGallery could be closed by pressing the \"Esc\" key.\n */\n escKey: boolean;\n\n /**\n * Enable keyboard navigation\n */\n keyPress: boolean;\n\n /**\n * Trap focus within the lightGallery\n * @version V2.5.0\n */\n trapFocus: boolean;\n\n /**\n * If false, prev/next buttons will not be displayed.\n */\n controls: boolean;\n\n /**\n * Enable slideEnd animation\n */\n slideEndAnimation: boolean;\n\n /**\n * If true, prev/next button will be hidden on first/last image.\n * @description Note - this option will be ignored if loop or slideEndAnimation is set to true\n */\n hideControlOnEnd: boolean;\n\n /**\n * ability to navigate to next/prev slides on mousewheel\n */\n mousewheel: boolean;\n\n /**\n * Option to get captions from alt or title tags.\n */\n getCaptionFromTitleOrAlt: boolean;\n\n /**\n * control where the sub-html should be appended.\n * If you choose '.lg-outer', you are responsible for placing the div at the right position.\n * '.lg-outer' is useful if you want show custom HTML outside the normal gallery\n */\n appendSubHtmlTo: '.lg-sub-html' | '.lg-item' | '.lg-outer';\n\n /**\n * Set to true if the selector in \"data-sub-html\" should use the current item as its origin.\n */\n subHtmlSelectorRelative: boolean;\n\n /**\n * number of preload slides\n * @description will exicute only after the current slide is fully loaded.\n * for example, if you click 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 preload: number;\n\n /**\n * Control how many slide items should be kept in dom at a time\n * @description To improve performance by reducing number of gallery items in the dom,\n * lightGallery keeps only the lowest possible number of slides in the dom at a time.\n * This has a minimum value of 3\n */\n numberOfSlideItemsInDom: number;\n\n /**\n * Custom selector property instead of direct children.\n * @description Based on your markup structure, you can specify custom selectors to fetch media data for the gallery\n * Pass \"this\" to select same element\n * You can also pass HTMLCollection directly\n * Example - '.my-selector' | '#my-selector' | this | document.querySelectorAll('.my-selector')\n */\n selector: string | HTMLCollection[];\n\n /**\n * By default selector element relative to the current gallery.\n * Instead of that you can tell lightGallery to select element relative to another element.\n * Example - '.my-selector-container' | '#my-selector-container'\n * In the code this become selector = document.querySelector(this.s.selectWithin ).querySelectorAll(this.s.selector);\n */\n selectWithin: string;\n\n /**\n * Custom html for next control\n */\n nextHtml: string;\n\n /**\n * Custom html for prev control\n */\n prevHtml: string;\n\n /**\n * specify which slide should load initially\n */\n index: number;\n\n /**\n * Set width for iframe.\n */\n iframeWidth: string;\n\n /**\n * Set height for iframe.\n */\n iframeHeight: string;\n\n /**\n * Set max width for iframe.\n */\n iframeMaxWidth: string;\n\n /**\n * Set max height for iframe.\n */\n iframeMaxHeight: string;\n\n /**\n * Enable download button.\n * @description By default download url will be taken from data-src/href attribute but it supports only for modern browsers.\n * If you want you can provide another url for download via data-download-url.\n * pass false in data-download-url if you want to hide download button for the particular slide.\n */\n download: boolean;\n\n /**\n * Whether to show total number of images and index number of currently displayed image.\n */\n counter: boolean;\n\n /**\n * Where the counter should be appended\n */\n appendCounterTo: string;\n\n /**\n * By setting the swipeThreshold (in px) you can set how far the user must swipe for the next/prev image.\n */\n swipeThreshold: number;\n\n /**\n * Enables swipe support for touch devices\n */\n enableSwipe: boolean;\n\n /**\n * Enables desktop mouse drag support\n */\n enableDrag: boolean;\n\n /**\n * LightGallery can be instantiated and launched programmatically by setting this option to true and populating dynamicEl option (see below) with the definitions of images.\n */\n dynamic: boolean;\n\n /**\n * An array of objects (src, iframe, subHtml, thumb, poster, responsive, srcset sizes) representing gallery elements.\n */\n dynamicEl: GalleryItem[];\n\n /**\n * Fetch custom properties from the selector\n * @description this is useful for plugin development\n * By default lightGallery fetches and store all the props selectors to\n * reduce frequent dom interaction for fetching props every time.\n *\n * If you need any addition data to be fetched and stored in the galleryItems variable,\n * you can do this just by passing the prop names via extraProps\n * @example\n * HTML:\n *
\n * \n * \n *
\n * JS:\n * lightGallery(document.getElementById('lightGallery'), {\n * extraProps: ['customProp']\n * })\n * // Note - If you are using dynamic mode, you can pass any custom prop in the galleryItem\n * lightGallery(document.getElementById('lightGallery'), {\n * dynamic: true,\n * dynamicEl: [{\n * src: 'img/img1.jpg',\n * customProp:'abc',\n * }]\n * })\n *\n */\n extraProps: string[];\n\n /**\n * Option to fetch different thumbnail image other than first image\n * @description If you want to use external image for thumbnail,\n * add the path of that image inside \"data-\" attribute\n * and set value of this option to the name of your custom attribute.\n *\n * @example\n *
\n * \n *
\n *\n * lightGallery(document.getElementById('lightGallery'), {\n * exThumbImage: 'data-external-thumb-image'\n * })\n */\n exThumbImage: string;\n\n /**\n * Function to detect mobile devices\n */\n isMobile?: () => boolean;\n\n /**\n * Separate settings for mobile devices\n * @description Note - this is applied only at the time of loading\n * by default controls and close buttons are disabled on mobile devices.\n * use this options if you want to enable them or change any other settings for mobile devices\n * Note - mobileSettings does not merge default values, You need to provide all mobileSettings including default values\n */\n mobileSettings: Partial;\n\n /**\n * Customize string.\n * @description This can be useful if you want to localize the lightGallery strings to other languages.\n * Use your own service to translate the strings and pass it via settings.strings\n * You can find dedicated strings option for all lightGallery modules in their respective documentation.\n * Note - You need to provide values for all the strings. For example, even if you just want to change the closeGallery string, you need to provide all the other strings as well.\n */\n strings: LightGalleryCoreStrings;\n\n plugins: (new (instance: LightGallery, $LG: LgQuery) => any)[];\n}\n\nexport const lightGalleryCoreSettings: LightGalleryCoreSettings = {\n mode: 'lg-slide',\n easing: 'ease',\n speed: 400,\n licenseKey: '0000-0000-000-0000',\n height: '100%',\n width: '100%',\n addClass: '',\n startClass: 'lg-start-zoom',\n backdropDuration: 300,\n container: '',\n startAnimationDuration: 400,\n zoomFromOrigin: true,\n hideBarsDelay: 0,\n showBarsAfter: 10000,\n slideDelay: 0,\n supportLegacyBrowser: true,\n allowMediaOverlap: false,\n videoMaxSize: '1280-720',\n loadYouTubePoster: true,\n defaultCaptionHeight: 0,\n ariaLabelledby: '',\n ariaDescribedby: '',\n resetScrollPosition: true,\n hideScrollbar: false,\n closable: true,\n swipeToClose: true,\n closeOnTap: true,\n showCloseIcon: true,\n showMaximizeIcon: false,\n loop: true,\n escKey: true,\n keyPress: true,\n trapFocus: true,\n controls: true,\n slideEndAnimation: true,\n hideControlOnEnd: false,\n mousewheel: false,\n getCaptionFromTitleOrAlt: true,\n appendSubHtmlTo: '.lg-sub-html',\n subHtmlSelectorRelative: false,\n preload: 2,\n numberOfSlideItemsInDom: 10,\n selector: '',\n selectWithin: '',\n nextHtml: '',\n prevHtml: '',\n index: 0,\n iframeWidth: '100%',\n iframeHeight: '100%',\n iframeMaxWidth: '100%',\n iframeMaxHeight: '100%',\n download: true,\n counter: true,\n appendCounterTo: '.lg-toolbar',\n swipeThreshold: 50,\n enableSwipe: true,\n enableDrag: true,\n dynamic: false,\n dynamicEl: [],\n extraProps: [],\n exThumbImage: '',\n isMobile: undefined,\n mobileSettings: {\n controls: false,\n showCloseIcon: false,\n download: false,\n } as MobileSettings,\n plugins: [],\n strings: {\n closeGallery: 'Close gallery',\n toggleMaximize: 'Toggle maximize',\n previousSlide: 'Previous slide',\n nextSlide: 'Next slide',\n download: 'Download',\n playVideo: 'Play video',\n mediaLoadingFailed: 'Oops... Failed to load content...',\n } as LightGalleryCoreStrings,\n};\n","interface Offset {\n left: number;\n top: number;\n}\n\nfunction initLgPolyfills() {\n (function () {\n if (typeof window.CustomEvent === 'function') return false;\n\n function CustomEvent(event: string, params: any) {\n params = params || {\n bubbles: false,\n cancelable: false,\n detail: null,\n };\n const evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(\n event,\n params.bubbles,\n params.cancelable,\n params.detail,\n );\n return evt;\n }\n\n window.CustomEvent = CustomEvent as any;\n })();\n (function () {\n if (!Element.prototype.matches) {\n Element.prototype.matches =\n (Element.prototype as any).msMatchesSelector ||\n Element.prototype.webkitMatchesSelector;\n }\n })();\n}\n\nexport type LgQuery = (selector: any) => lgQuery;\nexport class lgQuery {\n static eventListeners: { [key: string]: any[] } = {};\n static generateUUID(): string {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(\n /[xy]/g,\n function (c) {\n const r = (Math.random() * 16) | 0,\n v = c == 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n },\n );\n }\n\n private selector: any;\n private firstElement: any;\n private cssVenderPrefixes: string[] = [\n 'TransitionDuration',\n 'TransitionTimingFunction',\n 'Transform',\n 'Transition',\n ];\n constructor(selector: string | Element) {\n this.selector = this._getSelector(selector);\n this.firstElement = this._getFirstEl();\n return this;\n }\n\n private _getSelector(\n selector: string | Element,\n context: Element | Document = document,\n ): Element | null | NodeListOf {\n if (typeof selector !== 'string') {\n return selector;\n }\n context = context || document;\n const fl = selector.substring(0, 1);\n if (fl === '#') {\n return context.querySelector(selector);\n } else {\n return context.querySelectorAll(selector);\n }\n }\n\n private _each(\n func: (\n elements: Element | NodeListOf | null,\n index: number,\n ) => void,\n ): this {\n if (!this.selector) {\n return this;\n }\n if (this.selector.length !== undefined) {\n [].forEach.call(this.selector, func);\n } else {\n func(this.selector, 0);\n }\n return this;\n }\n\n private _setCssVendorPrefix(\n el: any,\n cssProperty: string,\n value?: string | number,\n ): void {\n // prettier-ignore\n const property = cssProperty.replace(/-([a-z])/gi, function (\n s,\n group1,\n ) {\n return group1.toUpperCase();\n });\n if (this.cssVenderPrefixes.indexOf(property) !== -1) {\n el.style[\n property.charAt(0).toLowerCase() + property.slice(1)\n ] = 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 } else {\n el.style[property] = value;\n }\n }\n\n private _getFirstEl() {\n if (this.selector && this.selector.length !== undefined) {\n return this.selector[0];\n } else {\n return this.selector;\n }\n }\n\n private isEventMatched(event: string, eventName: string): boolean {\n const eventNamespace = eventName.split('.');\n return event\n .split('.')\n .filter((e) => e)\n .every((e) => {\n return eventNamespace.indexOf(e) !== -1;\n });\n }\n\n attr(attr: string): string;\n attr(attr: string, value: string | number | boolean): this;\n attr(attr: string, value?: string | number | boolean): string | this {\n if (value === undefined) {\n if (!this.firstElement) {\n return '';\n }\n return this.firstElement.getAttribute(attr);\n }\n this._each((el: any) => {\n el.setAttribute(attr, value);\n });\n return this;\n }\n\n find(selector: any): lgQuery {\n return $LG(this._getSelector(selector, this.selector));\n }\n\n first(): lgQuery {\n if (this.selector && this.selector.length !== undefined) {\n return $LG(this.selector[0]);\n } else {\n return $LG(this.selector);\n }\n }\n\n eq(index: number): lgQuery {\n return $LG(this.selector[index]);\n }\n\n parent(): lgQuery {\n return $LG(this.selector.parentElement);\n }\n\n get(): HTMLElement {\n return this._getFirstEl();\n }\n\n removeAttr(attributes: string): this {\n const attrs = attributes.split(' ');\n this._each((el: any) => {\n attrs.forEach((attr: string) => el.removeAttribute(attr));\n });\n return this;\n }\n\n wrap(className: string): this {\n if (!this.firstElement) {\n return this;\n }\n const wrapper = document.createElement('div');\n wrapper.className = className;\n this.firstElement.parentNode.insertBefore(wrapper, this.firstElement);\n this.firstElement.parentNode.removeChild(this.firstElement);\n wrapper.appendChild(this.firstElement);\n return this;\n }\n\n addClass(classNames = ''): this {\n this._each((el: any) => {\n // IE doesn't support multiple arguments\n classNames.split(' ').forEach((className) => {\n if (className) {\n el.classList.add(className);\n }\n });\n });\n return this;\n }\n\n removeClass(classNames: string): this {\n this._each((el: any) => {\n // IE doesn't support multiple arguments\n classNames.split(' ').forEach((className) => {\n if (className) {\n el.classList.remove(className);\n }\n });\n });\n return this;\n }\n\n hasClass(className: string): boolean {\n if (!this.firstElement) {\n return false;\n }\n return this.firstElement.classList.contains(className);\n }\n hasAttribute(attribute: string): boolean {\n if (!this.firstElement) {\n return false;\n }\n return this.firstElement.hasAttribute(attribute);\n }\n toggleClass(className: string): this {\n if (!this.firstElement) {\n return this;\n }\n if (this.hasClass(className)) {\n this.removeClass(className);\n } else {\n this.addClass(className);\n }\n return this;\n }\n\n css(property: string, value?: string | number): this {\n this._each((el: any) => {\n this._setCssVendorPrefix(el, property, value);\n });\n return this;\n }\n // Need to pass separate namespaces for separate elements\n on(events: string, listener: (e: any) => void): this {\n if (!this.selector) {\n return this;\n }\n events.split(' ').forEach((event: string) => {\n if (!Array.isArray(lgQuery.eventListeners[event])) {\n lgQuery.eventListeners[event] = [];\n }\n lgQuery.eventListeners[event].push(listener);\n this.selector.addEventListener(event.split('.')[0], listener);\n });\n\n return this;\n }\n // @todo - test this\n once(event: string, listener: (e: any) => void): this {\n this.on(event, () => {\n this.off(event);\n listener(event);\n });\n return this;\n }\n off(event: string): this {\n if (!this.selector) {\n return this;\n }\n Object.keys(lgQuery.eventListeners).forEach((eventName) => {\n if (this.isEventMatched(event, eventName)) {\n lgQuery.eventListeners[eventName].forEach((listener) => {\n this.selector.removeEventListener(\n eventName.split('.')[0],\n listener,\n );\n });\n lgQuery.eventListeners[eventName] = [];\n }\n });\n\n return this;\n }\n trigger(event: string, detail?: Detail): this {\n if (!this.firstElement) {\n return this;\n }\n\n const customEvent = new CustomEvent(event.split('.')[0], {\n detail: detail || null,\n });\n this.firstElement.dispatchEvent(customEvent);\n return this;\n }\n\n // Does not support IE\n load(url: string): this {\n fetch(url)\n .then((res) => res.text())\n .then((html) => {\n this.selector.innerHTML = html;\n });\n return this;\n }\n\n html(): string;\n html(html: string): this;\n html(html?: string): string | this {\n if (html === undefined) {\n if (!this.firstElement) {\n return '';\n }\n return this.firstElement.innerHTML;\n }\n this._each((el: any) => {\n el.innerHTML = html;\n });\n return this;\n }\n append(html: string | HTMLElement): this {\n this._each((el: any) => {\n if (typeof html === 'string') {\n el.insertAdjacentHTML('beforeend', html);\n } else {\n el.appendChild(html);\n }\n });\n return this;\n }\n prepend(html: string | HTMLElement): this {\n this._each((el: any) => {\n if (typeof html === 'string') {\n el.insertAdjacentHTML('afterbegin', html);\n } else if (html instanceof HTMLElement) {\n el.insertBefore(html.cloneNode(true), el.firstChild);\n }\n });\n return this;\n }\n remove(): this {\n this._each((el: any) => {\n el.parentNode.removeChild(el);\n });\n return this;\n }\n empty(): this {\n this._each((el: any) => {\n el.innerHTML = '';\n });\n return this;\n }\n // Supports only window\n scrollTop(): number;\n scrollTop(scrollTop: number): this;\n scrollTop(scrollTop?: number): number | this {\n if (scrollTop !== undefined) {\n document.body.scrollTop = scrollTop;\n document.documentElement.scrollTop = scrollTop;\n return this;\n } else {\n return (\n window.pageYOffset ||\n document.documentElement.scrollTop ||\n document.body.scrollTop ||\n 0\n );\n }\n }\n // Supports only window\n scrollLeft(): number;\n scrollLeft(scrollLeft?: number): this;\n scrollLeft(scrollLeft?: number): number | this {\n if (scrollLeft !== undefined) {\n document.body.scrollLeft = scrollLeft;\n document.documentElement.scrollLeft = scrollLeft;\n return this;\n } else {\n return (\n window.pageXOffset ||\n document.documentElement.scrollLeft ||\n document.body.scrollLeft ||\n 0\n );\n }\n }\n offset(): Offset {\n if (!this.firstElement) {\n return {\n left: 0,\n top: 0,\n };\n }\n const rect = this.firstElement.getBoundingClientRect();\n const bodyMarginLeft = $LG('body').style().marginLeft;\n\n // Minus body margin - https://stackoverflow.com/questions/30711548/is-getboundingclientrect-left-returning-a-wrong-value\n return {\n left: rect.left - parseFloat(bodyMarginLeft) + this.scrollLeft(),\n top: rect.top + this.scrollTop(),\n };\n }\n style(): CSSStyleDeclaration {\n if (!this.firstElement) {\n return {} as CSSStyleDeclaration;\n }\n return (\n this.firstElement.currentStyle ||\n window.getComputedStyle(this.firstElement)\n );\n }\n // Width without padding and border even if box-sizing is used.\n width(): number {\n const style = this.style();\n return (\n this.firstElement.clientWidth -\n parseFloat(style.paddingLeft) -\n parseFloat(style.paddingRight)\n );\n }\n // Height without padding and border even if box-sizing is used.\n height(): number {\n const style = this.style();\n return (\n this.firstElement.clientHeight -\n parseFloat(style.paddingTop) -\n parseFloat(style.paddingBottom)\n );\n }\n}\n\nexport function $LG(selector: any): lgQuery {\n initLgPolyfills();\n return new lgQuery(selector);\n}\n","import { $LG, lgQuery } from './lgQuery';\nimport { VideoSource } from './plugins/video/types';\nimport { VideoInfo } from './types';\n\nexport interface ImageSize {\n width: number;\n height: number;\n}\n\nexport interface ImageSources {\n media?: string;\n srcset: string;\n sizes?: string;\n type?: string;\n}\n\nexport interface GalleryItem {\n /**\n * url of the media\n * @data-attr data-src\n */\n src?: string;\n\n /**\n * Source attributes for the picture element\n * @data-attr data-sources\n */\n sources?: ImageSources[];\n\n /**\n * Thumbnail url\n * @description By default lightGallery uses the image inside gallery selector as thumbnail.\n * But, If you want to use external image for thumbnail,\n * pass the thumbnail url via any data attribute and\n * pass the attribute name via exThumbImage option\n * @example\n *
\n * \n *
\n *\n * lightGallery(document.getElementById('lightGallery'), {\n * exThumbImage: 'data-external-thumb-image'\n * })\n * @data-attr data-*\n */\n thumb?: string;\n\n /**\n * alt attribute for the image\n * @data-attr alt\n */\n alt?: string;\n\n /**\n * Title attribute for the video\n * @data-attr title\n */\n title?: string;\n\n /**\n * Title for iframe\n * @data-attr data-iframe-title\n */\n iframeTitle?: string;\n\n /**\n * Caption for the slide\n * @description You can either pass the HTML markup or the ID or class name of the element which contains the captions\n * @data-attr data-sub-html\n */\n subHtml?: string;\n\n /**\n * url of the file which contain the sub html.\n * @description Note - Does not support Internet Explorer browser\n * @data-attr data-sub-html-url\n */\n subHtmlUrl?: string;\n\n /**\n * Video source\n * @data-attr data-video\n */\n video?: VideoSource;\n\n /**\n * Poster url\n * @data-attr data-poster\n */\n poster?: string;\n\n /**\n * Custom slide name to use in the url when hash plugin is enabled\n * @data-attr data-slide-name\n */\n slideName?: string;\n\n /**\n * List of images and viewport's max width separated by comma.\n * @description Ex?: img/1-375.jpg 375, img/1-480.jpg 480, img/1-757.jpg 757.\n * @data-attr data-responsive\n */\n responsive?: string;\n\n /**\n * srcset attribute values for the main image\n * @data-attr data-srcset\n */\n srcset?: string;\n\n /**\n * srcset sizes attribute for the main image\n * @data-attr data-sizes\n */\n sizes?: string;\n\n /**\n * Set true is you want to open your url in an iframe\n * @data-attr data-iframe\n */\n iframe?: boolean;\n\n /**\n * Download url for your image/video.\n * @description Pass false if you want to disable the download button.\n * @data-attr data-download-url\n */\n downloadUrl?: string | boolean;\n\n /**\n * Name of the file after it is downloaded.\n * @description The HTML value of the download attribute.\n * There are no restrictions on allowed values, and the browser will automatically\n * detect the correct file extension and add it to the file (.img, .pdf, .txt, .html, etc.).\n * More info\n * @data-attr data-download\n */\n download?: string | boolean;\n\n /**\n * Actual size of the image in px.\n * @description This is used in zoom plugin to see the actual size of the image when double taped on the image.\n * @data-attr data-width\n */\n width?: string;\n\n /**\n * Facebook share URL.\n * @description Specify only if you want to provide separate share URL for the specific slide. By default, current browser URL is taken.\n * @data-attr data-facebook-share-url\n */\n facebookShareUrl?: string;\n\n /**\n * Tweet text\n * @data-attr data-tweet-text\n */\n tweetText?: string;\n\n /**\n * Twitter share URL.\n * @description Specify only if you want to provide separate share URL for the specific slide. By default, current browser URL will be taken.\n * @data-attr data-twitter-share-url\n */\n twitterShareUrl?: string;\n\n /**\n * Pinterest share URL.\n * @description Specify only if you want to provide separate share URL for the specific slide. By default, current browser URL will be taken.\n * Note?: Pinterest requires absolute URL\n * @data-attr data-pinterest-share-url\n */\n pinterestShareUrl?: string;\n\n /**\n * Description for Pinterest post.\n * @data-attr data-pinterest-text\n */\n pinterestText?: string;\n\n /**\n * Facebook comments body html\n * @description Please refer facebook official documentation for generating the HTML markup\n * @example\n * \n * \n * @data-attr data-fb-html\n */\n fbHtml?: string;\n\n /**\n * Disqus page identifier\n * @description Please refer official disqus documentation for more info\n * @data-attr data-disqus-identifier\n */\n disqusIdentifier?: string;\n\n /**\n * Disqus page url\n * @description Please refer official disqus documentation for more info\n * @data-attr data-disqus-url\n */\n disqusUrl?: string;\n\n __slideVideoInfo?: VideoInfo;\n [key: string]: any;\n}\n\nconst defaultDynamicOptions = [\n 'src',\n 'sources',\n 'subHtml',\n 'subHtmlUrl',\n 'html',\n 'video',\n 'poster',\n 'slideName',\n 'responsive',\n 'srcset',\n 'sizes',\n 'iframe',\n 'downloadUrl',\n 'download',\n 'width',\n 'facebookShareUrl',\n 'tweetText',\n 'iframeTitle',\n 'twitterShareUrl',\n 'pinterestShareUrl',\n 'pinterestText',\n 'fbHtml',\n 'disqusIdentifier',\n 'disqusUrl',\n];\n\n// Convert html data-attribute to camalcase\nexport function convertToData(attr: string): string {\n // FInd a way for lgsize\n if (attr === 'href') {\n return 'src';\n }\n attr = attr.replace('data-', '');\n attr = attr.charAt(0).toLowerCase() + attr.slice(1);\n attr = attr.replace(/-([a-z])/g, (g) => g[1].toUpperCase());\n\n return attr;\n}\n\nconst utils = {\n /**\n * Fetches HTML content from a given URL and inserts it into a specified element.\n *\n * @param url - The URL to fetch the HTML content from.\n * @param element - The DOM element (jQuery object) to insert the HTML content into.\n * @param insertMethod - The method to insert the HTML ('append' or 'replace').\n */\n fetchCaptionFromUrl(\n url: string,\n element: lgQuery,\n insertMethod: 'append' | 'replace',\n ): void {\n // Fetch content from the URL\n fetch(url)\n .then((response) => response.text())\n .then((htmlContent) => {\n if (insertMethod === 'append') {\n const contentDiv = `
${htmlContent}
`;\n element.append(contentDiv);\n } else {\n element.html(htmlContent);\n }\n });\n },\n /**\n * get possible width and height from the lgSize attribute. Used for ZoomFromOrigin option\n */\n getSize(\n el: HTMLElement,\n container: lgQuery,\n spacing = 0,\n defaultLgSize?: string,\n ): ImageSize | undefined {\n const LGel = $LG(el);\n let lgSize = LGel.attr('data-lg-size') || defaultLgSize;\n\n if (!lgSize) {\n return;\n }\n\n const isResponsiveSizes = lgSize.split(',');\n // if at-least two viewport sizes are available\n if (isResponsiveSizes[1]) {\n const wWidth = window.innerWidth;\n for (let i = 0; i < isResponsiveSizes.length; i++) {\n const size = isResponsiveSizes[i];\n const responsiveWidth = parseInt(size.split('-')[2], 10);\n if (responsiveWidth > wWidth) {\n lgSize = size;\n break;\n }\n\n // take last item as last option\n if (i === isResponsiveSizes.length - 1) {\n lgSize = size;\n }\n }\n }\n\n const size = lgSize.split('-');\n\n const width = parseInt(size[0], 10);\n const height = parseInt(size[1], 10);\n\n const cWidth = container.width();\n const cHeight = container.height() - spacing;\n\n const maxWidth = Math.min(cWidth, width);\n const maxHeight = Math.min(cHeight, height);\n\n const ratio = Math.min(maxWidth / width, maxHeight / height);\n\n return { width: width * ratio, height: height * ratio };\n },\n\n /**\n * @desc Get transform value based on the imageSize. Used for ZoomFromOrigin option\n * @param {jQuery Element}\n * @returns {String} Transform CSS string\n */\n getTransform(\n el: HTMLElement,\n container: lgQuery,\n top: number,\n bottom: number,\n imageSize?: ImageSize,\n ): string | undefined {\n if (!imageSize) {\n return;\n }\n const LGel = $LG(el).find('img').first();\n if (!LGel.get()) {\n return;\n }\n\n const containerRect = container.get().getBoundingClientRect();\n\n const wWidth = containerRect.width;\n\n // using innerWidth to include mobile safari bottom bar\n const wHeight = container.height() - (top + bottom);\n\n const elWidth = LGel.width();\n const elHeight = LGel.height();\n\n const elStyle = LGel.style();\n let x =\n (wWidth - elWidth) / 2 -\n LGel.offset().left +\n (parseFloat(elStyle.paddingLeft) || 0) +\n (parseFloat(elStyle.borderLeft) || 0) +\n $LG(window).scrollLeft() +\n containerRect.left;\n let y =\n (wHeight - elHeight) / 2 -\n LGel.offset().top +\n (parseFloat(elStyle.paddingTop) || 0) +\n (parseFloat(elStyle.borderTop) || 0) +\n $LG(window).scrollTop() +\n top;\n\n const scX = elWidth / imageSize.width;\n const scY = elHeight / imageSize.height;\n\n const transform =\n 'translate3d(' +\n (x *= -1) +\n 'px, ' +\n (y *= -1) +\n 'px, 0) scale3d(' +\n scX +\n ', ' +\n scY +\n ', 1)';\n return transform;\n },\n\n getIframeMarkup(\n iframeWidth: string,\n iframeHeight: string,\n iframeMaxWidth: string,\n iframeMaxHeight: string,\n src?: string,\n iframeTitle?: string,\n ): string {\n const title = iframeTitle ? 'title=\"' + iframeTitle + '\"' : '';\n return `
\n \n
`;\n },\n\n getImgMarkup(\n index: number,\n src: string,\n altAttr: string,\n srcset?: string,\n sizes?: string,\n sources?: ImageSources[],\n ): string {\n const srcsetAttr = srcset ? `srcset=\"${srcset}\"` : '';\n const sizesAttr = sizes ? `sizes=\"${sizes}\"` : '';\n const imgMarkup = ``;\n let sourceTag = '';\n if (sources) {\n const sourceObj =\n typeof sources === 'string' ? JSON.parse(sources) : sources;\n\n sourceTag = sourceObj.map((source: any) => {\n let attrs = '';\n Object.keys(source).forEach((key) => {\n // Do not remove the first space as it is required to separate the attributes\n attrs += ` ${key}=\"${source[key]}\"`;\n });\n return ``;\n });\n }\n return `${sourceTag}${imgMarkup}`;\n },\n\n // Get src from responsive src\n getResponsiveSrc(srcItms: string[]): string {\n const rsWidth = [];\n const rsSrc = [];\n let src = '';\n for (let i = 0; i < srcItms.length; i++) {\n const _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 const wWidth = window.innerWidth;\n for (let j = 0; j < rsWidth.length; j++) {\n if (parseInt(rsWidth[j], 10) > wWidth) {\n src = rsSrc[j];\n break;\n }\n }\n return src;\n },\n\n isImageLoaded(img: HTMLImageElement): boolean {\n if (!img) return false;\n // During the onload event, IE correctly identifies any images that\n // weren’t downloaded as not complete. Others should too. Gecko-based\n // browsers act like NS4 in that they report this incorrectly.\n if (!img.complete) {\n return false;\n }\n\n // However, they do have two very useful properties: naturalWidth and\n // naturalHeight. These give the true size of the image. If it failed\n // to load, either of these should be zero.\n if (img.naturalWidth === 0) {\n return false;\n }\n\n // No other way of checking: assume it’s ok.\n return true;\n },\n\n getVideoPosterMarkup(\n _poster: string,\n dummyImg: string | HTMLElement,\n videoContStyle: string,\n playVideoString: string,\n _isVideo?: VideoInfo,\n ): string {\n let 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 let _dummy = dummyImg;\n if (typeof dummyImg !== 'string') {\n _dummy = dummyImg.outerHTML;\n }\n return `
\n
\n \n ${playVideoString}\n \n \n \n \n \n \n \n
\n ${_dummy}\n \n
`;\n },\n\n getFocusableElements(container: HTMLElement): NodeListOf {\n const elements = container.querySelectorAll(\n 'a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type=\"text\"]:not([disabled]), input[type=\"radio\"]:not([disabled]), input[type=\"checkbox\"]:not([disabled]), select:not([disabled])',\n );\n const visibleElements = [].filter.call(elements, (element) => {\n const style = window.getComputedStyle(element);\n return style.display !== 'none' && style.visibility !== 'hidden';\n });\n return (visibleElements as unknown) as NodeListOf;\n },\n\n /**\n * @desc Create dynamic elements array from gallery items when dynamic option is false\n * It helps to avoid frequent DOM interaction\n * and avoid multiple checks for dynamic elments\n *\n * @returns {Array} dynamicEl\n */\n getDynamicOptions(\n items: any,\n extraProps: string[],\n getCaptionFromTitleOrAlt: boolean,\n exThumbImage: string,\n ): GalleryItem[] {\n const dynamicElements: GalleryItem[] = [];\n const availableDynamicOptions = [\n ...defaultDynamicOptions,\n ...extraProps,\n ];\n [].forEach.call(items, (item: HTMLElement) => {\n const dynamicEl: GalleryItem = {} as GalleryItem;\n for (let i = 0; i < item.attributes.length; i++) {\n const attr = item.attributes[i];\n if (attr.specified) {\n const dynamicAttr = convertToData(attr.name);\n let label = '';\n if (availableDynamicOptions.indexOf(dynamicAttr) > -1) {\n label = dynamicAttr;\n }\n if (label) {\n (dynamicEl as any)[label] = attr.value;\n }\n }\n }\n const currentItem = $LG(item);\n const alt = currentItem.find('img').first().attr('alt');\n const title = currentItem.attr('title');\n\n const thumb = exThumbImage\n ? currentItem.attr(exThumbImage)\n : currentItem.find('img').first().attr('src');\n dynamicEl.thumb = thumb;\n\n if (getCaptionFromTitleOrAlt && !dynamicEl.subHtml) {\n dynamicEl.subHtml = title || alt || '';\n }\n dynamicEl.alt = alt || title || '';\n dynamicElements.push(dynamicEl);\n });\n return dynamicElements;\n },\n isMobile(): boolean {\n return /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);\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 * @todo - this information can be moved to dynamicEl to avoid frequent calls\n */\n\n isVideo(\n src: string,\n isHTML5VIdeo: boolean,\n index: number,\n ): VideoInfo | undefined {\n if (!src) {\n if (isHTML5VIdeo) {\n return {\n html5: true,\n };\n } else {\n console.error(\n 'lightGallery :- data-src is not provided on slide item ' +\n (index + 1) +\n '. Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/',\n );\n return;\n }\n }\n\n const youtube = src.match(\n /\\/\\/(?:www\\.)?youtu(?:\\.be|be\\.com|be-nocookie\\.com)\\/(?:watch\\?v=|embed\\/)?([a-z0-9\\-\\_\\%]+)([\\&|?][\\S]*)*/i,\n );\n const vimeo = src.match(\n /\\/\\/(?:www\\.)?(?:player\\.)?vimeo.com\\/(?:video\\/)?([0-9a-z\\-_]+)(.*)?/i,\n );\n const wistia = src.match(\n /https?:\\/\\/(.+)?(wistia\\.com|wi\\.st)\\/(medias|embed)\\/([0-9a-z\\-_]+)(.*)/,\n );\n\n if (youtube) {\n return {\n youtube,\n };\n } else if (vimeo) {\n return {\n vimeo,\n };\n } else if (wistia) {\n return {\n wistia,\n };\n }\n },\n};\n\nexport default utils;\n","import {\n AfterAppendSlideEventDetail,\n AfterAppendSubHtmlDetail,\n BeforeSlideDetail,\n lGEvents,\n SlideItemLoadDetail,\n} from './lg-events';\nimport {\n LightGalleryAllSettings,\n lightGalleryCoreSettings,\n LightGallerySettings,\n} from './lg-settings';\nimport utils, { GalleryItem, ImageSize } from './lg-utils';\nimport { $LG, lgQuery } from './lgQuery';\nimport {\n Coords,\n MediaContainerPosition,\n SlideDirection,\n VideoInfo,\n} from './types';\n\ndeclare let picturefill: any;\n\n// @ref - https://stackoverflow.com/questions/3971841/how-to-resize-images-proportionally-keeping-the-aspect-ratio\n// @ref - https://2ality.com/2017/04/setting-up-multi-platform-packages.html\n\n// Unique id for each gallery\nlet lgId = 0;\n\nexport class LightGallery {\n public settings!: LightGalleryAllSettings;\n public galleryItems!: GalleryItem[];\n\n // Current gallery item\n public lgId!: number;\n\n public el!: HTMLElement;\n public LGel!: lgQuery;\n public lgOpened = false;\n\n public index = 0;\n\n // lightGallery modules\n public plugins: any[] = [];\n\n // false when lightGallery load first slide content;\n public lGalleryOn = false;\n\n // True when a slide animation is in progress\n public lgBusy = false;\n\n // Type of touch action - {swipe, zoomSwipe, pinch}\n public touchAction?: 'swipe' | 'zoomSwipe' | 'pinch';\n\n // Direction of swipe/drag - {horizontal, vertical}\n public swipeDirection?: 'horizontal' | 'vertical';\n\n // Timeout function for hiding controls;\n public hideBarTimeout: any;\n\n public currentItemsInDom: string[] = [];\n\n public outer!: lgQuery;\n\n public items: any;\n\n public $backdrop!: lgQuery;\n public $lgComponents!: lgQuery;\n\n public $container!: lgQuery;\n\n public $inner!: lgQuery;\n public $content!: lgQuery;\n public $toolbar!: lgQuery;\n\n // Scroll top value before lightGallery is opened\n public prevScrollTop = 0;\n\n public bodyPaddingRight = 0;\n\n private zoomFromOrigin!: boolean;\n\n private currentImageSize?: ImageSize;\n\n private isDummyImageRemoved = false;\n\n private dragOrSwipeEnabled = false;\n\n public mediaContainerPosition = {\n top: 0,\n bottom: 0,\n };\n\n constructor(element: HTMLElement, options?: LightGallerySettings) {\n if (!element) {\n return this;\n }\n lgId++;\n this.lgId = lgId;\n\n this.el = element;\n this.LGel = $LG(element);\n\n this.generateSettings(options);\n\n this.buildModules();\n\n // When using dynamic mode, ensure dynamicEl is an array\n if (\n this.settings.dynamic &&\n this.settings.dynamicEl !== undefined &&\n !Array.isArray(this.settings.dynamicEl)\n ) {\n throw 'When using dynamic mode, you must also define dynamicEl as an Array.';\n }\n\n this.galleryItems = this.getItems();\n this.normalizeSettings();\n\n // Gallery items\n\n this.init();\n\n this.validateLicense();\n\n return this;\n }\n\n private generateSettings(options?: LightGallerySettings) {\n // lightGallery settings\n this.settings = {\n ...lightGalleryCoreSettings,\n ...options,\n } as LightGalleryAllSettings;\n if (\n this.settings.isMobile &&\n typeof this.settings.isMobile === 'function'\n ? this.settings.isMobile()\n : utils.isMobile()\n ) {\n const mobileSettings = {\n ...this.settings.mobileSettings,\n ...this.settings.mobileSettings,\n };\n this.settings = { ...this.settings, ...mobileSettings };\n }\n }\n\n private normalizeSettings() {\n if (this.settings.slideEndAnimation) {\n this.settings.hideControlOnEnd = false;\n }\n if (!this.settings.closable) {\n this.settings.swipeToClose = false;\n }\n\n // And reset it on close to get the correct value next time\n this.zoomFromOrigin = this.settings.zoomFromOrigin;\n\n // At the moment, Zoom from image doesn't support dynamic options\n // @todo add zoomFromOrigin support for dynamic images\n if (this.settings.dynamic) {\n this.zoomFromOrigin = false;\n }\n\n if (this.settings.container) {\n const { container } = this.settings;\n if (typeof container === 'function') {\n this.settings.container = container();\n } else if (typeof container === 'string') {\n const el = document.querySelector(container);\n this.settings.container = el ?? document.body;\n }\n } else {\n this.settings.container = document.body;\n }\n\n // settings.preload should not be grater than $item.length\n this.settings.preload = Math.min(\n this.settings.preload,\n this.galleryItems.length,\n );\n }\n\n init(): void {\n this.addSlideVideoInfo(this.galleryItems);\n\n this.buildStructure();\n\n this.LGel.trigger(lGEvents.init, {\n instance: this,\n });\n\n if (this.settings.keyPress) {\n this.keyPress();\n }\n\n setTimeout(() => {\n this.enableDrag();\n this.enableSwipe();\n this.triggerPosterClick();\n }, 50);\n\n this.arrow();\n if (this.settings.mousewheel) {\n this.mousewheel();\n }\n\n if (!this.settings.dynamic) {\n this.openGalleryOnItemClick();\n }\n }\n\n openGalleryOnItemClick(): void {\n // Using for loop instead of using bubbling as the items can be any html element.\n for (let index = 0; index < this.items.length; index++) {\n const element = this.items[index];\n const $element = $LG(element);\n // Using different namespace for click because click event should not unbind if selector is same object('this')\n // @todo manage all event listners - should have namespace that represent element\n const uuid = lgQuery.generateUUID();\n $element\n .attr('data-lg-id', uuid)\n .on(`click.lgcustom-item-${uuid}`, (e) => {\n e.preventDefault();\n const currentItemIndex = this.settings.index || index;\n this.openGallery(currentItemIndex, element);\n });\n }\n }\n\n /**\n * Module constructor\n * Modules are build incrementally.\n * Gallery should be opened only once all the modules are initialized.\n * use moduleBuildTimeout to make sure this\n */\n buildModules(): void {\n this.settings.plugins.forEach((plugin) => {\n this.plugins.push(new plugin(this, $LG));\n });\n }\n\n validateLicense(): void {\n if (!this.settings.licenseKey) {\n console.error('Please provide a valid license key');\n } else if (this.settings.licenseKey === '0000-0000-000-0000') {\n console.warn(\n `lightGallery: ${this.settings.licenseKey} license key is not valid for production use`,\n );\n }\n }\n\n getSlideItem(index: number): lgQuery {\n return $LG(this.getSlideItemId(index));\n }\n\n getSlideItemId(index: number): string {\n return `#lg-item-${this.lgId}-${index}`;\n }\n\n getIdName(id: string): string {\n return `${id}-${this.lgId}`;\n }\n getElementById(id: string): lgQuery {\n return $LG(`#${this.getIdName(id)}`);\n }\n\n manageSingleSlideClassName(): void {\n if (this.galleryItems.length < 2) {\n this.outer.addClass('lg-single-item');\n } else {\n this.outer.removeClass('lg-single-item');\n }\n }\n\n buildStructure(): void {\n const container = this.$container && this.$container.get();\n if (container) {\n return;\n }\n let controls = '';\n let subHtmlCont = '';\n\n // Create controls\n if (this.settings.controls) {\n controls = `\n `;\n }\n\n if (this.settings.appendSubHtmlTo !== '.lg-item') {\n subHtmlCont =\n '
';\n }\n\n let addClasses = '';\n\n if (this.settings.allowMediaOverlap) {\n // Do not remove space before last single quote\n addClasses += 'lg-media-overlap ';\n }\n\n const ariaLabelledby = this.settings.ariaLabelledby\n ? 'aria-labelledby=\"' + this.settings.ariaLabelledby + '\"'\n : '';\n const ariaDescribedby = this.settings.ariaDescribedby\n ? 'aria-describedby=\"' + this.settings.ariaDescribedby + '\"'\n : '';\n\n const containerClassName = `lg-container ${this.settings.addClass} ${\n document.body !== this.settings.container ? 'lg-inline' : ''\n }`;\n const closeIcon =\n this.settings.closable && this.settings.showCloseIcon\n ? ``\n : '';\n const maximizeIcon = this.settings.showMaximizeIcon\n ? ``\n : '';\n const template = `\n
\n
\n\n
\n\n
\n
\n
\n ${controls}\n
\n
\n ${maximizeIcon}\n ${closeIcon}\n
\n ${\n this.settings.appendSubHtmlTo === '.lg-outer'\n ? subHtmlCont\n : ''\n }\n
\n ${\n this.settings.appendSubHtmlTo === '.lg-sub-html'\n ? subHtmlCont\n : ''\n }\n
\n
\n
\n `;\n\n $LG(this.settings.container).append(template);\n\n if (document.body !== this.settings.container) {\n $LG(this.settings.container).css('position', 'relative');\n }\n\n this.outer = this.getElementById('lg-outer');\n this.$lgComponents = this.getElementById('lg-components');\n this.$backdrop = this.getElementById('lg-backdrop');\n this.$container = this.getElementById('lg-container');\n this.$inner = this.getElementById('lg-inner');\n this.$content = this.getElementById('lg-content');\n this.$toolbar = this.getElementById('lg-toolbar');\n\n this.$backdrop.css(\n 'transition-duration',\n this.settings.backdropDuration + 'ms',\n );\n\n let outerClassNames = `${this.settings.mode} `;\n\n this.manageSingleSlideClassName();\n\n if (this.settings.enableDrag) {\n outerClassNames += 'lg-grab ';\n }\n\n this.outer.addClass(outerClassNames);\n\n this.$inner.css('transition-timing-function', this.settings.easing);\n this.$inner.css('transition-duration', this.settings.speed + 'ms');\n\n if (this.settings.download) {\n this.$toolbar.append(\n ``,\n );\n }\n\n this.counter();\n\n $LG(window).on(\n `resize.lg.global${this.lgId} orientationchange.lg.global${this.lgId}`,\n () => {\n this.refreshOnResize();\n },\n );\n\n this.hideBars();\n\n this.manageCloseGallery();\n this.toggleMaximize();\n\n this.initModules();\n }\n\n refreshOnResize(): void {\n if (this.lgOpened) {\n const currentGalleryItem = this.galleryItems[this.index];\n const { __slideVideoInfo } = currentGalleryItem;\n\n this.mediaContainerPosition = this.getMediaContainerPosition();\n const { top, bottom } = this.mediaContainerPosition;\n this.currentImageSize = utils.getSize(\n this.items[this.index],\n this.outer,\n top + bottom,\n __slideVideoInfo && this.settings.videoMaxSize,\n );\n if (__slideVideoInfo) {\n this.resizeVideoSlide(this.index, this.currentImageSize);\n }\n if (this.zoomFromOrigin && !this.isDummyImageRemoved) {\n const imgStyle = this.getDummyImgStyles(this.currentImageSize);\n this.outer\n .find('.lg-current .lg-dummy-img')\n .first()\n .attr('style', imgStyle);\n }\n this.LGel.trigger(lGEvents.containerResize);\n }\n }\n\n resizeVideoSlide(index: number, imageSize?: ImageSize): void {\n const lgVideoStyle = this.getVideoContStyle(imageSize);\n const currentSlide = this.getSlideItem(index);\n currentSlide.find('.lg-video-cont').attr('style', lgVideoStyle);\n }\n\n /**\n * Update slides dynamically.\n * Add, edit or delete slides dynamically when lightGallery is opened.\n * Modify the current gallery items and pass it via updateSlides method\n * @note\n * - Do not mutate existing lightGallery items directly.\n * - Always pass new list of gallery items\n * - You need to take care of thumbnails outside the gallery if any\n * - user this method only if you want to update slides when the gallery is opened. Otherwise, use `refresh()` method.\n * @param items Gallery items\n * @param index After the update operation, which slide gallery should navigate to\n * @category lGPublicMethods\n * @example\n * const plugin = lightGallery();\n *\n * // Adding slides dynamically\n * let galleryItems = [\n * // Access existing lightGallery items\n * // galleryItems are automatically generated internally from the gallery HTML markup\n * // or directly from galleryItems when dynamic gallery is used\n * ...plugin.galleryItems,\n * ...[\n * {\n * src: 'img/img-1.png',\n * thumb: 'img/thumb1.png',\n * },\n * ],\n * ];\n * plugin.updateSlides(\n * galleryItems,\n * plugin.index,\n * );\n *\n *\n * // Remove slides dynamically\n * galleryItems = JSON.parse(\n * JSON.stringify(updateSlideInstance.galleryItems),\n * );\n * galleryItems.shift();\n * updateSlideInstance.updateSlides(galleryItems, 1);\n * @see Demo\n */\n updateSlides(items: GalleryItem[], index: number): void {\n if (this.index > items.length - 1) {\n this.index = items.length - 1;\n }\n if (items.length === 1) {\n this.index = 0;\n }\n if (!items.length) {\n this.closeGallery();\n return;\n }\n const currentSrc = this.galleryItems[index].src;\n this.galleryItems = items;\n this.updateControls();\n this.$inner.empty();\n this.currentItemsInDom = [];\n\n let _index = 0;\n // Find the current index based on source value of the slide\n this.galleryItems.some((galleryItem, itemIndex) => {\n if (galleryItem.src === currentSrc) {\n _index = itemIndex;\n return true;\n }\n return false;\n });\n\n this.currentItemsInDom = this.organizeSlideItems(_index, -1);\n this.loadContent(_index, true);\n this.getSlideItem(_index).addClass('lg-current');\n\n this.index = _index;\n this.updateCurrentCounter(_index);\n this.LGel.trigger(lGEvents.updateSlides);\n }\n\n // Get gallery items based on multiple conditions\n getItems(): GalleryItem[] {\n // Gallery items\n this.items = [];\n if (!this.settings.dynamic) {\n if (this.settings.selector === 'this') {\n this.items.push(this.el);\n } else if (this.settings.selector) {\n if (typeof this.settings.selector === 'string') {\n if (this.settings.selectWithin) {\n const selectWithin = $LG(this.settings.selectWithin);\n this.items = selectWithin\n .find(this.settings.selector)\n .get();\n } else {\n this.items = this.el.querySelectorAll(\n this.settings.selector,\n );\n }\n } else {\n this.items = this.settings.selector;\n }\n } else {\n this.items = this.el.children;\n }\n return utils.getDynamicOptions(\n this.items,\n this.settings.extraProps,\n this.settings.getCaptionFromTitleOrAlt,\n this.settings.exThumbImage,\n );\n } else {\n return this.settings.dynamicEl || [];\n }\n }\n\n shouldHideScrollbar(): boolean {\n return (\n this.settings.hideScrollbar &&\n document.body === this.settings.container\n );\n }\n\n hideScrollbar(): void {\n if (!this.shouldHideScrollbar()) {\n return;\n }\n this.bodyPaddingRight = parseFloat($LG('body').style().paddingRight);\n const bodyRect = document.documentElement.getBoundingClientRect();\n const scrollbarWidth = window.innerWidth - bodyRect.width;\n\n $LG(document.body).css(\n 'padding-right',\n scrollbarWidth + this.bodyPaddingRight + 'px',\n );\n $LG(document.body).addClass('lg-overlay-open');\n }\n\n resetScrollBar(): void {\n if (!this.shouldHideScrollbar()) {\n return;\n }\n $LG(document.body).css('padding-right', this.bodyPaddingRight + 'px');\n $LG(document.body).removeClass('lg-overlay-open');\n }\n\n /**\n * Open lightGallery.\n * Open gallery with specific slide by passing index of the slide as parameter.\n * @category lGPublicMethods\n * @param {Number} index - index of the slide\n * @param {HTMLElement} element - Which image lightGallery should zoom from\n *\n * @example\n * const $dynamicGallery = document.getElementById('dynamic-gallery-demo');\n * const dynamicGallery = lightGallery($dynamicGallery, {\n * dynamic: true,\n * dynamicEl: [\n * {\n * src: 'img/1.jpg',\n * thumb: 'img/thumb-1.jpg',\n * subHtml: '

Image 1 title

Image 1 descriptions.

',\n * },\n * ...\n * ],\n * });\n * $dynamicGallery.addEventListener('click', function () {\n * // Starts with third item.(Optional).\n * // This is useful if you want use dynamic mode with\n * // custom thumbnails (thumbnails outside gallery),\n * dynamicGallery.openGallery(2);\n * });\n *\n */\n openGallery(index = this.settings.index, element?: HTMLElement): void {\n // prevent accidental double execution\n if (this.lgOpened) return;\n this.lgOpened = true;\n this.outer.removeClass('lg-hide-items');\n\n this.hideScrollbar();\n\n // Add display block, but still has opacity 0\n this.$container.addClass('lg-show');\n\n const itemsToBeInsertedToDom = this.getItemsToBeInsertedToDom(\n index,\n index,\n );\n this.currentItemsInDom = itemsToBeInsertedToDom;\n\n let items = '';\n itemsToBeInsertedToDom.forEach((item) => {\n items = items + `
`;\n });\n\n this.$inner.append(items);\n this.addHtml(index);\n let transform: string | undefined = '';\n this.mediaContainerPosition = this.getMediaContainerPosition();\n const { top, bottom } = this.mediaContainerPosition;\n if (!this.settings.allowMediaOverlap) {\n this.setMediaContainerPosition(top, bottom);\n }\n const { __slideVideoInfo } = this.galleryItems[index];\n if (this.zoomFromOrigin && element) {\n this.currentImageSize = utils.getSize(\n element,\n this.outer,\n top + bottom,\n __slideVideoInfo && this.settings.videoMaxSize,\n );\n transform = utils.getTransform(\n element,\n this.outer,\n top,\n bottom,\n this.currentImageSize,\n );\n }\n if (!this.zoomFromOrigin || !transform) {\n this.outer.addClass(this.settings.startClass);\n this.getSlideItem(index).removeClass('lg-complete');\n }\n const timeout = this.settings.zoomFromOrigin\n ? 100\n : this.settings.backdropDuration;\n setTimeout(() => {\n this.outer.addClass('lg-components-open');\n }, timeout);\n this.index = index;\n this.LGel.trigger(lGEvents.beforeOpen);\n\n // add class lg-current to remove initial transition\n this.getSlideItem(index).addClass('lg-current');\n\n this.lGalleryOn = false;\n // Store the current scroll top value to scroll back after closing the gallery..\n this.prevScrollTop = $LG(window).scrollTop();\n\n setTimeout(() => {\n // Need to check both zoomFromOrigin and transform values as we need to set set the\n // default opening animation if user missed to add the lg-size attribute\n\n if (this.zoomFromOrigin && transform) {\n const currentSlide = this.getSlideItem(index);\n currentSlide.css('transform', transform);\n setTimeout(() => {\n currentSlide\n .addClass('lg-start-progress lg-start-end-progress')\n .css(\n 'transition-duration',\n this.settings.startAnimationDuration + 'ms',\n );\n this.outer.addClass('lg-zoom-from-image');\n });\n setTimeout(() => {\n currentSlide.css('transform', 'translate3d(0, 0, 0)');\n }, 100);\n }\n\n setTimeout(() => {\n this.$backdrop.addClass('in');\n this.$container.addClass('lg-show-in');\n }, 10);\n\n setTimeout(() => {\n if (\n this.settings.trapFocus &&\n document.body === this.settings.container\n ) {\n this.trapFocus();\n }\n }, this.settings.backdropDuration + 50);\n\n // lg-visible class resets gallery opacity to 1\n if (!this.zoomFromOrigin || !transform) {\n setTimeout(() => {\n this.outer.addClass('lg-visible');\n }, this.settings.backdropDuration);\n }\n\n // initiate slide function\n this.slide(index, false, false, false);\n\n this.LGel.trigger(lGEvents.afterOpen);\n });\n\n if (document.body === this.settings.container) {\n $LG('html').addClass('lg-on');\n }\n }\n\n /**\n * Note - Changing the position of the media on every slide transition creates a flickering effect.\n * Therefore, The height of the caption is calculated dynamically, only once based on the first slide caption.\n * if you have dynamic captions for each media,\n * you can provide an appropriate height for the captions via allowMediaOverlap option\n */\n public getMediaContainerPosition(): MediaContainerPosition {\n if (this.settings.allowMediaOverlap) {\n return {\n top: 0,\n bottom: 0,\n };\n }\n const top = this.$toolbar.get().clientHeight || 0;\n const subHtml = this.outer.find('.lg-components .lg-sub-html').get();\n const captionHeight =\n this.settings.defaultCaptionHeight ||\n (subHtml && subHtml.clientHeight) ||\n 0;\n const thumbContainer = this.outer.find('.lg-thumb-outer').get();\n const thumbHeight = thumbContainer ? thumbContainer.clientHeight : 0;\n const bottom = thumbHeight + captionHeight;\n return {\n top,\n bottom,\n };\n }\n\n private setMediaContainerPosition(top = 0, bottom = 0): void {\n this.$content.css('top', top + 'px').css('bottom', bottom + 'px');\n }\n\n hideBars(): void {\n // Hide controllers if mouse doesn't move for some period\n setTimeout(() => {\n this.outer.removeClass('lg-hide-items');\n if (this.settings.hideBarsDelay > 0) {\n this.outer.on('mousemove.lg click.lg touchstart.lg', () => {\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(() => {\n this.outer.addClass('lg-hide-items');\n }, this.settings.hideBarsDelay);\n });\n this.outer.trigger('mousemove.lg');\n }\n }, this.settings.showBarsAfter);\n }\n\n initPictureFill($img: lgQuery): void {\n if (this.settings.supportLegacyBrowser) {\n try {\n picturefill({\n elements: [$img.get()],\n });\n } catch (e) {\n console.warn(\n 'lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document.',\n );\n }\n }\n }\n\n /**\n * @desc Create image counter\n * Ex: 1/10\n */\n counter(): void {\n if (this.settings.counter) {\n const counterHtml = `
\n ${this.index + 1} /\n ${\n this.galleryItems.length\n }
`;\n this.outer.find(this.settings.appendCounterTo).append(counterHtml);\n }\n }\n\n /**\n * @desc add sub-html into the slide\n * @param {Number} index - index of the slide\n */\n addHtml(index: number): void {\n let subHtml;\n let subHtmlUrl;\n if (this.galleryItems[index].subHtmlUrl) {\n subHtmlUrl = this.galleryItems[index].subHtmlUrl;\n } else {\n subHtml = this.galleryItems[index].subHtml;\n }\n\n if (!subHtmlUrl) {\n if (subHtml) {\n // get first letter of sub-html\n // if first letter starts with . or # get the html form the jQuery object\n const fL = subHtml.substring(0, 1);\n if (fL === '.' || fL === '#') {\n try {\n if (\n this.settings.subHtmlSelectorRelative &&\n !this.settings.dynamic\n ) {\n subHtml = $LG(this.items)\n .eq(index)\n .find(subHtml)\n .first()\n .html();\n } else {\n subHtml = $LG(subHtml).first().html();\n }\n } catch (error) {\n console.warn(\n `Error processing subHtml selector \"${subHtml}\"`,\n );\n subHtml = '';\n }\n }\n } else {\n subHtml = '';\n }\n }\n\n if (this.settings.appendSubHtmlTo !== '.lg-item') {\n if (subHtmlUrl) {\n utils.fetchCaptionFromUrl(\n subHtmlUrl,\n this.outer.find('.lg-sub-html'),\n 'replace',\n );\n } else {\n this.outer.find('.lg-sub-html').html(subHtml as string);\n }\n } else {\n const currentSlide = $LG(this.getSlideItemId(index));\n if (subHtmlUrl) {\n utils.fetchCaptionFromUrl(subHtmlUrl, currentSlide, 'append');\n } else {\n currentSlide.append(\n `
${subHtml}
`,\n );\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\n .find(this.settings.appendSubHtmlTo)\n .addClass('lg-empty-html');\n } else {\n this.outer\n .find(this.settings.appendSubHtmlTo)\n .removeClass('lg-empty-html');\n }\n }\n\n this.LGel.trigger(\n lGEvents.afterAppendSubHtml,\n {\n index,\n },\n );\n }\n\n /**\n * @desc Preload slides\n * @param {Number} index - index of the slide\n * @todo preload not working for the first slide, Also, should work for the first and last slide as well\n */\n preload(index: number): void {\n for (let i = 1; i <= this.settings.preload; i++) {\n if (i >= this.galleryItems.length - index) {\n break;\n }\n\n this.loadContent(index + i, false);\n }\n\n for (let j = 1; j <= this.settings.preload; j++) {\n if (index - j < 0) {\n break;\n }\n\n this.loadContent(index - j, false);\n }\n }\n\n getDummyImgStyles(imageSize?: ImageSize): string {\n if (!imageSize) return '';\n return `width:${imageSize.width}px;\n margin-left: -${imageSize.width / 2}px;\n margin-top: -${imageSize.height / 2}px;\n height:${imageSize.height}px`;\n }\n getVideoContStyle(imageSize?: ImageSize): string {\n if (!imageSize) return '';\n return `width:${imageSize.width}px;\n height:${imageSize.height}px`;\n }\n\n getDummyImageContent(\n $currentSlide: lgQuery,\n index: number,\n alt: string,\n ): HTMLImageElement | string {\n let $currentItem;\n if (!this.settings.dynamic) {\n $currentItem = $LG(this.items).eq(index);\n }\n if ($currentItem) {\n let _dummyImgSrc;\n if (!this.settings.exThumbImage) {\n _dummyImgSrc = $currentItem.find('img').first().attr('src');\n } else {\n _dummyImgSrc = $currentItem.attr(this.settings.exThumbImage);\n }\n if (!_dummyImgSrc) return '';\n const imgStyle = this.getDummyImgStyles(this.currentImageSize);\n const dummyImgContentImg = document.createElement('img');\n dummyImgContentImg.alt = alt || '';\n dummyImgContentImg.src = _dummyImgSrc;\n dummyImgContentImg.className = `lg-dummy-img`;\n dummyImgContentImg.style.cssText = imgStyle;\n\n $currentSlide.addClass('lg-first-slide');\n this.outer.addClass('lg-first-slide-loading');\n\n return dummyImgContentImg;\n }\n return '';\n }\n\n setImgMarkup(src: string, $currentSlide: lgQuery, index: number): void {\n const currentGalleryItem = this.galleryItems[index];\n const { alt, srcset, sizes, sources } = currentGalleryItem;\n\n // Use the thumbnail as dummy image which will be resized to actual image size and\n // displayed on top of actual image\n let imgContent: string | HTMLImageElement = '';\n const altAttr = alt ? 'alt=\"' + alt + '\"' : '';\n\n if (this.isFirstSlideWithZoomAnimation()) {\n imgContent = this.getDummyImageContent(\n $currentSlide,\n index,\n altAttr,\n );\n } else {\n imgContent = utils.getImgMarkup(\n index,\n src,\n altAttr,\n srcset,\n sizes,\n sources,\n );\n }\n const picture = document.createElement('picture');\n picture.className = 'lg-img-wrap';\n $LG(picture).append(imgContent);\n $currentSlide.prepend(picture);\n }\n\n onSlideObjectLoad(\n $slide: lgQuery,\n isHTML5VideoWithoutPoster: boolean,\n onLoad: () => void,\n onError: () => void,\n ): void {\n const mediaObject = $slide.find('.lg-object').first();\n if (\n utils.isImageLoaded(mediaObject.get() as HTMLImageElement) ||\n isHTML5VideoWithoutPoster\n ) {\n onLoad();\n } else {\n mediaObject.on('load.lg error.lg', () => {\n onLoad && onLoad();\n });\n mediaObject.on('error.lg', () => {\n onError && onError();\n });\n }\n }\n\n /**\n *\n * @param $el Current slide item\n * @param index\n * @param delay Delay is 0 except first time\n * @param speed Speed is same as delay, except it is 0 if gallery is opened via hash plugin\n * @param isFirstSlide\n */\n onLgObjectLoad(\n currentSlide: lgQuery,\n index: number,\n delay: number,\n speed: number,\n isFirstSlide: boolean,\n isHTML5VideoWithoutPoster: boolean,\n ): void {\n this.onSlideObjectLoad(\n currentSlide,\n isHTML5VideoWithoutPoster,\n () => {\n this.triggerSlideItemLoad(\n currentSlide,\n index,\n delay,\n speed,\n isFirstSlide,\n );\n },\n () => {\n currentSlide.addClass('lg-complete lg-complete_');\n currentSlide.html(\n '' +\n this.settings.strings['mediaLoadingFailed'] +\n '',\n );\n },\n );\n }\n\n triggerSlideItemLoad(\n $currentSlide: lgQuery,\n index: number,\n delay: number,\n speed: number,\n isFirstSlide: boolean,\n ): void {\n const currentGalleryItem = this.galleryItems[index];\n\n // Adding delay for video slides without poster for better performance and user experience\n // Videos should start playing once once the gallery is completely loaded\n const _speed =\n isFirstSlide &&\n this.getSlideType(currentGalleryItem) === 'video' &&\n !currentGalleryItem.poster\n ? speed\n : 0;\n setTimeout(() => {\n $currentSlide.addClass('lg-complete lg-complete_');\n this.LGel.trigger(lGEvents.slideItemLoad, {\n index,\n delay: delay || 0,\n isFirstSlide,\n });\n }, _speed);\n }\n\n isFirstSlideWithZoomAnimation(): boolean {\n return !!(\n !this.lGalleryOn &&\n this.zoomFromOrigin &&\n this.currentImageSize\n );\n }\n\n // Add video slideInfo\n addSlideVideoInfo(items: GalleryItem[]): void {\n items.forEach((element, index) => {\n element.__slideVideoInfo = utils.isVideo(\n element.src as string,\n !!element.video,\n index,\n );\n if (\n element.__slideVideoInfo &&\n this.settings.loadYouTubePoster &&\n !element.poster &&\n element.__slideVideoInfo.youtube\n ) {\n element.poster = `//img.youtube.com/vi/${element.__slideVideoInfo.youtube[1]}/maxresdefault.jpg`;\n }\n });\n }\n\n /**\n * Load slide content into slide.\n * This is used to load content into slides that is not visible too\n * @param {Number} index - index of the slide.\n * @param {Boolean} rec - if true call loadcontent() function again.\n */\n loadContent(index: number, rec: boolean): void {\n const currentGalleryItem = this.galleryItems[index];\n const $currentSlide = $LG(this.getSlideItemId(index));\n\n const { poster, srcset, sizes, sources } = currentGalleryItem;\n let { src } = currentGalleryItem;\n\n const video = currentGalleryItem.video;\n\n const _html5Video =\n video && typeof video === 'string' ? JSON.parse(video) : video;\n\n if (currentGalleryItem.responsive) {\n const srcDyItms = currentGalleryItem.responsive.split(',');\n src = utils.getResponsiveSrc(srcDyItms) || src;\n }\n\n const videoInfo = currentGalleryItem.__slideVideoInfo;\n let lgVideoStyle = '';\n\n const iframe = !!currentGalleryItem.iframe;\n\n const isFirstSlide = !this.lGalleryOn;\n\n // delay for adding complete class. it is 0 except first time.\n let delay = 0;\n if (isFirstSlide) {\n if (this.zoomFromOrigin && this.currentImageSize) {\n delay = this.settings.startAnimationDuration + 10;\n } else {\n delay = this.settings.backdropDuration + 10;\n }\n }\n\n if (!$currentSlide.hasClass('lg-loaded')) {\n if (videoInfo) {\n const { top, bottom } = this.mediaContainerPosition;\n const videoSize = utils.getSize(\n this.items[index],\n this.outer,\n top + bottom,\n videoInfo && this.settings.videoMaxSize,\n );\n lgVideoStyle = this.getVideoContStyle(videoSize);\n }\n if (iframe) {\n const markup = utils.getIframeMarkup(\n this.settings.iframeWidth,\n this.settings.iframeHeight,\n this.settings.iframeMaxWidth,\n this.settings.iframeMaxHeight,\n src,\n currentGalleryItem.iframeTitle,\n );\n $currentSlide.prepend(markup);\n } else if (poster) {\n let dummyImg: string | HTMLImageElement = '';\n const hasStartAnimation =\n isFirstSlide &&\n this.zoomFromOrigin &&\n this.currentImageSize;\n if (hasStartAnimation) {\n dummyImg = this.getDummyImageContent(\n $currentSlide,\n index,\n '',\n );\n }\n\n const markup = utils.getVideoPosterMarkup(\n poster,\n dummyImg || '',\n lgVideoStyle,\n this.settings.strings['playVideo'],\n videoInfo,\n );\n $currentSlide.prepend(markup);\n } else if (videoInfo) {\n const markup = `
`;\n $currentSlide.prepend(markup);\n } else {\n this.setImgMarkup(src as string, $currentSlide, index);\n if (srcset || sources) {\n const $img = $currentSlide.find('.lg-object');\n this.initPictureFill($img);\n }\n }\n if (poster || videoInfo) {\n this.LGel.trigger(lGEvents.hasVideo, {\n index,\n src: src,\n html5Video: _html5Video,\n hasPoster: !!poster,\n });\n }\n\n this.LGel.trigger(\n lGEvents.afterAppendSlide,\n { index },\n );\n\n if (\n this.lGalleryOn &&\n this.settings.appendSubHtmlTo === '.lg-item'\n ) {\n this.addHtml(index);\n }\n }\n\n // For first time add some delay for displaying the start animation.\n let _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 && !$LG(document.body).hasClass('lg-from-hash')) {\n _speed = delay;\n }\n\n // Only for first slide and zoomFromOrigin is enabled\n if (this.isFirstSlideWithZoomAnimation()) {\n setTimeout(() => {\n $currentSlide\n .removeClass('lg-start-end-progress lg-start-progress')\n .removeAttr('style');\n }, this.settings.startAnimationDuration + 100);\n if (!$currentSlide.hasClass('lg-loaded')) {\n setTimeout(() => {\n if (this.getSlideType(currentGalleryItem) === 'image') {\n const { alt } = currentGalleryItem;\n const altAttr = alt ? 'alt=\"' + alt + '\"' : '';\n\n $currentSlide\n .find('.lg-img-wrap')\n .append(\n utils.getImgMarkup(\n index,\n src as string,\n altAttr,\n srcset,\n sizes,\n currentGalleryItem.sources,\n ),\n );\n if (srcset || sources) {\n const $img = $currentSlide.find('.lg-object');\n this.initPictureFill($img);\n }\n }\n if (\n this.getSlideType(currentGalleryItem) === 'image' ||\n (this.getSlideType(currentGalleryItem) === 'video' &&\n poster)\n ) {\n this.onLgObjectLoad(\n $currentSlide,\n index,\n delay,\n _speed,\n true,\n false,\n );\n\n // load remaining slides once the slide is completely loaded\n this.onSlideObjectLoad(\n $currentSlide,\n !!(videoInfo && videoInfo.html5 && !poster),\n () => {\n this.loadContentOnFirstSlideLoad(\n index,\n $currentSlide,\n _speed,\n );\n },\n () => {\n this.loadContentOnFirstSlideLoad(\n index,\n $currentSlide,\n _speed,\n );\n },\n );\n }\n }, this.settings.startAnimationDuration + 100);\n }\n }\n\n // SLide content has been added to dom\n $currentSlide.addClass('lg-loaded');\n\n if (\n !this.isFirstSlideWithZoomAnimation() ||\n (this.getSlideType(currentGalleryItem) === 'video' && !poster)\n ) {\n this.onLgObjectLoad(\n $currentSlide,\n index,\n delay,\n _speed,\n isFirstSlide,\n !!(videoInfo && videoInfo.html5 && !poster),\n );\n }\n\n // When gallery is opened once content is loaded (second time) need to add lg-complete class for css styling\n if (\n (!this.zoomFromOrigin || !this.currentImageSize) &&\n $currentSlide.hasClass('lg-complete_') &&\n !this.lGalleryOn\n ) {\n setTimeout(() => {\n $currentSlide.addClass('lg-complete');\n }, this.settings.backdropDuration);\n }\n\n // Content loaded\n // Need to set lGalleryOn before calling preload function\n this.lGalleryOn = true;\n\n if (rec === true) {\n if (!$currentSlide.hasClass('lg-complete_')) {\n $currentSlide\n .find('.lg-object')\n .first()\n .on('load.lg error.lg', () => {\n this.preload(index);\n });\n } else {\n this.preload(index);\n }\n }\n }\n\n /**\n * @desc Remove dummy image content and load next slides\n * Called only for the first time if zoomFromOrigin animation is enabled\n * @param index\n * @param $currentSlide\n * @param speed\n */\n loadContentOnFirstSlideLoad(\n index: number,\n $currentSlide: lgQuery,\n speed: number,\n ): void {\n setTimeout(() => {\n $currentSlide.find('.lg-dummy-img').remove();\n $currentSlide.removeClass('lg-first-slide');\n this.outer.removeClass('lg-first-slide-loading');\n this.isDummyImageRemoved = true;\n this.preload(index);\n }, speed + 300);\n }\n\n getItemsToBeInsertedToDom(\n index: number,\n prevIndex: number,\n numberOfItems = 0,\n ): string[] {\n const itemsToBeInsertedToDom: string[] = [];\n // Minimum 2 items should be there\n let possibleNumberOfItems = Math.max(numberOfItems, 3);\n possibleNumberOfItems = Math.min(\n possibleNumberOfItems,\n this.galleryItems.length,\n );\n const prevIndexItem = `lg-item-${this.lgId}-${prevIndex}`;\n if (this.galleryItems.length <= 3) {\n this.galleryItems.forEach((_element, index) => {\n itemsToBeInsertedToDom.push(`lg-item-${this.lgId}-${index}`);\n });\n return itemsToBeInsertedToDom;\n }\n\n if (index < (this.galleryItems.length - 1) / 2) {\n for (\n let idx = index;\n idx > index - possibleNumberOfItems / 2 && idx >= 0;\n idx--\n ) {\n itemsToBeInsertedToDom.push(`lg-item-${this.lgId}-${idx}`);\n }\n const numberOfExistingItems = itemsToBeInsertedToDom.length;\n for (\n let idx = 0;\n idx < possibleNumberOfItems - numberOfExistingItems;\n idx++\n ) {\n itemsToBeInsertedToDom.push(\n `lg-item-${this.lgId}-${index + idx + 1}`,\n );\n }\n } else {\n for (\n let idx = index;\n idx <= this.galleryItems.length - 1 &&\n idx < index + possibleNumberOfItems / 2;\n idx++\n ) {\n itemsToBeInsertedToDom.push(`lg-item-${this.lgId}-${idx}`);\n }\n const numberOfExistingItems = itemsToBeInsertedToDom.length;\n for (\n let idx = 0;\n idx < possibleNumberOfItems - numberOfExistingItems;\n idx++\n ) {\n itemsToBeInsertedToDom.push(\n `lg-item-${this.lgId}-${index - idx - 1}`,\n );\n }\n }\n if (this.settings.loop) {\n if (index === this.galleryItems.length - 1) {\n itemsToBeInsertedToDom.push(`lg-item-${this.lgId}-${0}`);\n } else if (index === 0) {\n itemsToBeInsertedToDom.push(\n `lg-item-${this.lgId}-${this.galleryItems.length - 1}`,\n );\n }\n }\n if (itemsToBeInsertedToDom.indexOf(prevIndexItem) === -1) {\n itemsToBeInsertedToDom.push(`lg-item-${this.lgId}-${prevIndex}`);\n }\n\n return itemsToBeInsertedToDom;\n }\n\n organizeSlideItems(index: number, prevIndex: number): string[] {\n const itemsToBeInsertedToDom = this.getItemsToBeInsertedToDom(\n index,\n prevIndex,\n this.settings.numberOfSlideItemsInDom,\n );\n\n itemsToBeInsertedToDom.forEach((item) => {\n if (this.currentItemsInDom.indexOf(item) === -1) {\n this.$inner.append(`
`);\n }\n });\n\n this.currentItemsInDom.forEach((item) => {\n if (itemsToBeInsertedToDom.indexOf(item) === -1) {\n $LG(`#${item}`).remove();\n }\n });\n return itemsToBeInsertedToDom;\n }\n\n /**\n * Get previous index of the slide\n */\n getPreviousSlideIndex(): number {\n let prevIndex = 0;\n try {\n const currentItemId = this.outer\n .find('.lg-current')\n .first()\n .attr('id');\n prevIndex = parseInt(currentItemId.split('-')[3]) || 0;\n } catch (error) {\n prevIndex = 0;\n }\n return prevIndex;\n }\n\n setDownloadValue(index: number): void {\n if (this.settings.download) {\n const currentGalleryItem = this.galleryItems[index];\n const hideDownloadBtn =\n currentGalleryItem.downloadUrl === false ||\n currentGalleryItem.downloadUrl === 'false';\n if (hideDownloadBtn) {\n this.outer.addClass('lg-hide-download');\n } else {\n const $download = this.getElementById('lg-download');\n this.outer.removeClass('lg-hide-download');\n $download.attr(\n 'href',\n currentGalleryItem.downloadUrl ||\n (currentGalleryItem.src as string),\n );\n if (currentGalleryItem.download) {\n $download.attr('download', currentGalleryItem.download);\n }\n }\n }\n }\n\n makeSlideAnimation(\n direction: 'next' | 'prev',\n currentSlideItem: lgQuery,\n previousSlideItem: lgQuery,\n ): void {\n if (this.lGalleryOn) {\n previousSlideItem.addClass('lg-slide-progress');\n }\n setTimeout(\n () => {\n // remove all transitions\n this.outer.addClass('lg-no-trans');\n\n this.outer\n .find('.lg-item')\n .removeClass('lg-prev-slide lg-next-slide');\n\n if (direction === 'prev') {\n //prevslide\n currentSlideItem.addClass('lg-prev-slide');\n previousSlideItem.addClass('lg-next-slide');\n } else {\n // next slide\n currentSlideItem.addClass('lg-next-slide');\n previousSlideItem.addClass('lg-prev-slide');\n }\n\n // give 50 ms for browser to add/remove class\n setTimeout(() => {\n this.outer.find('.lg-item').removeClass('lg-current');\n\n currentSlideItem.addClass('lg-current');\n\n // reset all transitions\n this.outer.removeClass('lg-no-trans');\n }, 50);\n },\n this.lGalleryOn ? this.settings.slideDelay : 0,\n );\n }\n\n /**\n * Goto a specific slide.\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 * @category lGPublicMethods\n * @example\n * const plugin = lightGallery();\n * // to go to 3rd slide\n * plugin.slide(2);\n *\n */\n slide(\n index: number,\n fromTouch?: boolean,\n fromThumb?: boolean,\n direction?: SlideDirection | false,\n ): void {\n const prevIndex = this.getPreviousSlideIndex();\n this.currentItemsInDom = this.organizeSlideItems(index, prevIndex);\n\n // Prevent multiple call, Required for hsh plugin\n if (this.lGalleryOn && prevIndex === index) {\n return;\n }\n\n const numberOfGalleryItems = this.galleryItems.length;\n\n if (!this.lgBusy) {\n if (this.settings.counter) {\n this.updateCurrentCounter(index);\n }\n\n const currentSlideItem = this.getSlideItem(index);\n const previousSlideItem = this.getSlideItem(prevIndex);\n\n const currentGalleryItem = this.galleryItems[index];\n const videoInfo = currentGalleryItem.__slideVideoInfo;\n\n this.outer.attr(\n 'data-lg-slide-type',\n this.getSlideType(currentGalleryItem),\n );\n this.setDownloadValue(index);\n\n if (videoInfo) {\n const { top, bottom } = this.mediaContainerPosition;\n const videoSize = utils.getSize(\n this.items[index],\n this.outer,\n top + bottom,\n videoInfo && this.settings.videoMaxSize,\n );\n this.resizeVideoSlide(index, videoSize);\n }\n\n this.LGel.trigger(lGEvents.beforeSlide, {\n prevIndex,\n index,\n fromTouch: !!fromTouch,\n fromThumb: !!fromThumb,\n });\n\n this.lgBusy = true;\n\n clearTimeout(this.hideBarTimeout);\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 this.makeSlideAnimation(\n direction as SlideDirection,\n currentSlideItem,\n previousSlideItem,\n );\n } else {\n this.outer\n .find('.lg-item')\n .removeClass('lg-prev-slide lg-current lg-next-slide');\n let touchPrev;\n let touchNext;\n if (numberOfGalleryItems > 2) {\n touchPrev = index - 1;\n touchNext = index + 1;\n\n if (index === 0 && prevIndex === numberOfGalleryItems - 1) {\n // next slide\n touchNext = 0;\n touchPrev = numberOfGalleryItems - 1;\n } else if (\n index === numberOfGalleryItems - 1 &&\n prevIndex === 0\n ) {\n // prev slide\n touchNext = 0;\n touchPrev = numberOfGalleryItems - 1;\n }\n } else {\n touchPrev = 0;\n touchNext = 1;\n }\n\n if (direction === 'prev') {\n this.getSlideItem(touchNext).addClass('lg-next-slide');\n } else {\n this.getSlideItem(touchPrev).addClass('lg-prev-slide');\n }\n\n currentSlideItem.addClass('lg-current');\n }\n\n // Do not put load content in set timeout as it needs to load immediately when the gallery is opened\n if (!this.lGalleryOn) {\n this.loadContent(index, true);\n } else {\n setTimeout(() => {\n this.loadContent(index, true);\n // Add title if this.settings.appendSubHtmlTo === lg-sub-html\n if (this.settings.appendSubHtmlTo !== '.lg-item') {\n this.addHtml(index);\n }\n }, this.settings.speed + 50 + (fromTouch ? 0 : this.settings.slideDelay));\n }\n\n setTimeout(() => {\n this.lgBusy = false;\n previousSlideItem.removeClass('lg-slide-progress');\n this.LGel.trigger(lGEvents.afterSlide, {\n prevIndex: prevIndex,\n index,\n fromTouch,\n fromThumb,\n });\n }, (this.lGalleryOn ? this.settings.speed + 100 : 100) + (fromTouch ? 0 : this.settings.slideDelay));\n }\n\n this.index = index;\n }\n\n updateCurrentCounter(index: number): void {\n this.getElementById('lg-counter-current').html(index + 1 + '');\n }\n\n updateCounterTotal(): void {\n this.getElementById('lg-counter-all').html(\n this.galleryItems.length + '',\n );\n }\n\n getSlideType(item: GalleryItem): 'video' | 'iframe' | 'image' {\n if (item.__slideVideoInfo) {\n return 'video';\n } else if (item.iframe) {\n return 'iframe';\n } else {\n return 'image';\n }\n }\n\n touchMove(startCoords: Coords, endCoords: Coords, e?: TouchEvent): void {\n const distanceX = endCoords.pageX - startCoords.pageX;\n const distanceY = endCoords.pageY - startCoords.pageY;\n let allowSwipe = false;\n\n if (this.swipeDirection) {\n allowSwipe = true;\n } else {\n if (Math.abs(distanceX) > 15) {\n this.swipeDirection = 'horizontal';\n allowSwipe = true;\n } else if (Math.abs(distanceY) > 15) {\n this.swipeDirection = 'vertical';\n allowSwipe = true;\n }\n }\n\n if (!allowSwipe) {\n return;\n }\n\n const $currentSlide = this.getSlideItem(this.index);\n\n if (this.swipeDirection === 'horizontal') {\n e?.preventDefault();\n // reset opacity and transition duration\n this.outer.addClass('lg-dragging');\n\n // move current slide\n this.setTranslate($currentSlide, distanceX, 0);\n\n // move next and prev slide with current slide\n const width = $currentSlide.get().offsetWidth;\n const slideWidthAmount = (width * 15) / 100;\n const gutter = slideWidthAmount - Math.abs((distanceX * 10) / 100);\n this.setTranslate(\n this.outer.find('.lg-prev-slide').first(),\n -width + distanceX - gutter,\n 0,\n );\n\n this.setTranslate(\n this.outer.find('.lg-next-slide').first(),\n width + distanceX + gutter,\n 0,\n );\n } else if (this.swipeDirection === 'vertical') {\n if (this.settings.swipeToClose) {\n e?.preventDefault();\n this.$container.addClass('lg-dragging-vertical');\n\n const opacity = 1 - Math.abs(distanceY) / window.innerHeight;\n this.$backdrop.css('opacity', opacity);\n\n const scale = 1 - Math.abs(distanceY) / (window.innerWidth * 2);\n this.setTranslate($currentSlide, 0, distanceY, scale, scale);\n if (Math.abs(distanceY) > 100) {\n this.outer\n .addClass('lg-hide-items')\n .removeClass('lg-components-open');\n }\n }\n }\n }\n\n touchEnd(endCoords: Coords, startCoords: Coords, event: TouchEvent): void {\n let distance;\n\n // keep slide animation for any mode while dragg/swipe\n if (this.settings.mode !== 'lg-slide') {\n this.outer.addClass('lg-slide');\n }\n\n // set transition duration\n setTimeout(() => {\n this.$container.removeClass('lg-dragging-vertical');\n this.outer\n .removeClass('lg-dragging lg-hide-items')\n .addClass('lg-components-open');\n\n let triggerClick = true;\n\n if (this.swipeDirection === 'horizontal') {\n distance = endCoords.pageX - startCoords.pageX;\n const distanceAbs = Math.abs(\n endCoords.pageX - startCoords.pageX,\n );\n if (\n distance < 0 &&\n distanceAbs > this.settings.swipeThreshold\n ) {\n this.goToNextSlide(true);\n triggerClick = false;\n } else if (\n distance > 0 &&\n distanceAbs > this.settings.swipeThreshold\n ) {\n this.goToPrevSlide(true);\n triggerClick = false;\n }\n } else if (this.swipeDirection === 'vertical') {\n distance = Math.abs(endCoords.pageY - startCoords.pageY);\n if (\n this.settings.closable &&\n this.settings.swipeToClose &&\n distance > 100\n ) {\n this.closeGallery();\n return;\n } else {\n this.$backdrop.css('opacity', 1);\n }\n }\n this.outer.find('.lg-item').removeAttr('style');\n\n if (\n triggerClick &&\n Math.abs(endCoords.pageX - startCoords.pageX) < 5\n ) {\n // Trigger click if distance is less than 5 pix\n const target = $LG(event.target);\n if (this.isPosterElement(target)) {\n this.LGel.trigger(lGEvents.posterClick);\n }\n }\n\n this.swipeDirection = undefined;\n });\n\n // remove slide class once drag/swipe is completed if mode is not slide\n setTimeout(() => {\n if (\n !this.outer.hasClass('lg-dragging') &&\n this.settings.mode !== 'lg-slide'\n ) {\n this.outer.removeClass('lg-slide');\n }\n }, this.settings.speed + 100);\n }\n\n enableSwipe(): void {\n let startCoords: Coords = {} as Coords;\n let endCoords: Coords = {} as Coords;\n let isMoved = false;\n let isSwiping = false;\n\n if (this.settings.enableSwipe) {\n this.$inner.on('touchstart.lg', (e) => {\n this.dragOrSwipeEnabled = true;\n const $item = this.getSlideItem(this.index);\n if (\n ($LG(e.target).hasClass('lg-item') ||\n $item.get().contains(e.target)) &&\n !this.outer.hasClass('lg-zoomed') &&\n !this.lgBusy &&\n e.touches.length === 1\n ) {\n isSwiping = true;\n this.touchAction = 'swipe';\n this.manageSwipeClass();\n startCoords = {\n pageX: e.touches[0].pageX,\n pageY: e.touches[0].pageY,\n };\n }\n });\n\n this.$inner.on('touchmove.lg', (e) => {\n if (\n isSwiping &&\n this.touchAction === 'swipe' &&\n e.touches.length === 1\n ) {\n endCoords = {\n pageX: e.touches[0].pageX,\n pageY: e.touches[0].pageY,\n };\n this.touchMove(startCoords, endCoords, e);\n isMoved = true;\n }\n });\n\n this.$inner.on('touchend.lg', (event: TouchEvent) => {\n if (this.touchAction === 'swipe') {\n if (isMoved) {\n isMoved = false;\n this.touchEnd(endCoords, startCoords, event);\n } else if (isSwiping) {\n const target = $LG(event.target);\n if (this.isPosterElement(target)) {\n this.LGel.trigger(lGEvents.posterClick);\n }\n }\n this.touchAction = undefined;\n isSwiping = false;\n }\n });\n }\n }\n\n enableDrag(): void {\n let startCoords: Coords = {} as Coords;\n let endCoords: Coords = {} as Coords;\n let isDraging = false;\n let isMoved = false;\n if (this.settings.enableDrag) {\n this.outer.on('mousedown.lg', (e) => {\n this.dragOrSwipeEnabled = true;\n const $item = this.getSlideItem(this.index);\n if (\n $LG(e.target).hasClass('lg-item') ||\n $item.get().contains(e.target)\n ) {\n if (!this.outer.hasClass('lg-zoomed') && !this.lgBusy) {\n e.preventDefault();\n if (!this.lgBusy) {\n this.manageSwipeClass();\n startCoords = {\n pageX: e.pageX,\n pageY: e.pageY,\n };\n isDraging = true;\n\n // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723\n this.outer.get().scrollLeft += 1;\n this.outer.get().scrollLeft -= 1;\n\n // *\n\n this.outer\n .removeClass('lg-grab')\n .addClass('lg-grabbing');\n\n this.LGel.trigger(lGEvents.dragStart);\n }\n }\n }\n });\n\n $LG(window).on(`mousemove.lg.global${this.lgId}`, (e) => {\n if (isDraging && this.lgOpened) {\n isMoved = true;\n endCoords = {\n pageX: e.pageX,\n pageY: e.pageY,\n };\n this.touchMove(startCoords, endCoords);\n this.LGel.trigger(lGEvents.dragMove);\n }\n });\n\n $LG(window).on(`mouseup.lg.global${this.lgId}`, (event) => {\n if (!this.lgOpened) {\n return;\n }\n const target = $LG(event.target);\n if (isMoved) {\n isMoved = false;\n this.touchEnd(endCoords, startCoords, event);\n this.LGel.trigger(lGEvents.dragEnd);\n } else if (this.isPosterElement(target)) {\n this.LGel.trigger(lGEvents.posterClick);\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 triggerPosterClick(): void {\n this.$inner.on('click.lg', (event) => {\n if (\n !this.dragOrSwipeEnabled &&\n this.isPosterElement($LG(event.target))\n ) {\n this.LGel.trigger(lGEvents.posterClick);\n }\n });\n }\n\n manageSwipeClass(): void {\n let _touchNext = this.index + 1;\n let _touchPrev = this.index - 1;\n if (this.settings.loop && this.galleryItems.length > 2) {\n if (this.index === 0) {\n _touchPrev = this.galleryItems.length - 1;\n } else if (this.index === this.galleryItems.length - 1) {\n _touchNext = 0;\n }\n }\n\n this.outer.find('.lg-item').removeClass('lg-next-slide lg-prev-slide');\n if (_touchPrev > -1) {\n this.getSlideItem(_touchPrev).addClass('lg-prev-slide');\n }\n\n this.getSlideItem(_touchNext).addClass('lg-next-slide');\n }\n\n /**\n * Go to next slide\n * @param {Boolean} fromTouch - true if slide function called via touch event\n * @category lGPublicMethods\n * @example\n * const plugin = lightGallery();\n * plugin.goToNextSlide();\n * @see Demo\n */\n goToNextSlide(fromTouch?: boolean): void {\n let _loop = this.settings.loop;\n if (fromTouch && this.galleryItems.length < 3) {\n _loop = false;\n }\n\n if (!this.lgBusy) {\n if (this.index + 1 < this.galleryItems.length) {\n this.index++;\n this.LGel.trigger(lGEvents.beforeNextSlide, {\n index: this.index,\n });\n this.slide(this.index, !!fromTouch, false, 'next');\n } else {\n if (_loop) {\n this.index = 0;\n this.LGel.trigger(lGEvents.beforeNextSlide, {\n index: this.index,\n });\n this.slide(this.index, !!fromTouch, false, 'next');\n } else if (this.settings.slideEndAnimation && !fromTouch) {\n this.outer.addClass('lg-right-end');\n setTimeout(() => {\n this.outer.removeClass('lg-right-end');\n }, 400);\n }\n }\n }\n }\n\n /**\n * Go to previous slides\n * @param {Boolean} fromTouch - true if slide function called via touch event\n * @category lGPublicMethods\n * @example\n * const plugin = lightGallery({});\n * plugin.goToPrevSlide();\n * @see Demo\n *\n */\n goToPrevSlide(fromTouch?: boolean): void {\n let _loop = this.settings.loop;\n if (fromTouch && this.galleryItems.length < 3) {\n _loop = false;\n }\n\n if (!this.lgBusy) {\n if (this.index > 0) {\n this.index--;\n this.LGel.trigger(lGEvents.beforePrevSlide, {\n index: this.index,\n fromTouch,\n });\n this.slide(this.index, !!fromTouch, false, 'prev');\n } else {\n if (_loop) {\n this.index = this.galleryItems.length - 1;\n this.LGel.trigger(lGEvents.beforePrevSlide, {\n index: this.index,\n fromTouch,\n });\n this.slide(this.index, !!fromTouch, false, 'prev');\n } else if (this.settings.slideEndAnimation && !fromTouch) {\n this.outer.addClass('lg-left-end');\n setTimeout(() => {\n this.outer.removeClass('lg-left-end');\n }, 400);\n }\n }\n }\n }\n\n keyPress(): void {\n $LG(window).on(`keydown.lg.global${this.lgId}`, (e) => {\n if (\n this.lgOpened &&\n this.settings.escKey === true &&\n e.keyCode === 27\n ) {\n e.preventDefault();\n if (\n this.settings.allowMediaOverlap &&\n this.outer.hasClass('lg-can-toggle') &&\n this.outer.hasClass('lg-components-open')\n ) {\n this.outer.removeClass('lg-components-open');\n } else {\n this.closeGallery();\n }\n }\n if (this.lgOpened && this.galleryItems.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 arrow(): void {\n this.getElementById('lg-prev').on('click.lg', () => {\n this.goToPrevSlide();\n });\n this.getElementById('lg-next').on('click.lg', () => {\n this.goToNextSlide();\n });\n }\n\n arrowDisable(index: number): void {\n // Disable arrows if settings.hideControlOnEnd is true\n if (!this.settings.loop && this.settings.hideControlOnEnd) {\n const $prev = this.getElementById('lg-prev');\n const $next = this.getElementById('lg-next');\n if (index + 1 === this.galleryItems.length) {\n $next.attr('disabled', 'disabled').addClass('disabled');\n } else {\n $next.removeAttr('disabled').removeClass('disabled');\n }\n\n if (index === 0) {\n $prev.attr('disabled', 'disabled').addClass('disabled');\n } else {\n $prev.removeAttr('disabled').removeClass('disabled');\n }\n }\n }\n\n setTranslate(\n $el: lgQuery,\n xValue: number,\n yValue: number,\n scaleX = 1,\n scaleY = 1,\n ): void {\n $el.css(\n 'transform',\n 'translate3d(' +\n xValue +\n 'px, ' +\n yValue +\n 'px, 0px) scale3d(' +\n scaleX +\n ', ' +\n scaleY +\n ', 1)',\n );\n }\n\n mousewheel(): void {\n let lastCall = 0;\n this.outer.on('wheel.lg', (e) => {\n if (!e.deltaY || this.galleryItems.length < 2) {\n return;\n }\n e.preventDefault();\n const now = new Date().getTime();\n if (now - lastCall < 1000) {\n return;\n }\n lastCall = now;\n if (e.deltaY > 0) {\n this.goToNextSlide();\n } else if (e.deltaY < 0) {\n this.goToPrevSlide();\n }\n });\n }\n\n isSlideElement(target: lgQuery): boolean {\n return (\n target.hasClass('lg-outer') ||\n target.hasClass('lg-item') ||\n target.hasClass('lg-img-wrap') ||\n target.hasClass('lg-img-rotate')\n );\n }\n\n isPosterElement(target: lgQuery): boolean {\n const playButton = this.getSlideItem(this.index)\n .find('.lg-video-play-button')\n .get();\n return (\n target.hasClass('lg-video-poster') ||\n target.hasClass('lg-video-play-button') ||\n (playButton && playButton.contains(target.get()))\n );\n }\n\n /**\n * Maximize minimize inline gallery.\n * @category lGPublicMethods\n */\n toggleMaximize(): void {\n this.getElementById('lg-maximize').on('click.lg', () => {\n this.$container.toggleClass('lg-inline');\n this.refreshOnResize();\n });\n }\n\n invalidateItems(): void {\n for (let index = 0; index < this.items.length; index++) {\n const element = this.items[index];\n const $element = $LG(element);\n $element.off(`click.lgcustom-item-${$element.attr('data-lg-id')}`);\n }\n }\n\n trapFocus(): void {\n this.$container.get().focus({\n preventScroll: true,\n });\n $LG(window).on(`keydown.lg.global${this.lgId}`, (e) => {\n if (!this.lgOpened) {\n return;\n }\n\n const isTabPressed = e.key === 'Tab' || e.keyCode === 9;\n if (!isTabPressed) {\n return;\n }\n const focusableEls = utils.getFocusableElements(\n this.$container.get(),\n );\n const firstFocusableEl = focusableEls[0];\n const lastFocusableEl = focusableEls[focusableEls.length - 1];\n\n if (e.shiftKey) {\n if (document.activeElement === firstFocusableEl) {\n (lastFocusableEl as HTMLElement).focus();\n e.preventDefault();\n }\n } else {\n if (document.activeElement === lastFocusableEl) {\n (firstFocusableEl as HTMLElement).focus();\n e.preventDefault();\n }\n }\n });\n }\n\n manageCloseGallery(): void {\n if (!this.settings.closable) return;\n let mousedown = false;\n this.getElementById('lg-close').on('click.lg', () => {\n this.closeGallery();\n });\n\n if (this.settings.closeOnTap) {\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', (e) => {\n const target = $LG(e.target);\n if (this.isSlideElement(target)) {\n mousedown = true;\n } else {\n mousedown = false;\n }\n });\n\n this.outer.on('mousemove.lg', () => {\n mousedown = false;\n });\n\n this.outer.on('mouseup.lg', (e) => {\n const target = $LG(e.target);\n if (this.isSlideElement(target) && mousedown) {\n if (!this.outer.hasClass('lg-dragging')) {\n this.closeGallery();\n }\n }\n });\n }\n }\n\n /**\n * Close lightGallery if it is opened.\n *\n * @description If closable is false in the settings, you need to pass true via closeGallery method to force close gallery\n * @return returns the estimated time to close gallery completely including the close animation duration\n * @category lGPublicMethods\n * @example\n * const plugin = lightGallery();\n * plugin.closeGallery();\n *\n */\n closeGallery(force?: boolean): number {\n if (!this.lgOpened || (!this.settings.closable && !force)) {\n return 0;\n }\n this.LGel.trigger(lGEvents.beforeClose);\n\n if (this.settings.resetScrollPosition && !this.settings.hideScrollbar) {\n $LG(window).scrollTop(this.prevScrollTop);\n }\n\n const currentItem = this.items[this.index];\n let transform: string | undefined;\n if (this.zoomFromOrigin && currentItem) {\n const { top, bottom } = this.mediaContainerPosition;\n const { __slideVideoInfo, poster } = this.galleryItems[this.index];\n const imageSize = utils.getSize(\n currentItem,\n this.outer,\n top + bottom,\n __slideVideoInfo && poster && this.settings.videoMaxSize,\n );\n transform = utils.getTransform(\n currentItem,\n this.outer,\n top,\n bottom,\n imageSize,\n );\n }\n if (this.zoomFromOrigin && transform) {\n this.outer.addClass('lg-closing lg-zoom-from-image');\n this.getSlideItem(this.index)\n .addClass('lg-start-end-progress')\n .css(\n 'transition-duration',\n this.settings.startAnimationDuration + 'ms',\n )\n .css('transform', transform);\n } else {\n this.outer.addClass('lg-hide-items');\n // lg-zoom-from-image is used for setting the opacity to 1 if zoomFromOrigin is true\n // If the closing item doesn't have the lg-size attribute, remove this class to avoid the closing css conflicts\n this.outer.removeClass('lg-zoom-from-image');\n }\n\n // Unbind all events added by lightGallery\n // @todo\n //this.$el.off('.lg.tm');\n\n this.destroyModules();\n\n this.lGalleryOn = false;\n this.isDummyImageRemoved = false;\n this.zoomFromOrigin = this.settings.zoomFromOrigin;\n\n clearTimeout(this.hideBarTimeout);\n this.hideBarTimeout = false;\n $LG('html').removeClass('lg-on');\n\n this.outer.removeClass('lg-visible lg-components-open');\n\n // Resetting opacity to 0 isd required as vertical swipe to close function adds inline opacity.\n this.$backdrop.removeClass('in').css('opacity', 0);\n\n const removeTimeout =\n this.zoomFromOrigin && transform\n ? Math.max(\n this.settings.startAnimationDuration,\n this.settings.backdropDuration,\n )\n : this.settings.backdropDuration;\n this.$container.removeClass('lg-show-in');\n\n // Once the closign animation is completed and gallery is invisible\n setTimeout(() => {\n if (this.zoomFromOrigin && transform) {\n this.outer.removeClass('lg-zoom-from-image');\n }\n this.$container.removeClass('lg-show');\n\n // Reset scrollbar\n this.resetScrollBar();\n\n // Need to remove inline opacity as it is used in the stylesheet as well\n this.$backdrop\n .removeAttr('style')\n .css(\n 'transition-duration',\n this.settings.backdropDuration + 'ms',\n );\n\n this.outer.removeClass(`lg-closing ${this.settings.startClass}`);\n\n this.getSlideItem(this.index).removeClass('lg-start-end-progress');\n this.$inner.empty();\n if (this.lgOpened) {\n this.LGel.trigger(lGEvents.afterClose, {\n instance: this,\n });\n }\n if (this.$container.get()) {\n this.$container.get().blur();\n }\n\n this.lgOpened = false;\n }, removeTimeout + 100);\n return removeTimeout + 100;\n }\n\n initModules(): void {\n this.plugins.forEach((module) => {\n try {\n module.init();\n } catch (err) {\n console.warn(\n `lightGallery:- make sure lightGallery module is properly initiated`,\n );\n }\n });\n }\n\n destroyModules(destroy?: true): void {\n this.plugins.forEach((module) => {\n try {\n if (destroy) {\n module.destroy();\n } else {\n module.closeGallery && module.closeGallery();\n }\n } catch (err) {\n console.warn(\n `lightGallery:- make sure lightGallery module is properly destroyed`,\n );\n }\n });\n }\n\n /**\n * Refresh lightGallery with new set of children.\n *\n * @description This is useful to update the gallery when the child elements are changed without calling destroy method.\n *\n * If you are using dynamic mode, you can pass the modified array of dynamicEl as the first parameter to refresh the dynamic gallery\n * @see Demo\n * @category lGPublicMethods\n * @example\n * const plugin = lightGallery();\n * // Delete or add children, then call\n * plugin.refresh();\n *\n */\n refresh(galleryItems?: GalleryItem[]): void {\n if (!this.settings.dynamic) {\n this.invalidateItems();\n }\n if (galleryItems) {\n this.galleryItems = galleryItems;\n } else {\n this.galleryItems = this.getItems();\n }\n this.updateControls();\n this.openGalleryOnItemClick();\n this.LGel.trigger(lGEvents.updateSlides);\n }\n\n updateControls(): void {\n this.addSlideVideoInfo(this.galleryItems);\n this.updateCounterTotal();\n this.manageSingleSlideClassName();\n }\n\n private destroyGallery(): void {\n this.destroyModules(true);\n if (!this.settings.dynamic) {\n this.invalidateItems();\n }\n $LG(window).off(`.lg.global${this.lgId}`);\n this.LGel.off('.lg');\n this.$container.remove();\n }\n\n /**\n * Destroy lightGallery.\n * Destroy lightGallery and its plugin instances completely\n *\n * @description This method also calls CloseGallery function internally. Returns the time takes to completely close and destroy the instance.\n * In case if you want to re-initialize lightGallery right after destroying it, initialize it only once the destroy process is completed.\n * You can use refresh method most of the times.\n * @category lGPublicMethods\n * @example\n * const plugin = lightGallery();\n * plugin.destroy();\n *\n */\n destroy(): number {\n const closeTimeout = this.closeGallery(true);\n if (closeTimeout) {\n setTimeout(this.destroyGallery.bind(this), closeTimeout);\n } else {\n this.destroyGallery();\n }\n return closeTimeout;\n }\n}\n","import { LightGallerySettings } from './lg-settings';\nimport { LightGallery } from './lightgallery';\n\nfunction lightGallery(\n el: HTMLElement,\n options?: LightGallerySettings,\n): LightGallery {\n return new LightGallery(el, options);\n}\nexport default lightGallery;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGA;;;;;IAKO,IAAM,QAAQ,GAEjB;QACA,gBAAgB,EAAE,oBAAoB;QACtC,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,YAAY;QACtB,eAAe,EAAE,mBAAmB;QACpC,YAAY,EAAE,gBAAgB;QAC9B,kBAAkB,EAAE,sBAAsB;QAC1C,UAAU,EAAE,cAAc;QAC1B,SAAS,EAAE,aAAa;QACxB,aAAa,EAAE,iBAAiB;QAChC,WAAW,EAAE,eAAe;QAC5B,UAAU,EAAE,cAAc;QAC1B,WAAW,EAAE,eAAe;QAC5B,SAAS,EAAE,aAAa;QACxB,QAAQ,EAAE,YAAY;QACtB,OAAO,EAAE,WAAW;QACpB,eAAe,EAAE,mBAAmB;QACpC,eAAe,EAAE,mBAAmB;QACpC,WAAW,EAAE,eAAe;QAC5B,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE,cAAc;QAC1B,WAAW,EAAE,eAAe;QAC5B,cAAc,EAAE,kBAAkB;QAClC,YAAY,EAAE,gBAAgB;QAC9B,QAAQ,EAAE,YAAY;QACtB,aAAa,EAAE,iBAAiB;QAChC,YAAY,EAAE,gBA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C9B,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;SAC5C;QAED,qCAAc,GAAd;YACI,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YAC1C,IAAI,CAAC,kBAAkB,EAAE,CAAC;YAC1B,IAAI,CAAC,0BAA0B,EAAE,CAAC;SACrC;QAEO,qCAAc,GAAtB;YACI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;YAC1B,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE;gBACxB,IAAI,CAAC,eAAe,EAAE,CAAC;aAC1B;YACD,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,eAAa,IAAI,CAAC,IAAM,CAAC,CAAC;YAC1C,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;SAC5B;;;;;;;;;;;;;;QAeD,8BAAO,GAAP;YACI,IAAM,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YAC7C,IAAI,YAAY,EAAE;gBACd,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC,CAAC;aAC5D;iBAAM;gBACH,IAAI,CAAC,cAAc,EAAE,CAAC;aACzB;YACD,OAAO,YAAY,CAAC;SACvB;QACL,mBAAC;IAAD,CAAC;;ICt/ED,SAAS,YAAY,CACjB,EAAe,EACf,OAA8B;QAE9B,OAAO,IAAI,YAAY,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IACzC;;;;"} \ No newline at end of file diff --git a/assets/lightGallery/package.json b/assets/lightGallery/package.json new file mode 100644 index 0000000..5b00cdb --- /dev/null +++ b/assets/lightGallery/package.json @@ -0,0 +1,33 @@ +{ + "name": "lightgallery", + "version": "2.9.0", + "description": "lightGallery is a feature-rich, modular JavaScript gallery plugin for building beautiful image and video galleries for the web and the mobile", + "keywords": [ + "JavaScript", + "Gallery", + "Video", + "slider", + "lightBox" + ], + "main": "lightgallery.umd.js", + "min": "lightgallery.min.js", + "module": "lightgallery.es5.js", + "typings": "index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/sachinchoolur/lightGallery" + }, + "homepage": "https://www.lightgalleryjs.com/", + "bugs": { + "url": "https://github.com/sachinchoolur/lightGallery/issues" + }, + "license": "GPLv3", + "author": { + "name": "Sachin Neravath", + "email": "sachi77n@gmail.com", + "url": "https://github.com/sachinchoolur" + }, + "engines": { + "node": ">=6.0.0" + } +} \ No newline at end of file diff --git a/assets/lightGallery/plugins/autoplay/lg-autoplay-settings.d.ts b/assets/lightGallery/plugins/autoplay/lg-autoplay-settings.d.ts new file mode 100644 index 0000000..ecabc41 --- /dev/null +++ b/assets/lightGallery/plugins/autoplay/lg-autoplay-settings.d.ts @@ -0,0 +1,38 @@ +export interface AutoplayStrings { + toggleAutoplay: string; +} +export interface AutoplaySettings { + /** + * Enable autoplay plugin + */ + autoplay: boolean; + /** + * Enable slideshow autoplay + */ + slideShowAutoplay: boolean; + /** + * The time (in ms) between each auto transition. + */ + slideShowInterval: number; + /** + * Show autoplay progressBar + */ + progressBar: boolean; + /** + * If false autoplay will be stopped after first user action + */ + forceSlideShowAutoplay: boolean; + /** + * Show/hide autoplay controls. + */ + autoplayControls: boolean; + /** + * Specify where the autoplay controls should be appended. + */ + appendAutoplayControlsTo: string; + /** + * Custom translation strings for aria-labels + */ + autoplayPluginStrings: AutoplayStrings; +} +export declare const autoplaySettings: AutoplaySettings; diff --git a/assets/lightGallery/plugins/autoplay/lg-autoplay.d.ts b/assets/lightGallery/plugins/autoplay/lg-autoplay.d.ts new file mode 100644 index 0000000..845a136 --- /dev/null +++ b/assets/lightGallery/plugins/autoplay/lg-autoplay.d.ts @@ -0,0 +1,22 @@ +import { LightGallery } from '../../lightgallery'; +import { AutoplaySettings } from './lg-autoplay-settings'; +/** + * Creates the autoplay plugin. + * @param {object} element - lightGallery element + */ +export default class Autoplay { + core: LightGallery; + settings: AutoplaySettings; + interval: any; + fromAuto: boolean; + pausedOnTouchDrag: boolean; + pausedOnSlideChange: boolean; + constructor(instance: LightGallery); + init(): void; + private showProgressBar; + private controls; + startAutoPlay(): void; + stopAutoPlay(): void; + closeGallery(): void; + destroy(): void; +} diff --git a/assets/lightGallery/plugins/autoplay/lg-autoplay.es5.js b/assets/lightGallery/plugins/autoplay/lg-autoplay.es5.js new file mode 100644 index 0000000..66948a6 --- /dev/null +++ b/assets/lightGallery/plugins/autoplay/lg-autoplay.es5.js @@ -0,0 +1,250 @@ +/*! + * lightgallery | 2.9.0 | October 1st 2025 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; + +/** + * List of lightGallery events + * All events should be documented here + * Below interfaces are used to build the website documentations + * */ +var lGEvents = { + afterAppendSlide: 'lgAfterAppendSlide', + init: 'lgInit', + hasVideo: 'lgHasVideo', + containerResize: 'lgContainerResize', + updateSlides: 'lgUpdateSlides', + afterAppendSubHtml: 'lgAfterAppendSubHtml', + beforeOpen: 'lgBeforeOpen', + afterOpen: 'lgAfterOpen', + slideItemLoad: 'lgSlideItemLoad', + beforeSlide: 'lgBeforeSlide', + afterSlide: 'lgAfterSlide', + posterClick: 'lgPosterClick', + dragStart: 'lgDragStart', + dragMove: 'lgDragMove', + dragEnd: 'lgDragEnd', + beforeNextSlide: 'lgBeforeNextSlide', + beforePrevSlide: 'lgBeforePrevSlide', + beforeClose: 'lgBeforeClose', + afterClose: 'lgAfterClose', + rotateLeft: 'lgRotateLeft', + rotateRight: 'lgRotateRight', + flipHorizontal: 'lgFlipHorizontal', + flipVertical: 'lgFlipVertical', + autoplay: 'lgAutoplay', + autoplayStart: 'lgAutoplayStart', + autoplayStop: 'lgAutoplayStop', +}; + +var autoplaySettings = { + autoplay: true, + slideShowAutoplay: false, + slideShowInterval: 5000, + progressBar: true, + forceSlideShowAutoplay: false, + autoplayControls: true, + appendAutoplayControlsTo: '.lg-toolbar', + autoplayPluginStrings: { + toggleAutoplay: 'Toggle Autoplay', + }, +}; + +/** + * Creates the autoplay plugin. + * @param {object} element - lightGallery element + */ +var Autoplay = /** @class */ (function () { + function Autoplay(instance) { + this.core = instance; + // extend module default settings with lightGallery core settings + this.settings = __assign(__assign({}, autoplaySettings), this.core.settings); + return this; + } + Autoplay.prototype.init = function () { + var _this = this; + if (!this.settings.autoplay) { + return; + } + this.interval = false; + // Identify if slide happened from autoplay + this.fromAuto = true; + // Identify if autoplay canceled from touch/drag + this.pausedOnTouchDrag = false; + this.pausedOnSlideChange = false; + // append autoplay controls + if (this.settings.autoplayControls) { + this.controls(); + } + // Create progress bar + if (this.settings.progressBar) { + this.core.outer.append('
'); + } + // Start autoplay + if (this.settings.slideShowAutoplay) { + this.core.LGel.once(lGEvents.slideItemLoad + ".autoplay", function () { + _this.startAutoPlay(); + }); + } + // cancel interval on touchstart and dragstart + this.core.LGel.on(lGEvents.dragStart + ".autoplay touchstart.lg.autoplay", function () { + if (_this.interval) { + _this.stopAutoPlay(); + _this.pausedOnTouchDrag = true; + } + }); + // restore autoplay if autoplay canceled from touchstart / dragstart + this.core.LGel.on(lGEvents.dragEnd + ".autoplay touchend.lg.autoplay", function () { + if (!_this.interval && _this.pausedOnTouchDrag) { + _this.startAutoPlay(); + _this.pausedOnTouchDrag = false; + } + }); + this.core.LGel.on(lGEvents.beforeSlide + ".autoplay", function () { + _this.showProgressBar(); + if (!_this.fromAuto && _this.interval) { + _this.stopAutoPlay(); + _this.pausedOnSlideChange = true; + } + else { + _this.pausedOnSlideChange = false; + } + _this.fromAuto = false; + }); + // restore autoplay if autoplay canceled from touchstart / dragstart + this.core.LGel.on(lGEvents.afterSlide + ".autoplay", function () { + if (_this.pausedOnSlideChange && + !_this.interval && + _this.settings.forceSlideShowAutoplay) { + _this.startAutoPlay(); + _this.pausedOnSlideChange = false; + } + }); + // set progress + this.showProgressBar(); + }; + Autoplay.prototype.showProgressBar = function () { + var _this = this; + if (this.settings.progressBar && this.fromAuto) { + var _$progressBar_1 = this.core.outer.find('.lg-progress-bar'); + var _$progress_1 = this.core.outer.find('.lg-progress'); + if (this.interval) { + _$progress_1.removeAttr('style'); + _$progressBar_1.removeClass('lg-start'); + setTimeout(function () { + _$progress_1.css('transition', 'width ' + + (_this.core.settings.speed + + _this.settings.slideShowInterval) + + 'ms ease 0s'); + _$progressBar_1.addClass('lg-start'); + }, 20); + } + } + }; + // Manage autoplay via play/stop buttons + Autoplay.prototype.controls = function () { + var _this = this; + var _html = ""; + // Append autoplay controls + this.core.outer + .find(this.settings.appendAutoplayControlsTo) + .append(_html); + this.core.outer + .find('.lg-autoplay-button') + .first() + .on('click.lg.autoplay', function () { + if (_this.core.outer.hasClass('lg-show-autoplay')) { + _this.stopAutoPlay(); + } + else { + if (!_this.interval) { + _this.startAutoPlay(); + } + } + }); + }; + // Autostart gallery + Autoplay.prototype.startAutoPlay = function () { + var _this = this; + this.core.outer + .find('.lg-progress') + .css('transition', 'width ' + + (this.core.settings.speed + + this.settings.slideShowInterval) + + 'ms ease 0s'); + this.core.outer.addClass('lg-show-autoplay'); + this.core.outer.find('.lg-progress-bar').addClass('lg-start'); + this.core.LGel.trigger(lGEvents.autoplayStart, { + index: this.core.index, + }); + this.interval = setInterval(function () { + if (_this.core.index + 1 < _this.core.galleryItems.length) { + _this.core.index++; + } + else { + _this.core.index = 0; + } + _this.core.LGel.trigger(lGEvents.autoplay, { + index: _this.core.index, + }); + _this.fromAuto = true; + _this.core.slide(_this.core.index, false, false, 'next'); + }, this.core.settings.speed + this.settings.slideShowInterval); + }; + // cancel Autostart + Autoplay.prototype.stopAutoPlay = function () { + if (this.interval) { + this.core.LGel.trigger(lGEvents.autoplayStop, { + index: this.core.index, + }); + this.core.outer.find('.lg-progress').removeAttr('style'); + this.core.outer.removeClass('lg-show-autoplay'); + this.core.outer.find('.lg-progress-bar').removeClass('lg-start'); + } + clearInterval(this.interval); + this.interval = false; + }; + Autoplay.prototype.closeGallery = function () { + this.stopAutoPlay(); + }; + Autoplay.prototype.destroy = function () { + if (this.settings.autoplay) { + this.core.outer.find('.lg-progress-bar').remove(); + } + // Remove all event listeners added by autoplay plugin + this.core.LGel.off('.lg.autoplay'); + this.core.LGel.off('.autoplay'); + }; + return Autoplay; +}()); + +export default Autoplay; +//# sourceMappingURL=lg-autoplay.es5.js.map diff --git a/assets/lightGallery/plugins/autoplay/lg-autoplay.es5.js.map b/assets/lightGallery/plugins/autoplay/lg-autoplay.es5.js.map new file mode 100644 index 0000000..1e49343 --- /dev/null +++ b/assets/lightGallery/plugins/autoplay/lg-autoplay.es5.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lg-autoplay.es5.js","sources":["../../../src/lg-events.ts","../../../src/plugins/autoplay/lg-autoplay-settings.ts","../../../src/plugins/autoplay/lg-autoplay.ts"],"sourcesContent":["import { LightGallery } from './lightgallery';\nimport { VideoSource } from './plugins/video/types';\n\n/**\n * List of lightGallery events\n * All events should be documented here\n * Below interfaces are used to build the website documentations\n * */\nexport const lGEvents: {\n [key: string]: string;\n} = {\n afterAppendSlide: 'lgAfterAppendSlide',\n init: 'lgInit',\n hasVideo: 'lgHasVideo',\n containerResize: 'lgContainerResize',\n updateSlides: 'lgUpdateSlides',\n afterAppendSubHtml: 'lgAfterAppendSubHtml',\n beforeOpen: 'lgBeforeOpen',\n afterOpen: 'lgAfterOpen',\n slideItemLoad: 'lgSlideItemLoad',\n beforeSlide: 'lgBeforeSlide',\n afterSlide: 'lgAfterSlide',\n posterClick: 'lgPosterClick',\n dragStart: 'lgDragStart',\n dragMove: 'lgDragMove',\n dragEnd: 'lgDragEnd',\n beforeNextSlide: 'lgBeforeNextSlide',\n beforePrevSlide: 'lgBeforePrevSlide',\n beforeClose: 'lgBeforeClose',\n afterClose: 'lgAfterClose',\n rotateLeft: 'lgRotateLeft',\n rotateRight: 'lgRotateRight',\n flipHorizontal: 'lgFlipHorizontal',\n flipVertical: 'lgFlipVertical',\n autoplay: 'lgAutoplay',\n autoplayStart: 'lgAutoplayStart',\n autoplayStop: 'lgAutoplayStop',\n};\n\n// Follow the below format for the event documentation\n// @method is the method name when event is used with Angular/React components\n\n/**\n * Fired only once when lightGallery is initialized\n * @name lgInit\n * @method onInit\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action on lightGallery initialization.\n * // Init event returns the plugin instance that can be used to call any lightGalley public method\n * let pluginInstance = null;\n * lg.addEventListener('lgInit', (event) => {\n * pluginInstance = event.detail.instance;\n * });\n * lightGallery(lg);\n * @see Methods\n */\nexport interface InitDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired when the slide content has been inserted into it's slide container.\n * @name lgAfterAppendSlide\n * @method onAfterAppendSlide\n */\nexport interface AfterAppendSlideEventDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired immediately before opening the gallery\n * @name lgBeforeOpen\n * @method onBeforeOpen\n */\nexport interface BeforeOpenDetail {}\n\n/**\n * Fired immediately after opening the gallery\n * @name lgAfterOpen\n * @method onAfterOpen\n */\nexport interface AfterOpenDetail {}\n\n/**\n * Fired once the media inside the slide has been completely loaded .\n * @name lgSlideItemLoad\n * @method onSlideItemLoad\n */\nexport interface SlideItemLoadDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * For the first slide, lightGallery adds some delay for displaying the loaded slide item.\n * This delay is required for the transition effect when the slide item is displayed\n * Respect the delay when you use this event\n */\n delay: number;\n\n // Will be true for the first slide\n isFirstSlide: boolean;\n}\n\n/**\n * Fired immediately before each slide transition.\n * @name lgBeforeSlide\n * @method onBeforeSlide\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action before each slide transition\n * lg.addEventListener('lgBeforeSlide', (event) => {\n * const { index, prevIndex } = event.detail;\n * alert(index, prevIndex);\n * });\n * lightGallery(lg);\n */\nexport interface BeforeSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired immediately after each slide transition.\n * @name lgAfterSlide\n * @method onAfterSlide\n */\nexport interface AfterSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired when the video poster is clicked.\n * @name lgPosterClick\n * @method onPosterClick\n */\nexport interface PosterClickDetail {}\n\n/**\n * Fired when the drag event to move to different slide starts.\n * @name lgDragStart\n * @method onDragStart\n */\nexport interface DragStartDetail {}\n\n/**\n * Fired periodically during the drag operation.\n * @name lgDragMove\n * @method onDragMove\n */\nexport interface DragMoveDetail {}\n\n/**\n * Fired when the user has finished the drag operation\n * @name lgDragEnd\n * @method onDragEnd\n */\nexport interface DragEndDetail {}\n\n/**\n * Fired immediately before the start of the close process.\n * @name lgBeforeClose\n * @method onBeforeClose\n */\nexport interface BeforeCloseDetail {}\n\n/**\n * Fired immediately once lightGallery is closed.\n * @name lgAfterClose\n * @method onAfterClose\n */\nexport interface AfterCloseDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired immediately before each \"next\" slide transition\n * @name lgBeforeNextSlide\n * @method onBeforeNextSlide\n */\nexport interface BeforeNextSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired immediately before each \"prev\" slide transition\n * @name lgBeforePrevSlide\n * @method onBeforePrevSlide\n */\nexport interface BeforePrevSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired when the sub-html content (ex : title/ description) has been appended into the slide.\n * @name lgAfterAppendSubHtml\n * @method onAfterAppendSubHtml\n */\nexport interface AfterAppendSubHtmlDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the lightGallery container has been resized.\n * @name lgContainerResize\n * @method onContainerResize\n */\nexport interface ContainerResizeDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when lightGallery detects video slide\n * @name lgHasVideo\n * @method onHasVideo\n */\nexport interface HasVideoDetail {\n /**\n * Index of the slide,\n */\n index: number;\n /**\n * Video source\n */\n src: string;\n /**\n * HTML5 video source if available\n *

\n HTML5 video source = source: {\n src: string;\n type: string;\n }[];\n attributes: HTMLVideoElement;\n *

\n */\n html5Video: VideoSource;\n /**\n * True if video has poster\n */\n hasPoster: boolean;\n}\n\n/**\n * Fired when the image is rotated in anticlockwise direction\n * @name lgRotateLeft\n * @method onRotateLeft\n */\nexport interface RotateLeftDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is rotated in clockwise direction\n * @name lgRotateRight\n * @method onRotateRight\n */\nexport interface RotateRightDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped horizontally\n * @name lgFlipHorizontal\n * @method onFlipHorizontal\n */\nexport interface FlipHorizontalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped vertically\n * @name lgFlipVertical\n * @method onFlipVertical\n */\nexport interface FlipVerticalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n","export interface AutoplayStrings {\n toggleAutoplay: string;\n}\n\nexport interface AutoplaySettings {\n /**\n * Enable autoplay plugin\n */\n autoplay: boolean;\n\n /**\n * Enable slideshow autoplay\n */\n slideShowAutoplay: boolean;\n\n /**\n * The time (in ms) between each auto transition.\n */\n slideShowInterval: number;\n\n /**\n * Show autoplay progressBar\n */\n progressBar: boolean;\n\n /**\n * If false autoplay will be stopped after first user action\n */\n forceSlideShowAutoplay: boolean;\n\n /**\n * Show/hide autoplay controls.\n */\n autoplayControls: boolean;\n\n /**\n * Specify where the autoplay controls should be appended.\n */\n appendAutoplayControlsTo: string;\n\n /**\n * Custom translation strings for aria-labels\n */\n autoplayPluginStrings: AutoplayStrings;\n}\nexport const autoplaySettings: AutoplaySettings = {\n autoplay: true,\n slideShowAutoplay: false,\n slideShowInterval: 5000,\n progressBar: true,\n forceSlideShowAutoplay: false,\n autoplayControls: true,\n appendAutoplayControlsTo: '.lg-toolbar',\n autoplayPluginStrings: {\n toggleAutoplay: 'Toggle Autoplay',\n } as AutoplayStrings,\n};\n","import { lGEvents } from '../../lg-events';\nimport { LightGallery } from '../../lightgallery';\nimport { AutoplaySettings, autoplaySettings } from './lg-autoplay-settings';\n\n/**\n * Creates the autoplay plugin.\n * @param {object} element - lightGallery element\n */\nexport default class Autoplay {\n core: LightGallery;\n settings: AutoplaySettings;\n interval!: any;\n fromAuto!: boolean;\n pausedOnTouchDrag!: boolean;\n pausedOnSlideChange!: boolean;\n\n constructor(instance: LightGallery) {\n this.core = instance;\n\n // extend module default settings with lightGallery core settings\n this.settings = { ...autoplaySettings, ...this.core.settings };\n\n return this;\n }\n\n public init(): void {\n if (!this.settings.autoplay) {\n return;\n }\n\n this.interval = false;\n\n // Identify if slide happened from autoplay\n this.fromAuto = true;\n\n // Identify if autoplay canceled from touch/drag\n this.pausedOnTouchDrag = false;\n\n this.pausedOnSlideChange = false;\n\n // append autoplay controls\n if (this.settings.autoplayControls) {\n this.controls();\n }\n\n // Create progress bar\n if (this.settings.progressBar) {\n this.core.outer.append(\n '
',\n );\n }\n\n // Start autoplay\n if (this.settings.slideShowAutoplay) {\n this.core.LGel.once(`${lGEvents.slideItemLoad}.autoplay`, () => {\n this.startAutoPlay();\n });\n }\n\n // cancel interval on touchstart and dragstart\n this.core.LGel.on(\n `${lGEvents.dragStart}.autoplay touchstart.lg.autoplay`,\n () => {\n if (this.interval) {\n this.stopAutoPlay();\n this.pausedOnTouchDrag = true;\n }\n },\n );\n\n // restore autoplay if autoplay canceled from touchstart / dragstart\n this.core.LGel.on(\n `${lGEvents.dragEnd}.autoplay touchend.lg.autoplay`,\n () => {\n if (!this.interval && this.pausedOnTouchDrag) {\n this.startAutoPlay();\n this.pausedOnTouchDrag = false;\n }\n },\n );\n\n this.core.LGel.on(`${lGEvents.beforeSlide}.autoplay`, () => {\n this.showProgressBar();\n if (!this.fromAuto && this.interval) {\n this.stopAutoPlay();\n this.pausedOnSlideChange = true;\n } else {\n this.pausedOnSlideChange = false;\n }\n this.fromAuto = false;\n });\n\n // restore autoplay if autoplay canceled from touchstart / dragstart\n this.core.LGel.on(`${lGEvents.afterSlide}.autoplay`, () => {\n if (\n this.pausedOnSlideChange &&\n !this.interval &&\n this.settings.forceSlideShowAutoplay\n ) {\n this.startAutoPlay();\n this.pausedOnSlideChange = false;\n }\n });\n\n // set progress\n this.showProgressBar();\n }\n\n private showProgressBar() {\n if (this.settings.progressBar && this.fromAuto) {\n const _$progressBar = this.core.outer.find('.lg-progress-bar');\n const _$progress = this.core.outer.find('.lg-progress');\n if (this.interval) {\n _$progress.removeAttr('style');\n _$progressBar.removeClass('lg-start');\n setTimeout(() => {\n _$progress.css(\n 'transition',\n 'width ' +\n (this.core.settings.speed +\n this.settings.slideShowInterval) +\n 'ms ease 0s',\n );\n _$progressBar.addClass('lg-start');\n }, 20);\n }\n }\n }\n\n // Manage autoplay via play/stop buttons\n private controls() {\n const _html = ``;\n\n // Append autoplay controls\n this.core.outer\n .find(this.settings.appendAutoplayControlsTo)\n .append(_html);\n\n this.core.outer\n .find('.lg-autoplay-button')\n .first()\n .on('click.lg.autoplay', () => {\n if (this.core.outer.hasClass('lg-show-autoplay')) {\n this.stopAutoPlay();\n } else {\n if (!this.interval) {\n this.startAutoPlay();\n }\n }\n });\n }\n\n // Autostart gallery\n public startAutoPlay(): void {\n this.core.outer\n .find('.lg-progress')\n .css(\n 'transition',\n 'width ' +\n (this.core.settings.speed +\n this.settings.slideShowInterval) +\n 'ms ease 0s',\n );\n this.core.outer.addClass('lg-show-autoplay');\n this.core.outer.find('.lg-progress-bar').addClass('lg-start');\n this.core.LGel.trigger(lGEvents.autoplayStart, {\n index: this.core.index,\n });\n\n this.interval = setInterval(() => {\n if (this.core.index + 1 < this.core.galleryItems.length) {\n this.core.index++;\n } else {\n this.core.index = 0;\n }\n\n this.core.LGel.trigger(lGEvents.autoplay, {\n index: this.core.index,\n });\n\n this.fromAuto = true;\n this.core.slide(this.core.index, false, false, 'next');\n }, this.core.settings.speed + this.settings.slideShowInterval);\n }\n\n // cancel Autostart\n public stopAutoPlay(): void {\n if (this.interval) {\n this.core.LGel.trigger(lGEvents.autoplayStop, {\n index: this.core.index,\n });\n this.core.outer.find('.lg-progress').removeAttr('style');\n this.core.outer.removeClass('lg-show-autoplay');\n this.core.outer.find('.lg-progress-bar').removeClass('lg-start');\n }\n clearInterval(this.interval);\n this.interval = false;\n }\n\n public closeGallery(): void {\n this.stopAutoPlay();\n }\n public destroy(): void {\n if (this.settings.autoplay) {\n this.core.outer.find('.lg-progress-bar').remove();\n }\n // Remove all event listeners added by autoplay plugin\n this.core.LGel.off('.lg.autoplay');\n this.core.LGel.off('.autoplay');\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;;;;;AAKO,IAAM,QAAQ,GAEjB;IACA,gBAAgB,EAAE,oBAAoB;IACtC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,YAAY;IACtB,eAAe,EAAE,mBAAmB;IACpC,YAAY,EAAE,gBAAgB;IAC9B,kBAAkB,EAAE,sBAAsB;IAC1C,UAAU,EAAE,cAAc;IAC1B,SAAS,EAAE,aAAa;IACxB,aAAa,EAAE,iBAAiB;IAChC,WAAW,EAAE,eAAe;IAC5B,UAAU,EAAE,cAAc;IAC1B,WAAW,EAAE,eAAe;IAC5B,SAAS,EAAE,aAAa;IACxB,QAAQ,EAAE,YAAY;IACtB,OAAO,EAAE,WAAW;IACpB,eAAe,EAAE,mBAAmB;IACpC,eAAe,EAAE,mBAAmB;IACpC,WAAW,EAAE,eAAe;IAC5B,UAAU,EAAE,cAAc;IAC1B,UAAU,EAAE,cAAc;IAC1B,WAAW,EAAE,eAAe;IAC5B,cAAc,EAAE,kBAAkB;IAClC,YAAY,EAAE,gBAAgB;IAC9B,QAAQ,EAAE,YAAY;IACtB,aAAa,EAAE,iBAAiB;IAChC,YAAY,EAAE,gBAAgB;CACjC;;ACQM,IAAM,gBAAgB,GAAqB;IAC9C,QAAQ,EAAE,IAAI;IACd,iBAAiB,EAAE,KAAK;IACxB,iBAAiB,EAAE,IAAI;IACvB,WAAW,EAAE,IAAI;IACjB,sBAAsB,EAAE,KAAK;IAC7B,gBAAgB,EAAE,IAAI;IACtB,wBAAwB,EAAE,aAAa;IACvC,qBAAqB,EAAE;QACnB,cAAc,EAAE,iBA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,QAAQ,CAAC,YAAY,EAAE;gBAC1C,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK;aACzB,CAAC,CAAC;YACH,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YACzD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;YAChD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;SACpE;QACD,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;KACzB;IAEM,+BAAY,GAAnB;QACI,IAAI,CAAC,YAAY,EAAE,CAAC;KACvB;IACM,0BAAO,GAAd;QACI,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE;YACxB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,MAAM,EAAE,CAAC;SACrD;;QAED,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QACnC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;KACnC;IACL,eAAC;AAAD,CAAC;;"} \ No newline at end of file diff --git a/assets/lightGallery/plugins/autoplay/lg-autoplay.min.js b/assets/lightGallery/plugins/autoplay/lg-autoplay.min.js new file mode 100644 index 0000000..03ebbcb --- /dev/null +++ b/assets/lightGallery/plugins/autoplay/lg-autoplay.min.js @@ -0,0 +1,8 @@ +/** + * lightgallery | 2.9.0 | October 1st 2025 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +!function(t,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(t="undefined"!=typeof globalThis?globalThis:t||self).lgAutoplay=o()}(this,(function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var o,e=1,s=arguments.length;e
'),this.settings.slideShowAutoplay&&this.core.LGel.once(o+".autoplay",(function(){t.startAutoPlay()})),this.core.LGel.on(r+".autoplay touchstart.lg.autoplay",(function(){t.interval&&(t.stopAutoPlay(),t.pausedOnTouchDrag=!0)})),this.core.LGel.on(i+".autoplay touchend.lg.autoplay",(function(){!t.interval&&t.pausedOnTouchDrag&&(t.startAutoPlay(),t.pausedOnTouchDrag=!1)})),this.core.LGel.on(e+".autoplay",(function(){t.showProgressBar(),!t.fromAuto&&t.interval?(t.stopAutoPlay(),t.pausedOnSlideChange=!0):t.pausedOnSlideChange=!1,t.fromAuto=!1})),this.core.LGel.on(s+".autoplay",(function(){t.pausedOnSlideChange&&!t.interval&&t.settings.forceSlideShowAutoplay&&(t.startAutoPlay(),t.pausedOnSlideChange=!1)})),this.showProgressBar())},p.prototype.showProgressBar=function(){var t=this;if(this.settings.progressBar&&this.fromAuto){var o=this.core.outer.find(".lg-progress-bar"),e=this.core.outer.find(".lg-progress");this.interval&&(e.removeAttr("style"),o.removeClass("lg-start"),setTimeout((function(){e.css("transition","width "+(t.core.settings.speed+t.settings.slideShowInterval)+"ms ease 0s"),o.addClass("lg-start")}),20))}},p.prototype.controls=function(){var t=this,o='';this.core.outer.find(this.settings.appendAutoplayControlsTo).append(o),this.core.outer.find(".lg-autoplay-button").first().on("click.lg.autoplay",(function(){t.core.outer.hasClass("lg-show-autoplay")?t.stopAutoPlay():t.interval||t.startAutoPlay()}))},p.prototype.startAutoPlay=function(){var t=this;this.core.outer.find(".lg-progress").css("transition","width "+(this.core.settings.speed+this.settings.slideShowInterval)+"ms ease 0s"),this.core.outer.addClass("lg-show-autoplay"),this.core.outer.find(".lg-progress-bar").addClass("lg-start"),this.core.LGel.trigger(l,{index:this.core.index}),this.interval=setInterval((function(){t.core.index+1
'); + } + // Start autoplay + if (this.settings.slideShowAutoplay) { + this.core.LGel.once(lGEvents.slideItemLoad + ".autoplay", function () { + _this.startAutoPlay(); + }); + } + // cancel interval on touchstart and dragstart + this.core.LGel.on(lGEvents.dragStart + ".autoplay touchstart.lg.autoplay", function () { + if (_this.interval) { + _this.stopAutoPlay(); + _this.pausedOnTouchDrag = true; + } + }); + // restore autoplay if autoplay canceled from touchstart / dragstart + this.core.LGel.on(lGEvents.dragEnd + ".autoplay touchend.lg.autoplay", function () { + if (!_this.interval && _this.pausedOnTouchDrag) { + _this.startAutoPlay(); + _this.pausedOnTouchDrag = false; + } + }); + this.core.LGel.on(lGEvents.beforeSlide + ".autoplay", function () { + _this.showProgressBar(); + if (!_this.fromAuto && _this.interval) { + _this.stopAutoPlay(); + _this.pausedOnSlideChange = true; + } + else { + _this.pausedOnSlideChange = false; + } + _this.fromAuto = false; + }); + // restore autoplay if autoplay canceled from touchstart / dragstart + this.core.LGel.on(lGEvents.afterSlide + ".autoplay", function () { + if (_this.pausedOnSlideChange && + !_this.interval && + _this.settings.forceSlideShowAutoplay) { + _this.startAutoPlay(); + _this.pausedOnSlideChange = false; + } + }); + // set progress + this.showProgressBar(); + }; + Autoplay.prototype.showProgressBar = function () { + var _this = this; + if (this.settings.progressBar && this.fromAuto) { + var _$progressBar_1 = this.core.outer.find('.lg-progress-bar'); + var _$progress_1 = this.core.outer.find('.lg-progress'); + if (this.interval) { + _$progress_1.removeAttr('style'); + _$progressBar_1.removeClass('lg-start'); + setTimeout(function () { + _$progress_1.css('transition', 'width ' + + (_this.core.settings.speed + + _this.settings.slideShowInterval) + + 'ms ease 0s'); + _$progressBar_1.addClass('lg-start'); + }, 20); + } + } + }; + // Manage autoplay via play/stop buttons + Autoplay.prototype.controls = function () { + var _this = this; + var _html = ""; + // Append autoplay controls + this.core.outer + .find(this.settings.appendAutoplayControlsTo) + .append(_html); + this.core.outer + .find('.lg-autoplay-button') + .first() + .on('click.lg.autoplay', function () { + if (_this.core.outer.hasClass('lg-show-autoplay')) { + _this.stopAutoPlay(); + } + else { + if (!_this.interval) { + _this.startAutoPlay(); + } + } + }); + }; + // Autostart gallery + Autoplay.prototype.startAutoPlay = function () { + var _this = this; + this.core.outer + .find('.lg-progress') + .css('transition', 'width ' + + (this.core.settings.speed + + this.settings.slideShowInterval) + + 'ms ease 0s'); + this.core.outer.addClass('lg-show-autoplay'); + this.core.outer.find('.lg-progress-bar').addClass('lg-start'); + this.core.LGel.trigger(lGEvents.autoplayStart, { + index: this.core.index, + }); + this.interval = setInterval(function () { + if (_this.core.index + 1 < _this.core.galleryItems.length) { + _this.core.index++; + } + else { + _this.core.index = 0; + } + _this.core.LGel.trigger(lGEvents.autoplay, { + index: _this.core.index, + }); + _this.fromAuto = true; + _this.core.slide(_this.core.index, false, false, 'next'); + }, this.core.settings.speed + this.settings.slideShowInterval); + }; + // cancel Autostart + Autoplay.prototype.stopAutoPlay = function () { + if (this.interval) { + this.core.LGel.trigger(lGEvents.autoplayStop, { + index: this.core.index, + }); + this.core.outer.find('.lg-progress').removeAttr('style'); + this.core.outer.removeClass('lg-show-autoplay'); + this.core.outer.find('.lg-progress-bar').removeClass('lg-start'); + } + clearInterval(this.interval); + this.interval = false; + }; + Autoplay.prototype.closeGallery = function () { + this.stopAutoPlay(); + }; + Autoplay.prototype.destroy = function () { + if (this.settings.autoplay) { + this.core.outer.find('.lg-progress-bar').remove(); + } + // Remove all event listeners added by autoplay plugin + this.core.LGel.off('.lg.autoplay'); + this.core.LGel.off('.autoplay'); + }; + return Autoplay; + }()); + + return Autoplay; + +}))); +//# sourceMappingURL=lg-autoplay.umd.js.map diff --git a/assets/lightGallery/plugins/autoplay/lg-autoplay.umd.js.map b/assets/lightGallery/plugins/autoplay/lg-autoplay.umd.js.map new file mode 100644 index 0000000..692348c --- /dev/null +++ b/assets/lightGallery/plugins/autoplay/lg-autoplay.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lg-autoplay.umd.js","sources":["../../../src/lg-events.ts","../../../src/plugins/autoplay/lg-autoplay-settings.ts","../../../src/plugins/autoplay/lg-autoplay.ts"],"sourcesContent":["import { LightGallery } from './lightgallery';\nimport { VideoSource } from './plugins/video/types';\n\n/**\n * List of lightGallery events\n * All events should be documented here\n * Below interfaces are used to build the website documentations\n * */\nexport const lGEvents: {\n [key: string]: string;\n} = {\n afterAppendSlide: 'lgAfterAppendSlide',\n init: 'lgInit',\n hasVideo: 'lgHasVideo',\n containerResize: 'lgContainerResize',\n updateSlides: 'lgUpdateSlides',\n afterAppendSubHtml: 'lgAfterAppendSubHtml',\n beforeOpen: 'lgBeforeOpen',\n afterOpen: 'lgAfterOpen',\n slideItemLoad: 'lgSlideItemLoad',\n beforeSlide: 'lgBeforeSlide',\n afterSlide: 'lgAfterSlide',\n posterClick: 'lgPosterClick',\n dragStart: 'lgDragStart',\n dragMove: 'lgDragMove',\n dragEnd: 'lgDragEnd',\n beforeNextSlide: 'lgBeforeNextSlide',\n beforePrevSlide: 'lgBeforePrevSlide',\n beforeClose: 'lgBeforeClose',\n afterClose: 'lgAfterClose',\n rotateLeft: 'lgRotateLeft',\n rotateRight: 'lgRotateRight',\n flipHorizontal: 'lgFlipHorizontal',\n flipVertical: 'lgFlipVertical',\n autoplay: 'lgAutoplay',\n autoplayStart: 'lgAutoplayStart',\n autoplayStop: 'lgAutoplayStop',\n};\n\n// Follow the below format for the event documentation\n// @method is the method name when event is used with Angular/React components\n\n/**\n * Fired only once when lightGallery is initialized\n * @name lgInit\n * @method onInit\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action on lightGallery initialization.\n * // Init event returns the plugin instance that can be used to call any lightGalley public method\n * let pluginInstance = null;\n * lg.addEventListener('lgInit', (event) => {\n * pluginInstance = event.detail.instance;\n * });\n * lightGallery(lg);\n * @see
Methods\n */\nexport interface InitDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired when the slide content has been inserted into it's slide container.\n * @name lgAfterAppendSlide\n * @method onAfterAppendSlide\n */\nexport interface AfterAppendSlideEventDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired immediately before opening the gallery\n * @name lgBeforeOpen\n * @method onBeforeOpen\n */\nexport interface BeforeOpenDetail {}\n\n/**\n * Fired immediately after opening the gallery\n * @name lgAfterOpen\n * @method onAfterOpen\n */\nexport interface AfterOpenDetail {}\n\n/**\n * Fired once the media inside the slide has been completely loaded .\n * @name lgSlideItemLoad\n * @method onSlideItemLoad\n */\nexport interface SlideItemLoadDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * For the first slide, lightGallery adds some delay for displaying the loaded slide item.\n * This delay is required for the transition effect when the slide item is displayed\n * Respect the delay when you use this event\n */\n delay: number;\n\n // Will be true for the first slide\n isFirstSlide: boolean;\n}\n\n/**\n * Fired immediately before each slide transition.\n * @name lgBeforeSlide\n * @method onBeforeSlide\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action before each slide transition\n * lg.addEventListener('lgBeforeSlide', (event) => {\n * const { index, prevIndex } = event.detail;\n * alert(index, prevIndex);\n * });\n * lightGallery(lg);\n */\nexport interface BeforeSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired immediately after each slide transition.\n * @name lgAfterSlide\n * @method onAfterSlide\n */\nexport interface AfterSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired when the video poster is clicked.\n * @name lgPosterClick\n * @method onPosterClick\n */\nexport interface PosterClickDetail {}\n\n/**\n * Fired when the drag event to move to different slide starts.\n * @name lgDragStart\n * @method onDragStart\n */\nexport interface DragStartDetail {}\n\n/**\n * Fired periodically during the drag operation.\n * @name lgDragMove\n * @method onDragMove\n */\nexport interface DragMoveDetail {}\n\n/**\n * Fired when the user has finished the drag operation\n * @name lgDragEnd\n * @method onDragEnd\n */\nexport interface DragEndDetail {}\n\n/**\n * Fired immediately before the start of the close process.\n * @name lgBeforeClose\n * @method onBeforeClose\n */\nexport interface BeforeCloseDetail {}\n\n/**\n * Fired immediately once lightGallery is closed.\n * @name lgAfterClose\n * @method onAfterClose\n */\nexport interface AfterCloseDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired immediately before each \"next\" slide transition\n * @name lgBeforeNextSlide\n * @method onBeforeNextSlide\n */\nexport interface BeforeNextSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired immediately before each \"prev\" slide transition\n * @name lgBeforePrevSlide\n * @method onBeforePrevSlide\n */\nexport interface BeforePrevSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired when the sub-html content (ex : title/ description) has been appended into the slide.\n * @name lgAfterAppendSubHtml\n * @method onAfterAppendSubHtml\n */\nexport interface AfterAppendSubHtmlDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the lightGallery container has been resized.\n * @name lgContainerResize\n * @method onContainerResize\n */\nexport interface ContainerResizeDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when lightGallery detects video slide\n * @name lgHasVideo\n * @method onHasVideo\n */\nexport interface HasVideoDetail {\n /**\n * Index of the slide,\n */\n index: number;\n /**\n * Video source\n */\n src: string;\n /**\n * HTML5 video source if available\n *

\n HTML5 video source = source: {\n src: string;\n type: string;\n }[];\n attributes: HTMLVideoElement;\n *

\n */\n html5Video: VideoSource;\n /**\n * True if video has poster\n */\n hasPoster: boolean;\n}\n\n/**\n * Fired when the image is rotated in anticlockwise direction\n * @name lgRotateLeft\n * @method onRotateLeft\n */\nexport interface RotateLeftDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is rotated in clockwise direction\n * @name lgRotateRight\n * @method onRotateRight\n */\nexport interface RotateRightDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped horizontally\n * @name lgFlipHorizontal\n * @method onFlipHorizontal\n */\nexport interface FlipHorizontalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped vertically\n * @name lgFlipVertical\n * @method onFlipVertical\n */\nexport interface FlipVerticalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n","export interface AutoplayStrings {\n toggleAutoplay: string;\n}\n\nexport interface AutoplaySettings {\n /**\n * Enable autoplay plugin\n */\n autoplay: boolean;\n\n /**\n * Enable slideshow autoplay\n */\n slideShowAutoplay: boolean;\n\n /**\n * The time (in ms) between each auto transition.\n */\n slideShowInterval: number;\n\n /**\n * Show autoplay progressBar\n */\n progressBar: boolean;\n\n /**\n * If false autoplay will be stopped after first user action\n */\n forceSlideShowAutoplay: boolean;\n\n /**\n * Show/hide autoplay controls.\n */\n autoplayControls: boolean;\n\n /**\n * Specify where the autoplay controls should be appended.\n */\n appendAutoplayControlsTo: string;\n\n /**\n * Custom translation strings for aria-labels\n */\n autoplayPluginStrings: AutoplayStrings;\n}\nexport const autoplaySettings: AutoplaySettings = {\n autoplay: true,\n slideShowAutoplay: false,\n slideShowInterval: 5000,\n progressBar: true,\n forceSlideShowAutoplay: false,\n autoplayControls: true,\n appendAutoplayControlsTo: '.lg-toolbar',\n autoplayPluginStrings: {\n toggleAutoplay: 'Toggle Autoplay',\n } as AutoplayStrings,\n};\n","import { lGEvents } from '../../lg-events';\nimport { LightGallery } from '../../lightgallery';\nimport { AutoplaySettings, autoplaySettings } from './lg-autoplay-settings';\n\n/**\n * Creates the autoplay plugin.\n * @param {object} element - lightGallery element\n */\nexport default class Autoplay {\n core: LightGallery;\n settings: AutoplaySettings;\n interval!: any;\n fromAuto!: boolean;\n pausedOnTouchDrag!: boolean;\n pausedOnSlideChange!: boolean;\n\n constructor(instance: LightGallery) {\n this.core = instance;\n\n // extend module default settings with lightGallery core settings\n this.settings = { ...autoplaySettings, ...this.core.settings };\n\n return this;\n }\n\n public init(): void {\n if (!this.settings.autoplay) {\n return;\n }\n\n this.interval = false;\n\n // Identify if slide happened from autoplay\n this.fromAuto = true;\n\n // Identify if autoplay canceled from touch/drag\n this.pausedOnTouchDrag = false;\n\n this.pausedOnSlideChange = false;\n\n // append autoplay controls\n if (this.settings.autoplayControls) {\n this.controls();\n }\n\n // Create progress bar\n if (this.settings.progressBar) {\n this.core.outer.append(\n '
',\n );\n }\n\n // Start autoplay\n if (this.settings.slideShowAutoplay) {\n this.core.LGel.once(`${lGEvents.slideItemLoad}.autoplay`, () => {\n this.startAutoPlay();\n });\n }\n\n // cancel interval on touchstart and dragstart\n this.core.LGel.on(\n `${lGEvents.dragStart}.autoplay touchstart.lg.autoplay`,\n () => {\n if (this.interval) {\n this.stopAutoPlay();\n this.pausedOnTouchDrag = true;\n }\n },\n );\n\n // restore autoplay if autoplay canceled from touchstart / dragstart\n this.core.LGel.on(\n `${lGEvents.dragEnd}.autoplay touchend.lg.autoplay`,\n () => {\n if (!this.interval && this.pausedOnTouchDrag) {\n this.startAutoPlay();\n this.pausedOnTouchDrag = false;\n }\n },\n );\n\n this.core.LGel.on(`${lGEvents.beforeSlide}.autoplay`, () => {\n this.showProgressBar();\n if (!this.fromAuto && this.interval) {\n this.stopAutoPlay();\n this.pausedOnSlideChange = true;\n } else {\n this.pausedOnSlideChange = false;\n }\n this.fromAuto = false;\n });\n\n // restore autoplay if autoplay canceled from touchstart / dragstart\n this.core.LGel.on(`${lGEvents.afterSlide}.autoplay`, () => {\n if (\n this.pausedOnSlideChange &&\n !this.interval &&\n this.settings.forceSlideShowAutoplay\n ) {\n this.startAutoPlay();\n this.pausedOnSlideChange = false;\n }\n });\n\n // set progress\n this.showProgressBar();\n }\n\n private showProgressBar() {\n if (this.settings.progressBar && this.fromAuto) {\n const _$progressBar = this.core.outer.find('.lg-progress-bar');\n const _$progress = this.core.outer.find('.lg-progress');\n if (this.interval) {\n _$progress.removeAttr('style');\n _$progressBar.removeClass('lg-start');\n setTimeout(() => {\n _$progress.css(\n 'transition',\n 'width ' +\n (this.core.settings.speed +\n this.settings.slideShowInterval) +\n 'ms ease 0s',\n );\n _$progressBar.addClass('lg-start');\n }, 20);\n }\n }\n }\n\n // Manage autoplay via play/stop buttons\n private controls() {\n const _html = ``;\n\n // Append autoplay controls\n this.core.outer\n .find(this.settings.appendAutoplayControlsTo)\n .append(_html);\n\n this.core.outer\n .find('.lg-autoplay-button')\n .first()\n .on('click.lg.autoplay', () => {\n if (this.core.outer.hasClass('lg-show-autoplay')) {\n this.stopAutoPlay();\n } else {\n if (!this.interval) {\n this.startAutoPlay();\n }\n }\n });\n }\n\n // Autostart gallery\n public startAutoPlay(): void {\n this.core.outer\n .find('.lg-progress')\n .css(\n 'transition',\n 'width ' +\n (this.core.settings.speed +\n this.settings.slideShowInterval) +\n 'ms ease 0s',\n );\n this.core.outer.addClass('lg-show-autoplay');\n this.core.outer.find('.lg-progress-bar').addClass('lg-start');\n this.core.LGel.trigger(lGEvents.autoplayStart, {\n index: this.core.index,\n });\n\n this.interval = setInterval(() => {\n if (this.core.index + 1 < this.core.galleryItems.length) {\n this.core.index++;\n } else {\n this.core.index = 0;\n }\n\n this.core.LGel.trigger(lGEvents.autoplay, {\n index: this.core.index,\n });\n\n this.fromAuto = true;\n this.core.slide(this.core.index, false, false, 'next');\n }, this.core.settings.speed + this.settings.slideShowInterval);\n }\n\n // cancel Autostart\n public stopAutoPlay(): void {\n if (this.interval) {\n this.core.LGel.trigger(lGEvents.autoplayStop, {\n index: this.core.index,\n });\n this.core.outer.find('.lg-progress').removeAttr('style');\n this.core.outer.removeClass('lg-show-autoplay');\n this.core.outer.find('.lg-progress-bar').removeClass('lg-start');\n }\n clearInterval(this.interval);\n this.interval = false;\n }\n\n public closeGallery(): void {\n this.stopAutoPlay();\n }\n public destroy(): void {\n if (this.settings.autoplay) {\n this.core.outer.find('.lg-progress-bar').remove();\n }\n // Remove all event listeners added by autoplay plugin\n this.core.LGel.off('.lg.autoplay');\n this.core.LGel.off('.autoplay');\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGA;;;;;IAKO,IAAM,QAAQ,GAEjB;QACA,gBAAgB,EAAE,oBAAoB;QACtC,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,YAAY;QACtB,eAAe,EAAE,mBAAmB;QACpC,YAAY,EAAE,gBAAgB;QAC9B,kBAAkB,EAAE,sBAAsB;QAC1C,UAAU,EAAE,cAAc;QAC1B,SAAS,EAAE,aAAa;QACxB,aAAa,EAAE,iBAAiB;QAChC,WAAW,EAAE,eAAe;QAC5B,UAAU,EAAE,cAAc;QAC1B,WAAW,EAAE,eAAe;QAC5B,SAAS,EAAE,aAAa;QACxB,QAAQ,EAAE,YAAY;QACtB,OAAO,EAAE,WAAW;QACpB,eAAe,EAAE,mBAAmB;QACpC,eAAe,EAAE,mBAAmB;QACpC,WAAW,EAAE,eAAe;QAC5B,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE,cAAc;QAC1B,WAAW,EAAE,eAAe;QAC5B,cAAc,EAAE,kBAAkB;QAClC,YAAY,EAAE,gBAAgB;QAC9B,QAAQ,EAAE,YAAY;QACtB,aAAa,EAAE,iBAAiB;QAChC,YAAY,EAAE,gBAAgB;KACjC;;ICQM,IAAM,gBAAgB,GAAqB;QAC9C,QAAQ,EAAE,IAAI;QACd,iBAAiB,EAAE,KAAK;QACxB,iBAAiB,EAAE,IAAI;QACvB,WAAW,EAAE,IAAI;QACjB,sBAAsB,EAAE,KAAK;QAC7B,gBAAgB,EAAE,IAAI;QACtB,wBAA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GM,+BAAY,GAAnB;YACI,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACf,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,EAAE;oBAC1C,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK;iBACzB,CAAC,CAAC;gBACH,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;gBACzD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;gBAChD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;aACpE;YACD,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC7B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;SACzB;QAEM,+BAAY,GAAnB;YACI,IAAI,CAAC,YAAY,EAAE,CAAC;SACvB;QACM,0BAAO,GAAd;YACI,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE;gBACxB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,MAAM,EAAE,CAAC;aACrD;;YAED,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;YACnC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;SACnC;QACL,eAAC;IAAD,CAAC;;;;"} \ No newline at end of file diff --git a/assets/lightGallery/plugins/autoplay/package.json b/assets/lightGallery/plugins/autoplay/package.json new file mode 100644 index 0000000..e4eb37b --- /dev/null +++ b/assets/lightGallery/plugins/autoplay/package.json @@ -0,0 +1,7 @@ +{ + "name": "lightgallery/plugins/autoplay", + "private": true, + "main": "lg-autoplay.umd.js", + "module": "lg-autoplay.es5.js", + "typings": "lg-autoplay.d.ts" +} \ No newline at end of file diff --git a/assets/lightGallery/plugins/comment/lg-comment-settings.d.ts b/assets/lightGallery/plugins/comment/lg-comment-settings.d.ts new file mode 100644 index 0000000..b73067d --- /dev/null +++ b/assets/lightGallery/plugins/comment/lg-comment-settings.d.ts @@ -0,0 +1,33 @@ +export interface CommentStrings { + toggleComments: string; +} +export interface CommentSettings { + /** + * Enable comment box + */ + commentBox: boolean; + /** + * Enable facebook comment box + */ + fbComments: boolean; + /** + * Enable disqus comment box + */ + disqusComments: boolean; + /** + * Disqus comment config + */ + disqusConfig: { + title?: string; + language: string; + }; + /** + * Facebook comments default markup + */ + commentsMarkup: string; + /** + * Custom translation strings for aria-labels + */ + commentPluginStrings: CommentStrings; +} +export declare const commentSettings: CommentSettings; diff --git a/assets/lightGallery/plugins/comment/lg-comment.d.ts b/assets/lightGallery/plugins/comment/lg-comment.d.ts new file mode 100644 index 0000000..b7c1cb8 --- /dev/null +++ b/assets/lightGallery/plugins/comment/lg-comment.d.ts @@ -0,0 +1,25 @@ +/** + * lightGallery comments module + * Supports facebook and disqus comments + * + * @ref - https://help.disqus.com/customer/portal/articles/472098-javascript-configuration-variables + * @ref - https://github.com/disqus/DISQUS-API-Recipes/blob/master/snippets/js/disqus-reset/disqus_reset.html + * @ref - https://css-tricks.com/lazy-loading-disqus-comments/ + * @ref - https://developers.facebook.com/docs/plugins/comments/#comments-plugin + * + */ +import { LgQuery } from '../../lgQuery'; +import { LightGallery } from '../../lightgallery'; +import { CommentSettings } from './lg-comment-settings'; +export default class CommentBox { + core: LightGallery; + settings: CommentSettings; + private $LG; + constructor(instance: LightGallery, $LG: LgQuery); + init(): void; + private setMarkup; + toggleCommentBox(): void; + addFbComments(): void; + addDisqusComments(): void; + destroy(): void; +} diff --git a/assets/lightGallery/plugins/comment/lg-comment.es5.js b/assets/lightGallery/plugins/comment/lg-comment.es5.js new file mode 100644 index 0000000..db6cc13 --- /dev/null +++ b/assets/lightGallery/plugins/comment/lg-comment.es5.js @@ -0,0 +1,205 @@ +/*! + * lightgallery | 2.9.0 | October 1st 2025 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; + +/** + * List of lightGallery events + * All events should be documented here + * Below interfaces are used to build the website documentations + * */ +var lGEvents = { + afterAppendSlide: 'lgAfterAppendSlide', + init: 'lgInit', + hasVideo: 'lgHasVideo', + containerResize: 'lgContainerResize', + updateSlides: 'lgUpdateSlides', + afterAppendSubHtml: 'lgAfterAppendSubHtml', + beforeOpen: 'lgBeforeOpen', + afterOpen: 'lgAfterOpen', + slideItemLoad: 'lgSlideItemLoad', + beforeSlide: 'lgBeforeSlide', + afterSlide: 'lgAfterSlide', + posterClick: 'lgPosterClick', + dragStart: 'lgDragStart', + dragMove: 'lgDragMove', + dragEnd: 'lgDragEnd', + beforeNextSlide: 'lgBeforeNextSlide', + beforePrevSlide: 'lgBeforePrevSlide', + beforeClose: 'lgBeforeClose', + afterClose: 'lgAfterClose', + rotateLeft: 'lgRotateLeft', + rotateRight: 'lgRotateRight', + flipHorizontal: 'lgFlipHorizontal', + flipVertical: 'lgFlipVertical', + autoplay: 'lgAutoplay', + autoplayStart: 'lgAutoplayStart', + autoplayStop: 'lgAutoplayStop', +}; + +var commentSettings = { + commentBox: false, + fbComments: false, + disqusComments: false, + disqusConfig: { + title: undefined, + language: 'en', + }, + commentsMarkup: '

Leave a comment.

', + commentPluginStrings: { + toggleComments: 'Toggle Comments', + }, +}; + +/** + * lightGallery comments module + * Supports facebook and disqus comments + * + * @ref - https://help.disqus.com/customer/portal/articles/472098-javascript-configuration-variables + * @ref - https://github.com/disqus/DISQUS-API-Recipes/blob/master/snippets/js/disqus-reset/disqus_reset.html + * @ref - https://css-tricks.com/lazy-loading-disqus-comments/ + * @ref - https://developers.facebook.com/docs/plugins/comments/#comments-plugin + * + */ +var CommentBox = /** @class */ (function () { + function CommentBox(instance, $LG) { + // get lightGallery core plugin instance + this.core = instance; + this.$LG = $LG; + // extend module default settings with lightGallery core settings + this.settings = __assign(__assign({}, commentSettings), this.core.settings); + return this; + } + CommentBox.prototype.init = function () { + if (!this.settings.commentBox) { + return; + } + this.setMarkup(); + this.toggleCommentBox(); + if (this.settings.fbComments) { + this.addFbComments(); + } + else if (this.settings.disqusComments) { + this.addDisqusComments(); + } + }; + CommentBox.prototype.setMarkup = function () { + this.core.outer.append(this.settings.commentsMarkup + + '
'); + var commentToggleBtn = ""; + this.core.$toolbar.append(commentToggleBtn); + }; + CommentBox.prototype.toggleCommentBox = function () { + var _this_1 = this; + this.core.outer + .find('.lg-comment-toggle') + .first() + .on('click.lg.comment', function () { + _this_1.core.outer.toggleClass('lg-comment-active'); + }); + this.core.outer + .find('.lg-comment-overlay') + .first() + .on('click.lg.comment', function () { + _this_1.core.outer.removeClass('lg-comment-active'); + }); + this.core.outer + .find('.lg-comment-close') + .first() + .on('click.lg.comment', function () { + _this_1.core.outer.removeClass('lg-comment-active'); + }); + }; + CommentBox.prototype.addFbComments = function () { + var _this_1 = this; + // eslint-disable-next-line @typescript-eslint/no-this-alias + var _this = this; + this.core.LGel.on(lGEvents.beforeSlide + ".comment", function (event) { + var html = _this_1.core.galleryItems[event.detail.index].fbHtml; + _this_1.core.outer.find('.lg-comment-body').html(html); + }); + this.core.LGel.on(lGEvents.afterSlide + ".comment", function () { + try { + FB.XFBML.parse(); + } + catch (err) { + _this.$LG(window).on('fbAsyncInit', function () { + FB.XFBML.parse(); + }); + } + }); + }; + CommentBox.prototype.addDisqusComments = function () { + var _this_1 = this; + var $disqusThread = this.$LG('#disqus_thread'); + $disqusThread.remove(); + this.core.outer + .find('.lg-comment-body') + .append('
'); + this.core.LGel.on(lGEvents.beforeSlide + ".comment", function () { + $disqusThread.html(''); + }); + this.core.LGel.on(lGEvents.afterSlide + ".comment", function (event) { + var index = event.detail.index; + // eslint-disable-next-line @typescript-eslint/no-this-alias + var _this = _this_1; + // DISQUS needs sometime to intialize when lightGallery is opened from direct url(hash plugin). + setTimeout(function () { + try { + DISQUS.reset({ + reload: true, + config: function () { + this.page.identifier = + _this.core.galleryItems[index].disqusIdentifier; + this.page.url = + _this.core.galleryItems[index].disqusURL; + this.page.title = + _this.settings.disqusConfig.title; + this.language = + _this.settings.disqusConfig.language; + }, + }); + } + catch (err) { + console.error('Make sure you have included disqus JavaScript code in your document. Ex - https://lg-disqus.disqus.com/admin/install/platforms/universalcode/'); + } + }, _this.core.lGalleryOn ? 0 : 1000); + }); + }; + CommentBox.prototype.destroy = function () { + this.core.LGel.off('.lg.comment'); + this.core.LGel.off('.comment'); + }; + return CommentBox; +}()); + +export default CommentBox; +//# sourceMappingURL=lg-comment.es5.js.map diff --git a/assets/lightGallery/plugins/comment/lg-comment.es5.js.map b/assets/lightGallery/plugins/comment/lg-comment.es5.js.map new file mode 100644 index 0000000..e419b9b --- /dev/null +++ b/assets/lightGallery/plugins/comment/lg-comment.es5.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lg-comment.es5.js","sources":["../../../src/lg-events.ts","../../../src/plugins/comment/lg-comment-settings.ts","../../../src/plugins/comment/lg-comment.ts"],"sourcesContent":["import { LightGallery } from './lightgallery';\nimport { VideoSource } from './plugins/video/types';\n\n/**\n * List of lightGallery events\n * All events should be documented here\n * Below interfaces are used to build the website documentations\n * */\nexport const lGEvents: {\n [key: string]: string;\n} = {\n afterAppendSlide: 'lgAfterAppendSlide',\n init: 'lgInit',\n hasVideo: 'lgHasVideo',\n containerResize: 'lgContainerResize',\n updateSlides: 'lgUpdateSlides',\n afterAppendSubHtml: 'lgAfterAppendSubHtml',\n beforeOpen: 'lgBeforeOpen',\n afterOpen: 'lgAfterOpen',\n slideItemLoad: 'lgSlideItemLoad',\n beforeSlide: 'lgBeforeSlide',\n afterSlide: 'lgAfterSlide',\n posterClick: 'lgPosterClick',\n dragStart: 'lgDragStart',\n dragMove: 'lgDragMove',\n dragEnd: 'lgDragEnd',\n beforeNextSlide: 'lgBeforeNextSlide',\n beforePrevSlide: 'lgBeforePrevSlide',\n beforeClose: 'lgBeforeClose',\n afterClose: 'lgAfterClose',\n rotateLeft: 'lgRotateLeft',\n rotateRight: 'lgRotateRight',\n flipHorizontal: 'lgFlipHorizontal',\n flipVertical: 'lgFlipVertical',\n autoplay: 'lgAutoplay',\n autoplayStart: 'lgAutoplayStart',\n autoplayStop: 'lgAutoplayStop',\n};\n\n// Follow the below format for the event documentation\n// @method is the method name when event is used with Angular/React components\n\n/**\n * Fired only once when lightGallery is initialized\n * @name lgInit\n * @method onInit\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action on lightGallery initialization.\n * // Init event returns the plugin instance that can be used to call any lightGalley public method\n * let pluginInstance = null;\n * lg.addEventListener('lgInit', (event) => {\n * pluginInstance = event.detail.instance;\n * });\n * lightGallery(lg);\n * @see
Methods\n */\nexport interface InitDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired when the slide content has been inserted into it's slide container.\n * @name lgAfterAppendSlide\n * @method onAfterAppendSlide\n */\nexport interface AfterAppendSlideEventDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired immediately before opening the gallery\n * @name lgBeforeOpen\n * @method onBeforeOpen\n */\nexport interface BeforeOpenDetail {}\n\n/**\n * Fired immediately after opening the gallery\n * @name lgAfterOpen\n * @method onAfterOpen\n */\nexport interface AfterOpenDetail {}\n\n/**\n * Fired once the media inside the slide has been completely loaded .\n * @name lgSlideItemLoad\n * @method onSlideItemLoad\n */\nexport interface SlideItemLoadDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * For the first slide, lightGallery adds some delay for displaying the loaded slide item.\n * This delay is required for the transition effect when the slide item is displayed\n * Respect the delay when you use this event\n */\n delay: number;\n\n // Will be true for the first slide\n isFirstSlide: boolean;\n}\n\n/**\n * Fired immediately before each slide transition.\n * @name lgBeforeSlide\n * @method onBeforeSlide\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action before each slide transition\n * lg.addEventListener('lgBeforeSlide', (event) => {\n * const { index, prevIndex } = event.detail;\n * alert(index, prevIndex);\n * });\n * lightGallery(lg);\n */\nexport interface BeforeSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired immediately after each slide transition.\n * @name lgAfterSlide\n * @method onAfterSlide\n */\nexport interface AfterSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired when the video poster is clicked.\n * @name lgPosterClick\n * @method onPosterClick\n */\nexport interface PosterClickDetail {}\n\n/**\n * Fired when the drag event to move to different slide starts.\n * @name lgDragStart\n * @method onDragStart\n */\nexport interface DragStartDetail {}\n\n/**\n * Fired periodically during the drag operation.\n * @name lgDragMove\n * @method onDragMove\n */\nexport interface DragMoveDetail {}\n\n/**\n * Fired when the user has finished the drag operation\n * @name lgDragEnd\n * @method onDragEnd\n */\nexport interface DragEndDetail {}\n\n/**\n * Fired immediately before the start of the close process.\n * @name lgBeforeClose\n * @method onBeforeClose\n */\nexport interface BeforeCloseDetail {}\n\n/**\n * Fired immediately once lightGallery is closed.\n * @name lgAfterClose\n * @method onAfterClose\n */\nexport interface AfterCloseDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired immediately before each \"next\" slide transition\n * @name lgBeforeNextSlide\n * @method onBeforeNextSlide\n */\nexport interface BeforeNextSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired immediately before each \"prev\" slide transition\n * @name lgBeforePrevSlide\n * @method onBeforePrevSlide\n */\nexport interface BeforePrevSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired when the sub-html content (ex : title/ description) has been appended into the slide.\n * @name lgAfterAppendSubHtml\n * @method onAfterAppendSubHtml\n */\nexport interface AfterAppendSubHtmlDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the lightGallery container has been resized.\n * @name lgContainerResize\n * @method onContainerResize\n */\nexport interface ContainerResizeDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when lightGallery detects video slide\n * @name lgHasVideo\n * @method onHasVideo\n */\nexport interface HasVideoDetail {\n /**\n * Index of the slide,\n */\n index: number;\n /**\n * Video source\n */\n src: string;\n /**\n * HTML5 video source if available\n *

\n HTML5 video source = source: {\n src: string;\n type: string;\n }[];\n attributes: HTMLVideoElement;\n *

\n */\n html5Video: VideoSource;\n /**\n * True if video has poster\n */\n hasPoster: boolean;\n}\n\n/**\n * Fired when the image is rotated in anticlockwise direction\n * @name lgRotateLeft\n * @method onRotateLeft\n */\nexport interface RotateLeftDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is rotated in clockwise direction\n * @name lgRotateRight\n * @method onRotateRight\n */\nexport interface RotateRightDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped horizontally\n * @name lgFlipHorizontal\n * @method onFlipHorizontal\n */\nexport interface FlipHorizontalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped vertically\n * @name lgFlipVertical\n * @method onFlipVertical\n */\nexport interface FlipVerticalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n","export interface CommentStrings {\n toggleComments: string;\n}\n\nexport interface CommentSettings {\n /**\n * Enable comment box\n */\n commentBox: boolean;\n /**\n * Enable facebook comment box\n */\n fbComments: boolean;\n /**\n * Enable disqus comment box\n */\n disqusComments: boolean;\n\n /**\n * Disqus comment config\n */\n disqusConfig: {\n title?: string;\n language: string;\n };\n\n /**\n * Facebook comments default markup\n */\n commentsMarkup: string;\n\n /**\n * Custom translation strings for aria-labels\n */\n commentPluginStrings: CommentStrings;\n}\n\nexport const commentSettings: CommentSettings = {\n commentBox: false,\n fbComments: false,\n disqusComments: false,\n disqusConfig: {\n title: undefined,\n language: 'en',\n },\n commentsMarkup:\n '

Leave a comment.

',\n commentPluginStrings: {\n toggleComments: 'Toggle Comments',\n } as CommentStrings,\n};\n","/**\n * lightGallery comments module\n * Supports facebook and disqus comments\n *\n * @ref - https://help.disqus.com/customer/portal/articles/472098-javascript-configuration-variables\n * @ref - https://github.com/disqus/DISQUS-API-Recipes/blob/master/snippets/js/disqus-reset/disqus_reset.html\n * @ref - https://css-tricks.com/lazy-loading-disqus-comments/\n * @ref - https://developers.facebook.com/docs/plugins/comments/#comments-plugin\n *\n */\n\nimport { lGEvents } from '../../lg-events';\nimport { LgQuery } from '../../lgQuery';\nimport { LightGallery } from '../../lightgallery';\nimport { commentSettings, CommentSettings } from './lg-comment-settings';\n\ndeclare let FB: any;\ndeclare let DISQUS: any;\n\nexport default class CommentBox {\n core: LightGallery;\n settings: CommentSettings;\n private $LG!: LgQuery;\n constructor(instance: LightGallery, $LG: LgQuery) {\n // get lightGallery core plugin instance\n this.core = instance;\n this.$LG = $LG;\n\n // extend module default settings with lightGallery core settings\n this.settings = { ...commentSettings, ...this.core.settings };\n\n return this;\n }\n\n public init(): void {\n if (!this.settings.commentBox) {\n return;\n }\n this.setMarkup();\n this.toggleCommentBox();\n if (this.settings.fbComments) {\n this.addFbComments();\n } else if (this.settings.disqusComments) {\n this.addDisqusComments();\n }\n }\n\n private setMarkup() {\n this.core.outer.append(\n this.settings.commentsMarkup +\n '
',\n );\n\n const commentToggleBtn = ``;\n this.core.$toolbar.append(commentToggleBtn);\n }\n\n toggleCommentBox(): void {\n this.core.outer\n .find('.lg-comment-toggle')\n .first()\n .on('click.lg.comment', () => {\n this.core.outer.toggleClass('lg-comment-active');\n });\n\n this.core.outer\n .find('.lg-comment-overlay')\n .first()\n .on('click.lg.comment', () => {\n this.core.outer.removeClass('lg-comment-active');\n });\n this.core.outer\n .find('.lg-comment-close')\n .first()\n .on('click.lg.comment', () => {\n this.core.outer.removeClass('lg-comment-active');\n });\n }\n\n addFbComments() {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const _this = this;\n this.core.LGel.on(`${lGEvents.beforeSlide}.comment`, (event) => {\n const html = this.core.galleryItems[event.detail.index].fbHtml;\n this.core.outer.find('.lg-comment-body').html(html as string);\n });\n this.core.LGel.on(`${lGEvents.afterSlide}.comment`, function () {\n try {\n FB.XFBML.parse();\n } catch (err) {\n _this.$LG(window).on('fbAsyncInit', function () {\n FB.XFBML.parse();\n });\n }\n });\n }\n\n addDisqusComments(): void {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const _this = this;\n const $disqusThread = this.$LG('#disqus_thread');\n $disqusThread.remove();\n this.core.outer\n .find('.lg-comment-body')\n .append('
');\n\n this.core.LGel.on(`${lGEvents.beforeSlide}.comment`, () => {\n $disqusThread.html('');\n });\n\n this.core.LGel.on(`${lGEvents.afterSlide}.comment`, (event) => {\n const { index } = event.detail;\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const _this = this;\n // DISQUS needs sometime to intialize when lightGallery is opened from direct url(hash plugin).\n setTimeout(\n function () {\n try {\n DISQUS.reset({\n reload: true,\n config: function () {\n this.page.identifier =\n _this.core.galleryItems[\n index\n ].disqusIdentifier;\n this.page.url =\n _this.core.galleryItems[index].disqusURL;\n this.page.title =\n _this.settings.disqusConfig.title;\n this.language =\n _this.settings.disqusConfig.language;\n },\n });\n } catch (err) {\n console.error(\n 'Make sure you have included disqus JavaScript code in your document. Ex - https://lg-disqus.disqus.com/admin/install/platforms/universalcode/',\n );\n }\n },\n _this.core.lGalleryOn ? 0 : 1000,\n );\n });\n }\n\n destroy(): void {\n this.core.LGel.off('.lg.comment');\n this.core.LGel.off('.comment');\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;;;;;AAKO,IAAM,QAAQ,GAEjB;IACA,gBAAgB,EAAE,oBAAoB;IACtC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,YAAY;IACtB,eAAe,EAAE,mBAAmB;IACpC,YAAY,EAAE,gBAAgB;IAC9B,kBAAkB,EAAE,sBAAsB;IAC1C,UAAU,EAAE,cAAc;IAC1B,SAAS,EAAE,aAAa;IACxB,aAAa,EAAE,iBAAiB;IAChC,WAAW,EAAE,eAAe;IAC5B,UAAU,EAAE,cAAc;IAC1B,WAAW,EAAE,eAAe;IAC5B,SAAS,EAAE,aAAa;IACxB,QAAQ,EAAE,YAAY;IACtB,OAAO,EAAE,WAAW;IACpB,eAAe,EAAE,mBAAmB;IACpC,eAAe,EAAE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,CAAC,GAAG;gCACT,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC;4BAC7C,IAAI,CAAC,IAAI,CAAC,KAAK;gCACX,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC;4BACtC,IAAI,CAAC,QAAQ;gCACT,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC;yBAC5C;qBACJ,CAAC,CAAC;iBACN;gBAAC,OAAO,GAAG,EAAE;oBACV,OAAO,CAAC,KAAK,CACT,+IAA+I,CAClJ,CAAC;iBACL;aACJ,EACD,KAAK,CAAC,IAAI,CAAC,UAAU,GAAG,CAAC,GAAG,IAAI,CACnC,CAAC;SACL,CAAC,CAAC;KACN;IAED,4BAAO,GAAP;QACI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAClC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;KAClC;IACL,iBAAC;AAAD,CAAC;;"} \ No newline at end of file diff --git a/assets/lightGallery/plugins/comment/lg-comment.min.js b/assets/lightGallery/plugins/comment/lg-comment.min.js new file mode 100644 index 0000000..bd4fa09 --- /dev/null +++ b/assets/lightGallery/plugins/comment/lg-comment.min.js @@ -0,0 +1,8 @@ +/** + * lightgallery | 2.9.0 | October 1st 2025 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgComment=e()}(this,(function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,o=1,n=arguments.length;o

Leave a comment.

',commentPluginStrings:{toggleComments:"Toggle Comments"}};return function(){function i(e,o){return this.core=e,this.$LG=o,this.settings=t(t({},n),this.core.settings),this}return i.prototype.init=function(){this.settings.commentBox&&(this.setMarkup(),this.toggleCommentBox(),this.settings.fbComments?this.addFbComments():this.settings.disqusComments&&this.addDisqusComments())},i.prototype.setMarkup=function(){this.core.outer.append(this.settings.commentsMarkup+'
');var t='';this.core.$toolbar.append(t)},i.prototype.toggleCommentBox=function(){var t=this;this.core.outer.find(".lg-comment-toggle").first().on("click.lg.comment",(function(){t.core.outer.toggleClass("lg-comment-active")})),this.core.outer.find(".lg-comment-overlay").first().on("click.lg.comment",(function(){t.core.outer.removeClass("lg-comment-active")})),this.core.outer.find(".lg-comment-close").first().on("click.lg.comment",(function(){t.core.outer.removeClass("lg-comment-active")}))},i.prototype.addFbComments=function(){var t=this,n=this;this.core.LGel.on(e+".comment",(function(e){var o=t.core.galleryItems[e.detail.index].fbHtml;t.core.outer.find(".lg-comment-body").html(o)})),this.core.LGel.on(o+".comment",(function(){try{FB.XFBML.parse()}catch(t){n.$LG(window).on("fbAsyncInit",(function(){FB.XFBML.parse()}))}}))},i.prototype.addDisqusComments=function(){var t=this,n=this.$LG("#disqus_thread");n.remove(),this.core.outer.find(".lg-comment-body").append('
'),this.core.LGel.on(e+".comment",(function(){n.html("")})),this.core.LGel.on(o+".comment",(function(e){var o=e.detail.index,n=t;setTimeout((function(){try{DISQUS.reset({reload:!0,config:function(){this.page.identifier=n.core.galleryItems[o].disqusIdentifier,this.page.url=n.core.galleryItems[o].disqusURL,this.page.title=n.settings.disqusConfig.title,this.language=n.settings.disqusConfig.language}})}catch(t){console.error("Make sure you have included disqus JavaScript code in your document. Ex - https://lg-disqus.disqus.com/admin/install/platforms/universalcode/")}}),n.core.lGalleryOn?0:1e3)}))},i.prototype.destroy=function(){this.core.LGel.off(".lg.comment"),this.core.LGel.off(".comment")},i}()})); diff --git a/assets/lightGallery/plugins/comment/lg-comment.umd.js b/assets/lightGallery/plugins/comment/lg-comment.umd.js new file mode 100644 index 0000000..81d8323 --- /dev/null +++ b/assets/lightGallery/plugins/comment/lg-comment.umd.js @@ -0,0 +1,213 @@ +/*! + * lightgallery | 2.9.0 | October 1st 2025 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgComment = factory()); +}(this, (function () { 'use strict'; + + /*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */ + + var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); + }; + + /** + * List of lightGallery events + * All events should be documented here + * Below interfaces are used to build the website documentations + * */ + var lGEvents = { + afterAppendSlide: 'lgAfterAppendSlide', + init: 'lgInit', + hasVideo: 'lgHasVideo', + containerResize: 'lgContainerResize', + updateSlides: 'lgUpdateSlides', + afterAppendSubHtml: 'lgAfterAppendSubHtml', + beforeOpen: 'lgBeforeOpen', + afterOpen: 'lgAfterOpen', + slideItemLoad: 'lgSlideItemLoad', + beforeSlide: 'lgBeforeSlide', + afterSlide: 'lgAfterSlide', + posterClick: 'lgPosterClick', + dragStart: 'lgDragStart', + dragMove: 'lgDragMove', + dragEnd: 'lgDragEnd', + beforeNextSlide: 'lgBeforeNextSlide', + beforePrevSlide: 'lgBeforePrevSlide', + beforeClose: 'lgBeforeClose', + afterClose: 'lgAfterClose', + rotateLeft: 'lgRotateLeft', + rotateRight: 'lgRotateRight', + flipHorizontal: 'lgFlipHorizontal', + flipVertical: 'lgFlipVertical', + autoplay: 'lgAutoplay', + autoplayStart: 'lgAutoplayStart', + autoplayStop: 'lgAutoplayStop', + }; + + var commentSettings = { + commentBox: false, + fbComments: false, + disqusComments: false, + disqusConfig: { + title: undefined, + language: 'en', + }, + commentsMarkup: '

Leave a comment.

', + commentPluginStrings: { + toggleComments: 'Toggle Comments', + }, + }; + + /** + * lightGallery comments module + * Supports facebook and disqus comments + * + * @ref - https://help.disqus.com/customer/portal/articles/472098-javascript-configuration-variables + * @ref - https://github.com/disqus/DISQUS-API-Recipes/blob/master/snippets/js/disqus-reset/disqus_reset.html + * @ref - https://css-tricks.com/lazy-loading-disqus-comments/ + * @ref - https://developers.facebook.com/docs/plugins/comments/#comments-plugin + * + */ + var CommentBox = /** @class */ (function () { + function CommentBox(instance, $LG) { + // get lightGallery core plugin instance + this.core = instance; + this.$LG = $LG; + // extend module default settings with lightGallery core settings + this.settings = __assign(__assign({}, commentSettings), this.core.settings); + return this; + } + CommentBox.prototype.init = function () { + if (!this.settings.commentBox) { + return; + } + this.setMarkup(); + this.toggleCommentBox(); + if (this.settings.fbComments) { + this.addFbComments(); + } + else if (this.settings.disqusComments) { + this.addDisqusComments(); + } + }; + CommentBox.prototype.setMarkup = function () { + this.core.outer.append(this.settings.commentsMarkup + + '
'); + var commentToggleBtn = ""; + this.core.$toolbar.append(commentToggleBtn); + }; + CommentBox.prototype.toggleCommentBox = function () { + var _this_1 = this; + this.core.outer + .find('.lg-comment-toggle') + .first() + .on('click.lg.comment', function () { + _this_1.core.outer.toggleClass('lg-comment-active'); + }); + this.core.outer + .find('.lg-comment-overlay') + .first() + .on('click.lg.comment', function () { + _this_1.core.outer.removeClass('lg-comment-active'); + }); + this.core.outer + .find('.lg-comment-close') + .first() + .on('click.lg.comment', function () { + _this_1.core.outer.removeClass('lg-comment-active'); + }); + }; + CommentBox.prototype.addFbComments = function () { + var _this_1 = this; + // eslint-disable-next-line @typescript-eslint/no-this-alias + var _this = this; + this.core.LGel.on(lGEvents.beforeSlide + ".comment", function (event) { + var html = _this_1.core.galleryItems[event.detail.index].fbHtml; + _this_1.core.outer.find('.lg-comment-body').html(html); + }); + this.core.LGel.on(lGEvents.afterSlide + ".comment", function () { + try { + FB.XFBML.parse(); + } + catch (err) { + _this.$LG(window).on('fbAsyncInit', function () { + FB.XFBML.parse(); + }); + } + }); + }; + CommentBox.prototype.addDisqusComments = function () { + var _this_1 = this; + var $disqusThread = this.$LG('#disqus_thread'); + $disqusThread.remove(); + this.core.outer + .find('.lg-comment-body') + .append('
'); + this.core.LGel.on(lGEvents.beforeSlide + ".comment", function () { + $disqusThread.html(''); + }); + this.core.LGel.on(lGEvents.afterSlide + ".comment", function (event) { + var index = event.detail.index; + // eslint-disable-next-line @typescript-eslint/no-this-alias + var _this = _this_1; + // DISQUS needs sometime to intialize when lightGallery is opened from direct url(hash plugin). + setTimeout(function () { + try { + DISQUS.reset({ + reload: true, + config: function () { + this.page.identifier = + _this.core.galleryItems[index].disqusIdentifier; + this.page.url = + _this.core.galleryItems[index].disqusURL; + this.page.title = + _this.settings.disqusConfig.title; + this.language = + _this.settings.disqusConfig.language; + }, + }); + } + catch (err) { + console.error('Make sure you have included disqus JavaScript code in your document. Ex - https://lg-disqus.disqus.com/admin/install/platforms/universalcode/'); + } + }, _this.core.lGalleryOn ? 0 : 1000); + }); + }; + CommentBox.prototype.destroy = function () { + this.core.LGel.off('.lg.comment'); + this.core.LGel.off('.comment'); + }; + return CommentBox; + }()); + + return CommentBox; + +}))); +//# sourceMappingURL=lg-comment.umd.js.map diff --git a/assets/lightGallery/plugins/comment/lg-comment.umd.js.map b/assets/lightGallery/plugins/comment/lg-comment.umd.js.map new file mode 100644 index 0000000..6c36715 --- /dev/null +++ b/assets/lightGallery/plugins/comment/lg-comment.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lg-comment.umd.js","sources":["../../../src/lg-events.ts","../../../src/plugins/comment/lg-comment-settings.ts","../../../src/plugins/comment/lg-comment.ts"],"sourcesContent":["import { LightGallery } from './lightgallery';\nimport { VideoSource } from './plugins/video/types';\n\n/**\n * List of lightGallery events\n * All events should be documented here\n * Below interfaces are used to build the website documentations\n * */\nexport const lGEvents: {\n [key: string]: string;\n} = {\n afterAppendSlide: 'lgAfterAppendSlide',\n init: 'lgInit',\n hasVideo: 'lgHasVideo',\n containerResize: 'lgContainerResize',\n updateSlides: 'lgUpdateSlides',\n afterAppendSubHtml: 'lgAfterAppendSubHtml',\n beforeOpen: 'lgBeforeOpen',\n afterOpen: 'lgAfterOpen',\n slideItemLoad: 'lgSlideItemLoad',\n beforeSlide: 'lgBeforeSlide',\n afterSlide: 'lgAfterSlide',\n posterClick: 'lgPosterClick',\n dragStart: 'lgDragStart',\n dragMove: 'lgDragMove',\n dragEnd: 'lgDragEnd',\n beforeNextSlide: 'lgBeforeNextSlide',\n beforePrevSlide: 'lgBeforePrevSlide',\n beforeClose: 'lgBeforeClose',\n afterClose: 'lgAfterClose',\n rotateLeft: 'lgRotateLeft',\n rotateRight: 'lgRotateRight',\n flipHorizontal: 'lgFlipHorizontal',\n flipVertical: 'lgFlipVertical',\n autoplay: 'lgAutoplay',\n autoplayStart: 'lgAutoplayStart',\n autoplayStop: 'lgAutoplayStop',\n};\n\n// Follow the below format for the event documentation\n// @method is the method name when event is used with Angular/React components\n\n/**\n * Fired only once when lightGallery is initialized\n * @name lgInit\n * @method onInit\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action on lightGallery initialization.\n * // Init event returns the plugin instance that can be used to call any lightGalley public method\n * let pluginInstance = null;\n * lg.addEventListener('lgInit', (event) => {\n * pluginInstance = event.detail.instance;\n * });\n * lightGallery(lg);\n * @see
Methods\n */\nexport interface InitDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired when the slide content has been inserted into it's slide container.\n * @name lgAfterAppendSlide\n * @method onAfterAppendSlide\n */\nexport interface AfterAppendSlideEventDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired immediately before opening the gallery\n * @name lgBeforeOpen\n * @method onBeforeOpen\n */\nexport interface BeforeOpenDetail {}\n\n/**\n * Fired immediately after opening the gallery\n * @name lgAfterOpen\n * @method onAfterOpen\n */\nexport interface AfterOpenDetail {}\n\n/**\n * Fired once the media inside the slide has been completely loaded .\n * @name lgSlideItemLoad\n * @method onSlideItemLoad\n */\nexport interface SlideItemLoadDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * For the first slide, lightGallery adds some delay for displaying the loaded slide item.\n * This delay is required for the transition effect when the slide item is displayed\n * Respect the delay when you use this event\n */\n delay: number;\n\n // Will be true for the first slide\n isFirstSlide: boolean;\n}\n\n/**\n * Fired immediately before each slide transition.\n * @name lgBeforeSlide\n * @method onBeforeSlide\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action before each slide transition\n * lg.addEventListener('lgBeforeSlide', (event) => {\n * const { index, prevIndex } = event.detail;\n * alert(index, prevIndex);\n * });\n * lightGallery(lg);\n */\nexport interface BeforeSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired immediately after each slide transition.\n * @name lgAfterSlide\n * @method onAfterSlide\n */\nexport interface AfterSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired when the video poster is clicked.\n * @name lgPosterClick\n * @method onPosterClick\n */\nexport interface PosterClickDetail {}\n\n/**\n * Fired when the drag event to move to different slide starts.\n * @name lgDragStart\n * @method onDragStart\n */\nexport interface DragStartDetail {}\n\n/**\n * Fired periodically during the drag operation.\n * @name lgDragMove\n * @method onDragMove\n */\nexport interface DragMoveDetail {}\n\n/**\n * Fired when the user has finished the drag operation\n * @name lgDragEnd\n * @method onDragEnd\n */\nexport interface DragEndDetail {}\n\n/**\n * Fired immediately before the start of the close process.\n * @name lgBeforeClose\n * @method onBeforeClose\n */\nexport interface BeforeCloseDetail {}\n\n/**\n * Fired immediately once lightGallery is closed.\n * @name lgAfterClose\n * @method onAfterClose\n */\nexport interface AfterCloseDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired immediately before each \"next\" slide transition\n * @name lgBeforeNextSlide\n * @method onBeforeNextSlide\n */\nexport interface BeforeNextSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired immediately before each \"prev\" slide transition\n * @name lgBeforePrevSlide\n * @method onBeforePrevSlide\n */\nexport interface BeforePrevSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired when the sub-html content (ex : title/ description) has been appended into the slide.\n * @name lgAfterAppendSubHtml\n * @method onAfterAppendSubHtml\n */\nexport interface AfterAppendSubHtmlDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the lightGallery container has been resized.\n * @name lgContainerResize\n * @method onContainerResize\n */\nexport interface ContainerResizeDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when lightGallery detects video slide\n * @name lgHasVideo\n * @method onHasVideo\n */\nexport interface HasVideoDetail {\n /**\n * Index of the slide,\n */\n index: number;\n /**\n * Video source\n */\n src: string;\n /**\n * HTML5 video source if available\n *

\n HTML5 video source = source: {\n src: string;\n type: string;\n }[];\n attributes: HTMLVideoElement;\n *

\n */\n html5Video: VideoSource;\n /**\n * True if video has poster\n */\n hasPoster: boolean;\n}\n\n/**\n * Fired when the image is rotated in anticlockwise direction\n * @name lgRotateLeft\n * @method onRotateLeft\n */\nexport interface RotateLeftDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is rotated in clockwise direction\n * @name lgRotateRight\n * @method onRotateRight\n */\nexport interface RotateRightDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped horizontally\n * @name lgFlipHorizontal\n * @method onFlipHorizontal\n */\nexport interface FlipHorizontalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped vertically\n * @name lgFlipVertical\n * @method onFlipVertical\n */\nexport interface FlipVerticalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n","export interface CommentStrings {\n toggleComments: string;\n}\n\nexport interface CommentSettings {\n /**\n * Enable comment box\n */\n commentBox: boolean;\n /**\n * Enable facebook comment box\n */\n fbComments: boolean;\n /**\n * Enable disqus comment box\n */\n disqusComments: boolean;\n\n /**\n * Disqus comment config\n */\n disqusConfig: {\n title?: string;\n language: string;\n };\n\n /**\n * Facebook comments default markup\n */\n commentsMarkup: string;\n\n /**\n * Custom translation strings for aria-labels\n */\n commentPluginStrings: CommentStrings;\n}\n\nexport const commentSettings: CommentSettings = {\n commentBox: false,\n fbComments: false,\n disqusComments: false,\n disqusConfig: {\n title: undefined,\n language: 'en',\n },\n commentsMarkup:\n '

Leave a comment.

',\n commentPluginStrings: {\n toggleComments: 'Toggle Comments',\n } as CommentStrings,\n};\n","/**\n * lightGallery comments module\n * Supports facebook and disqus comments\n *\n * @ref - https://help.disqus.com/customer/portal/articles/472098-javascript-configuration-variables\n * @ref - https://github.com/disqus/DISQUS-API-Recipes/blob/master/snippets/js/disqus-reset/disqus_reset.html\n * @ref - https://css-tricks.com/lazy-loading-disqus-comments/\n * @ref - https://developers.facebook.com/docs/plugins/comments/#comments-plugin\n *\n */\n\nimport { lGEvents } from '../../lg-events';\nimport { LgQuery } from '../../lgQuery';\nimport { LightGallery } from '../../lightgallery';\nimport { commentSettings, CommentSettings } from './lg-comment-settings';\n\ndeclare let FB: any;\ndeclare let DISQUS: any;\n\nexport default class CommentBox {\n core: LightGallery;\n settings: CommentSettings;\n private $LG!: LgQuery;\n constructor(instance: LightGallery, $LG: LgQuery) {\n // get lightGallery core plugin instance\n this.core = instance;\n this.$LG = $LG;\n\n // extend module default settings with lightGallery core settings\n this.settings = { ...commentSettings, ...this.core.settings };\n\n return this;\n }\n\n public init(): void {\n if (!this.settings.commentBox) {\n return;\n }\n this.setMarkup();\n this.toggleCommentBox();\n if (this.settings.fbComments) {\n this.addFbComments();\n } else if (this.settings.disqusComments) {\n this.addDisqusComments();\n }\n }\n\n private setMarkup() {\n this.core.outer.append(\n this.settings.commentsMarkup +\n '
',\n );\n\n const commentToggleBtn = ``;\n this.core.$toolbar.append(commentToggleBtn);\n }\n\n toggleCommentBox(): void {\n this.core.outer\n .find('.lg-comment-toggle')\n .first()\n .on('click.lg.comment', () => {\n this.core.outer.toggleClass('lg-comment-active');\n });\n\n this.core.outer\n .find('.lg-comment-overlay')\n .first()\n .on('click.lg.comment', () => {\n this.core.outer.removeClass('lg-comment-active');\n });\n this.core.outer\n .find('.lg-comment-close')\n .first()\n .on('click.lg.comment', () => {\n this.core.outer.removeClass('lg-comment-active');\n });\n }\n\n addFbComments() {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const _this = this;\n this.core.LGel.on(`${lGEvents.beforeSlide}.comment`, (event) => {\n const html = this.core.galleryItems[event.detail.index].fbHtml;\n this.core.outer.find('.lg-comment-body').html(html as string);\n });\n this.core.LGel.on(`${lGEvents.afterSlide}.comment`, function () {\n try {\n FB.XFBML.parse();\n } catch (err) {\n _this.$LG(window).on('fbAsyncInit', function () {\n FB.XFBML.parse();\n });\n }\n });\n }\n\n addDisqusComments(): void {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const _this = this;\n const $disqusThread = this.$LG('#disqus_thread');\n $disqusThread.remove();\n this.core.outer\n .find('.lg-comment-body')\n .append('
');\n\n this.core.LGel.on(`${lGEvents.beforeSlide}.comment`, () => {\n $disqusThread.html('');\n });\n\n this.core.LGel.on(`${lGEvents.afterSlide}.comment`, (event) => {\n const { index } = event.detail;\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const _this = this;\n // DISQUS needs sometime to intialize when lightGallery is opened from direct url(hash plugin).\n setTimeout(\n function () {\n try {\n DISQUS.reset({\n reload: true,\n config: function () {\n this.page.identifier =\n _this.core.galleryItems[\n index\n ].disqusIdentifier;\n this.page.url =\n _this.core.galleryItems[index].disqusURL;\n this.page.title =\n _this.settings.disqusConfig.title;\n this.language =\n _this.settings.disqusConfig.language;\n },\n });\n } catch (err) {\n console.error(\n 'Make sure you have included disqus JavaScript code in your document. Ex - https://lg-disqus.disqus.com/admin/install/platforms/universalcode/',\n );\n }\n },\n _this.core.lGalleryOn ? 0 : 1000,\n );\n });\n }\n\n destroy(): void {\n this.core.LGel.off('.lg.comment');\n this.core.LGel.off('.comment');\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGA;;;;;IAKO,IAAM,QAAQ,GAEjB;QACA,gBAAgB,EAAE,oBAAoB;QACtC,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,YAAY;QACtB,eAAe,EAAE,mBAAmB;QACpC,YAAY,EAAE,gBAAgB;QAC9B,kBAAkB,EAAE,sBAAsB;QAC1C,UAAU,EAAE,cAAc;QAC1B,SAAS,EAAE,aAAa;QACxB,aAAa,EAAE,iBAAiB;QAChC,WAAW,EAAE,eAAe;QAC5B,UAAU,EAAE,cAAc;QAC1B,WAAW,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AE,IAAI;4BACZ,MAAM,EAAE;gCACJ,IAAI,CAAC,IAAI,CAAC,UAAU;oCAChB,KAAK,CAAC,IAAI,CAAC,YAAY,CACnB,KAAK,CACR,CAAC,gBAAgB,CAAC;gCACvB,IAAI,CAAC,IAAI,CAAC,GAAG;oCACT,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC;gCAC7C,IAAI,CAAC,IAAI,CAAC,KAAK;oCACX,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC;gCACtC,IAAI,CAAC,QAAQ;oCACT,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC;6BAC5C;yBACJ,CAAC,CAAC;qBACN;oBAAC,OAAO,GAAG,EAAE;wBACV,OAAO,CAAC,KAAK,CACT,+IAA+I,CAClJ,CAAC;qBACL;iBACJ,EACD,KAAK,CAAC,IAAI,CAAC,UAAU,GAAG,CAAC,GAAG,IAAI,CACnC,CAAC;aACL,CAAC,CAAC;SACN;QAED,4BAAO,GAAP;YACI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;YAClC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;SAClC;QACL,iBAAC;IAAD,CAAC;;;;"} \ No newline at end of file diff --git a/assets/lightGallery/plugins/comment/package.json b/assets/lightGallery/plugins/comment/package.json new file mode 100644 index 0000000..b7c501b --- /dev/null +++ b/assets/lightGallery/plugins/comment/package.json @@ -0,0 +1,7 @@ +{ + "name": "lightgallery/plugins/comment", + "private": true, + "main": "lg-comment.umd.js", + "module": "lg-comment.es5.js", + "typings": "lg-comment.d.ts" +} \ No newline at end of file diff --git a/assets/lightGallery/plugins/fullscreen/lg-fullscreen-settings.d.ts b/assets/lightGallery/plugins/fullscreen/lg-fullscreen-settings.d.ts new file mode 100644 index 0000000..0252563 --- /dev/null +++ b/assets/lightGallery/plugins/fullscreen/lg-fullscreen-settings.d.ts @@ -0,0 +1,14 @@ +export interface FullscreenStrings { + toggleFullscreen: string; +} +export interface FullscreenSettings { + /** + * Enable/Disable fullscreen option + */ + fullScreen: boolean; + /** + * Custom translation strings for aria-labels + */ + fullscreenPluginStrings: FullscreenStrings; +} +export declare const fullscreenSettings: FullscreenSettings; diff --git a/assets/lightGallery/plugins/fullscreen/lg-fullscreen.d.ts b/assets/lightGallery/plugins/fullscreen/lg-fullscreen.d.ts new file mode 100644 index 0000000..1ecd2ae --- /dev/null +++ b/assets/lightGallery/plugins/fullscreen/lg-fullscreen.d.ts @@ -0,0 +1,16 @@ +import { LgQuery } from '../../lgQuery'; +import { LightGallery } from '../../lightgallery'; +import { FullscreenSettings } from './lg-fullscreen-settings'; +export default class FullScreen { + core: LightGallery; + settings: FullscreenSettings; + private $LG; + constructor(instance: LightGallery, $LG: LgQuery); + init(): void; + private isFullScreen; + private requestFullscreen; + private exitFullscreen; + private fullScreen; + closeGallery(): void; + destroy(): void; +} diff --git a/assets/lightGallery/plugins/fullscreen/lg-fullscreen.es5.js b/assets/lightGallery/plugins/fullscreen/lg-fullscreen.es5.js new file mode 100644 index 0000000..02a3b9b --- /dev/null +++ b/assets/lightGallery/plugins/fullscreen/lg-fullscreen.es5.js @@ -0,0 +1,135 @@ +/*! + * lightgallery | 2.9.0 | October 1st 2025 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; + +var fullscreenSettings = { + fullScreen: true, + fullscreenPluginStrings: { + toggleFullscreen: 'Toggle Fullscreen', + }, +}; + +var FullScreen = /** @class */ (function () { + function FullScreen(instance, $LG) { + // get lightGallery core plugin instance + this.core = instance; + this.$LG = $LG; + // extend module default settings with lightGallery core settings + this.settings = __assign(__assign({}, fullscreenSettings), this.core.settings); + return this; + } + FullScreen.prototype.init = function () { + var fullScreen = ''; + if (this.settings.fullScreen) { + // check for fullscreen browser support + if (!document.fullscreenEnabled && + !document.webkitFullscreenEnabled && + !document.mozFullScreenEnabled && + !document.msFullscreenEnabled) { + return; + } + else { + fullScreen = ""; + this.core.$toolbar.append(fullScreen); + this.fullScreen(); + } + } + }; + FullScreen.prototype.isFullScreen = function () { + return (document.fullscreenElement || + document.mozFullScreenElement || + document.webkitFullscreenElement || + document.msFullscreenElement); + }; + FullScreen.prototype.requestFullscreen = function () { + var el = document.documentElement; + if (el.requestFullscreen) { + el.requestFullscreen(); + } + else if (el.msRequestFullscreen) { + el.msRequestFullscreen(); + } + else if (el.mozRequestFullScreen) { + el.mozRequestFullScreen(); + } + else if (el.webkitRequestFullscreen) { + el.webkitRequestFullscreen(); + } + }; + FullScreen.prototype.exitFullscreen = function () { + if (document.exitFullscreen) { + document.exitFullscreen(); + } + else if (document.msExitFullscreen) { + document.msExitFullscreen(); + } + else if (document.mozCancelFullScreen) { + document.mozCancelFullScreen(); + } + else if (document.webkitExitFullscreen) { + document.webkitExitFullscreen(); + } + }; + // https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode + FullScreen.prototype.fullScreen = function () { + var _this = this; + this.$LG(document).on("fullscreenchange.lg.global" + this.core.lgId + " \n webkitfullscreenchange.lg.global" + this.core.lgId + " \n mozfullscreenchange.lg.global" + this.core.lgId + " \n MSFullscreenChange.lg.global" + this.core.lgId, function () { + if (!_this.core.lgOpened) + return; + _this.core.outer.toggleClass('lg-fullscreen-on'); + }); + this.core.outer + .find('.lg-fullscreen') + .first() + .on('click.lg', function () { + if (_this.isFullScreen()) { + _this.exitFullscreen(); + } + else { + _this.requestFullscreen(); + } + }); + }; + FullScreen.prototype.closeGallery = function () { + // exit from fullscreen if activated + if (this.isFullScreen()) { + this.exitFullscreen(); + } + }; + FullScreen.prototype.destroy = function () { + this.$LG(document).off("fullscreenchange.lg.global" + this.core.lgId + " \n webkitfullscreenchange.lg.global" + this.core.lgId + " \n mozfullscreenchange.lg.global" + this.core.lgId + " \n MSFullscreenChange.lg.global" + this.core.lgId); + }; + return FullScreen; +}()); + +export default FullScreen; +//# sourceMappingURL=lg-fullscreen.es5.js.map diff --git a/assets/lightGallery/plugins/fullscreen/lg-fullscreen.es5.js.map b/assets/lightGallery/plugins/fullscreen/lg-fullscreen.es5.js.map new file mode 100644 index 0000000..9f5623c --- /dev/null +++ b/assets/lightGallery/plugins/fullscreen/lg-fullscreen.es5.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lg-fullscreen.es5.js","sources":["../../../src/plugins/fullscreen/lg-fullscreen-settings.ts","../../../src/plugins/fullscreen/lg-fullscreen.ts"],"sourcesContent":["export interface FullscreenStrings {\n toggleFullscreen: string;\n}\nexport interface FullscreenSettings {\n /**\n * Enable/Disable fullscreen option\n */\n fullScreen: boolean;\n\n /**\n * Custom translation strings for aria-labels\n */\n fullscreenPluginStrings: FullscreenStrings;\n}\n\nexport const fullscreenSettings: FullscreenSettings = {\n fullScreen: true,\n fullscreenPluginStrings: {\n toggleFullscreen: 'Toggle Fullscreen',\n } as FullscreenStrings,\n};\n","import { LgQuery } from '../../lgQuery';\nimport { LightGallery } from '../../lightgallery';\nimport {\n FullscreenSettings,\n fullscreenSettings,\n} from './lg-fullscreen-settings';\n\ndeclare let document: any;\n\nexport default class FullScreen {\n core: LightGallery;\n settings: FullscreenSettings;\n private $LG!: LgQuery;\n constructor(instance: LightGallery, $LG: LgQuery) {\n // get lightGallery core plugin instance\n this.core = instance;\n this.$LG = $LG;\n\n // extend module default settings with lightGallery core settings\n this.settings = { ...fullscreenSettings, ...this.core.settings };\n\n return this;\n }\n\n public init(): void {\n let fullScreen = '';\n if (this.settings.fullScreen) {\n // check for fullscreen browser support\n if (\n !document.fullscreenEnabled &&\n !document.webkitFullscreenEnabled &&\n !document.mozFullScreenEnabled &&\n !document.msFullscreenEnabled\n ) {\n return;\n } else {\n fullScreen = ``;\n this.core.$toolbar.append(fullScreen);\n this.fullScreen();\n }\n }\n }\n\n private isFullScreen(): boolean {\n return (\n document.fullscreenElement ||\n document.mozFullScreenElement ||\n document.webkitFullscreenElement ||\n document.msFullscreenElement\n );\n }\n\n private requestFullscreen(): void {\n const el = document.documentElement;\n if (el.requestFullscreen) {\n el.requestFullscreen();\n } else if (el.msRequestFullscreen) {\n el.msRequestFullscreen();\n } else if (el.mozRequestFullScreen) {\n el.mozRequestFullScreen();\n } else if (el.webkitRequestFullscreen) {\n el.webkitRequestFullscreen();\n }\n }\n\n private exitFullscreen(): void {\n if (document.exitFullscreen) {\n document.exitFullscreen();\n } else if (document.msExitFullscreen) {\n document.msExitFullscreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n } else if (document.webkitExitFullscreen) {\n document.webkitExitFullscreen();\n }\n }\n\n // https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode\n private fullScreen(): void {\n this.$LG(document).on(\n `fullscreenchange.lg.global${this.core.lgId} \n webkitfullscreenchange.lg.global${this.core.lgId} \n mozfullscreenchange.lg.global${this.core.lgId} \n MSFullscreenChange.lg.global${this.core.lgId}`,\n () => {\n if (!this.core.lgOpened) return;\n this.core.outer.toggleClass('lg-fullscreen-on');\n },\n );\n\n this.core.outer\n .find('.lg-fullscreen')\n .first()\n .on('click.lg', () => {\n if (this.isFullScreen()) {\n this.exitFullscreen();\n } else {\n this.requestFullscreen();\n }\n });\n }\n\n closeGallery(): void {\n // exit from fullscreen if activated\n if (this.isFullScreen()) {\n this.exitFullscreen();\n }\n }\n\n destroy(): void {\n this.$LG(document).off(\n `fullscreenchange.lg.global${this.core.lgId} \n webkitfullscreenchange.lg.global${this.core.lgId} \n mozfullscreenchange.lg.global${this.core.lgId} \n MSFullscreenChange.lg.global${this.core.lgId}`,\n );\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeO,IAAM,kBAAkB,GAAuB;IAClD,UAAU,EAAE,IAAI;IAChB,uBAAuB,EAAE;QACrB,gBAAgB,EAAE,mBAAmB;KACnB;CACzB;;;ICPG,oBAAY,QAAsB,EAAE,GAAY;;QAE5C,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC;QACrB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;;QAGf,IAAI,CAAC,QAAQ,yBAAQ,kBAAkB,GAAK,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAE,CAAC;QAEjE,OAAO,IAAI,CAAC;KACf;IAEM,yBAAI,GAAX;QACI,IAAI,UAAU,GAAG,EAAE,CAAC;QACpB,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE;;YAE1B,IACI,CAAC,QAAQ,CAAC,iBAAiB;gBAC3B,CAAC,QAAQ,CAAC,uBAAuB;gBACjC,CAAC,QAAQ,CAAC,oBAAoB;gBAC9B,CAAC,QAAQ,CAAC,mBAAmB,EAC/B;gBACE,OAAO;aACV;iBAAM;gBACH,UAAU,GAAG,0CAAqC,IAAI,CAAC,QAAQ,CAAC,u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I,uDACT,IAAI,CAAC,IAAI,CAAC,IAAI,oDACjB,IAAI,CAAC,IAAI,CAAC,IAAI,mDACf,IAAI,CAAC,IAAI,CAAC,IAAM,EAC9C;YACI,IAAI,CAAC,KAAI,CAAC,IAAI,CAAC,QAAQ;gBAAE,OAAO;YAChC,KAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;SACnD,CACJ,CAAC;QAEF,IAAI,CAAC,IAAI,CAAC,KAAK;aACV,IAAI,CAAC,gBAAgB,CAAC;aACtB,KAAK,EAAE;aACP,EAAE,CAAC,UAAU,EAAE;YACZ,IAAI,KAAI,CAAC,YAAY,EAAE,EAAE;gBACrB,KAAI,CAAC,cAAc,EAAE,CAAC;aACzB;iBAAM;gBACH,KAAI,CAAC,iBAAiB,EAAE,CAAC;aAC5B;SACJ,CAAC,CAAC;KACV;IAED,iCAAY,GAAZ;;QAEI,IAAI,IAAI,CAAC,YAAY,EAAE,EAAE;YACrB,IAAI,CAAC,cAAc,EAAE,CAAC;SACzB;KACJ;IAED,4BAAO,GAAP;QACI,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,GAAG,CAClB,+BAA6B,IAAI,CAAC,IAAI,CAAC,IAAI,uDACT,IAAI,CAAC,IAAI,CAAC,IAAI,oDACjB,IAAI,CAAC,IAAI,CAAC,IAAI,mDACf,IAAI,CAAC,IAAI,CAAC,IAAM,CACjD,CAAC;KACL;IACL,iBAAC;AAAD,CAAC;;"} \ No newline at end of file diff --git a/assets/lightGallery/plugins/fullscreen/lg-fullscreen.min.js b/assets/lightGallery/plugins/fullscreen/lg-fullscreen.min.js new file mode 100644 index 0000000..92690fa --- /dev/null +++ b/assets/lightGallery/plugins/fullscreen/lg-fullscreen.min.js @@ -0,0 +1,8 @@ +/** + * lightgallery | 2.9.0 | October 1st 2025 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +!function(e,l){"object"==typeof exports&&"undefined"!=typeof module?module.exports=l():"function"==typeof define&&define.amd?define(l):(e="undefined"!=typeof globalThis?globalThis:e||self).lgFullscreen=l()}(this,(function(){"use strict";var e=function(){return(e=Object.assign||function(e){for(var l,n=1,t=arguments.length;n',this.core.$toolbar.append(e),this.fullScreen()}},n.prototype.isFullScreen=function(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement},n.prototype.requestFullscreen=function(){var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()},n.prototype.exitFullscreen=function(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()},n.prototype.fullScreen=function(){var e=this;this.$LG(document).on("fullscreenchange.lg.global"+this.core.lgId+" \n webkitfullscreenchange.lg.global"+this.core.lgId+" \n mozfullscreenchange.lg.global"+this.core.lgId+" \n MSFullscreenChange.lg.global"+this.core.lgId,(function(){e.core.lgOpened&&e.core.outer.toggleClass("lg-fullscreen-on")})),this.core.outer.find(".lg-fullscreen").first().on("click.lg",(function(){e.isFullScreen()?e.exitFullscreen():e.requestFullscreen()}))},n.prototype.closeGallery=function(){this.isFullScreen()&&this.exitFullscreen()},n.prototype.destroy=function(){this.$LG(document).off("fullscreenchange.lg.global"+this.core.lgId+" \n webkitfullscreenchange.lg.global"+this.core.lgId+" \n mozfullscreenchange.lg.global"+this.core.lgId+" \n MSFullscreenChange.lg.global"+this.core.lgId)},n}()})); diff --git a/assets/lightGallery/plugins/fullscreen/lg-fullscreen.umd.js b/assets/lightGallery/plugins/fullscreen/lg-fullscreen.umd.js new file mode 100644 index 0000000..588b54b --- /dev/null +++ b/assets/lightGallery/plugins/fullscreen/lg-fullscreen.umd.js @@ -0,0 +1,143 @@ +/*! + * lightgallery | 2.9.0 | October 1st 2025 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgFullscreen = factory()); +}(this, (function () { 'use strict'; + + /*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */ + + var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); + }; + + var fullscreenSettings = { + fullScreen: true, + fullscreenPluginStrings: { + toggleFullscreen: 'Toggle Fullscreen', + }, + }; + + var FullScreen = /** @class */ (function () { + function FullScreen(instance, $LG) { + // get lightGallery core plugin instance + this.core = instance; + this.$LG = $LG; + // extend module default settings with lightGallery core settings + this.settings = __assign(__assign({}, fullscreenSettings), this.core.settings); + return this; + } + FullScreen.prototype.init = function () { + var fullScreen = ''; + if (this.settings.fullScreen) { + // check for fullscreen browser support + if (!document.fullscreenEnabled && + !document.webkitFullscreenEnabled && + !document.mozFullScreenEnabled && + !document.msFullscreenEnabled) { + return; + } + else { + fullScreen = ""; + this.core.$toolbar.append(fullScreen); + this.fullScreen(); + } + } + }; + FullScreen.prototype.isFullScreen = function () { + return (document.fullscreenElement || + document.mozFullScreenElement || + document.webkitFullscreenElement || + document.msFullscreenElement); + }; + FullScreen.prototype.requestFullscreen = function () { + var el = document.documentElement; + if (el.requestFullscreen) { + el.requestFullscreen(); + } + else if (el.msRequestFullscreen) { + el.msRequestFullscreen(); + } + else if (el.mozRequestFullScreen) { + el.mozRequestFullScreen(); + } + else if (el.webkitRequestFullscreen) { + el.webkitRequestFullscreen(); + } + }; + FullScreen.prototype.exitFullscreen = function () { + if (document.exitFullscreen) { + document.exitFullscreen(); + } + else if (document.msExitFullscreen) { + document.msExitFullscreen(); + } + else if (document.mozCancelFullScreen) { + document.mozCancelFullScreen(); + } + else if (document.webkitExitFullscreen) { + document.webkitExitFullscreen(); + } + }; + // https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode + FullScreen.prototype.fullScreen = function () { + var _this = this; + this.$LG(document).on("fullscreenchange.lg.global" + this.core.lgId + " \n webkitfullscreenchange.lg.global" + this.core.lgId + " \n mozfullscreenchange.lg.global" + this.core.lgId + " \n MSFullscreenChange.lg.global" + this.core.lgId, function () { + if (!_this.core.lgOpened) + return; + _this.core.outer.toggleClass('lg-fullscreen-on'); + }); + this.core.outer + .find('.lg-fullscreen') + .first() + .on('click.lg', function () { + if (_this.isFullScreen()) { + _this.exitFullscreen(); + } + else { + _this.requestFullscreen(); + } + }); + }; + FullScreen.prototype.closeGallery = function () { + // exit from fullscreen if activated + if (this.isFullScreen()) { + this.exitFullscreen(); + } + }; + FullScreen.prototype.destroy = function () { + this.$LG(document).off("fullscreenchange.lg.global" + this.core.lgId + " \n webkitfullscreenchange.lg.global" + this.core.lgId + " \n mozfullscreenchange.lg.global" + this.core.lgId + " \n MSFullscreenChange.lg.global" + this.core.lgId); + }; + return FullScreen; + }()); + + return FullScreen; + +}))); +//# sourceMappingURL=lg-fullscreen.umd.js.map diff --git a/assets/lightGallery/plugins/fullscreen/lg-fullscreen.umd.js.map b/assets/lightGallery/plugins/fullscreen/lg-fullscreen.umd.js.map new file mode 100644 index 0000000..f2b653d --- /dev/null +++ b/assets/lightGallery/plugins/fullscreen/lg-fullscreen.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lg-fullscreen.umd.js","sources":["../../../src/plugins/fullscreen/lg-fullscreen-settings.ts","../../../src/plugins/fullscreen/lg-fullscreen.ts"],"sourcesContent":["export interface FullscreenStrings {\n toggleFullscreen: string;\n}\nexport interface FullscreenSettings {\n /**\n * Enable/Disable fullscreen option\n */\n fullScreen: boolean;\n\n /**\n * Custom translation strings for aria-labels\n */\n fullscreenPluginStrings: FullscreenStrings;\n}\n\nexport const fullscreenSettings: FullscreenSettings = {\n fullScreen: true,\n fullscreenPluginStrings: {\n toggleFullscreen: 'Toggle Fullscreen',\n } as FullscreenStrings,\n};\n","import { LgQuery } from '../../lgQuery';\nimport { LightGallery } from '../../lightgallery';\nimport {\n FullscreenSettings,\n fullscreenSettings,\n} from './lg-fullscreen-settings';\n\ndeclare let document: any;\n\nexport default class FullScreen {\n core: LightGallery;\n settings: FullscreenSettings;\n private $LG!: LgQuery;\n constructor(instance: LightGallery, $LG: LgQuery) {\n // get lightGallery core plugin instance\n this.core = instance;\n this.$LG = $LG;\n\n // extend module default settings with lightGallery core settings\n this.settings = { ...fullscreenSettings, ...this.core.settings };\n\n return this;\n }\n\n public init(): void {\n let fullScreen = '';\n if (this.settings.fullScreen) {\n // check for fullscreen browser support\n if (\n !document.fullscreenEnabled &&\n !document.webkitFullscreenEnabled &&\n !document.mozFullScreenEnabled &&\n !document.msFullscreenEnabled\n ) {\n return;\n } else {\n fullScreen = ``;\n this.core.$toolbar.append(fullScreen);\n this.fullScreen();\n }\n }\n }\n\n private isFullScreen(): boolean {\n return (\n document.fullscreenElement ||\n document.mozFullScreenElement ||\n document.webkitFullscreenElement ||\n document.msFullscreenElement\n );\n }\n\n private requestFullscreen(): void {\n const el = document.documentElement;\n if (el.requestFullscreen) {\n el.requestFullscreen();\n } else if (el.msRequestFullscreen) {\n el.msRequestFullscreen();\n } else if (el.mozRequestFullScreen) {\n el.mozRequestFullScreen();\n } else if (el.webkitRequestFullscreen) {\n el.webkitRequestFullscreen();\n }\n }\n\n private exitFullscreen(): void {\n if (document.exitFullscreen) {\n document.exitFullscreen();\n } else if (document.msExitFullscreen) {\n document.msExitFullscreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n } else if (document.webkitExitFullscreen) {\n document.webkitExitFullscreen();\n }\n }\n\n // https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode\n private fullScreen(): void {\n this.$LG(document).on(\n `fullscreenchange.lg.global${this.core.lgId} \n webkitfullscreenchange.lg.global${this.core.lgId} \n mozfullscreenchange.lg.global${this.core.lgId} \n MSFullscreenChange.lg.global${this.core.lgId}`,\n () => {\n if (!this.core.lgOpened) return;\n this.core.outer.toggleClass('lg-fullscreen-on');\n },\n );\n\n this.core.outer\n .find('.lg-fullscreen')\n .first()\n .on('click.lg', () => {\n if (this.isFullScreen()) {\n this.exitFullscreen();\n } else {\n this.requestFullscreen();\n }\n });\n }\n\n closeGallery(): void {\n // exit from fullscreen if activated\n if (this.isFullScreen()) {\n this.exitFullscreen();\n }\n }\n\n destroy(): void {\n this.$LG(document).off(\n `fullscreenchange.lg.global${this.core.lgId} \n webkitfullscreenchange.lg.global${this.core.lgId} \n mozfullscreenchange.lg.global${this.core.lgId} \n MSFullscreenChange.lg.global${this.core.lgId}`,\n );\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAeO,IAAM,kBAAkB,GAAuB;QAClD,UAAU,EAAE,IAAI;QAChB,uBAAuB,EAAE;YACrB,gBAAgB,EAAE,mBAAmB;SACnB;KACzB;;;Q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AI,CAAC,cAAc,EAAE,CAAC;aACzB;SACJ;QAED,4BAAO,GAAP;YACI,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,GAAG,CAClB,+BAA6B,IAAI,CAAC,IAAI,CAAC,IAAI,uDACT,IAAI,CAAC,IAAI,CAAC,IAAI,oDACjB,IAAI,CAAC,IAAI,CAAC,IAAI,mDACf,IAAI,CAAC,IAAI,CAAC,IAAM,CACjD,CAAC;SACL;QACL,iBAAC;IAAD,CAAC;;;;"} \ No newline at end of file diff --git a/assets/lightGallery/plugins/fullscreen/package.json b/assets/lightGallery/plugins/fullscreen/package.json new file mode 100644 index 0000000..76d191a --- /dev/null +++ b/assets/lightGallery/plugins/fullscreen/package.json @@ -0,0 +1,7 @@ +{ + "name": "lightgallery/plugins/fullscreen", + "private": true, + "main": "lg-fullscreen.umd.js", + "module": "lg-fullscreen.es5.js", + "typings": "lg-fullscreen.d.ts" +} \ No newline at end of file diff --git a/assets/lightGallery/plugins/hash/lg-hash-settings.d.ts b/assets/lightGallery/plugins/hash/lg-hash-settings.d.ts new file mode 100644 index 0000000..68778e4 --- /dev/null +++ b/assets/lightGallery/plugins/hash/lg-hash-settings.d.ts @@ -0,0 +1,16 @@ +export interface HashSettings { + /** + * Enable/Disable hash option + */ + hash: boolean; + /** + * Unique id for each gallery. + * @description It is mandatory when you use hash plugin for multiple galleries on the same page. + */ + galleryId: string; + /** + * Custom slide name to use in the url when hash plugin is enabled + */ + customSlideName: boolean; +} +export declare const hashSettings: HashSettings; diff --git a/assets/lightGallery/plugins/hash/lg-hash.d.ts b/assets/lightGallery/plugins/hash/lg-hash.d.ts new file mode 100644 index 0000000..e646021 --- /dev/null +++ b/assets/lightGallery/plugins/hash/lg-hash.d.ts @@ -0,0 +1,23 @@ +import { LgQuery } from '../../lgQuery'; +import { LightGallery } from '../../lightgallery'; +import { HashSettings } from './lg-hash-settings'; +export default class Hash { + core: LightGallery; + settings: HashSettings; + oldHash: string; + private $LG; + constructor(instance: LightGallery, $LG: LgQuery); + init(): void; + private onAfterSlide; + /** + * Get index of the slide from custom slideName. Has to be a public method. Used in hash plugin + * @param {String} hash + * @returns {Number} Index of the slide. + */ + getIndexFromUrl(hash?: string): number; + buildFromHash(): boolean | undefined; + private onCloseAfter; + private onHashchange; + closeGallery(): void; + destroy(): void; +} diff --git a/assets/lightGallery/plugins/hash/lg-hash.es5.js b/assets/lightGallery/plugins/hash/lg-hash.es5.js new file mode 100644 index 0000000..53ed14c --- /dev/null +++ b/assets/lightGallery/plugins/hash/lg-hash.es5.js @@ -0,0 +1,198 @@ +/*! + * lightgallery | 2.9.0 | October 1st 2025 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; + +/** + * List of lightGallery events + * All events should be documented here + * Below interfaces are used to build the website documentations + * */ +var lGEvents = { + afterAppendSlide: 'lgAfterAppendSlide', + init: 'lgInit', + hasVideo: 'lgHasVideo', + containerResize: 'lgContainerResize', + updateSlides: 'lgUpdateSlides', + afterAppendSubHtml: 'lgAfterAppendSubHtml', + beforeOpen: 'lgBeforeOpen', + afterOpen: 'lgAfterOpen', + slideItemLoad: 'lgSlideItemLoad', + beforeSlide: 'lgBeforeSlide', + afterSlide: 'lgAfterSlide', + posterClick: 'lgPosterClick', + dragStart: 'lgDragStart', + dragMove: 'lgDragMove', + dragEnd: 'lgDragEnd', + beforeNextSlide: 'lgBeforeNextSlide', + beforePrevSlide: 'lgBeforePrevSlide', + beforeClose: 'lgBeforeClose', + afterClose: 'lgAfterClose', + rotateLeft: 'lgRotateLeft', + rotateRight: 'lgRotateRight', + flipHorizontal: 'lgFlipHorizontal', + flipVertical: 'lgFlipVertical', + autoplay: 'lgAutoplay', + autoplayStart: 'lgAutoplayStart', + autoplayStop: 'lgAutoplayStop', +}; + +var hashSettings = { + hash: true, + galleryId: '1', + customSlideName: false, +}; + +var Hash = /** @class */ (function () { + function Hash(instance, $LG) { + // get lightGallery core plugin instance + this.core = instance; + this.$LG = $LG; + // extend module default settings with lightGallery core settings + this.settings = __assign(__assign({}, hashSettings), this.core.settings); + return this; + } + Hash.prototype.init = function () { + var _this = this; + if (!this.settings.hash) { + return; + } + this.oldHash = window.location.hash; + setTimeout(function () { + _this.buildFromHash(); + }, 100); + // Change hash value on after each slide transition + this.core.LGel.on(lGEvents.afterSlide + ".hash", this.onAfterSlide.bind(this)); + this.core.LGel.on(lGEvents.afterClose + ".hash", this.onCloseAfter.bind(this)); + // Listen hash change and change the slide according to slide value + this.$LG(window).on("hashchange.lg.hash.global" + this.core.lgId, this.onHashchange.bind(this)); + }; + Hash.prototype.onAfterSlide = function (event) { + var slideName = this.core.galleryItems[event.detail.index].slideName; + slideName = this.settings.customSlideName + ? slideName || event.detail.index + : event.detail.index; + if (history.replaceState) { + history.replaceState(null, '', window.location.pathname + + window.location.search + + '#lg=' + + this.settings.galleryId + + '&slide=' + + slideName); + } + else { + window.location.hash = + 'lg=' + this.settings.galleryId + '&slide=' + slideName; + } + }; + /** + * Get index of the slide from custom slideName. Has to be a public method. Used in hash plugin + * @param {String} hash + * @returns {Number} Index of the slide. + */ + Hash.prototype.getIndexFromUrl = function (hash) { + if (hash === void 0) { hash = window.location.hash; } + var slideName = hash.split('&slide=')[1]; + var _idx = 0; + if (this.settings.customSlideName) { + for (var index = 0; index < this.core.galleryItems.length; index++) { + var dynamicEl = this.core.galleryItems[index]; + if (dynamicEl.slideName === slideName) { + _idx = index; + break; + } + } + } + else { + _idx = parseInt(slideName, 10); + } + return isNaN(_idx) ? 0 : _idx; + }; + // Build Gallery if gallery id exist in the URL + Hash.prototype.buildFromHash = function () { + // if dynamic option is enabled execute immediately + var _hash = window.location.hash; + if (_hash.indexOf('lg=' + this.settings.galleryId) > 0) { + // This class is used to remove the initial animation if galleryId present in the URL + this.$LG(document.body).addClass('lg-from-hash'); + var index = this.getIndexFromUrl(_hash); + this.core.openGallery(index); + return true; + } + }; + Hash.prototype.onCloseAfter = function () { + // Reset to old hash value + if (this.oldHash && + this.oldHash.indexOf('lg=' + this.settings.galleryId) < 0) { + if (history.replaceState) { + history.replaceState(null, '', this.oldHash); + } + else { + window.location.hash = this.oldHash; + } + } + else { + if (history.replaceState) { + history.replaceState(null, document.title, window.location.pathname + window.location.search); + } + else { + window.location.hash = ''; + } + } + }; + Hash.prototype.onHashchange = function () { + if (!this.core.lgOpened) + return; + var _hash = window.location.hash; + var index = this.getIndexFromUrl(_hash); + // it galleryId doesn't exist in the url close the gallery + if (_hash.indexOf('lg=' + this.settings.galleryId) > -1) { + this.core.slide(index, false, false); + } + else if (this.core.lGalleryOn) { + this.core.closeGallery(); + } + }; + Hash.prototype.closeGallery = function () { + if (this.settings.hash) { + this.$LG(document.body).removeClass('lg-from-hash'); + } + }; + Hash.prototype.destroy = function () { + this.core.LGel.off('.lg.hash'); + this.core.LGel.off('.hash'); + this.$LG(window).off("hashchange.lg.hash.global" + this.core.lgId); + }; + return Hash; +}()); + +export default Hash; +//# sourceMappingURL=lg-hash.es5.js.map diff --git a/assets/lightGallery/plugins/hash/lg-hash.es5.js.map b/assets/lightGallery/plugins/hash/lg-hash.es5.js.map new file mode 100644 index 0000000..667256d --- /dev/null +++ b/assets/lightGallery/plugins/hash/lg-hash.es5.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lg-hash.es5.js","sources":["../../../src/lg-events.ts","../../../src/plugins/hash/lg-hash-settings.ts","../../../src/plugins/hash/lg-hash.ts"],"sourcesContent":["import { LightGallery } from './lightgallery';\nimport { VideoSource } from './plugins/video/types';\n\n/**\n * List of lightGallery events\n * All events should be documented here\n * Below interfaces are used to build the website documentations\n * */\nexport const lGEvents: {\n [key: string]: string;\n} = {\n afterAppendSlide: 'lgAfterAppendSlide',\n init: 'lgInit',\n hasVideo: 'lgHasVideo',\n containerResize: 'lgContainerResize',\n updateSlides: 'lgUpdateSlides',\n afterAppendSubHtml: 'lgAfterAppendSubHtml',\n beforeOpen: 'lgBeforeOpen',\n afterOpen: 'lgAfterOpen',\n slideItemLoad: 'lgSlideItemLoad',\n beforeSlide: 'lgBeforeSlide',\n afterSlide: 'lgAfterSlide',\n posterClick: 'lgPosterClick',\n dragStart: 'lgDragStart',\n dragMove: 'lgDragMove',\n dragEnd: 'lgDragEnd',\n beforeNextSlide: 'lgBeforeNextSlide',\n beforePrevSlide: 'lgBeforePrevSlide',\n beforeClose: 'lgBeforeClose',\n afterClose: 'lgAfterClose',\n rotateLeft: 'lgRotateLeft',\n rotateRight: 'lgRotateRight',\n flipHorizontal: 'lgFlipHorizontal',\n flipVertical: 'lgFlipVertical',\n autoplay: 'lgAutoplay',\n autoplayStart: 'lgAutoplayStart',\n autoplayStop: 'lgAutoplayStop',\n};\n\n// Follow the below format for the event documentation\n// @method is the method name when event is used with Angular/React components\n\n/**\n * Fired only once when lightGallery is initialized\n * @name lgInit\n * @method onInit\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action on lightGallery initialization.\n * // Init event returns the plugin instance that can be used to call any lightGalley public method\n * let pluginInstance = null;\n * lg.addEventListener('lgInit', (event) => {\n * pluginInstance = event.detail.instance;\n * });\n * lightGallery(lg);\n * @see
Methods\n */\nexport interface InitDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired when the slide content has been inserted into it's slide container.\n * @name lgAfterAppendSlide\n * @method onAfterAppendSlide\n */\nexport interface AfterAppendSlideEventDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired immediately before opening the gallery\n * @name lgBeforeOpen\n * @method onBeforeOpen\n */\nexport interface BeforeOpenDetail {}\n\n/**\n * Fired immediately after opening the gallery\n * @name lgAfterOpen\n * @method onAfterOpen\n */\nexport interface AfterOpenDetail {}\n\n/**\n * Fired once the media inside the slide has been completely loaded .\n * @name lgSlideItemLoad\n * @method onSlideItemLoad\n */\nexport interface SlideItemLoadDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * For the first slide, lightGallery adds some delay for displaying the loaded slide item.\n * This delay is required for the transition effect when the slide item is displayed\n * Respect the delay when you use this event\n */\n delay: number;\n\n // Will be true for the first slide\n isFirstSlide: boolean;\n}\n\n/**\n * Fired immediately before each slide transition.\n * @name lgBeforeSlide\n * @method onBeforeSlide\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action before each slide transition\n * lg.addEventListener('lgBeforeSlide', (event) => {\n * const { index, prevIndex } = event.detail;\n * alert(index, prevIndex);\n * });\n * lightGallery(lg);\n */\nexport interface BeforeSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired immediately after each slide transition.\n * @name lgAfterSlide\n * @method onAfterSlide\n */\nexport interface AfterSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired when the video poster is clicked.\n * @name lgPosterClick\n * @method onPosterClick\n */\nexport interface PosterClickDetail {}\n\n/**\n * Fired when the drag event to move to different slide starts.\n * @name lgDragStart\n * @method onDragStart\n */\nexport interface DragStartDetail {}\n\n/**\n * Fired periodically during the drag operation.\n * @name lgDragMove\n * @method onDragMove\n */\nexport interface DragMoveDetail {}\n\n/**\n * Fired when the user has finished the drag operation\n * @name lgDragEnd\n * @method onDragEnd\n */\nexport interface DragEndDetail {}\n\n/**\n * Fired immediately before the start of the close process.\n * @name lgBeforeClose\n * @method onBeforeClose\n */\nexport interface BeforeCloseDetail {}\n\n/**\n * Fired immediately once lightGallery is closed.\n * @name lgAfterClose\n * @method onAfterClose\n */\nexport interface AfterCloseDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired immediately before each \"next\" slide transition\n * @name lgBeforeNextSlide\n * @method onBeforeNextSlide\n */\nexport interface BeforeNextSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired immediately before each \"prev\" slide transition\n * @name lgBeforePrevSlide\n * @method onBeforePrevSlide\n */\nexport interface BeforePrevSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired when the sub-html content (ex : title/ description) has been appended into the slide.\n * @name lgAfterAppendSubHtml\n * @method onAfterAppendSubHtml\n */\nexport interface AfterAppendSubHtmlDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the lightGallery container has been resized.\n * @name lgContainerResize\n * @method onContainerResize\n */\nexport interface ContainerResizeDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when lightGallery detects video slide\n * @name lgHasVideo\n * @method onHasVideo\n */\nexport interface HasVideoDetail {\n /**\n * Index of the slide,\n */\n index: number;\n /**\n * Video source\n */\n src: string;\n /**\n * HTML5 video source if available\n *

\n HTML5 video source = source: {\n src: string;\n type: string;\n }[];\n attributes: HTMLVideoElement;\n *

\n */\n html5Video: VideoSource;\n /**\n * True if video has poster\n */\n hasPoster: boolean;\n}\n\n/**\n * Fired when the image is rotated in anticlockwise direction\n * @name lgRotateLeft\n * @method onRotateLeft\n */\nexport interface RotateLeftDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is rotated in clockwise direction\n * @name lgRotateRight\n * @method onRotateRight\n */\nexport interface RotateRightDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped horizontally\n * @name lgFlipHorizontal\n * @method onFlipHorizontal\n */\nexport interface FlipHorizontalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped vertically\n * @name lgFlipVertical\n * @method onFlipVertical\n */\nexport interface FlipVerticalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n","export interface HashSettings {\n /**\n * Enable/Disable hash option\n */\n hash: boolean;\n\n /**\n * Unique id for each gallery.\n * @description It is mandatory when you use hash plugin for multiple galleries on the same page.\n */\n galleryId: string;\n\n /**\n * Custom slide name to use in the url when hash plugin is enabled\n */\n customSlideName: boolean;\n}\n\nexport const hashSettings: HashSettings = {\n hash: true,\n galleryId: '1',\n customSlideName: false,\n};\n","import { lGEvents } from '../../lg-events';\nimport { LgQuery } from '../../lgQuery';\nimport { LightGallery } from '../../lightgallery';\nimport { hashSettings, HashSettings } from './lg-hash-settings';\n\nexport default class Hash {\n core: LightGallery;\n settings: HashSettings;\n oldHash!: string;\n private $LG!: LgQuery;\n constructor(instance: LightGallery, $LG: LgQuery) {\n // get lightGallery core plugin instance\n this.core = instance;\n this.$LG = $LG;\n // extend module default settings with lightGallery core settings\n this.settings = { ...hashSettings, ...this.core.settings };\n return this;\n }\n\n public init(): void {\n if (!this.settings.hash) {\n return;\n }\n this.oldHash = window.location.hash;\n setTimeout(() => {\n this.buildFromHash();\n }, 100);\n // Change hash value on after each slide transition\n this.core.LGel.on(\n `${lGEvents.afterSlide}.hash`,\n this.onAfterSlide.bind(this),\n );\n this.core.LGel.on(\n `${lGEvents.afterClose}.hash`,\n this.onCloseAfter.bind(this),\n );\n\n // Listen hash change and change the slide according to slide value\n this.$LG(window).on(\n `hashchange.lg.hash.global${this.core.lgId}`,\n this.onHashchange.bind(this),\n );\n }\n\n private onAfterSlide(event: CustomEvent) {\n let slideName = this.core.galleryItems[event.detail.index].slideName;\n slideName = this.settings.customSlideName\n ? slideName || event.detail.index\n : event.detail.index;\n if (history.replaceState) {\n history.replaceState(\n null,\n '',\n window.location.pathname +\n window.location.search +\n '#lg=' +\n this.settings.galleryId +\n '&slide=' +\n slideName,\n );\n } else {\n window.location.hash =\n 'lg=' + this.settings.galleryId + '&slide=' + slideName;\n }\n }\n\n /**\n * Get index of the slide from custom slideName. Has to be a public method. Used in hash plugin\n * @param {String} hash\n * @returns {Number} Index of the slide.\n */\n getIndexFromUrl(hash = window.location.hash): number {\n const slideName = hash.split('&slide=')[1];\n let _idx = 0;\n\n if (this.settings.customSlideName) {\n for (\n let index = 0;\n index < this.core.galleryItems.length;\n index++\n ) {\n const dynamicEl = this.core.galleryItems[index];\n if (dynamicEl.slideName === slideName) {\n _idx = index;\n break;\n }\n }\n } else {\n _idx = parseInt(slideName, 10);\n }\n\n return isNaN(_idx) ? 0 : _idx;\n }\n\n // Build Gallery if gallery id exist in the URL\n buildFromHash(): boolean | undefined {\n // if dynamic option is enabled execute immediately\n const _hash = window.location.hash;\n if (_hash.indexOf('lg=' + this.settings.galleryId) > 0) {\n // This class is used to remove the initial animation if galleryId present in the URL\n this.$LG(document.body).addClass('lg-from-hash');\n\n const index = this.getIndexFromUrl(_hash);\n\n this.core.openGallery(index);\n return true;\n }\n }\n\n private onCloseAfter() {\n // Reset to old hash value\n if (\n this.oldHash &&\n this.oldHash.indexOf('lg=' + this.settings.galleryId) < 0\n ) {\n if (history.replaceState) {\n history.replaceState(null, '', this.oldHash);\n } else {\n window.location.hash = this.oldHash;\n }\n } else {\n if (history.replaceState) {\n history.replaceState(\n null,\n document.title,\n window.location.pathname + window.location.search,\n );\n } else {\n window.location.hash = '';\n }\n }\n }\n\n private onHashchange() {\n if (!this.core.lgOpened) return;\n const _hash = window.location.hash;\n const index = this.getIndexFromUrl(_hash);\n\n // it galleryId doesn't exist in the url close the gallery\n if (_hash.indexOf('lg=' + this.settings.galleryId) > -1) {\n this.core.slide(index, false, false);\n } else if (this.core.lGalleryOn) {\n this.core.closeGallery();\n }\n }\n\n closeGallery(): void {\n if (this.settings.hash) {\n this.$LG(document.body).removeClass('lg-from-hash');\n }\n }\n\n destroy(): void {\n this.core.LGel.off('.lg.hash');\n this.core.LGel.off('.hash');\n this.$LG(window).off(`hashchange.lg.hash.global${this.core.lgId}`);\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;;;;;AAKO,IAAM,QAAQ,GAEjB;IACA,gBAAgB,EAAE,oBAAoB;IACtC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,YAAY;IACtB,eAAe,EAAE,mBAAmB;IACpC,YAAY,EAAE,gBAAgB;IAC9B,kBAAkB,EAAE,sBAAsB;IAC1C,UAAU,EAAE,cAAc;IAC1B,SAAS,EAAE,aAAa;IACxB,aAAa,EAAE,iBAAiB;IAChC,WAAW,EAAE,eAAe;IAC5B,UAAU,EAAE,cAAc;IAC1B,WAAW,EAAE,eAAe;IAC5B,SAAS,EAAE,aAAa;IACxB,QAAQ,EAAE,YAAY;IACtB,OAAO,EAAE,WAAW;IACpB,eAAe,EAAE,mBAAmB;IACpC,eAAe,EAAE,mBAAmB;IACpC,WAAW,EAAE,eAAe;IAC5B,UAAU,EAAE,cAA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AQ,CAAC,IAAI,GAAG,EAAE,CAAC;aAC7B;SACJ;KACJ;IAEO,2BAAY,GAApB;QACI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ;YAAE,OAAO;QAChC,IAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;QACnC,IAAM,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;;QAG1C,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE;YACrD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;SACxC;aAAM,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YAC7B,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;SAC5B;KACJ;IAED,2BAAY,GAAZ;QACI,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;YACpB,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;SACvD;KACJ;IAED,sBAAO,GAAP;QACI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAC/B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC5B,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,8BAA4B,IAAI,CAAC,IAAI,CAAC,IAAM,CAAC,CAAC;KACtE;IACL,WAAC;AAAD,CAAC;;"} \ No newline at end of file diff --git a/assets/lightGallery/plugins/hash/lg-hash.min.js b/assets/lightGallery/plugins/hash/lg-hash.min.js new file mode 100644 index 0000000..4ab02cf --- /dev/null +++ b/assets/lightGallery/plugins/hash/lg-hash.min.js @@ -0,0 +1,8 @@ +/** + * lightgallery | 2.9.0 | October 1st 2025 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgHash=e()}(this,(function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,i=1,o=arguments.length;i0){this.$LG(document.body).addClass("lg-from-hash");var e=this.getIndexFromUrl(t);return this.core.openGallery(e),!0}},s.prototype.onCloseAfter=function(){this.oldHash&&this.oldHash.indexOf("lg="+this.settings.galleryId)<0?history.replaceState?history.replaceState(null,"",this.oldHash):window.location.hash=this.oldHash:history.replaceState?history.replaceState(null,document.title,window.location.pathname+window.location.search):window.location.hash=""},s.prototype.onHashchange=function(){if(this.core.lgOpened){var t=window.location.hash,e=this.getIndexFromUrl(t);t.indexOf("lg="+this.settings.galleryId)>-1?this.core.slide(e,!1,!1):this.core.lGalleryOn&&this.core.closeGallery()}},s.prototype.closeGallery=function(){this.settings.hash&&this.$LG(document.body).removeClass("lg-from-hash")},s.prototype.destroy=function(){this.core.LGel.off(".lg.hash"),this.core.LGel.off(".hash"),this.$LG(window).off("hashchange.lg.hash.global"+this.core.lgId)},s}()})); diff --git a/assets/lightGallery/plugins/hash/lg-hash.umd.js b/assets/lightGallery/plugins/hash/lg-hash.umd.js new file mode 100644 index 0000000..2a8726f --- /dev/null +++ b/assets/lightGallery/plugins/hash/lg-hash.umd.js @@ -0,0 +1,206 @@ +/*! + * lightgallery | 2.9.0 | October 1st 2025 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgHash = factory()); +}(this, (function () { 'use strict'; + + /*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */ + + var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); + }; + + /** + * List of lightGallery events + * All events should be documented here + * Below interfaces are used to build the website documentations + * */ + var lGEvents = { + afterAppendSlide: 'lgAfterAppendSlide', + init: 'lgInit', + hasVideo: 'lgHasVideo', + containerResize: 'lgContainerResize', + updateSlides: 'lgUpdateSlides', + afterAppendSubHtml: 'lgAfterAppendSubHtml', + beforeOpen: 'lgBeforeOpen', + afterOpen: 'lgAfterOpen', + slideItemLoad: 'lgSlideItemLoad', + beforeSlide: 'lgBeforeSlide', + afterSlide: 'lgAfterSlide', + posterClick: 'lgPosterClick', + dragStart: 'lgDragStart', + dragMove: 'lgDragMove', + dragEnd: 'lgDragEnd', + beforeNextSlide: 'lgBeforeNextSlide', + beforePrevSlide: 'lgBeforePrevSlide', + beforeClose: 'lgBeforeClose', + afterClose: 'lgAfterClose', + rotateLeft: 'lgRotateLeft', + rotateRight: 'lgRotateRight', + flipHorizontal: 'lgFlipHorizontal', + flipVertical: 'lgFlipVertical', + autoplay: 'lgAutoplay', + autoplayStart: 'lgAutoplayStart', + autoplayStop: 'lgAutoplayStop', + }; + + var hashSettings = { + hash: true, + galleryId: '1', + customSlideName: false, + }; + + var Hash = /** @class */ (function () { + function Hash(instance, $LG) { + // get lightGallery core plugin instance + this.core = instance; + this.$LG = $LG; + // extend module default settings with lightGallery core settings + this.settings = __assign(__assign({}, hashSettings), this.core.settings); + return this; + } + Hash.prototype.init = function () { + var _this = this; + if (!this.settings.hash) { + return; + } + this.oldHash = window.location.hash; + setTimeout(function () { + _this.buildFromHash(); + }, 100); + // Change hash value on after each slide transition + this.core.LGel.on(lGEvents.afterSlide + ".hash", this.onAfterSlide.bind(this)); + this.core.LGel.on(lGEvents.afterClose + ".hash", this.onCloseAfter.bind(this)); + // Listen hash change and change the slide according to slide value + this.$LG(window).on("hashchange.lg.hash.global" + this.core.lgId, this.onHashchange.bind(this)); + }; + Hash.prototype.onAfterSlide = function (event) { + var slideName = this.core.galleryItems[event.detail.index].slideName; + slideName = this.settings.customSlideName + ? slideName || event.detail.index + : event.detail.index; + if (history.replaceState) { + history.replaceState(null, '', window.location.pathname + + window.location.search + + '#lg=' + + this.settings.galleryId + + '&slide=' + + slideName); + } + else { + window.location.hash = + 'lg=' + this.settings.galleryId + '&slide=' + slideName; + } + }; + /** + * Get index of the slide from custom slideName. Has to be a public method. Used in hash plugin + * @param {String} hash + * @returns {Number} Index of the slide. + */ + Hash.prototype.getIndexFromUrl = function (hash) { + if (hash === void 0) { hash = window.location.hash; } + var slideName = hash.split('&slide=')[1]; + var _idx = 0; + if (this.settings.customSlideName) { + for (var index = 0; index < this.core.galleryItems.length; index++) { + var dynamicEl = this.core.galleryItems[index]; + if (dynamicEl.slideName === slideName) { + _idx = index; + break; + } + } + } + else { + _idx = parseInt(slideName, 10); + } + return isNaN(_idx) ? 0 : _idx; + }; + // Build Gallery if gallery id exist in the URL + Hash.prototype.buildFromHash = function () { + // if dynamic option is enabled execute immediately + var _hash = window.location.hash; + if (_hash.indexOf('lg=' + this.settings.galleryId) > 0) { + // This class is used to remove the initial animation if galleryId present in the URL + this.$LG(document.body).addClass('lg-from-hash'); + var index = this.getIndexFromUrl(_hash); + this.core.openGallery(index); + return true; + } + }; + Hash.prototype.onCloseAfter = function () { + // Reset to old hash value + if (this.oldHash && + this.oldHash.indexOf('lg=' + this.settings.galleryId) < 0) { + if (history.replaceState) { + history.replaceState(null, '', this.oldHash); + } + else { + window.location.hash = this.oldHash; + } + } + else { + if (history.replaceState) { + history.replaceState(null, document.title, window.location.pathname + window.location.search); + } + else { + window.location.hash = ''; + } + } + }; + Hash.prototype.onHashchange = function () { + if (!this.core.lgOpened) + return; + var _hash = window.location.hash; + var index = this.getIndexFromUrl(_hash); + // it galleryId doesn't exist in the url close the gallery + if (_hash.indexOf('lg=' + this.settings.galleryId) > -1) { + this.core.slide(index, false, false); + } + else if (this.core.lGalleryOn) { + this.core.closeGallery(); + } + }; + Hash.prototype.closeGallery = function () { + if (this.settings.hash) { + this.$LG(document.body).removeClass('lg-from-hash'); + } + }; + Hash.prototype.destroy = function () { + this.core.LGel.off('.lg.hash'); + this.core.LGel.off('.hash'); + this.$LG(window).off("hashchange.lg.hash.global" + this.core.lgId); + }; + return Hash; + }()); + + return Hash; + +}))); +//# sourceMappingURL=lg-hash.umd.js.map diff --git a/assets/lightGallery/plugins/hash/lg-hash.umd.js.map b/assets/lightGallery/plugins/hash/lg-hash.umd.js.map new file mode 100644 index 0000000..b0e85bd --- /dev/null +++ b/assets/lightGallery/plugins/hash/lg-hash.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lg-hash.umd.js","sources":["../../../src/lg-events.ts","../../../src/plugins/hash/lg-hash-settings.ts","../../../src/plugins/hash/lg-hash.ts"],"sourcesContent":["import { LightGallery } from './lightgallery';\nimport { VideoSource } from './plugins/video/types';\n\n/**\n * List of lightGallery events\n * All events should be documented here\n * Below interfaces are used to build the website documentations\n * */\nexport const lGEvents: {\n [key: string]: string;\n} = {\n afterAppendSlide: 'lgAfterAppendSlide',\n init: 'lgInit',\n hasVideo: 'lgHasVideo',\n containerResize: 'lgContainerResize',\n updateSlides: 'lgUpdateSlides',\n afterAppendSubHtml: 'lgAfterAppendSubHtml',\n beforeOpen: 'lgBeforeOpen',\n afterOpen: 'lgAfterOpen',\n slideItemLoad: 'lgSlideItemLoad',\n beforeSlide: 'lgBeforeSlide',\n afterSlide: 'lgAfterSlide',\n posterClick: 'lgPosterClick',\n dragStart: 'lgDragStart',\n dragMove: 'lgDragMove',\n dragEnd: 'lgDragEnd',\n beforeNextSlide: 'lgBeforeNextSlide',\n beforePrevSlide: 'lgBeforePrevSlide',\n beforeClose: 'lgBeforeClose',\n afterClose: 'lgAfterClose',\n rotateLeft: 'lgRotateLeft',\n rotateRight: 'lgRotateRight',\n flipHorizontal: 'lgFlipHorizontal',\n flipVertical: 'lgFlipVertical',\n autoplay: 'lgAutoplay',\n autoplayStart: 'lgAutoplayStart',\n autoplayStop: 'lgAutoplayStop',\n};\n\n// Follow the below format for the event documentation\n// @method is the method name when event is used with Angular/React components\n\n/**\n * Fired only once when lightGallery is initialized\n * @name lgInit\n * @method onInit\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action on lightGallery initialization.\n * // Init event returns the plugin instance that can be used to call any lightGalley public method\n * let pluginInstance = null;\n * lg.addEventListener('lgInit', (event) => {\n * pluginInstance = event.detail.instance;\n * });\n * lightGallery(lg);\n * @see
Methods\n */\nexport interface InitDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired when the slide content has been inserted into it's slide container.\n * @name lgAfterAppendSlide\n * @method onAfterAppendSlide\n */\nexport interface AfterAppendSlideEventDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired immediately before opening the gallery\n * @name lgBeforeOpen\n * @method onBeforeOpen\n */\nexport interface BeforeOpenDetail {}\n\n/**\n * Fired immediately after opening the gallery\n * @name lgAfterOpen\n * @method onAfterOpen\n */\nexport interface AfterOpenDetail {}\n\n/**\n * Fired once the media inside the slide has been completely loaded .\n * @name lgSlideItemLoad\n * @method onSlideItemLoad\n */\nexport interface SlideItemLoadDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * For the first slide, lightGallery adds some delay for displaying the loaded slide item.\n * This delay is required for the transition effect when the slide item is displayed\n * Respect the delay when you use this event\n */\n delay: number;\n\n // Will be true for the first slide\n isFirstSlide: boolean;\n}\n\n/**\n * Fired immediately before each slide transition.\n * @name lgBeforeSlide\n * @method onBeforeSlide\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action before each slide transition\n * lg.addEventListener('lgBeforeSlide', (event) => {\n * const { index, prevIndex } = event.detail;\n * alert(index, prevIndex);\n * });\n * lightGallery(lg);\n */\nexport interface BeforeSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired immediately after each slide transition.\n * @name lgAfterSlide\n * @method onAfterSlide\n */\nexport interface AfterSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired when the video poster is clicked.\n * @name lgPosterClick\n * @method onPosterClick\n */\nexport interface PosterClickDetail {}\n\n/**\n * Fired when the drag event to move to different slide starts.\n * @name lgDragStart\n * @method onDragStart\n */\nexport interface DragStartDetail {}\n\n/**\n * Fired periodically during the drag operation.\n * @name lgDragMove\n * @method onDragMove\n */\nexport interface DragMoveDetail {}\n\n/**\n * Fired when the user has finished the drag operation\n * @name lgDragEnd\n * @method onDragEnd\n */\nexport interface DragEndDetail {}\n\n/**\n * Fired immediately before the start of the close process.\n * @name lgBeforeClose\n * @method onBeforeClose\n */\nexport interface BeforeCloseDetail {}\n\n/**\n * Fired immediately once lightGallery is closed.\n * @name lgAfterClose\n * @method onAfterClose\n */\nexport interface AfterCloseDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired immediately before each \"next\" slide transition\n * @name lgBeforeNextSlide\n * @method onBeforeNextSlide\n */\nexport interface BeforeNextSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired immediately before each \"prev\" slide transition\n * @name lgBeforePrevSlide\n * @method onBeforePrevSlide\n */\nexport interface BeforePrevSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired when the sub-html content (ex : title/ description) has been appended into the slide.\n * @name lgAfterAppendSubHtml\n * @method onAfterAppendSubHtml\n */\nexport interface AfterAppendSubHtmlDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the lightGallery container has been resized.\n * @name lgContainerResize\n * @method onContainerResize\n */\nexport interface ContainerResizeDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when lightGallery detects video slide\n * @name lgHasVideo\n * @method onHasVideo\n */\nexport interface HasVideoDetail {\n /**\n * Index of the slide,\n */\n index: number;\n /**\n * Video source\n */\n src: string;\n /**\n * HTML5 video source if available\n *

\n HTML5 video source = source: {\n src: string;\n type: string;\n }[];\n attributes: HTMLVideoElement;\n *

\n */\n html5Video: VideoSource;\n /**\n * True if video has poster\n */\n hasPoster: boolean;\n}\n\n/**\n * Fired when the image is rotated in anticlockwise direction\n * @name lgRotateLeft\n * @method onRotateLeft\n */\nexport interface RotateLeftDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is rotated in clockwise direction\n * @name lgRotateRight\n * @method onRotateRight\n */\nexport interface RotateRightDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped horizontally\n * @name lgFlipHorizontal\n * @method onFlipHorizontal\n */\nexport interface FlipHorizontalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped vertically\n * @name lgFlipVertical\n * @method onFlipVertical\n */\nexport interface FlipVerticalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n","export interface HashSettings {\n /**\n * Enable/Disable hash option\n */\n hash: boolean;\n\n /**\n * Unique id for each gallery.\n * @description It is mandatory when you use hash plugin for multiple galleries on the same page.\n */\n galleryId: string;\n\n /**\n * Custom slide name to use in the url when hash plugin is enabled\n */\n customSlideName: boolean;\n}\n\nexport const hashSettings: HashSettings = {\n hash: true,\n galleryId: '1',\n customSlideName: false,\n};\n","import { lGEvents } from '../../lg-events';\nimport { LgQuery } from '../../lgQuery';\nimport { LightGallery } from '../../lightgallery';\nimport { hashSettings, HashSettings } from './lg-hash-settings';\n\nexport default class Hash {\n core: LightGallery;\n settings: HashSettings;\n oldHash!: string;\n private $LG!: LgQuery;\n constructor(instance: LightGallery, $LG: LgQuery) {\n // get lightGallery core plugin instance\n this.core = instance;\n this.$LG = $LG;\n // extend module default settings with lightGallery core settings\n this.settings = { ...hashSettings, ...this.core.settings };\n return this;\n }\n\n public init(): void {\n if (!this.settings.hash) {\n return;\n }\n this.oldHash = window.location.hash;\n setTimeout(() => {\n this.buildFromHash();\n }, 100);\n // Change hash value on after each slide transition\n this.core.LGel.on(\n `${lGEvents.afterSlide}.hash`,\n this.onAfterSlide.bind(this),\n );\n this.core.LGel.on(\n `${lGEvents.afterClose}.hash`,\n this.onCloseAfter.bind(this),\n );\n\n // Listen hash change and change the slide according to slide value\n this.$LG(window).on(\n `hashchange.lg.hash.global${this.core.lgId}`,\n this.onHashchange.bind(this),\n );\n }\n\n private onAfterSlide(event: CustomEvent) {\n let slideName = this.core.galleryItems[event.detail.index].slideName;\n slideName = this.settings.customSlideName\n ? slideName || event.detail.index\n : event.detail.index;\n if (history.replaceState) {\n history.replaceState(\n null,\n '',\n window.location.pathname +\n window.location.search +\n '#lg=' +\n this.settings.galleryId +\n '&slide=' +\n slideName,\n );\n } else {\n window.location.hash =\n 'lg=' + this.settings.galleryId + '&slide=' + slideName;\n }\n }\n\n /**\n * Get index of the slide from custom slideName. Has to be a public method. Used in hash plugin\n * @param {String} hash\n * @returns {Number} Index of the slide.\n */\n getIndexFromUrl(hash = window.location.hash): number {\n const slideName = hash.split('&slide=')[1];\n let _idx = 0;\n\n if (this.settings.customSlideName) {\n for (\n let index = 0;\n index < this.core.galleryItems.length;\n index++\n ) {\n const dynamicEl = this.core.galleryItems[index];\n if (dynamicEl.slideName === slideName) {\n _idx = index;\n break;\n }\n }\n } else {\n _idx = parseInt(slideName, 10);\n }\n\n return isNaN(_idx) ? 0 : _idx;\n }\n\n // Build Gallery if gallery id exist in the URL\n buildFromHash(): boolean | undefined {\n // if dynamic option is enabled execute immediately\n const _hash = window.location.hash;\n if (_hash.indexOf('lg=' + this.settings.galleryId) > 0) {\n // This class is used to remove the initial animation if galleryId present in the URL\n this.$LG(document.body).addClass('lg-from-hash');\n\n const index = this.getIndexFromUrl(_hash);\n\n this.core.openGallery(index);\n return true;\n }\n }\n\n private onCloseAfter() {\n // Reset to old hash value\n if (\n this.oldHash &&\n this.oldHash.indexOf('lg=' + this.settings.galleryId) < 0\n ) {\n if (history.replaceState) {\n history.replaceState(null, '', this.oldHash);\n } else {\n window.location.hash = this.oldHash;\n }\n } else {\n if (history.replaceState) {\n history.replaceState(\n null,\n document.title,\n window.location.pathname + window.location.search,\n );\n } else {\n window.location.hash = '';\n }\n }\n }\n\n private onHashchange() {\n if (!this.core.lgOpened) return;\n const _hash = window.location.hash;\n const index = this.getIndexFromUrl(_hash);\n\n // it galleryId doesn't exist in the url close the gallery\n if (_hash.indexOf('lg=' + this.settings.galleryId) > -1) {\n this.core.slide(index, false, false);\n } else if (this.core.lGalleryOn) {\n this.core.closeGallery();\n }\n }\n\n closeGallery(): void {\n if (this.settings.hash) {\n this.$LG(document.body).removeClass('lg-from-hash');\n }\n }\n\n destroy(): void {\n this.core.LGel.off('.lg.hash');\n this.core.LGel.off('.hash');\n this.$LG(window).off(`hashchange.lg.hash.global${this.core.lgId}`);\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGA;;;;;IAKO,IAAM,QAAQ,GAEjB;QACA,gBAAgB,EAAE,oBAAoB;QACtC,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,YAAY;QACtB,eAAe,EAAE,mBAAmB;QACpC,YAAY,EAAE,gBAAgB;QAC9B,kBAAkB,EAAE,sBAAsB;QAC1C,UAAU,EAAE,cAAc;QAC1B,SAAS,EAAE,aAAa;QACxB,aAAa,EAAE,iBAAiB;QAChC,WAAW,EAAE,eAAe;QAC5B,UAAU,EAAE,cAAc;QAC1B,WAAW,EAAE,eAAe;QAC5B,SAAS,EAAE,aAAa;QACxB,QAAQ,EAAE,YAAY;QACtB,OAAO,EAAE,WAAW;QACpB,eAAe,EAAE,mBAAmB;QACpC,eAAe,EAAE,mBAAmB;QACpC,WAAW,EAAE,eAAe;QAC5B,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE,cAAc;QAC1B,WAAW,EAAE,eAAe;QAC5B,cAAc,EAAE,kBAAkB;QAClC,YAAY,EAAE,gBAAgB;QAC9B,QAAQ,EAAE,YAAY;QACtB,aAAa,EAAE,iBAAiB;QAChC,YAAY,EAAE,gBAAgB;KACjC;;ICnBM,IAAM,YAAY,GAAiB;QACtC,IAAI,EAAE,IAAI;QACV,SAAS,EAAE,GAAG;QACd,eAAe,EAAE,KAAK;KACzB;;;QCZG,cAAY,QAAsB,EAAE,GAAY;;YAE5C,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC;YACrB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;;YAEf,IAAI,CAAC,QAAQ,yBAAQ,YAAY,GAAK,IAAI,CAAC,I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AC,CAAC;aACxC;iBAAM,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;gBAC7B,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;aAC5B;SACJ;QAED,2BAAY,GAAZ;YACI,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;gBACpB,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;aACvD;SACJ;QAED,sBAAO,GAAP;YACI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YAC/B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAC5B,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,8BAA4B,IAAI,CAAC,IAAI,CAAC,IAAM,CAAC,CAAC;SACtE;QACL,WAAC;IAAD,CAAC;;;;"} \ No newline at end of file diff --git a/assets/lightGallery/plugins/hash/package.json b/assets/lightGallery/plugins/hash/package.json new file mode 100644 index 0000000..78c4be1 --- /dev/null +++ b/assets/lightGallery/plugins/hash/package.json @@ -0,0 +1,7 @@ +{ + "name": "lightgallery/plugins/hash", + "private": true, + "main": "lg-hash.umd.js", + "module": "lg-hash.es5.js", + "typings": "lg-hash.d.ts" +} \ No newline at end of file diff --git a/assets/lightGallery/plugins/mediumZoom/lg-medium-zoom-settings.d.ts b/assets/lightGallery/plugins/mediumZoom/lg-medium-zoom-settings.d.ts new file mode 100644 index 0000000..18c607a --- /dev/null +++ b/assets/lightGallery/plugins/mediumZoom/lg-medium-zoom-settings.d.ts @@ -0,0 +1,16 @@ +export interface MediumZoomSettings { + /** + * Enable/Disable medium like zoom experience + */ + mediumZoom: boolean; + /** + * Space between the gallery outer area and images + */ + margin: number; + /** + * Background color for the gallery + * This can be overwritten by passing background color via `lg-background-color` for each item + */ + backgroundColor: string; +} +export declare const mediumZoomSettings: MediumZoomSettings; diff --git a/assets/lightGallery/plugins/mediumZoom/lg-medium-zoom.d.ts b/assets/lightGallery/plugins/mediumZoom/lg-medium-zoom.d.ts new file mode 100644 index 0000000..113aaf8 --- /dev/null +++ b/assets/lightGallery/plugins/mediumZoom/lg-medium-zoom.d.ts @@ -0,0 +1,12 @@ +import { LgQuery } from '../../lgQuery'; +import { LightGallery } from '../../lightgallery'; +import { MediumZoomSettings } from './lg-medium-zoom-settings'; +export default class MediumZoom { + core: LightGallery; + settings: MediumZoomSettings; + private $LG; + constructor(instance: LightGallery, $LG: LgQuery); + private toggleItemClass; + init(): void; + destroy(): void; +} diff --git a/assets/lightGallery/plugins/mediumZoom/lg-medium-zoom.es5.js b/assets/lightGallery/plugins/mediumZoom/lg-medium-zoom.es5.js new file mode 100644 index 0000000..d3d2dc2 --- /dev/null +++ b/assets/lightGallery/plugins/mediumZoom/lg-medium-zoom.es5.js @@ -0,0 +1,132 @@ +/*! + * lightgallery | 2.9.0 | October 1st 2025 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; + +/** + * List of lightGallery events + * All events should be documented here + * Below interfaces are used to build the website documentations + * */ +var lGEvents = { + afterAppendSlide: 'lgAfterAppendSlide', + init: 'lgInit', + hasVideo: 'lgHasVideo', + containerResize: 'lgContainerResize', + updateSlides: 'lgUpdateSlides', + afterAppendSubHtml: 'lgAfterAppendSubHtml', + beforeOpen: 'lgBeforeOpen', + afterOpen: 'lgAfterOpen', + slideItemLoad: 'lgSlideItemLoad', + beforeSlide: 'lgBeforeSlide', + afterSlide: 'lgAfterSlide', + posterClick: 'lgPosterClick', + dragStart: 'lgDragStart', + dragMove: 'lgDragMove', + dragEnd: 'lgDragEnd', + beforeNextSlide: 'lgBeforeNextSlide', + beforePrevSlide: 'lgBeforePrevSlide', + beforeClose: 'lgBeforeClose', + afterClose: 'lgAfterClose', + rotateLeft: 'lgRotateLeft', + rotateRight: 'lgRotateRight', + flipHorizontal: 'lgFlipHorizontal', + flipVertical: 'lgFlipVertical', + autoplay: 'lgAutoplay', + autoplayStart: 'lgAutoplayStart', + autoplayStop: 'lgAutoplayStop', +}; + +var mediumZoomSettings = { + margin: 40, + mediumZoom: true, + backgroundColor: '#000', +}; + +var MediumZoom = /** @class */ (function () { + function MediumZoom(instance, $LG) { + var _this = this; + // get lightGallery core plugin instance + this.core = instance; + this.$LG = $LG; + // Set margin + this.core.getMediaContainerPosition = function () { + return { + top: _this.settings.margin, + bottom: _this.settings.margin, + }; + }; + // Override some of lightGallery default settings + var defaultSettings = { + controls: false, + download: false, + counter: false, + showCloseIcon: false, + extraProps: ['lgBackgroundColor'], + closeOnTap: false, + enableSwipe: false, + enableDrag: false, + swipeToClose: false, + addClass: this.core.settings.addClass + ' lg-medium-zoom', + }; + this.core.settings = __assign(__assign({}, this.core.settings), defaultSettings); + // extend module default settings with lightGallery core settings + this.settings = __assign(__assign(__assign({}, mediumZoomSettings), this.core.settings), defaultSettings); + return this; + } + MediumZoom.prototype.toggleItemClass = function () { + for (var index = 0; index < this.core.items.length; index++) { + var $element = this.$LG(this.core.items[index]); + $element.toggleClass('lg-medium-zoom-item'); + } + }; + MediumZoom.prototype.init = function () { + var _this = this; + if (!this.settings.mediumZoom) { + return; + } + this.core.LGel.on(lGEvents.beforeOpen + ".medium", function () { + _this.core.$backdrop.css('background-color', _this.core.galleryItems[_this.core.index].lgBackgroundColor || + _this.settings.backgroundColor); + }); + this.toggleItemClass(); + this.core.outer.on('click.lg.medium', function () { + _this.core.closeGallery(); + }); + }; + MediumZoom.prototype.destroy = function () { + this.toggleItemClass(); + }; + return MediumZoom; +}()); + +export default MediumZoom; +//# sourceMappingURL=lg-medium-zoom.es5.js.map diff --git a/assets/lightGallery/plugins/mediumZoom/lg-medium-zoom.es5.js.map b/assets/lightGallery/plugins/mediumZoom/lg-medium-zoom.es5.js.map new file mode 100644 index 0000000..d64a2db --- /dev/null +++ b/assets/lightGallery/plugins/mediumZoom/lg-medium-zoom.es5.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lg-medium-zoom.es5.js","sources":["../../../src/lg-events.ts","../../../src/plugins/mediumZoom/lg-medium-zoom-settings.ts","../../../src/plugins/mediumZoom/lg-medium-zoom.ts"],"sourcesContent":["import { LightGallery } from './lightgallery';\nimport { VideoSource } from './plugins/video/types';\n\n/**\n * List of lightGallery events\n * All events should be documented here\n * Below interfaces are used to build the website documentations\n * */\nexport const lGEvents: {\n [key: string]: string;\n} = {\n afterAppendSlide: 'lgAfterAppendSlide',\n init: 'lgInit',\n hasVideo: 'lgHasVideo',\n containerResize: 'lgContainerResize',\n updateSlides: 'lgUpdateSlides',\n afterAppendSubHtml: 'lgAfterAppendSubHtml',\n beforeOpen: 'lgBeforeOpen',\n afterOpen: 'lgAfterOpen',\n slideItemLoad: 'lgSlideItemLoad',\n beforeSlide: 'lgBeforeSlide',\n afterSlide: 'lgAfterSlide',\n posterClick: 'lgPosterClick',\n dragStart: 'lgDragStart',\n dragMove: 'lgDragMove',\n dragEnd: 'lgDragEnd',\n beforeNextSlide: 'lgBeforeNextSlide',\n beforePrevSlide: 'lgBeforePrevSlide',\n beforeClose: 'lgBeforeClose',\n afterClose: 'lgAfterClose',\n rotateLeft: 'lgRotateLeft',\n rotateRight: 'lgRotateRight',\n flipHorizontal: 'lgFlipHorizontal',\n flipVertical: 'lgFlipVertical',\n autoplay: 'lgAutoplay',\n autoplayStart: 'lgAutoplayStart',\n autoplayStop: 'lgAutoplayStop',\n};\n\n// Follow the below format for the event documentation\n// @method is the method name when event is used with Angular/React components\n\n/**\n * Fired only once when lightGallery is initialized\n * @name lgInit\n * @method onInit\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action on lightGallery initialization.\n * // Init event returns the plugin instance that can be used to call any lightGalley public method\n * let pluginInstance = null;\n * lg.addEventListener('lgInit', (event) => {\n * pluginInstance = event.detail.instance;\n * });\n * lightGallery(lg);\n * @see
Methods\n */\nexport interface InitDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired when the slide content has been inserted into it's slide container.\n * @name lgAfterAppendSlide\n * @method onAfterAppendSlide\n */\nexport interface AfterAppendSlideEventDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired immediately before opening the gallery\n * @name lgBeforeOpen\n * @method onBeforeOpen\n */\nexport interface BeforeOpenDetail {}\n\n/**\n * Fired immediately after opening the gallery\n * @name lgAfterOpen\n * @method onAfterOpen\n */\nexport interface AfterOpenDetail {}\n\n/**\n * Fired once the media inside the slide has been completely loaded .\n * @name lgSlideItemLoad\n * @method onSlideItemLoad\n */\nexport interface SlideItemLoadDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * For the first slide, lightGallery adds some delay for displaying the loaded slide item.\n * This delay is required for the transition effect when the slide item is displayed\n * Respect the delay when you use this event\n */\n delay: number;\n\n // Will be true for the first slide\n isFirstSlide: boolean;\n}\n\n/**\n * Fired immediately before each slide transition.\n * @name lgBeforeSlide\n * @method onBeforeSlide\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action before each slide transition\n * lg.addEventListener('lgBeforeSlide', (event) => {\n * const { index, prevIndex } = event.detail;\n * alert(index, prevIndex);\n * });\n * lightGallery(lg);\n */\nexport interface BeforeSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired immediately after each slide transition.\n * @name lgAfterSlide\n * @method onAfterSlide\n */\nexport interface AfterSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired when the video poster is clicked.\n * @name lgPosterClick\n * @method onPosterClick\n */\nexport interface PosterClickDetail {}\n\n/**\n * Fired when the drag event to move to different slide starts.\n * @name lgDragStart\n * @method onDragStart\n */\nexport interface DragStartDetail {}\n\n/**\n * Fired periodically during the drag operation.\n * @name lgDragMove\n * @method onDragMove\n */\nexport interface DragMoveDetail {}\n\n/**\n * Fired when the user has finished the drag operation\n * @name lgDragEnd\n * @method onDragEnd\n */\nexport interface DragEndDetail {}\n\n/**\n * Fired immediately before the start of the close process.\n * @name lgBeforeClose\n * @method onBeforeClose\n */\nexport interface BeforeCloseDetail {}\n\n/**\n * Fired immediately once lightGallery is closed.\n * @name lgAfterClose\n * @method onAfterClose\n */\nexport interface AfterCloseDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired immediately before each \"next\" slide transition\n * @name lgBeforeNextSlide\n * @method onBeforeNextSlide\n */\nexport interface BeforeNextSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired immediately before each \"prev\" slide transition\n * @name lgBeforePrevSlide\n * @method onBeforePrevSlide\n */\nexport interface BeforePrevSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired when the sub-html content (ex : title/ description) has been appended into the slide.\n * @name lgAfterAppendSubHtml\n * @method onAfterAppendSubHtml\n */\nexport interface AfterAppendSubHtmlDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the lightGallery container has been resized.\n * @name lgContainerResize\n * @method onContainerResize\n */\nexport interface ContainerResizeDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when lightGallery detects video slide\n * @name lgHasVideo\n * @method onHasVideo\n */\nexport interface HasVideoDetail {\n /**\n * Index of the slide,\n */\n index: number;\n /**\n * Video source\n */\n src: string;\n /**\n * HTML5 video source if available\n *

\n HTML5 video source = source: {\n src: string;\n type: string;\n }[];\n attributes: HTMLVideoElement;\n *

\n */\n html5Video: VideoSource;\n /**\n * True if video has poster\n */\n hasPoster: boolean;\n}\n\n/**\n * Fired when the image is rotated in anticlockwise direction\n * @name lgRotateLeft\n * @method onRotateLeft\n */\nexport interface RotateLeftDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is rotated in clockwise direction\n * @name lgRotateRight\n * @method onRotateRight\n */\nexport interface RotateRightDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped horizontally\n * @name lgFlipHorizontal\n * @method onFlipHorizontal\n */\nexport interface FlipHorizontalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped vertically\n * @name lgFlipVertical\n * @method onFlipVertical\n */\nexport interface FlipVerticalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n","export interface MediumZoomSettings {\n /**\n * Enable/Disable medium like zoom experience\n */\n mediumZoom: boolean;\n\n /**\n * Space between the gallery outer area and images\n */\n margin: number;\n\n /**\n * Background color for the gallery\n * This can be overwritten by passing background color via `lg-background-color` for each item\n */\n backgroundColor: string;\n}\n\nexport const mediumZoomSettings: MediumZoomSettings = {\n margin: 40,\n mediumZoom: true,\n backgroundColor: '#000',\n};\n","import { lGEvents } from '../../lg-events';\nimport { LightGallerySettings } from '../../lg-settings';\nimport { LgQuery } from '../../lgQuery';\nimport { LightGallery } from '../../lightgallery';\nimport {\n MediumZoomSettings,\n mediumZoomSettings,\n} from './lg-medium-zoom-settings';\n\nexport default class MediumZoom {\n core: LightGallery;\n settings: MediumZoomSettings;\n private $LG!: LgQuery;\n constructor(instance: LightGallery, $LG: LgQuery) {\n // get lightGallery core plugin instance\n this.core = instance;\n this.$LG = $LG;\n\n // Set margin\n this.core.getMediaContainerPosition = () => {\n return {\n top: this.settings.margin,\n bottom: this.settings.margin,\n };\n };\n\n // Override some of lightGallery default settings\n const defaultSettings: Partial = {\n controls: false,\n download: false,\n counter: false,\n showCloseIcon: false,\n extraProps: ['lgBackgroundColor'],\n closeOnTap: false,\n enableSwipe: false,\n enableDrag: false,\n swipeToClose: false,\n addClass: this.core.settings.addClass + ' lg-medium-zoom',\n };\n\n this.core.settings = { ...this.core.settings, ...defaultSettings };\n\n // extend module default settings with lightGallery core settings\n this.settings = {\n ...mediumZoomSettings,\n ...this.core.settings,\n ...defaultSettings,\n };\n\n return this;\n }\n\n private toggleItemClass() {\n for (let index = 0; index < this.core.items.length; index++) {\n const $element = this.$LG(this.core.items[index]);\n $element.toggleClass('lg-medium-zoom-item');\n }\n }\n\n init(): void {\n if (!this.settings.mediumZoom) {\n return;\n }\n this.core.LGel.on(`${lGEvents.beforeOpen}.medium`, () => {\n this.core.$backdrop.css(\n 'background-color',\n this.core.galleryItems[this.core.index].lgBackgroundColor ||\n this.settings.backgroundColor,\n );\n });\n this.toggleItemClass();\n\n this.core.outer.on('click.lg.medium', () => {\n this.core.closeGallery();\n });\n }\n\n destroy(): void {\n this.toggleItemClass();\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;;;;;AAKO,IAAM,QAAQ,GAEjB;IACA,gBAAgB,EAAE,oBAAoB;IACtC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,YAAY;IACtB,eAAe,EAAE,mBAAmB;IACpC,YAAY,EAAE,gBAAgB;IAC9B,kBAAkB,EAAE,sBAAsB;IAC1C,UAAU,EAAE,cAAc;IAC1B,SAAS,EAAE,aAAa;IACxB,aAAa,EAAE,iBAAiB;IAChC,WAAW,EAAE,eAAe;IAC5B,UAAU,EAAE,cAAc;IAC1B,WAAW,EAAE,eAAe;IAC5B,SAAS,EAAE,aAAa;IACxB,QAAQ,EAAE,YAAY;IACtB,OAAO,EAAE,WAAW;IACpB,eAAe,EAAE,mBAAmB;IACpC,eAAe,EAAE,mBAAmB;IACpC,WAAW,EAAE,eAAe;IAC5B,UAAU,EAAE,cAAc;IAC1B,UAAU,EAAE,cAAc;IAC1B,WAAW,EAAE,eAAe;IAC5B,cAAc,EAAE,kBAAkB;IAClC,YAAY,EAAE,gBAAgB;IAC9B,QAAQ,EAAE,YAAY;IACtB,aAAa,EAAE,iBAAiB;IAChC,YAAY,EAAE,gBAAgB;CACjC;;ACnBM,IAAM,kBAAkB,GAAuB;IAClD,MAAM,EAAE,EAAE;IACV,UAAU,EAAE,IAAI;IAChB,eAAe,EAAE,MAAM;CAC1B;;;ICTG,oBAAY,QAAsB,EAAE,GAAY;QAAhD,iBAqCC;;QAnCG,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC;QACrB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;;QAGf,IAAI,CAAC,IAAI,CAAC,yBAAyB,GAAG;YAClC,OAAO;gBACH,GAAG,EAAE,KAAI,CAAC,QAAQ,CAAC,MAAM;gBACzB,MAAM,EA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,CAAC,YAAY,CAAC,KAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,iBAAiB;gBACrD,KAAI,CAAC,QAAQ,CAAC,eAAe,CACpC,CAAC;SACL,CAAC,CAAC;QACH,IAAI,CAAC,eAAe,EAAE,CAAC;QAEvB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,iBAAiB,EAAE;YAClC,KAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;SAC5B,CAAC,CAAC;KACN;IAED,4BAAO,GAAP;QACI,IAAI,CAAC,eAAe,EAAE,CAAC;KAC1B;IACL,iBAAC;AAAD,CAAC;;"} \ No newline at end of file diff --git a/assets/lightGallery/plugins/mediumZoom/lg-medium-zoom.min.js b/assets/lightGallery/plugins/mediumZoom/lg-medium-zoom.min.js new file mode 100644 index 0000000..4ffedc8 --- /dev/null +++ b/assets/lightGallery/plugins/mediumZoom/lg-medium-zoom.min.js @@ -0,0 +1,8 @@ +/** + * lightgallery | 2.9.0 | October 1st 2025 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +!function(o,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(o="undefined"!=typeof globalThis?globalThis:o||self).lgMediumZoom=t()}(this,(function(){"use strict";var o=function(){return(o=Object.assign||function(o){for(var t,e=1,i=arguments.length;e {\n * pluginInstance = event.detail.instance;\n * });\n * lightGallery(lg);\n * @see
Methods\n */\nexport interface InitDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired when the slide content has been inserted into it's slide container.\n * @name lgAfterAppendSlide\n * @method onAfterAppendSlide\n */\nexport interface AfterAppendSlideEventDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired immediately before opening the gallery\n * @name lgBeforeOpen\n * @method onBeforeOpen\n */\nexport interface BeforeOpenDetail {}\n\n/**\n * Fired immediately after opening the gallery\n * @name lgAfterOpen\n * @method onAfterOpen\n */\nexport interface AfterOpenDetail {}\n\n/**\n * Fired once the media inside the slide has been completely loaded .\n * @name lgSlideItemLoad\n * @method onSlideItemLoad\n */\nexport interface SlideItemLoadDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * For the first slide, lightGallery adds some delay for displaying the loaded slide item.\n * This delay is required for the transition effect when the slide item is displayed\n * Respect the delay when you use this event\n */\n delay: number;\n\n // Will be true for the first slide\n isFirstSlide: boolean;\n}\n\n/**\n * Fired immediately before each slide transition.\n * @name lgBeforeSlide\n * @method onBeforeSlide\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action before each slide transition\n * lg.addEventListener('lgBeforeSlide', (event) => {\n * const { index, prevIndex } = event.detail;\n * alert(index, prevIndex);\n * });\n * lightGallery(lg);\n */\nexport interface BeforeSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired immediately after each slide transition.\n * @name lgAfterSlide\n * @method onAfterSlide\n */\nexport interface AfterSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired when the video poster is clicked.\n * @name lgPosterClick\n * @method onPosterClick\n */\nexport interface PosterClickDetail {}\n\n/**\n * Fired when the drag event to move to different slide starts.\n * @name lgDragStart\n * @method onDragStart\n */\nexport interface DragStartDetail {}\n\n/**\n * Fired periodically during the drag operation.\n * @name lgDragMove\n * @method onDragMove\n */\nexport interface DragMoveDetail {}\n\n/**\n * Fired when the user has finished the drag operation\n * @name lgDragEnd\n * @method onDragEnd\n */\nexport interface DragEndDetail {}\n\n/**\n * Fired immediately before the start of the close process.\n * @name lgBeforeClose\n * @method onBeforeClose\n */\nexport interface BeforeCloseDetail {}\n\n/**\n * Fired immediately once lightGallery is closed.\n * @name lgAfterClose\n * @method onAfterClose\n */\nexport interface AfterCloseDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired immediately before each \"next\" slide transition\n * @name lgBeforeNextSlide\n * @method onBeforeNextSlide\n */\nexport interface BeforeNextSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired immediately before each \"prev\" slide transition\n * @name lgBeforePrevSlide\n * @method onBeforePrevSlide\n */\nexport interface BeforePrevSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired when the sub-html content (ex : title/ description) has been appended into the slide.\n * @name lgAfterAppendSubHtml\n * @method onAfterAppendSubHtml\n */\nexport interface AfterAppendSubHtmlDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the lightGallery container has been resized.\n * @name lgContainerResize\n * @method onContainerResize\n */\nexport interface ContainerResizeDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when lightGallery detects video slide\n * @name lgHasVideo\n * @method onHasVideo\n */\nexport interface HasVideoDetail {\n /**\n * Index of the slide,\n */\n index: number;\n /**\n * Video source\n */\n src: string;\n /**\n * HTML5 video source if available\n *

\n HTML5 video source = source: {\n src: string;\n type: string;\n }[];\n attributes: HTMLVideoElement;\n *

\n */\n html5Video: VideoSource;\n /**\n * True if video has poster\n */\n hasPoster: boolean;\n}\n\n/**\n * Fired when the image is rotated in anticlockwise direction\n * @name lgRotateLeft\n * @method onRotateLeft\n */\nexport interface RotateLeftDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is rotated in clockwise direction\n * @name lgRotateRight\n * @method onRotateRight\n */\nexport interface RotateRightDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped horizontally\n * @name lgFlipHorizontal\n * @method onFlipHorizontal\n */\nexport interface FlipHorizontalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped vertically\n * @name lgFlipVertical\n * @method onFlipVertical\n */\nexport interface FlipVerticalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n","export interface MediumZoomSettings {\n /**\n * Enable/Disable medium like zoom experience\n */\n mediumZoom: boolean;\n\n /**\n * Space between the gallery outer area and images\n */\n margin: number;\n\n /**\n * Background color for the gallery\n * This can be overwritten by passing background color via `lg-background-color` for each item\n */\n backgroundColor: string;\n}\n\nexport const mediumZoomSettings: MediumZoomSettings = {\n margin: 40,\n mediumZoom: true,\n backgroundColor: '#000',\n};\n","import { lGEvents } from '../../lg-events';\nimport { LightGallerySettings } from '../../lg-settings';\nimport { LgQuery } from '../../lgQuery';\nimport { LightGallery } from '../../lightgallery';\nimport {\n MediumZoomSettings,\n mediumZoomSettings,\n} from './lg-medium-zoom-settings';\n\nexport default class MediumZoom {\n core: LightGallery;\n settings: MediumZoomSettings;\n private $LG!: LgQuery;\n constructor(instance: LightGallery, $LG: LgQuery) {\n // get lightGallery core plugin instance\n this.core = instance;\n this.$LG = $LG;\n\n // Set margin\n this.core.getMediaContainerPosition = () => {\n return {\n top: this.settings.margin,\n bottom: this.settings.margin,\n };\n };\n\n // Override some of lightGallery default settings\n const defaultSettings: Partial = {\n controls: false,\n download: false,\n counter: false,\n showCloseIcon: false,\n extraProps: ['lgBackgroundColor'],\n closeOnTap: false,\n enableSwipe: false,\n enableDrag: false,\n swipeToClose: false,\n addClass: this.core.settings.addClass + ' lg-medium-zoom',\n };\n\n this.core.settings = { ...this.core.settings, ...defaultSettings };\n\n // extend module default settings with lightGallery core settings\n this.settings = {\n ...mediumZoomSettings,\n ...this.core.settings,\n ...defaultSettings,\n };\n\n return this;\n }\n\n private toggleItemClass() {\n for (let index = 0; index < this.core.items.length; index++) {\n const $element = this.$LG(this.core.items[index]);\n $element.toggleClass('lg-medium-zoom-item');\n }\n }\n\n init(): void {\n if (!this.settings.mediumZoom) {\n return;\n }\n this.core.LGel.on(`${lGEvents.beforeOpen}.medium`, () => {\n this.core.$backdrop.css(\n 'background-color',\n this.core.galleryItems[this.core.index].lgBackgroundColor ||\n this.settings.backgroundColor,\n );\n });\n this.toggleItemClass();\n\n this.core.outer.on('click.lg.medium', () => {\n this.core.closeGallery();\n });\n }\n\n destroy(): void {\n this.toggleItemClass();\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGA;;;;;IAKO,IAAM,QAAQ,GAEjB;QACA,gBAAgB,EAAE,oBAAoB;QACtC,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,YAAY;QACtB,eAAe,EAAE,mBAAmB;QACpC,YAAY,EAAE,gBAAgB;QAC9B,kBAAkB,EAAE,sBAAsB;QAC1C,UAAU,EAAE,cAAc;QAC1B,SAAS,EAAE,aAAa;QACxB,aAAa,EAAE,iBAAiB;QAChC,WAAW,EAAE,eAAe;QAC5B,UAAU,EAAE,cAAc;QAC1B,WAAW,EAAE,eAAe;QAC5B,SAAS,EAAE,aAAa;QACxB,QAAQ,EAAE,YAAY;QACtB,OAAO,EAAE,WAAW;QACpB,eAAe,EAAE,mBAAmB;QACpC,eAAe,EAAE,mBAAmB;QACpC,WAAW,EAAE,eAAe;QAC5B,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE,cAAc;QAC1B,WAAW,EAAE,eAAe;QAC5B,cAAc,EAAE,kBAAkB;QAClC,YAAY,EAAE,gBAAgB;QAC9B,QAAQ,EAAE,YAAY;QACtB,aAAa,EAAE,iBAAiB;QAChC,YAAY,EAAE,gBAAgB;KACjC;;ICnBM,IAAM,kBAAkB,GAAuB;QAClD,MAAM,EAAE,EAAE;QACV,UAAU,EAAE,IAAI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BAAqB,CAAC,CAAC;aAC/C;SACJ;QAED,yBAAI,GAAJ;YAAA,iBAgBC;YAfG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE;gBAC3B,OAAO;aACV;YACD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAI,QAAQ,CAAC,UAAU,YAAS,EAAE;gBAC/C,KAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CACnB,kBAAkB,EAClB,KAAI,CAAC,IAAI,CAAC,YAAY,CAAC,KAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,iBAAiB;oBACrD,KAAI,CAAC,QAAQ,CAAC,eAAe,CACpC,CAAC;aACL,CAAC,CAAC;YACH,IAAI,CAAC,eAAe,EAAE,CAAC;YAEvB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,iBAAiB,EAAE;gBAClC,KAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;aAC5B,CAAC,CAAC;SACN;QAED,4BAAO,GAAP;YACI,IAAI,CAAC,eAAe,EAAE,CAAC;SAC1B;QACL,iBAAC;IAAD,CAAC;;;;"} \ No newline at end of file diff --git a/assets/lightGallery/plugins/mediumZoom/package.json b/assets/lightGallery/plugins/mediumZoom/package.json new file mode 100644 index 0000000..1714bf3 --- /dev/null +++ b/assets/lightGallery/plugins/mediumZoom/package.json @@ -0,0 +1,7 @@ +{ + "name": "lightgallery/plugins/mediumZoom", + "private": true, + "main": "lg-medium-zoom.umd.js", + "module": "lg-medium-zoom.es5.js", + "typings": "lg-medium-zoom.d.ts" +} \ No newline at end of file diff --git a/assets/lightGallery/plugins/pager/lg-pager-settings.d.ts b/assets/lightGallery/plugins/pager/lg-pager-settings.d.ts new file mode 100644 index 0000000..1c7a548 --- /dev/null +++ b/assets/lightGallery/plugins/pager/lg-pager-settings.d.ts @@ -0,0 +1,7 @@ +export interface PagerSettings { + /** + * Enable/Disable pager option + */ + pager: boolean; +} +export declare const pagerSettings: PagerSettings; diff --git a/assets/lightGallery/plugins/pager/lg-pager.d.ts b/assets/lightGallery/plugins/pager/lg-pager.d.ts new file mode 100644 index 0000000..384cd28 --- /dev/null +++ b/assets/lightGallery/plugins/pager/lg-pager.d.ts @@ -0,0 +1,13 @@ +import { LgQuery } from '../../lgQuery'; +import { LightGallery } from '../../lightgallery'; +import { PagerSettings } from './lg-pager-settings'; +export default class Pager { + core: LightGallery; + settings: PagerSettings; + private $LG; + constructor(instance: LightGallery, $LG: LgQuery); + private getPagerHtml; + init(): void; + private manageActiveClass; + destroy(): void; +} diff --git a/assets/lightGallery/plugins/pager/lg-pager.es5.js b/assets/lightGallery/plugins/pager/lg-pager.es5.js new file mode 100644 index 0000000..c4be4f1 --- /dev/null +++ b/assets/lightGallery/plugins/pager/lg-pager.es5.js @@ -0,0 +1,139 @@ +/*! + * lightgallery | 2.9.0 | October 1st 2025 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; + +/** + * List of lightGallery events + * All events should be documented here + * Below interfaces are used to build the website documentations + * */ +var lGEvents = { + afterAppendSlide: 'lgAfterAppendSlide', + init: 'lgInit', + hasVideo: 'lgHasVideo', + containerResize: 'lgContainerResize', + updateSlides: 'lgUpdateSlides', + afterAppendSubHtml: 'lgAfterAppendSubHtml', + beforeOpen: 'lgBeforeOpen', + afterOpen: 'lgAfterOpen', + slideItemLoad: 'lgSlideItemLoad', + beforeSlide: 'lgBeforeSlide', + afterSlide: 'lgAfterSlide', + posterClick: 'lgPosterClick', + dragStart: 'lgDragStart', + dragMove: 'lgDragMove', + dragEnd: 'lgDragEnd', + beforeNextSlide: 'lgBeforeNextSlide', + beforePrevSlide: 'lgBeforePrevSlide', + beforeClose: 'lgBeforeClose', + afterClose: 'lgAfterClose', + rotateLeft: 'lgRotateLeft', + rotateRight: 'lgRotateRight', + flipHorizontal: 'lgFlipHorizontal', + flipVertical: 'lgFlipVertical', + autoplay: 'lgAutoplay', + autoplayStart: 'lgAutoplayStart', + autoplayStop: 'lgAutoplayStop', +}; + +var pagerSettings = { + pager: true, +}; + +var Pager = /** @class */ (function () { + function Pager(instance, $LG) { + // get lightGallery core plugin instance + this.core = instance; + this.$LG = $LG; + // extend module default settings with lightGallery core settings + this.settings = __assign(__assign({}, pagerSettings), this.core.settings); + return this; + } + Pager.prototype.getPagerHtml = function (items) { + var pagerList = ''; + for (var i = 0; i < items.length; i++) { + pagerList += " \n \n
\n
"; + } + return pagerList; + }; + Pager.prototype.init = function () { + var _this = this; + if (!this.settings.pager) { + return; + } + var timeout; + this.core.$lgComponents.prepend('
'); + var $pagerOuter = this.core.outer.find('.lg-pager-outer'); + $pagerOuter.html(this.getPagerHtml(this.core.galleryItems)); + // @todo enable click + $pagerOuter.first().on('click.lg touchend.lg', function (event) { + var $target = _this.$LG(event.target); + if (!$target.hasAttribute('data-lg-item-id')) { + return; + } + var index = parseInt($target.attr('data-lg-item-id')); + _this.core.slide(index, false, true, false); + }); + $pagerOuter.first().on('mouseover.lg', function () { + clearTimeout(timeout); + $pagerOuter.addClass('lg-pager-hover'); + }); + $pagerOuter.first().on('mouseout.lg', function () { + timeout = setTimeout(function () { + $pagerOuter.removeClass('lg-pager-hover'); + }); + }); + this.core.LGel.on(lGEvents.beforeSlide + ".pager", function (event) { + var index = event.detail.index; + _this.manageActiveClass.call(_this, index); + }); + this.core.LGel.on(lGEvents.updateSlides + ".pager", function () { + $pagerOuter.empty(); + $pagerOuter.html(_this.getPagerHtml(_this.core.galleryItems)); + _this.manageActiveClass(_this.core.index); + }); + }; + Pager.prototype.manageActiveClass = function (index) { + var $pagerCont = this.core.outer.find('.lg-pager-cont'); + $pagerCont.removeClass('lg-pager-active'); + $pagerCont.eq(index).addClass('lg-pager-active'); + }; + Pager.prototype.destroy = function () { + this.core.outer.find('.lg-pager-outer').remove(); + this.core.LGel.off('.lg.pager'); + this.core.LGel.off('.pager'); + }; + return Pager; +}()); + +export default Pager; +//# sourceMappingURL=lg-pager.es5.js.map diff --git a/assets/lightGallery/plugins/pager/lg-pager.es5.js.map b/assets/lightGallery/plugins/pager/lg-pager.es5.js.map new file mode 100644 index 0000000..14371e7 --- /dev/null +++ b/assets/lightGallery/plugins/pager/lg-pager.es5.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lg-pager.es5.js","sources":["../../../src/lg-events.ts","../../../src/plugins/pager/lg-pager-settings.ts","../../../src/plugins/pager/lg-pager.ts"],"sourcesContent":["import { LightGallery } from './lightgallery';\nimport { VideoSource } from './plugins/video/types';\n\n/**\n * List of lightGallery events\n * All events should be documented here\n * Below interfaces are used to build the website documentations\n * */\nexport const lGEvents: {\n [key: string]: string;\n} = {\n afterAppendSlide: 'lgAfterAppendSlide',\n init: 'lgInit',\n hasVideo: 'lgHasVideo',\n containerResize: 'lgContainerResize',\n updateSlides: 'lgUpdateSlides',\n afterAppendSubHtml: 'lgAfterAppendSubHtml',\n beforeOpen: 'lgBeforeOpen',\n afterOpen: 'lgAfterOpen',\n slideItemLoad: 'lgSlideItemLoad',\n beforeSlide: 'lgBeforeSlide',\n afterSlide: 'lgAfterSlide',\n posterClick: 'lgPosterClick',\n dragStart: 'lgDragStart',\n dragMove: 'lgDragMove',\n dragEnd: 'lgDragEnd',\n beforeNextSlide: 'lgBeforeNextSlide',\n beforePrevSlide: 'lgBeforePrevSlide',\n beforeClose: 'lgBeforeClose',\n afterClose: 'lgAfterClose',\n rotateLeft: 'lgRotateLeft',\n rotateRight: 'lgRotateRight',\n flipHorizontal: 'lgFlipHorizontal',\n flipVertical: 'lgFlipVertical',\n autoplay: 'lgAutoplay',\n autoplayStart: 'lgAutoplayStart',\n autoplayStop: 'lgAutoplayStop',\n};\n\n// Follow the below format for the event documentation\n// @method is the method name when event is used with Angular/React components\n\n/**\n * Fired only once when lightGallery is initialized\n * @name lgInit\n * @method onInit\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action on lightGallery initialization.\n * // Init event returns the plugin instance that can be used to call any lightGalley public method\n * let pluginInstance = null;\n * lg.addEventListener('lgInit', (event) => {\n * pluginInstance = event.detail.instance;\n * });\n * lightGallery(lg);\n * @see
Methods\n */\nexport interface InitDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired when the slide content has been inserted into it's slide container.\n * @name lgAfterAppendSlide\n * @method onAfterAppendSlide\n */\nexport interface AfterAppendSlideEventDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired immediately before opening the gallery\n * @name lgBeforeOpen\n * @method onBeforeOpen\n */\nexport interface BeforeOpenDetail {}\n\n/**\n * Fired immediately after opening the gallery\n * @name lgAfterOpen\n * @method onAfterOpen\n */\nexport interface AfterOpenDetail {}\n\n/**\n * Fired once the media inside the slide has been completely loaded .\n * @name lgSlideItemLoad\n * @method onSlideItemLoad\n */\nexport interface SlideItemLoadDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * For the first slide, lightGallery adds some delay for displaying the loaded slide item.\n * This delay is required for the transition effect when the slide item is displayed\n * Respect the delay when you use this event\n */\n delay: number;\n\n // Will be true for the first slide\n isFirstSlide: boolean;\n}\n\n/**\n * Fired immediately before each slide transition.\n * @name lgBeforeSlide\n * @method onBeforeSlide\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action before each slide transition\n * lg.addEventListener('lgBeforeSlide', (event) => {\n * const { index, prevIndex } = event.detail;\n * alert(index, prevIndex);\n * });\n * lightGallery(lg);\n */\nexport interface BeforeSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired immediately after each slide transition.\n * @name lgAfterSlide\n * @method onAfterSlide\n */\nexport interface AfterSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired when the video poster is clicked.\n * @name lgPosterClick\n * @method onPosterClick\n */\nexport interface PosterClickDetail {}\n\n/**\n * Fired when the drag event to move to different slide starts.\n * @name lgDragStart\n * @method onDragStart\n */\nexport interface DragStartDetail {}\n\n/**\n * Fired periodically during the drag operation.\n * @name lgDragMove\n * @method onDragMove\n */\nexport interface DragMoveDetail {}\n\n/**\n * Fired when the user has finished the drag operation\n * @name lgDragEnd\n * @method onDragEnd\n */\nexport interface DragEndDetail {}\n\n/**\n * Fired immediately before the start of the close process.\n * @name lgBeforeClose\n * @method onBeforeClose\n */\nexport interface BeforeCloseDetail {}\n\n/**\n * Fired immediately once lightGallery is closed.\n * @name lgAfterClose\n * @method onAfterClose\n */\nexport interface AfterCloseDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired immediately before each \"next\" slide transition\n * @name lgBeforeNextSlide\n * @method onBeforeNextSlide\n */\nexport interface BeforeNextSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired immediately before each \"prev\" slide transition\n * @name lgBeforePrevSlide\n * @method onBeforePrevSlide\n */\nexport interface BeforePrevSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired when the sub-html content (ex : title/ description) has been appended into the slide.\n * @name lgAfterAppendSubHtml\n * @method onAfterAppendSubHtml\n */\nexport interface AfterAppendSubHtmlDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the lightGallery container has been resized.\n * @name lgContainerResize\n * @method onContainerResize\n */\nexport interface ContainerResizeDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when lightGallery detects video slide\n * @name lgHasVideo\n * @method onHasVideo\n */\nexport interface HasVideoDetail {\n /**\n * Index of the slide,\n */\n index: number;\n /**\n * Video source\n */\n src: string;\n /**\n * HTML5 video source if available\n *

\n HTML5 video source = source: {\n src: string;\n type: string;\n }[];\n attributes: HTMLVideoElement;\n *

\n */\n html5Video: VideoSource;\n /**\n * True if video has poster\n */\n hasPoster: boolean;\n}\n\n/**\n * Fired when the image is rotated in anticlockwise direction\n * @name lgRotateLeft\n * @method onRotateLeft\n */\nexport interface RotateLeftDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is rotated in clockwise direction\n * @name lgRotateRight\n * @method onRotateRight\n */\nexport interface RotateRightDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped horizontally\n * @name lgFlipHorizontal\n * @method onFlipHorizontal\n */\nexport interface FlipHorizontalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped vertically\n * @name lgFlipVertical\n * @method onFlipVertical\n */\nexport interface FlipVerticalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n","export interface PagerSettings {\n /**\n * Enable/Disable pager option\n */\n pager: boolean;\n}\n\nexport const pagerSettings: PagerSettings = {\n pager: true,\n};\n","import { lGEvents } from '../../lg-events';\nimport { GalleryItem } from '../../lg-utils';\nimport { LgQuery } from '../../lgQuery';\nimport { LightGallery } from '../../lightgallery';\nimport { PagerSettings, pagerSettings } from './lg-pager-settings';\n\nexport default class Pager {\n core: LightGallery;\n settings: PagerSettings;\n private $LG!: LgQuery;\n constructor(instance: LightGallery, $LG: LgQuery) {\n // get lightGallery core plugin instance\n this.core = instance;\n this.$LG = $LG;\n // extend module default settings with lightGallery core settings\n this.settings = { ...pagerSettings, ...this.core.settings };\n\n return this;\n }\n\n private getPagerHtml(items: GalleryItem[]): string {\n let pagerList = '';\n for (let i = 0; i < items.length; i++) {\n pagerList += ` \n \n
\n
`;\n }\n return pagerList;\n }\n\n public init(): void {\n if (!this.settings.pager) {\n return;\n }\n let timeout: any;\n this.core.$lgComponents.prepend('
');\n\n const $pagerOuter = this.core.outer.find('.lg-pager-outer');\n\n $pagerOuter.html(this.getPagerHtml(this.core.galleryItems));\n\n // @todo enable click\n $pagerOuter.first().on('click.lg touchend.lg', (event: MouseEvent) => {\n const $target = this.$LG(event.target);\n if (!$target.hasAttribute('data-lg-item-id')) {\n return;\n }\n const index = parseInt($target.attr('data-lg-item-id'));\n this.core.slide(index, false, true, false);\n });\n\n $pagerOuter.first().on('mouseover.lg', () => {\n clearTimeout(timeout);\n $pagerOuter.addClass('lg-pager-hover');\n });\n\n $pagerOuter.first().on('mouseout.lg', () => {\n timeout = setTimeout(() => {\n $pagerOuter.removeClass('lg-pager-hover');\n });\n });\n\n this.core.LGel.on(`${lGEvents.beforeSlide}.pager`, (event) => {\n const { index } = event.detail;\n this.manageActiveClass.call(this, index);\n });\n\n this.core.LGel.on(`${lGEvents.updateSlides}.pager`, () => {\n $pagerOuter.empty();\n $pagerOuter.html(this.getPagerHtml(this.core.galleryItems));\n this.manageActiveClass(this.core.index);\n });\n }\n\n private manageActiveClass(index: number): void {\n const $pagerCont = this.core.outer.find('.lg-pager-cont');\n $pagerCont.removeClass('lg-pager-active');\n $pagerCont.eq(index).addClass('lg-pager-active');\n }\n\n destroy(): void {\n this.core.outer.find('.lg-pager-outer').remove();\n this.core.LGel.off('.lg.pager');\n this.core.LGel.off('.pager');\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;;;;;AAKO,IAAM,QAAQ,GAEjB;IACA,gBAAgB,EAAE,oBAAoB;IACtC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,YAAY;IACtB,eAAe,EAAE,mBAAmB;IACpC,YAAY,EAAE,gBAAgB;IAC9B,kBAAkB,EAAE,sBAAsB;IAC1C,UAAU,EAAE,cAAc;IAC1B,SAAS,EAAE,aAAa;IACxB,aAAa,EAAE,iBAAiB;IAChC,WAAW,EAAE,eAAe;IAC5B,UAAU,EAAE,cAAc;IAC1B,WAAW,EAAE,eAAe;IAC5B,SAAS,EAAE,aAAa;IACxB,QAAQ,EAAE,YAAY;IACtB,OAAO,EAAE,WAAW;IACpB,eAAe,EAAE,mBAAmB;IACpC,eAAe,EAAE,mBAAmB;IACpC,WAAW,EAAE,eAAe;IAC5B,UAAU,EAAE,cAAc;IAC1B,UAAU,EAAE,cAAc;IAC1B,WAAW,EAAE,eAAe;IAC5B,cAAc,EAAE,kBAAkB;IAClC,YAAY,EAAE,gBAAgB;IAC9B,QAAQ,EAAE,YAAY;IACtB,aAAa,EAAE,iBAAiB;IAChC,YAAY,EAAE,gBAAgB;CACjC;;AC9BM,IAAM,aAAa,GAAkB;IACxC,KAAK,EAAE,IAAI;CACd;;;ICCG,eAAY,QAAsB,EAAE,GAAY;;QAE5C,IAAI,CAAC,IAAI,GAAG,QAAQ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,QAAQ,CAAC,iBAAiB,CAAC,CAAC;KACpD;IAED,uBAAO,GAAP;QACI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,MAAM,EAAE,CAAC;QACjD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QAChC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;KAChC;IACL,YAAC;AAAD,CAAC;;"} \ No newline at end of file diff --git a/assets/lightGallery/plugins/pager/lg-pager.min.js b/assets/lightGallery/plugins/pager/lg-pager.min.js new file mode 100644 index 0000000..2e537bb --- /dev/null +++ b/assets/lightGallery/plugins/pager/lg-pager.min.js @@ -0,0 +1,8 @@ +/** + * lightgallery | 2.9.0 | October 1st 2025 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).lgPager=t()}(this,(function(){"use strict";var e=function(){return(e=Object.assign||function(e){for(var t,r=1,o=arguments.length;r \n \n
\n ';return t},i.prototype.init=function(){var e=this;if(this.settings.pager){var o;this.core.$lgComponents.prepend('
');var i=this.core.outer.find(".lg-pager-outer");i.html(this.getPagerHtml(this.core.galleryItems)),i.first().on("click.lg touchend.lg",(function(t){var r=e.$LG(t.target);if(r.hasAttribute("data-lg-item-id")){var o=parseInt(r.attr("data-lg-item-id"));e.core.slide(o,!1,!0,!1)}})),i.first().on("mouseover.lg",(function(){clearTimeout(o),i.addClass("lg-pager-hover")})),i.first().on("mouseout.lg",(function(){o=setTimeout((function(){i.removeClass("lg-pager-hover")}))})),this.core.LGel.on(r+".pager",(function(t){var r=t.detail.index;e.manageActiveClass.call(e,r)})),this.core.LGel.on(t+".pager",(function(){i.empty(),i.html(e.getPagerHtml(e.core.galleryItems)),e.manageActiveClass(e.core.index)}))}},i.prototype.manageActiveClass=function(e){var t=this.core.outer.find(".lg-pager-cont");t.removeClass("lg-pager-active"),t.eq(e).addClass("lg-pager-active")},i.prototype.destroy=function(){this.core.outer.find(".lg-pager-outer").remove(),this.core.LGel.off(".lg.pager"),this.core.LGel.off(".pager")},i}()})); diff --git a/assets/lightGallery/plugins/pager/lg-pager.umd.js b/assets/lightGallery/plugins/pager/lg-pager.umd.js new file mode 100644 index 0000000..bed2175 --- /dev/null +++ b/assets/lightGallery/plugins/pager/lg-pager.umd.js @@ -0,0 +1,147 @@ +/*! + * lightgallery | 2.9.0 | October 1st 2025 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgPager = factory()); +}(this, (function () { 'use strict'; + + /*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */ + + var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); + }; + + /** + * List of lightGallery events + * All events should be documented here + * Below interfaces are used to build the website documentations + * */ + var lGEvents = { + afterAppendSlide: 'lgAfterAppendSlide', + init: 'lgInit', + hasVideo: 'lgHasVideo', + containerResize: 'lgContainerResize', + updateSlides: 'lgUpdateSlides', + afterAppendSubHtml: 'lgAfterAppendSubHtml', + beforeOpen: 'lgBeforeOpen', + afterOpen: 'lgAfterOpen', + slideItemLoad: 'lgSlideItemLoad', + beforeSlide: 'lgBeforeSlide', + afterSlide: 'lgAfterSlide', + posterClick: 'lgPosterClick', + dragStart: 'lgDragStart', + dragMove: 'lgDragMove', + dragEnd: 'lgDragEnd', + beforeNextSlide: 'lgBeforeNextSlide', + beforePrevSlide: 'lgBeforePrevSlide', + beforeClose: 'lgBeforeClose', + afterClose: 'lgAfterClose', + rotateLeft: 'lgRotateLeft', + rotateRight: 'lgRotateRight', + flipHorizontal: 'lgFlipHorizontal', + flipVertical: 'lgFlipVertical', + autoplay: 'lgAutoplay', + autoplayStart: 'lgAutoplayStart', + autoplayStop: 'lgAutoplayStop', + }; + + var pagerSettings = { + pager: true, + }; + + var Pager = /** @class */ (function () { + function Pager(instance, $LG) { + // get lightGallery core plugin instance + this.core = instance; + this.$LG = $LG; + // extend module default settings with lightGallery core settings + this.settings = __assign(__assign({}, pagerSettings), this.core.settings); + return this; + } + Pager.prototype.getPagerHtml = function (items) { + var pagerList = ''; + for (var i = 0; i < items.length; i++) { + pagerList += " \n \n
\n
"; + } + return pagerList; + }; + Pager.prototype.init = function () { + var _this = this; + if (!this.settings.pager) { + return; + } + var timeout; + this.core.$lgComponents.prepend('
'); + var $pagerOuter = this.core.outer.find('.lg-pager-outer'); + $pagerOuter.html(this.getPagerHtml(this.core.galleryItems)); + // @todo enable click + $pagerOuter.first().on('click.lg touchend.lg', function (event) { + var $target = _this.$LG(event.target); + if (!$target.hasAttribute('data-lg-item-id')) { + return; + } + var index = parseInt($target.attr('data-lg-item-id')); + _this.core.slide(index, false, true, false); + }); + $pagerOuter.first().on('mouseover.lg', function () { + clearTimeout(timeout); + $pagerOuter.addClass('lg-pager-hover'); + }); + $pagerOuter.first().on('mouseout.lg', function () { + timeout = setTimeout(function () { + $pagerOuter.removeClass('lg-pager-hover'); + }); + }); + this.core.LGel.on(lGEvents.beforeSlide + ".pager", function (event) { + var index = event.detail.index; + _this.manageActiveClass.call(_this, index); + }); + this.core.LGel.on(lGEvents.updateSlides + ".pager", function () { + $pagerOuter.empty(); + $pagerOuter.html(_this.getPagerHtml(_this.core.galleryItems)); + _this.manageActiveClass(_this.core.index); + }); + }; + Pager.prototype.manageActiveClass = function (index) { + var $pagerCont = this.core.outer.find('.lg-pager-cont'); + $pagerCont.removeClass('lg-pager-active'); + $pagerCont.eq(index).addClass('lg-pager-active'); + }; + Pager.prototype.destroy = function () { + this.core.outer.find('.lg-pager-outer').remove(); + this.core.LGel.off('.lg.pager'); + this.core.LGel.off('.pager'); + }; + return Pager; + }()); + + return Pager; + +}))); +//# sourceMappingURL=lg-pager.umd.js.map diff --git a/assets/lightGallery/plugins/pager/lg-pager.umd.js.map b/assets/lightGallery/plugins/pager/lg-pager.umd.js.map new file mode 100644 index 0000000..054a00c --- /dev/null +++ b/assets/lightGallery/plugins/pager/lg-pager.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lg-pager.umd.js","sources":["../../../src/lg-events.ts","../../../src/plugins/pager/lg-pager-settings.ts","../../../src/plugins/pager/lg-pager.ts"],"sourcesContent":["import { LightGallery } from './lightgallery';\nimport { VideoSource } from './plugins/video/types';\n\n/**\n * List of lightGallery events\n * All events should be documented here\n * Below interfaces are used to build the website documentations\n * */\nexport const lGEvents: {\n [key: string]: string;\n} = {\n afterAppendSlide: 'lgAfterAppendSlide',\n init: 'lgInit',\n hasVideo: 'lgHasVideo',\n containerResize: 'lgContainerResize',\n updateSlides: 'lgUpdateSlides',\n afterAppendSubHtml: 'lgAfterAppendSubHtml',\n beforeOpen: 'lgBeforeOpen',\n afterOpen: 'lgAfterOpen',\n slideItemLoad: 'lgSlideItemLoad',\n beforeSlide: 'lgBeforeSlide',\n afterSlide: 'lgAfterSlide',\n posterClick: 'lgPosterClick',\n dragStart: 'lgDragStart',\n dragMove: 'lgDragMove',\n dragEnd: 'lgDragEnd',\n beforeNextSlide: 'lgBeforeNextSlide',\n beforePrevSlide: 'lgBeforePrevSlide',\n beforeClose: 'lgBeforeClose',\n afterClose: 'lgAfterClose',\n rotateLeft: 'lgRotateLeft',\n rotateRight: 'lgRotateRight',\n flipHorizontal: 'lgFlipHorizontal',\n flipVertical: 'lgFlipVertical',\n autoplay: 'lgAutoplay',\n autoplayStart: 'lgAutoplayStart',\n autoplayStop: 'lgAutoplayStop',\n};\n\n// Follow the below format for the event documentation\n// @method is the method name when event is used with Angular/React components\n\n/**\n * Fired only once when lightGallery is initialized\n * @name lgInit\n * @method onInit\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action on lightGallery initialization.\n * // Init event returns the plugin instance that can be used to call any lightGalley public method\n * let pluginInstance = null;\n * lg.addEventListener('lgInit', (event) => {\n * pluginInstance = event.detail.instance;\n * });\n * lightGallery(lg);\n * @see
Methods\n */\nexport interface InitDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired when the slide content has been inserted into it's slide container.\n * @name lgAfterAppendSlide\n * @method onAfterAppendSlide\n */\nexport interface AfterAppendSlideEventDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired immediately before opening the gallery\n * @name lgBeforeOpen\n * @method onBeforeOpen\n */\nexport interface BeforeOpenDetail {}\n\n/**\n * Fired immediately after opening the gallery\n * @name lgAfterOpen\n * @method onAfterOpen\n */\nexport interface AfterOpenDetail {}\n\n/**\n * Fired once the media inside the slide has been completely loaded .\n * @name lgSlideItemLoad\n * @method onSlideItemLoad\n */\nexport interface SlideItemLoadDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * For the first slide, lightGallery adds some delay for displaying the loaded slide item.\n * This delay is required for the transition effect when the slide item is displayed\n * Respect the delay when you use this event\n */\n delay: number;\n\n // Will be true for the first slide\n isFirstSlide: boolean;\n}\n\n/**\n * Fired immediately before each slide transition.\n * @name lgBeforeSlide\n * @method onBeforeSlide\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action before each slide transition\n * lg.addEventListener('lgBeforeSlide', (event) => {\n * const { index, prevIndex } = event.detail;\n * alert(index, prevIndex);\n * });\n * lightGallery(lg);\n */\nexport interface BeforeSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired immediately after each slide transition.\n * @name lgAfterSlide\n * @method onAfterSlide\n */\nexport interface AfterSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired when the video poster is clicked.\n * @name lgPosterClick\n * @method onPosterClick\n */\nexport interface PosterClickDetail {}\n\n/**\n * Fired when the drag event to move to different slide starts.\n * @name lgDragStart\n * @method onDragStart\n */\nexport interface DragStartDetail {}\n\n/**\n * Fired periodically during the drag operation.\n * @name lgDragMove\n * @method onDragMove\n */\nexport interface DragMoveDetail {}\n\n/**\n * Fired when the user has finished the drag operation\n * @name lgDragEnd\n * @method onDragEnd\n */\nexport interface DragEndDetail {}\n\n/**\n * Fired immediately before the start of the close process.\n * @name lgBeforeClose\n * @method onBeforeClose\n */\nexport interface BeforeCloseDetail {}\n\n/**\n * Fired immediately once lightGallery is closed.\n * @name lgAfterClose\n * @method onAfterClose\n */\nexport interface AfterCloseDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired immediately before each \"next\" slide transition\n * @name lgBeforeNextSlide\n * @method onBeforeNextSlide\n */\nexport interface BeforeNextSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired immediately before each \"prev\" slide transition\n * @name lgBeforePrevSlide\n * @method onBeforePrevSlide\n */\nexport interface BeforePrevSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired when the sub-html content (ex : title/ description) has been appended into the slide.\n * @name lgAfterAppendSubHtml\n * @method onAfterAppendSubHtml\n */\nexport interface AfterAppendSubHtmlDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the lightGallery container has been resized.\n * @name lgContainerResize\n * @method onContainerResize\n */\nexport interface ContainerResizeDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when lightGallery detects video slide\n * @name lgHasVideo\n * @method onHasVideo\n */\nexport interface HasVideoDetail {\n /**\n * Index of the slide,\n */\n index: number;\n /**\n * Video source\n */\n src: string;\n /**\n * HTML5 video source if available\n *

\n HTML5 video source = source: {\n src: string;\n type: string;\n }[];\n attributes: HTMLVideoElement;\n *

\n */\n html5Video: VideoSource;\n /**\n * True if video has poster\n */\n hasPoster: boolean;\n}\n\n/**\n * Fired when the image is rotated in anticlockwise direction\n * @name lgRotateLeft\n * @method onRotateLeft\n */\nexport interface RotateLeftDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is rotated in clockwise direction\n * @name lgRotateRight\n * @method onRotateRight\n */\nexport interface RotateRightDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped horizontally\n * @name lgFlipHorizontal\n * @method onFlipHorizontal\n */\nexport interface FlipHorizontalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped vertically\n * @name lgFlipVertical\n * @method onFlipVertical\n */\nexport interface FlipVerticalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n","export interface PagerSettings {\n /**\n * Enable/Disable pager option\n */\n pager: boolean;\n}\n\nexport const pagerSettings: PagerSettings = {\n pager: true,\n};\n","import { lGEvents } from '../../lg-events';\nimport { GalleryItem } from '../../lg-utils';\nimport { LgQuery } from '../../lgQuery';\nimport { LightGallery } from '../../lightgallery';\nimport { PagerSettings, pagerSettings } from './lg-pager-settings';\n\nexport default class Pager {\n core: LightGallery;\n settings: PagerSettings;\n private $LG!: LgQuery;\n constructor(instance: LightGallery, $LG: LgQuery) {\n // get lightGallery core plugin instance\n this.core = instance;\n this.$LG = $LG;\n // extend module default settings with lightGallery core settings\n this.settings = { ...pagerSettings, ...this.core.settings };\n\n return this;\n }\n\n private getPagerHtml(items: GalleryItem[]): string {\n let pagerList = '';\n for (let i = 0; i < items.length; i++) {\n pagerList += ` \n \n
\n
`;\n }\n return pagerList;\n }\n\n public init(): void {\n if (!this.settings.pager) {\n return;\n }\n let timeout: any;\n this.core.$lgComponents.prepend('
');\n\n const $pagerOuter = this.core.outer.find('.lg-pager-outer');\n\n $pagerOuter.html(this.getPagerHtml(this.core.galleryItems));\n\n // @todo enable click\n $pagerOuter.first().on('click.lg touchend.lg', (event: MouseEvent) => {\n const $target = this.$LG(event.target);\n if (!$target.hasAttribute('data-lg-item-id')) {\n return;\n }\n const index = parseInt($target.attr('data-lg-item-id'));\n this.core.slide(index, false, true, false);\n });\n\n $pagerOuter.first().on('mouseover.lg', () => {\n clearTimeout(timeout);\n $pagerOuter.addClass('lg-pager-hover');\n });\n\n $pagerOuter.first().on('mouseout.lg', () => {\n timeout = setTimeout(() => {\n $pagerOuter.removeClass('lg-pager-hover');\n });\n });\n\n this.core.LGel.on(`${lGEvents.beforeSlide}.pager`, (event) => {\n const { index } = event.detail;\n this.manageActiveClass.call(this, index);\n });\n\n this.core.LGel.on(`${lGEvents.updateSlides}.pager`, () => {\n $pagerOuter.empty();\n $pagerOuter.html(this.getPagerHtml(this.core.galleryItems));\n this.manageActiveClass(this.core.index);\n });\n }\n\n private manageActiveClass(index: number): void {\n const $pagerCont = this.core.outer.find('.lg-pager-cont');\n $pagerCont.removeClass('lg-pager-active');\n $pagerCont.eq(index).addClass('lg-pager-active');\n }\n\n destroy(): void {\n this.core.outer.find('.lg-pager-outer').remove();\n this.core.LGel.off('.lg.pager');\n this.core.LGel.off('.pager');\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGA;;;;;IAKO,IAAM,QAAQ,GAEjB;QACA,gBAAgB,EAAE,oBAAoB;QACtC,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,YAAY;QACtB,eAAe,EAAE,mBAAmB;QACpC,YAAY,EAAE,gBAAgB;QAC9B,kBAAkB,EAAE,sBAAsB;QAC1C,UAAU,EAAE,cAAc;QAC1B,SAAS,EAAE,aAAa;QACxB,aAAa,EAAE,iBAAiB;QAChC,WAAW,EAAE,eAAe;QAC5B,UAAU,EAAE,cAAc;QAC1B,WAAW,EAAE,eAAe;QAC5B,SAAS,EAAE,aAAa;QACxB,QAAQ,EAAE,YAAY;QACtB,OAAO,EAAE,WAAW;QACpB,eAAe,EAAE,mBAAmB;QACpC,eAAe,EAAE,mBAAmB;QACpC,WAAW,EAAE,eAAe;QAC5B,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE,cAAc;QAC1B,WAAW,EAAE,eAAe;QAC5B,cAAc,EAAE,kBAAkB;QAClC,YAAY,EAAE,gBAAgB;QAC9B,QAAQ,EAAE,YAAY;QACtB,aAAa,EAAE,iBAAiB;QAChC,YAAY,EAAE,gBAAgB;KACjC;;IC9BM,IAAM,aAAa,GAAkB;QACxC,KAAK,EAAE,IAAI;KACd;;;QCCG,eAAY,QAAsB,EAAE,GAAY;;YAE5C,IAAI,CAAC,IAA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AAC,EAAE,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;SACpD;QAED,uBAAO,GAAP;YACI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,MAAM,EAAE,CAAC;YACjD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;YAChC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;SAChC;QACL,YAAC;IAAD,CAAC;;;;"} \ No newline at end of file diff --git a/assets/lightGallery/plugins/pager/package.json b/assets/lightGallery/plugins/pager/package.json new file mode 100644 index 0000000..5a1bf54 --- /dev/null +++ b/assets/lightGallery/plugins/pager/package.json @@ -0,0 +1,7 @@ +{ + "name": "lightgallery/plugins/pager", + "private": true, + "main": "lg-pager.umd.js", + "module": "lg-pager.es5.js", + "typings": "lg-pager.d.ts" +} \ No newline at end of file diff --git a/assets/lightGallery/plugins/relativeCaption/lg-relative-caption-settings.d.ts b/assets/lightGallery/plugins/relativeCaption/lg-relative-caption-settings.d.ts new file mode 100644 index 0000000..50610f8 --- /dev/null +++ b/assets/lightGallery/plugins/relativeCaption/lg-relative-caption-settings.d.ts @@ -0,0 +1,7 @@ +export interface RelativeCaptionSettings { + /** + * Enable/Disable relative captions + */ + relativeCaption: boolean; +} +export declare const relativeCaptionSettings: RelativeCaptionSettings; diff --git a/assets/lightGallery/plugins/relativeCaption/lg-relative-caption.d.ts b/assets/lightGallery/plugins/relativeCaption/lg-relative-caption.d.ts new file mode 100644 index 0000000..dad8242 --- /dev/null +++ b/assets/lightGallery/plugins/relativeCaption/lg-relative-caption.d.ts @@ -0,0 +1,14 @@ +/** + * lightGallery caption for placing captions relative to the image + */ +import { LightGallery } from '../../lightgallery'; +import { RelativeCaptionSettings } from './lg-relative-caption-settings'; +export default class RelativeCaption { + core: LightGallery; + settings: RelativeCaptionSettings; + constructor(instance: LightGallery); + init(): void; + private setCaptionStyle; + private setRelativeCaption; + destroy(): void; +} diff --git a/assets/lightGallery/plugins/relativeCaption/lg-relative-caption.es5.js b/assets/lightGallery/plugins/relativeCaption/lg-relative-caption.es5.js new file mode 100644 index 0000000..4eed72f --- /dev/null +++ b/assets/lightGallery/plugins/relativeCaption/lg-relative-caption.es5.js @@ -0,0 +1,154 @@ +/*! + * lightgallery | 2.9.0 | October 1st 2025 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; + +/** + * List of lightGallery events + * All events should be documented here + * Below interfaces are used to build the website documentations + * */ +var lGEvents = { + afterAppendSlide: 'lgAfterAppendSlide', + init: 'lgInit', + hasVideo: 'lgHasVideo', + containerResize: 'lgContainerResize', + updateSlides: 'lgUpdateSlides', + afterAppendSubHtml: 'lgAfterAppendSubHtml', + beforeOpen: 'lgBeforeOpen', + afterOpen: 'lgAfterOpen', + slideItemLoad: 'lgSlideItemLoad', + beforeSlide: 'lgBeforeSlide', + afterSlide: 'lgAfterSlide', + posterClick: 'lgPosterClick', + dragStart: 'lgDragStart', + dragMove: 'lgDragMove', + dragEnd: 'lgDragEnd', + beforeNextSlide: 'lgBeforeNextSlide', + beforePrevSlide: 'lgBeforePrevSlide', + beforeClose: 'lgBeforeClose', + afterClose: 'lgAfterClose', + rotateLeft: 'lgRotateLeft', + rotateRight: 'lgRotateRight', + flipHorizontal: 'lgFlipHorizontal', + flipVertical: 'lgFlipVertical', + autoplay: 'lgAutoplay', + autoplayStart: 'lgAutoplayStart', + autoplayStop: 'lgAutoplayStop', +}; + +var relativeCaptionSettings = { + relativeCaption: false, +}; + +/** + * lightGallery caption for placing captions relative to the image + */ +var RelativeCaption = /** @class */ (function () { + function RelativeCaption(instance) { + // get lightGallery core plugin instance + this.core = instance; + // Override some of lightGallery default settings + var defaultSettings = { + addClass: this.core.settings.addClass + ' lg-relative-caption', + }; + this.core.settings = __assign(__assign({}, this.core.settings), defaultSettings); + // extend module default settings with lightGallery core settings + this.settings = __assign(__assign(__assign({}, relativeCaptionSettings), this.core.settings), defaultSettings); + return this; + } + RelativeCaption.prototype.init = function () { + var _this = this; + if (!this.settings.relativeCaption) { + return; + } + this.core.LGel.on(lGEvents.slideItemLoad + ".caption", function (event) { + var _a = event.detail, index = _a.index, delay = _a.delay; + setTimeout(function () { + if (index === _this.core.index) { + _this.setRelativeCaption(index); + } + }, delay); + }); + this.core.LGel.on(lGEvents.afterSlide + ".caption", function (event) { + var index = event.detail.index; + setTimeout(function () { + var slide = _this.core.getSlideItem(index); + if (slide.hasClass('lg-complete')) { + _this.setRelativeCaption(index); + } + }); + }); + this.core.LGel.on(lGEvents.beforeSlide + ".caption", function (event) { + var index = event.detail.index; + setTimeout(function () { + var slide = _this.core.getSlideItem(index); + slide.removeClass('lg-show-caption'); + }); + }); + this.core.LGel.on(lGEvents.containerResize + ".caption", function (event) { + _this.setRelativeCaption(_this.core.index); + }); + }; + RelativeCaption.prototype.setCaptionStyle = function (index, rect, slideWrapRect) { + var $subHtmlInner = this.core + .getSlideItem(index) + .find('.lg-relative-caption-item'); + var $subHtml = this.core.getSlideItem(index).find('.lg-sub-html'); + $subHtml.css('width', rect.width + "px").css('left', rect.left + "px"); + var subHtmlRect = $subHtmlInner.get().getBoundingClientRect(); + var bottom = slideWrapRect.bottom - rect.bottom - subHtmlRect.height; + $subHtml.css('top', "auto").css('bottom', Math.max(bottom, 0) + "px"); + }; + RelativeCaption.prototype.setRelativeCaption = function (index) { + var slide = this.core.getSlideItem(index); + if (slide.hasClass('lg-current')) { + var rect = this.core + .getSlideItem(index) + .find('.lg-object') + .get() + .getBoundingClientRect(); + var slideWrapRect = this.core + .getSlideItem(index) + .get() + .getBoundingClientRect(); + this.setCaptionStyle(index, rect, slideWrapRect); + slide.addClass('lg-show-caption'); + } + }; + RelativeCaption.prototype.destroy = function () { + this.core.LGel.off('.caption'); + }; + return RelativeCaption; +}()); + +export default RelativeCaption; +//# sourceMappingURL=lg-relative-caption.es5.js.map diff --git a/assets/lightGallery/plugins/relativeCaption/lg-relative-caption.es5.js.map b/assets/lightGallery/plugins/relativeCaption/lg-relative-caption.es5.js.map new file mode 100644 index 0000000..a87fa1b --- /dev/null +++ b/assets/lightGallery/plugins/relativeCaption/lg-relative-caption.es5.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lg-relative-caption.es5.js","sources":["../../../src/lg-events.ts","../../../src/plugins/relativeCaption/lg-relative-caption-settings.ts","../../../src/plugins/relativeCaption/lg-relative-caption.ts"],"sourcesContent":["import { LightGallery } from './lightgallery';\nimport { VideoSource } from './plugins/video/types';\n\n/**\n * List of lightGallery events\n * All events should be documented here\n * Below interfaces are used to build the website documentations\n * */\nexport const lGEvents: {\n [key: string]: string;\n} = {\n afterAppendSlide: 'lgAfterAppendSlide',\n init: 'lgInit',\n hasVideo: 'lgHasVideo',\n containerResize: 'lgContainerResize',\n updateSlides: 'lgUpdateSlides',\n afterAppendSubHtml: 'lgAfterAppendSubHtml',\n beforeOpen: 'lgBeforeOpen',\n afterOpen: 'lgAfterOpen',\n slideItemLoad: 'lgSlideItemLoad',\n beforeSlide: 'lgBeforeSlide',\n afterSlide: 'lgAfterSlide',\n posterClick: 'lgPosterClick',\n dragStart: 'lgDragStart',\n dragMove: 'lgDragMove',\n dragEnd: 'lgDragEnd',\n beforeNextSlide: 'lgBeforeNextSlide',\n beforePrevSlide: 'lgBeforePrevSlide',\n beforeClose: 'lgBeforeClose',\n afterClose: 'lgAfterClose',\n rotateLeft: 'lgRotateLeft',\n rotateRight: 'lgRotateRight',\n flipHorizontal: 'lgFlipHorizontal',\n flipVertical: 'lgFlipVertical',\n autoplay: 'lgAutoplay',\n autoplayStart: 'lgAutoplayStart',\n autoplayStop: 'lgAutoplayStop',\n};\n\n// Follow the below format for the event documentation\n// @method is the method name when event is used with Angular/React components\n\n/**\n * Fired only once when lightGallery is initialized\n * @name lgInit\n * @method onInit\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action on lightGallery initialization.\n * // Init event returns the plugin instance that can be used to call any lightGalley public method\n * let pluginInstance = null;\n * lg.addEventListener('lgInit', (event) => {\n * pluginInstance = event.detail.instance;\n * });\n * lightGallery(lg);\n * @see
Methods\n */\nexport interface InitDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired when the slide content has been inserted into it's slide container.\n * @name lgAfterAppendSlide\n * @method onAfterAppendSlide\n */\nexport interface AfterAppendSlideEventDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired immediately before opening the gallery\n * @name lgBeforeOpen\n * @method onBeforeOpen\n */\nexport interface BeforeOpenDetail {}\n\n/**\n * Fired immediately after opening the gallery\n * @name lgAfterOpen\n * @method onAfterOpen\n */\nexport interface AfterOpenDetail {}\n\n/**\n * Fired once the media inside the slide has been completely loaded .\n * @name lgSlideItemLoad\n * @method onSlideItemLoad\n */\nexport interface SlideItemLoadDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * For the first slide, lightGallery adds some delay for displaying the loaded slide item.\n * This delay is required for the transition effect when the slide item is displayed\n * Respect the delay when you use this event\n */\n delay: number;\n\n // Will be true for the first slide\n isFirstSlide: boolean;\n}\n\n/**\n * Fired immediately before each slide transition.\n * @name lgBeforeSlide\n * @method onBeforeSlide\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action before each slide transition\n * lg.addEventListener('lgBeforeSlide', (event) => {\n * const { index, prevIndex } = event.detail;\n * alert(index, prevIndex);\n * });\n * lightGallery(lg);\n */\nexport interface BeforeSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired immediately after each slide transition.\n * @name lgAfterSlide\n * @method onAfterSlide\n */\nexport interface AfterSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired when the video poster is clicked.\n * @name lgPosterClick\n * @method onPosterClick\n */\nexport interface PosterClickDetail {}\n\n/**\n * Fired when the drag event to move to different slide starts.\n * @name lgDragStart\n * @method onDragStart\n */\nexport interface DragStartDetail {}\n\n/**\n * Fired periodically during the drag operation.\n * @name lgDragMove\n * @method onDragMove\n */\nexport interface DragMoveDetail {}\n\n/**\n * Fired when the user has finished the drag operation\n * @name lgDragEnd\n * @method onDragEnd\n */\nexport interface DragEndDetail {}\n\n/**\n * Fired immediately before the start of the close process.\n * @name lgBeforeClose\n * @method onBeforeClose\n */\nexport interface BeforeCloseDetail {}\n\n/**\n * Fired immediately once lightGallery is closed.\n * @name lgAfterClose\n * @method onAfterClose\n */\nexport interface AfterCloseDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired immediately before each \"next\" slide transition\n * @name lgBeforeNextSlide\n * @method onBeforeNextSlide\n */\nexport interface BeforeNextSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired immediately before each \"prev\" slide transition\n * @name lgBeforePrevSlide\n * @method onBeforePrevSlide\n */\nexport interface BeforePrevSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired when the sub-html content (ex : title/ description) has been appended into the slide.\n * @name lgAfterAppendSubHtml\n * @method onAfterAppendSubHtml\n */\nexport interface AfterAppendSubHtmlDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the lightGallery container has been resized.\n * @name lgContainerResize\n * @method onContainerResize\n */\nexport interface ContainerResizeDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when lightGallery detects video slide\n * @name lgHasVideo\n * @method onHasVideo\n */\nexport interface HasVideoDetail {\n /**\n * Index of the slide,\n */\n index: number;\n /**\n * Video source\n */\n src: string;\n /**\n * HTML5 video source if available\n *

\n HTML5 video source = source: {\n src: string;\n type: string;\n }[];\n attributes: HTMLVideoElement;\n *

\n */\n html5Video: VideoSource;\n /**\n * True if video has poster\n */\n hasPoster: boolean;\n}\n\n/**\n * Fired when the image is rotated in anticlockwise direction\n * @name lgRotateLeft\n * @method onRotateLeft\n */\nexport interface RotateLeftDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is rotated in clockwise direction\n * @name lgRotateRight\n * @method onRotateRight\n */\nexport interface RotateRightDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped horizontally\n * @name lgFlipHorizontal\n * @method onFlipHorizontal\n */\nexport interface FlipHorizontalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped vertically\n * @name lgFlipVertical\n * @method onFlipVertical\n */\nexport interface FlipVerticalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n","export interface RelativeCaptionSettings {\n /**\n * Enable/Disable relative captions\n */\n relativeCaption: boolean;\n}\n\nexport const relativeCaptionSettings: RelativeCaptionSettings = {\n relativeCaption: false,\n};\n","/**\n * lightGallery caption for placing captions relative to the image\n */\n\nimport { lGEvents } from '../../lg-events';\nimport { LightGallerySettings } from '../../lg-settings';\nimport { LightGallery } from '../../lightgallery';\nimport {\n RelativeCaptionSettings,\n relativeCaptionSettings,\n} from './lg-relative-caption-settings';\n\nexport default class RelativeCaption {\n core: LightGallery;\n settings: RelativeCaptionSettings;\n constructor(instance: LightGallery) {\n // get lightGallery core plugin instance\n this.core = instance;\n\n // Override some of lightGallery default settings\n const defaultSettings: Partial = {\n addClass: this.core.settings.addClass + ' lg-relative-caption',\n };\n\n this.core.settings = { ...this.core.settings, ...defaultSettings };\n\n // extend module default settings with lightGallery core settings\n this.settings = {\n ...relativeCaptionSettings,\n ...this.core.settings,\n ...defaultSettings,\n };\n\n return this;\n }\n\n init(): void {\n if (!this.settings.relativeCaption) {\n return;\n }\n this.core.LGel.on(`${lGEvents.slideItemLoad}.caption`, (event) => {\n const { index, delay } = event.detail;\n setTimeout(() => {\n if (index === this.core.index) {\n this.setRelativeCaption(index);\n }\n }, delay);\n });\n this.core.LGel.on(`${lGEvents.afterSlide}.caption`, (event) => {\n const { index } = event.detail;\n setTimeout(() => {\n const slide = this.core.getSlideItem(index);\n if (slide.hasClass('lg-complete')) {\n this.setRelativeCaption(index);\n }\n });\n });\n this.core.LGel.on(`${lGEvents.beforeSlide}.caption`, (event) => {\n const { index } = event.detail;\n setTimeout(() => {\n const slide = this.core.getSlideItem(index);\n slide.removeClass('lg-show-caption');\n });\n });\n this.core.LGel.on(`${lGEvents.containerResize}.caption`, (event) => {\n this.setRelativeCaption(this.core.index);\n });\n }\n\n private setCaptionStyle(\n index: number,\n rect: ClientRect,\n slideWrapRect: ClientRect,\n ) {\n const $subHtmlInner = this.core\n .getSlideItem(index)\n .find('.lg-relative-caption-item');\n const $subHtml = this.core.getSlideItem(index).find('.lg-sub-html');\n $subHtml.css('width', `${rect.width}px`).css('left', `${rect.left}px`);\n const subHtmlRect = $subHtmlInner.get().getBoundingClientRect();\n const bottom = slideWrapRect.bottom - rect.bottom - subHtmlRect.height;\n $subHtml.css('top', `auto`).css('bottom', `${Math.max(bottom, 0)}px`);\n }\n\n private setRelativeCaption(index: number) {\n const slide = this.core.getSlideItem(index);\n if (slide.hasClass('lg-current')) {\n const rect = this.core\n .getSlideItem(index)\n .find('.lg-object')\n .get()\n .getBoundingClientRect();\n const slideWrapRect = this.core\n .getSlideItem(index)\n .get()\n .getBoundingClientRect();\n this.setCaptionStyle(index, rect, slideWrapRect);\n slide.addClass('lg-show-caption');\n }\n }\n\n destroy(): void {\n this.core.LGel.off('.caption');\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;;;;;AAKO,IAAM,QAAQ,GAEjB;IACA,gBAAgB,EAAE,oBAAoB;IACtC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,YAAY;IACtB,eAAe,EAAE,mBAAmB;IACpC,YAAY,EAAE,gBAAgB;IAC9B,kBAAkB,EAAE,sBAAsB;IAC1C,UAAU,EAAE,cAAc;IAC1B,SAAS,EAAE,aAAa;IACxB,aAAa,EAAE,iBAAiB;IAChC,WAAW,EAAE,eAAe;IAC5B,UAAU,EAAE,cAAc;IAC1B,WAAW,EAAE,eAAe;IAC5B,SAAS,EAAE,aAAa;IACxB,QAAQ,EAAE,YAAY;IACtB,OAAO,EAAE,WAAW;IACpB,eAAe,EAAE,mBAAmB;IACpC,eAAe,EAAE,mBAAmB;IACpC,WAAW,EAAE,eAAe;IAC5B,UA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GAAG,CAAC,MAAM,EAAK,IAAI,CAAC,IAAI,OAAI,CAAC,CAAC;QACvE,IAAM,WAAW,GAAG,aAAa,CAAC,GAAG,EAAE,CAAC,qBAAqB,EAAE,CAAC;QAChE,IAAM,MAAM,GAAG,aAAa,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC;QACvE,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAK,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,OAAI,CAAC,CAAC;KACzE;IAEO,4CAAkB,GAA1B,UAA2B,KAAa;QACpC,IAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QAC5C,IAAI,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE;YAC9B,IAAM,IAAI,GAAG,IAAI,CAAC,IAAI;iBACjB,YAAY,CAAC,KAAK,CAAC;iBACnB,IAAI,CAAC,YAAY,CAAC;iBAClB,GAAG,EAAE;iBACL,qBAAqB,EAAE,CAAC;YAC7B,IAAM,aAAa,GAAG,IAAI,CAAC,IAAI;iBAC1B,YAAY,CAAC,KAAK,CAAC;iBACnB,GAAG,EAAE;iBACL,qBAAqB,EAAE,CAAC;YAC7B,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC;YACjD,KAAK,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;SACrC;KACJ;IAED,iCAAO,GAAP;QACI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;KAClC;IACL,sBAAC;AAAD,CAAC;;"} \ No newline at end of file diff --git a/assets/lightGallery/plugins/relativeCaption/lg-relative-caption.min.js b/assets/lightGallery/plugins/relativeCaption/lg-relative-caption.min.js new file mode 100644 index 0000000..d2e823a --- /dev/null +++ b/assets/lightGallery/plugins/relativeCaption/lg-relative-caption.min.js @@ -0,0 +1,8 @@ +/** + * lightgallery | 2.9.0 | October 1st 2025 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgRelativeCaption=e()}(this,(function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,i=1,o=arguments.length;i {\n * pluginInstance = event.detail.instance;\n * });\n * lightGallery(lg);\n * @see
Methods\n */\nexport interface InitDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired when the slide content has been inserted into it's slide container.\n * @name lgAfterAppendSlide\n * @method onAfterAppendSlide\n */\nexport interface AfterAppendSlideEventDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired immediately before opening the gallery\n * @name lgBeforeOpen\n * @method onBeforeOpen\n */\nexport interface BeforeOpenDetail {}\n\n/**\n * Fired immediately after opening the gallery\n * @name lgAfterOpen\n * @method onAfterOpen\n */\nexport interface AfterOpenDetail {}\n\n/**\n * Fired once the media inside the slide has been completely loaded .\n * @name lgSlideItemLoad\n * @method onSlideItemLoad\n */\nexport interface SlideItemLoadDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * For the first slide, lightGallery adds some delay for displaying the loaded slide item.\n * This delay is required for the transition effect when the slide item is displayed\n * Respect the delay when you use this event\n */\n delay: number;\n\n // Will be true for the first slide\n isFirstSlide: boolean;\n}\n\n/**\n * Fired immediately before each slide transition.\n * @name lgBeforeSlide\n * @method onBeforeSlide\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action before each slide transition\n * lg.addEventListener('lgBeforeSlide', (event) => {\n * const { index, prevIndex } = event.detail;\n * alert(index, prevIndex);\n * });\n * lightGallery(lg);\n */\nexport interface BeforeSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired immediately after each slide transition.\n * @name lgAfterSlide\n * @method onAfterSlide\n */\nexport interface AfterSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired when the video poster is clicked.\n * @name lgPosterClick\n * @method onPosterClick\n */\nexport interface PosterClickDetail {}\n\n/**\n * Fired when the drag event to move to different slide starts.\n * @name lgDragStart\n * @method onDragStart\n */\nexport interface DragStartDetail {}\n\n/**\n * Fired periodically during the drag operation.\n * @name lgDragMove\n * @method onDragMove\n */\nexport interface DragMoveDetail {}\n\n/**\n * Fired when the user has finished the drag operation\n * @name lgDragEnd\n * @method onDragEnd\n */\nexport interface DragEndDetail {}\n\n/**\n * Fired immediately before the start of the close process.\n * @name lgBeforeClose\n * @method onBeforeClose\n */\nexport interface BeforeCloseDetail {}\n\n/**\n * Fired immediately once lightGallery is closed.\n * @name lgAfterClose\n * @method onAfterClose\n */\nexport interface AfterCloseDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired immediately before each \"next\" slide transition\n * @name lgBeforeNextSlide\n * @method onBeforeNextSlide\n */\nexport interface BeforeNextSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired immediately before each \"prev\" slide transition\n * @name lgBeforePrevSlide\n * @method onBeforePrevSlide\n */\nexport interface BeforePrevSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired when the sub-html content (ex : title/ description) has been appended into the slide.\n * @name lgAfterAppendSubHtml\n * @method onAfterAppendSubHtml\n */\nexport interface AfterAppendSubHtmlDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the lightGallery container has been resized.\n * @name lgContainerResize\n * @method onContainerResize\n */\nexport interface ContainerResizeDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when lightGallery detects video slide\n * @name lgHasVideo\n * @method onHasVideo\n */\nexport interface HasVideoDetail {\n /**\n * Index of the slide,\n */\n index: number;\n /**\n * Video source\n */\n src: string;\n /**\n * HTML5 video source if available\n *

\n HTML5 video source = source: {\n src: string;\n type: string;\n }[];\n attributes: HTMLVideoElement;\n *

\n */\n html5Video: VideoSource;\n /**\n * True if video has poster\n */\n hasPoster: boolean;\n}\n\n/**\n * Fired when the image is rotated in anticlockwise direction\n * @name lgRotateLeft\n * @method onRotateLeft\n */\nexport interface RotateLeftDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is rotated in clockwise direction\n * @name lgRotateRight\n * @method onRotateRight\n */\nexport interface RotateRightDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped horizontally\n * @name lgFlipHorizontal\n * @method onFlipHorizontal\n */\nexport interface FlipHorizontalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped vertically\n * @name lgFlipVertical\n * @method onFlipVertical\n */\nexport interface FlipVerticalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n","export interface RelativeCaptionSettings {\n /**\n * Enable/Disable relative captions\n */\n relativeCaption: boolean;\n}\n\nexport const relativeCaptionSettings: RelativeCaptionSettings = {\n relativeCaption: false,\n};\n","/**\n * lightGallery caption for placing captions relative to the image\n */\n\nimport { lGEvents } from '../../lg-events';\nimport { LightGallerySettings } from '../../lg-settings';\nimport { LightGallery } from '../../lightgallery';\nimport {\n RelativeCaptionSettings,\n relativeCaptionSettings,\n} from './lg-relative-caption-settings';\n\nexport default class RelativeCaption {\n core: LightGallery;\n settings: RelativeCaptionSettings;\n constructor(instance: LightGallery) {\n // get lightGallery core plugin instance\n this.core = instance;\n\n // Override some of lightGallery default settings\n const defaultSettings: Partial = {\n addClass: this.core.settings.addClass + ' lg-relative-caption',\n };\n\n this.core.settings = { ...this.core.settings, ...defaultSettings };\n\n // extend module default settings with lightGallery core settings\n this.settings = {\n ...relativeCaptionSettings,\n ...this.core.settings,\n ...defaultSettings,\n };\n\n return this;\n }\n\n init(): void {\n if (!this.settings.relativeCaption) {\n return;\n }\n this.core.LGel.on(`${lGEvents.slideItemLoad}.caption`, (event) => {\n const { index, delay } = event.detail;\n setTimeout(() => {\n if (index === this.core.index) {\n this.setRelativeCaption(index);\n }\n }, delay);\n });\n this.core.LGel.on(`${lGEvents.afterSlide}.caption`, (event) => {\n const { index } = event.detail;\n setTimeout(() => {\n const slide = this.core.getSlideItem(index);\n if (slide.hasClass('lg-complete')) {\n this.setRelativeCaption(index);\n }\n });\n });\n this.core.LGel.on(`${lGEvents.beforeSlide}.caption`, (event) => {\n const { index } = event.detail;\n setTimeout(() => {\n const slide = this.core.getSlideItem(index);\n slide.removeClass('lg-show-caption');\n });\n });\n this.core.LGel.on(`${lGEvents.containerResize}.caption`, (event) => {\n this.setRelativeCaption(this.core.index);\n });\n }\n\n private setCaptionStyle(\n index: number,\n rect: ClientRect,\n slideWrapRect: ClientRect,\n ) {\n const $subHtmlInner = this.core\n .getSlideItem(index)\n .find('.lg-relative-caption-item');\n const $subHtml = this.core.getSlideItem(index).find('.lg-sub-html');\n $subHtml.css('width', `${rect.width}px`).css('left', `${rect.left}px`);\n const subHtmlRect = $subHtmlInner.get().getBoundingClientRect();\n const bottom = slideWrapRect.bottom - rect.bottom - subHtmlRect.height;\n $subHtml.css('top', `auto`).css('bottom', `${Math.max(bottom, 0)}px`);\n }\n\n private setRelativeCaption(index: number) {\n const slide = this.core.getSlideItem(index);\n if (slide.hasClass('lg-current')) {\n const rect = this.core\n .getSlideItem(index)\n .find('.lg-object')\n .get()\n .getBoundingClientRect();\n const slideWrapRect = this.core\n .getSlideItem(index)\n .get()\n .getBoundingClientRect();\n this.setCaptionStyle(index, rect, slideWrapRect);\n slide.addClass('lg-show-caption');\n }\n }\n\n destroy(): void {\n this.core.LGel.off('.caption');\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGA;;;;;IAKO,IAAM,QAAQ,GAEjB;QACA,gBAAgB,EAAE,oBAAoB;QACtC,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,YAAY;QACtB,eAAe,EAAE,mBAAmB;QACpC,YAAY,EAAE,gBAAgB;QAC9B,kBAAkB,EAAE,sBAAsB;QAC1C,UAAU,EAAE,cAAc;QAC1B,SAAS,EAAE,aAAa;QACxB,aAAa,EAAE,iBAAiB;QAChC,WAAW,EAAE,eAAe;QAC5B,UAAU,EAAE,cAAc;QAC1B,WAAW,EAAE,eAAe;QAC5B,SAAS,EAAE,aAAa;QACxB,QAAQ,EAAE,YAAY;QACtB,OAAO,EAAE,WAAW;QACpB,eAAe,EAAE,mBAAmB;QACpC,eAAe,EAAE,mBAAmB;QACpC,WAAW,EAAE,eAAe;QAC5B,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE,cAAc;QAC1B,WAAW,EAAE,eAAe;QAC5B,cAAc,EAAE,kBAAkB;QAClC,YAAY,EAAE,gBAAgB;QAC9B,QAAQ,EAAE,YAAY;QACtB,aAAa,EAAE,iBAAiB;QAChC,YAAY,EAAE,gBAAgB;KACjC;;IC9BM,IAAM,uBAAuB,GAA4B;QAC5D,eAAe,EAAE,KAAK;KACzB;;ICTD;;;;QAeI,yBAAY,QAAsB;;YAE9B,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC;;YAGrB,IAAM,eAAe,GAAkC;gBACnD,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC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UAA2B,KAAa;YACpC,IAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;YAC5C,IAAI,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE;gBAC9B,IAAM,IAAI,GAAG,IAAI,CAAC,IAAI;qBACjB,YAAY,CAAC,KAAK,CAAC;qBACnB,IAAI,CAAC,YAAY,CAAC;qBAClB,GAAG,EAAE;qBACL,qBAAqB,EAAE,CAAC;gBAC7B,IAAM,aAAa,GAAG,IAAI,CAAC,IAAI;qBAC1B,YAAY,CAAC,KAAK,CAAC;qBACnB,GAAG,EAAE;qBACL,qBAAqB,EAAE,CAAC;gBAC7B,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC;gBACjD,KAAK,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;aACrC;SACJ;QAED,iCAAO,GAAP;YACI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;SAClC;QACL,sBAAC;IAAD,CAAC;;;;"} \ No newline at end of file diff --git a/assets/lightGallery/plugins/relativeCaption/package.json b/assets/lightGallery/plugins/relativeCaption/package.json new file mode 100644 index 0000000..eb43c90 --- /dev/null +++ b/assets/lightGallery/plugins/relativeCaption/package.json @@ -0,0 +1,7 @@ +{ + "name": "lightgallery/plugins/relativeCaption", + "private": true, + "main": "lg-relative-caption.umd.js", + "module": "lg-relative-caption.es5.js", + "typings": "lg-relative-caption.d.ts" +} \ No newline at end of file diff --git a/assets/lightGallery/plugins/rotate/lg-rotate-settings.d.ts b/assets/lightGallery/plugins/rotate/lg-rotate-settings.d.ts new file mode 100644 index 0000000..0230d6a --- /dev/null +++ b/assets/lightGallery/plugins/rotate/lg-rotate-settings.d.ts @@ -0,0 +1,45 @@ +export interface RotateStrings { + flipVertical: string; + flipHorizontal: string; + rotateLeft: string; + rotateRight: string; +} +export interface RotateSettings { + /** + * Enable/Disable rotate option + */ + rotate: boolean; + /** + * Rotate speed in milliseconds + */ + rotateSpeed: number; + /** + * Enable rotate left. + */ + rotateLeft: boolean; + /** + * Enable rotate right. + */ + rotateRight: boolean; + /** + * Enable flip horizontal. + */ + flipHorizontal: boolean; + /** + * Enable flip vertical. + */ + flipVertical: boolean; + /** + * Custom translation strings for aria-labels + */ + rotatePluginStrings: RotateStrings; +} +export declare const rotateSettings: { + rotate: boolean; + rotateSpeed: number; + rotateLeft: boolean; + rotateRight: boolean; + flipHorizontal: boolean; + flipVertical: boolean; + rotatePluginStrings: RotateStrings; +}; diff --git a/assets/lightGallery/plugins/rotate/lg-rotate.d.ts b/assets/lightGallery/plugins/rotate/lg-rotate.d.ts new file mode 100644 index 0000000..6d16a15 --- /dev/null +++ b/assets/lightGallery/plugins/rotate/lg-rotate.d.ts @@ -0,0 +1,24 @@ +import { LgQuery } from '../../lgQuery'; +import { LightGallery } from '../../lightgallery'; +import { RotateSettings } from './lg-rotate-settings'; +export default class Rotate { + core: LightGallery; + settings: RotateSettings; + rotateValuesList: { + [key: string]: any; + }; + private $LG; + constructor(instance: LightGallery, $LG: LgQuery); + buildTemplates(): void; + init(): void; + applyStyles(): void; + rotateLeft(): void; + rotateRight(): void; + getCurrentRotation(el: HTMLElement): number; + flipHorizontal(): void; + flipVertical(): void; + triggerEvents(event: string, detail: any): void; + isImageOrientationChanged(): boolean; + closeGallery(): void; + destroy(): void; +} diff --git a/assets/lightGallery/plugins/rotate/lg-rotate.es5.js b/assets/lightGallery/plugins/rotate/lg-rotate.es5.js new file mode 100644 index 0000000..cad4da6 --- /dev/null +++ b/assets/lightGallery/plugins/rotate/lg-rotate.es5.js @@ -0,0 +1,274 @@ +/*! + * lightgallery | 2.9.0 | October 1st 2025 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; + +/** + * List of lightGallery events + * All events should be documented here + * Below interfaces are used to build the website documentations + * */ +var lGEvents = { + afterAppendSlide: 'lgAfterAppendSlide', + init: 'lgInit', + hasVideo: 'lgHasVideo', + containerResize: 'lgContainerResize', + updateSlides: 'lgUpdateSlides', + afterAppendSubHtml: 'lgAfterAppendSubHtml', + beforeOpen: 'lgBeforeOpen', + afterOpen: 'lgAfterOpen', + slideItemLoad: 'lgSlideItemLoad', + beforeSlide: 'lgBeforeSlide', + afterSlide: 'lgAfterSlide', + posterClick: 'lgPosterClick', + dragStart: 'lgDragStart', + dragMove: 'lgDragMove', + dragEnd: 'lgDragEnd', + beforeNextSlide: 'lgBeforeNextSlide', + beforePrevSlide: 'lgBeforePrevSlide', + beforeClose: 'lgBeforeClose', + afterClose: 'lgAfterClose', + rotateLeft: 'lgRotateLeft', + rotateRight: 'lgRotateRight', + flipHorizontal: 'lgFlipHorizontal', + flipVertical: 'lgFlipVertical', + autoplay: 'lgAutoplay', + autoplayStart: 'lgAutoplayStart', + autoplayStop: 'lgAutoplayStop', +}; + +var rotateSettings = { + rotate: true, + rotateSpeed: 400, + rotateLeft: true, + rotateRight: true, + flipHorizontal: true, + flipVertical: true, + rotatePluginStrings: { + flipVertical: 'Flip vertical', + flipHorizontal: 'Flip horizontal', + rotateLeft: 'Rotate left', + rotateRight: 'Rotate right', + }, +}; + +var Rotate = /** @class */ (function () { + function Rotate(instance, $LG) { + // get lightGallery core plugin instance + this.core = instance; + this.$LG = $LG; + // extend module default settings with lightGallery core settings + this.settings = __assign(__assign({}, rotateSettings), this.core.settings); + return this; + } + Rotate.prototype.buildTemplates = function () { + var rotateIcons = ''; + if (this.settings.flipVertical) { + rotateIcons += ""; + } + if (this.settings.flipHorizontal) { + rotateIcons += ""; + } + if (this.settings.rotateLeft) { + rotateIcons += ""; + } + if (this.settings.rotateRight) { + rotateIcons += ""; + } + this.core.$toolbar.append(rotateIcons); + }; + Rotate.prototype.init = function () { + var _this = this; + if (!this.settings.rotate) { + return; + } + this.buildTemplates(); + // Save rotate config for each item to persist its rotate, flip values + // even after navigating to diferent slides + this.rotateValuesList = {}; + // event triggered after appending slide content + this.core.LGel.on(lGEvents.slideItemLoad + ".rotate", function (event) { + var index = event.detail.index; + var rotateEl = _this.core + .getSlideItem(index) + .find('.lg-img-rotate') + .get(); + if (!rotateEl) { + var imageWrap = _this.core + .getSlideItem(index) + .find('.lg-object') + .first(); + imageWrap.wrap('lg-img-rotate'); + //this.rotateValuesList[this.core.index] + _this.core + .getSlideItem(_this.core.index) + .find('.lg-img-rotate') + .css('transition-duration', _this.settings.rotateSpeed + 'ms'); + } + }); + this.core.outer + .find('#lg-rotate-left') + .first() + .on('click.lg', this.rotateLeft.bind(this)); + this.core.outer + .find('#lg-rotate-right') + .first() + .on('click.lg', this.rotateRight.bind(this)); + this.core.outer + .find('#lg-flip-hor') + .first() + .on('click.lg', this.flipHorizontal.bind(this)); + this.core.outer + .find('#lg-flip-ver') + .first() + .on('click.lg', this.flipVertical.bind(this)); + // Reset rotate on slide change + this.core.LGel.on(lGEvents.beforeSlide + ".rotate", function (event) { + if (!_this.rotateValuesList[event.detail.index]) { + _this.rotateValuesList[event.detail.index] = { + rotate: 0, + flipHorizontal: 1, + flipVertical: 1, + }; + } + }); + }; + Rotate.prototype.applyStyles = function () { + var $image = this.core + .getSlideItem(this.core.index) + .find('.lg-img-rotate') + .first(); + $image.css('transform', 'rotate(' + + this.rotateValuesList[this.core.index].rotate + + 'deg)' + + ' scale3d(' + + this.rotateValuesList[this.core.index].flipHorizontal + + ', ' + + this.rotateValuesList[this.core.index].flipVertical + + ', 1)'); + }; + Rotate.prototype.rotateLeft = function () { + this.rotateValuesList[this.core.index].rotate -= 90; + this.applyStyles(); + this.triggerEvents(lGEvents.rotateLeft, { + rotate: this.rotateValuesList[this.core.index].rotate, + }); + }; + Rotate.prototype.rotateRight = function () { + this.rotateValuesList[this.core.index].rotate += 90; + this.applyStyles(); + this.triggerEvents(lGEvents.rotateRight, { + rotate: this.rotateValuesList[this.core.index].rotate, + }); + }; + Rotate.prototype.getCurrentRotation = function (el) { + if (!el) { + return 0; + } + var st = this.$LG(el).style(); + var tm = st.getPropertyValue('-webkit-transform') || + st.getPropertyValue('-moz-transform') || + st.getPropertyValue('-ms-transform') || + st.getPropertyValue('-o-transform') || + st.getPropertyValue('transform') || + 'none'; + if (tm !== 'none') { + var values = tm.split('(')[1].split(')')[0].split(','); + if (values) { + var angle = Math.round(Math.atan2(values[1], values[0]) * (180 / Math.PI)); + return angle < 0 ? angle + 360 : angle; + } + } + return 0; + }; + Rotate.prototype.flipHorizontal = function () { + var rotateEl = this.core + .getSlideItem(this.core.index) + .find('.lg-img-rotate') + .first() + .get(); + var currentRotation = this.getCurrentRotation(rotateEl); + var rotateAxis = 'flipHorizontal'; + if (currentRotation === 90 || currentRotation === 270) { + rotateAxis = 'flipVertical'; + } + this.rotateValuesList[this.core.index][rotateAxis] *= -1; + this.applyStyles(); + this.triggerEvents(lGEvents.flipHorizontal, { + flipHorizontal: this.rotateValuesList[this.core.index][rotateAxis], + }); + }; + Rotate.prototype.flipVertical = function () { + var rotateEl = this.core + .getSlideItem(this.core.index) + .find('.lg-img-rotate') + .first() + .get(); + var currentRotation = this.getCurrentRotation(rotateEl); + var rotateAxis = 'flipVertical'; + if (currentRotation === 90 || currentRotation === 270) { + rotateAxis = 'flipHorizontal'; + } + this.rotateValuesList[this.core.index][rotateAxis] *= -1; + this.applyStyles(); + this.triggerEvents(lGEvents.flipVertical, { + flipVertical: this.rotateValuesList[this.core.index][rotateAxis], + }); + }; + Rotate.prototype.triggerEvents = function (event, detail) { + var _this = this; + setTimeout(function () { + _this.core.LGel.trigger(event, detail); + }, this.settings.rotateSpeed + 10); + }; + Rotate.prototype.isImageOrientationChanged = function () { + var rotateValue = this.rotateValuesList[this.core.index]; + var isRotated = Math.abs(rotateValue.rotate) % 360 !== 0; + var ifFlippedHor = rotateValue.flipHorizontal < 0; + var ifFlippedVer = rotateValue.flipVertical < 0; + return isRotated || ifFlippedHor || ifFlippedVer; + }; + Rotate.prototype.closeGallery = function () { + if (this.isImageOrientationChanged()) { + this.core.getSlideItem(this.core.index).css('opacity', 0); + } + this.rotateValuesList = {}; + }; + Rotate.prototype.destroy = function () { + // Unbind all events added by lightGallery rotate plugin + this.core.LGel.off('.lg.rotate'); + this.core.LGel.off('.rotate'); + }; + return Rotate; +}()); + +export default Rotate; +//# sourceMappingURL=lg-rotate.es5.js.map diff --git a/assets/lightGallery/plugins/rotate/lg-rotate.es5.js.map b/assets/lightGallery/plugins/rotate/lg-rotate.es5.js.map new file mode 100644 index 0000000..8729f5f --- /dev/null +++ b/assets/lightGallery/plugins/rotate/lg-rotate.es5.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lg-rotate.es5.js","sources":["../../../src/lg-events.ts","../../../src/plugins/rotate/lg-rotate-settings.ts","../../../src/plugins/rotate/lg-rotate.ts"],"sourcesContent":["import { LightGallery } from './lightgallery';\nimport { VideoSource } from './plugins/video/types';\n\n/**\n * List of lightGallery events\n * All events should be documented here\n * Below interfaces are used to build the website documentations\n * */\nexport const lGEvents: {\n [key: string]: string;\n} = {\n afterAppendSlide: 'lgAfterAppendSlide',\n init: 'lgInit',\n hasVideo: 'lgHasVideo',\n containerResize: 'lgContainerResize',\n updateSlides: 'lgUpdateSlides',\n afterAppendSubHtml: 'lgAfterAppendSubHtml',\n beforeOpen: 'lgBeforeOpen',\n afterOpen: 'lgAfterOpen',\n slideItemLoad: 'lgSlideItemLoad',\n beforeSlide: 'lgBeforeSlide',\n afterSlide: 'lgAfterSlide',\n posterClick: 'lgPosterClick',\n dragStart: 'lgDragStart',\n dragMove: 'lgDragMove',\n dragEnd: 'lgDragEnd',\n beforeNextSlide: 'lgBeforeNextSlide',\n beforePrevSlide: 'lgBeforePrevSlide',\n beforeClose: 'lgBeforeClose',\n afterClose: 'lgAfterClose',\n rotateLeft: 'lgRotateLeft',\n rotateRight: 'lgRotateRight',\n flipHorizontal: 'lgFlipHorizontal',\n flipVertical: 'lgFlipVertical',\n autoplay: 'lgAutoplay',\n autoplayStart: 'lgAutoplayStart',\n autoplayStop: 'lgAutoplayStop',\n};\n\n// Follow the below format for the event documentation\n// @method is the method name when event is used with Angular/React components\n\n/**\n * Fired only once when lightGallery is initialized\n * @name lgInit\n * @method onInit\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action on lightGallery initialization.\n * // Init event returns the plugin instance that can be used to call any lightGalley public method\n * let pluginInstance = null;\n * lg.addEventListener('lgInit', (event) => {\n * pluginInstance = event.detail.instance;\n * });\n * lightGallery(lg);\n * @see
Methods\n */\nexport interface InitDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired when the slide content has been inserted into it's slide container.\n * @name lgAfterAppendSlide\n * @method onAfterAppendSlide\n */\nexport interface AfterAppendSlideEventDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired immediately before opening the gallery\n * @name lgBeforeOpen\n * @method onBeforeOpen\n */\nexport interface BeforeOpenDetail {}\n\n/**\n * Fired immediately after opening the gallery\n * @name lgAfterOpen\n * @method onAfterOpen\n */\nexport interface AfterOpenDetail {}\n\n/**\n * Fired once the media inside the slide has been completely loaded .\n * @name lgSlideItemLoad\n * @method onSlideItemLoad\n */\nexport interface SlideItemLoadDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * For the first slide, lightGallery adds some delay for displaying the loaded slide item.\n * This delay is required for the transition effect when the slide item is displayed\n * Respect the delay when you use this event\n */\n delay: number;\n\n // Will be true for the first slide\n isFirstSlide: boolean;\n}\n\n/**\n * Fired immediately before each slide transition.\n * @name lgBeforeSlide\n * @method onBeforeSlide\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action before each slide transition\n * lg.addEventListener('lgBeforeSlide', (event) => {\n * const { index, prevIndex } = event.detail;\n * alert(index, prevIndex);\n * });\n * lightGallery(lg);\n */\nexport interface BeforeSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired immediately after each slide transition.\n * @name lgAfterSlide\n * @method onAfterSlide\n */\nexport interface AfterSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired when the video poster is clicked.\n * @name lgPosterClick\n * @method onPosterClick\n */\nexport interface PosterClickDetail {}\n\n/**\n * Fired when the drag event to move to different slide starts.\n * @name lgDragStart\n * @method onDragStart\n */\nexport interface DragStartDetail {}\n\n/**\n * Fired periodically during the drag operation.\n * @name lgDragMove\n * @method onDragMove\n */\nexport interface DragMoveDetail {}\n\n/**\n * Fired when the user has finished the drag operation\n * @name lgDragEnd\n * @method onDragEnd\n */\nexport interface DragEndDetail {}\n\n/**\n * Fired immediately before the start of the close process.\n * @name lgBeforeClose\n * @method onBeforeClose\n */\nexport interface BeforeCloseDetail {}\n\n/**\n * Fired immediately once lightGallery is closed.\n * @name lgAfterClose\n * @method onAfterClose\n */\nexport interface AfterCloseDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired immediately before each \"next\" slide transition\n * @name lgBeforeNextSlide\n * @method onBeforeNextSlide\n */\nexport interface BeforeNextSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired immediately before each \"prev\" slide transition\n * @name lgBeforePrevSlide\n * @method onBeforePrevSlide\n */\nexport interface BeforePrevSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired when the sub-html content (ex : title/ description) has been appended into the slide.\n * @name lgAfterAppendSubHtml\n * @method onAfterAppendSubHtml\n */\nexport interface AfterAppendSubHtmlDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the lightGallery container has been resized.\n * @name lgContainerResize\n * @method onContainerResize\n */\nexport interface ContainerResizeDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when lightGallery detects video slide\n * @name lgHasVideo\n * @method onHasVideo\n */\nexport interface HasVideoDetail {\n /**\n * Index of the slide,\n */\n index: number;\n /**\n * Video source\n */\n src: string;\n /**\n * HTML5 video source if available\n *

\n HTML5 video source = source: {\n src: string;\n type: string;\n }[];\n attributes: HTMLVideoElement;\n *

\n */\n html5Video: VideoSource;\n /**\n * True if video has poster\n */\n hasPoster: boolean;\n}\n\n/**\n * Fired when the image is rotated in anticlockwise direction\n * @name lgRotateLeft\n * @method onRotateLeft\n */\nexport interface RotateLeftDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is rotated in clockwise direction\n * @name lgRotateRight\n * @method onRotateRight\n */\nexport interface RotateRightDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped horizontally\n * @name lgFlipHorizontal\n * @method onFlipHorizontal\n */\nexport interface FlipHorizontalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped vertically\n * @name lgFlipVertical\n * @method onFlipVertical\n */\nexport interface FlipVerticalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n","export interface RotateStrings {\n flipVertical: string;\n flipHorizontal: string;\n rotateLeft: string;\n rotateRight: string;\n}\n\nexport interface RotateSettings {\n /**\n * Enable/Disable rotate option\n */\n rotate: boolean;\n\n /**\n * Rotate speed in milliseconds\n */\n rotateSpeed: number;\n\n /**\n * Enable rotate left.\n */\n rotateLeft: boolean;\n\n /**\n * Enable rotate right.\n */\n rotateRight: boolean;\n\n /**\n * Enable flip horizontal.\n */\n flipHorizontal: boolean;\n\n /**\n * Enable flip vertical.\n */\n flipVertical: boolean;\n\n /**\n * Custom translation strings for aria-labels\n */\n rotatePluginStrings: RotateStrings;\n}\nexport const rotateSettings = {\n rotate: true,\n rotateSpeed: 400,\n rotateLeft: true,\n rotateRight: true,\n flipHorizontal: true,\n flipVertical: true,\n rotatePluginStrings: {\n flipVertical: 'Flip vertical',\n flipHorizontal: 'Flip horizontal',\n rotateLeft: 'Rotate left',\n rotateRight: 'Rotate right',\n } as RotateStrings,\n};\n","import { lGEvents } from '../../lg-events';\nimport { LgQuery } from '../../lgQuery';\nimport { LightGallery } from '../../lightgallery';\nimport { rotateSettings, RotateSettings } from './lg-rotate-settings';\n\nexport default class Rotate {\n core: LightGallery;\n settings: RotateSettings;\n rotateValuesList!: {\n [key: string]: any;\n };\n private $LG!: LgQuery;\n constructor(instance: LightGallery, $LG: LgQuery) {\n // get lightGallery core plugin instance\n this.core = instance;\n this.$LG = $LG;\n\n // extend module default settings with lightGallery core settings\n this.settings = {\n ...rotateSettings,\n ...this.core.settings,\n };\n\n return this;\n }\n buildTemplates(): void {\n let rotateIcons = '';\n if (this.settings.flipVertical) {\n rotateIcons += ``;\n }\n if (this.settings.flipHorizontal) {\n rotateIcons += ``;\n }\n if (this.settings.rotateLeft) {\n rotateIcons += ``;\n }\n if (this.settings.rotateRight) {\n rotateIcons += ``;\n }\n this.core.$toolbar.append(rotateIcons);\n }\n\n init(): void {\n if (!this.settings.rotate) {\n return;\n }\n this.buildTemplates();\n\n // Save rotate config for each item to persist its rotate, flip values\n // even after navigating to diferent slides\n this.rotateValuesList = {};\n\n // event triggered after appending slide content\n this.core.LGel.on(`${lGEvents.slideItemLoad}.rotate`, (event) => {\n const { index } = event.detail;\n\n const rotateEl = this.core\n .getSlideItem(index)\n .find('.lg-img-rotate')\n .get();\n if (!rotateEl) {\n const imageWrap = this.core\n .getSlideItem(index)\n .find('.lg-object')\n .first();\n\n imageWrap.wrap('lg-img-rotate');\n //this.rotateValuesList[this.core.index]\n this.core\n .getSlideItem(this.core.index)\n .find('.lg-img-rotate')\n .css(\n 'transition-duration',\n this.settings.rotateSpeed + 'ms',\n );\n }\n });\n\n this.core.outer\n .find('#lg-rotate-left')\n .first()\n .on('click.lg', this.rotateLeft.bind(this));\n\n this.core.outer\n .find('#lg-rotate-right')\n .first()\n .on('click.lg', this.rotateRight.bind(this));\n\n this.core.outer\n .find('#lg-flip-hor')\n .first()\n .on('click.lg', this.flipHorizontal.bind(this));\n\n this.core.outer\n .find('#lg-flip-ver')\n .first()\n .on('click.lg', this.flipVertical.bind(this));\n\n // Reset rotate on slide change\n this.core.LGel.on(`${lGEvents.beforeSlide}.rotate`, (event) => {\n if (!this.rotateValuesList[event.detail.index]) {\n this.rotateValuesList[event.detail.index] = {\n rotate: 0,\n flipHorizontal: 1,\n flipVertical: 1,\n };\n }\n });\n }\n\n applyStyles(): void {\n const $image = this.core\n .getSlideItem(this.core.index)\n .find('.lg-img-rotate')\n .first();\n\n $image.css(\n 'transform',\n 'rotate(' +\n this.rotateValuesList[this.core.index].rotate +\n 'deg)' +\n ' scale3d(' +\n this.rotateValuesList[this.core.index].flipHorizontal +\n ', ' +\n this.rotateValuesList[this.core.index].flipVertical +\n ', 1)',\n );\n }\n\n rotateLeft(): void {\n this.rotateValuesList[this.core.index].rotate -= 90;\n this.applyStyles();\n this.triggerEvents(lGEvents.rotateLeft, {\n rotate: this.rotateValuesList[this.core.index].rotate,\n });\n }\n\n rotateRight(): void {\n this.rotateValuesList[this.core.index].rotate += 90;\n this.applyStyles();\n this.triggerEvents(lGEvents.rotateRight, {\n rotate: this.rotateValuesList[this.core.index].rotate,\n });\n }\n\n getCurrentRotation(el: HTMLElement): number {\n if (!el) {\n return 0;\n }\n const st = this.$LG(el).style();\n const tm =\n st.getPropertyValue('-webkit-transform') ||\n st.getPropertyValue('-moz-transform') ||\n st.getPropertyValue('-ms-transform') ||\n st.getPropertyValue('-o-transform') ||\n st.getPropertyValue('transform') ||\n 'none';\n if (tm !== 'none') {\n const values = tm.split('(')[1].split(')')[0].split(',') as any;\n if (values) {\n const angle = Math.round(\n Math.atan2(values[1], values[0]) * (180 / Math.PI),\n );\n return angle < 0 ? angle + 360 : angle;\n }\n }\n return 0;\n }\n\n flipHorizontal(): void {\n const rotateEl = this.core\n .getSlideItem(this.core.index)\n .find('.lg-img-rotate')\n .first()\n .get();\n const currentRotation = this.getCurrentRotation(rotateEl);\n let rotateAxis = 'flipHorizontal';\n if (currentRotation === 90 || currentRotation === 270) {\n rotateAxis = 'flipVertical';\n }\n this.rotateValuesList[this.core.index][rotateAxis] *= -1;\n this.applyStyles();\n this.triggerEvents(lGEvents.flipHorizontal, {\n flipHorizontal: this.rotateValuesList[this.core.index][rotateAxis],\n });\n }\n\n flipVertical(): void {\n const rotateEl = this.core\n .getSlideItem(this.core.index)\n .find('.lg-img-rotate')\n .first()\n .get();\n const currentRotation = this.getCurrentRotation(rotateEl);\n let rotateAxis = 'flipVertical';\n if (currentRotation === 90 || currentRotation === 270) {\n rotateAxis = 'flipHorizontal';\n }\n this.rotateValuesList[this.core.index][rotateAxis] *= -1;\n\n this.applyStyles();\n\n this.triggerEvents(lGEvents.flipVertical, {\n flipVertical: this.rotateValuesList[this.core.index][rotateAxis],\n });\n }\n\n triggerEvents(event: string, detail: any): void {\n setTimeout(() => {\n this.core.LGel.trigger(event, detail);\n }, this.settings.rotateSpeed + 10);\n }\n\n isImageOrientationChanged(): boolean {\n const rotateValue = this.rotateValuesList[this.core.index];\n const isRotated = Math.abs(rotateValue.rotate) % 360 !== 0;\n const ifFlippedHor = rotateValue.flipHorizontal < 0;\n const ifFlippedVer = rotateValue.flipVertical < 0;\n return isRotated || ifFlippedHor || ifFlippedVer;\n }\n\n closeGallery(): void {\n if (this.isImageOrientationChanged()) {\n this.core.getSlideItem(this.core.index).css('opacity', 0);\n }\n this.rotateValuesList = {};\n }\n\n destroy(): void {\n // Unbind all events added by lightGallery rotate plugin\n this.core.LGel.off('.lg.rotate');\n this.core.LGel.off('.rotate');\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;;;;;AAKO,IAAM,QAAQ,GAEjB;IACA,gBAAgB,EAAE,oBAAoB;IACtC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,YAAY;IACtB,eAAe,EAAE,mBAAmB;IACpC,YAAY,EAAE,gBAAgB;IAC9B,kBAAkB,EAAE,sBAAsB;IAC1C,UAAU,EAAE,cAAc;IAC1B,SAAS,EAAE,aAAa;IACxB,aAAa,EAAE,iBAAiB;IAChC,WAAW,EAAE,eAAe;IAC5B,UAAU,EAAE,cAAc;IAC1B,WAAW,EAAE,eAAe;IAC5B,SAAS,EAAE,aAAa;IACxB,QAAQ,EAAE,YAAY;IACtB,OAAO,EAAE,WAAW;IACpB,eAAe,EAAE,mBAAmB;IACpC,eAAe,EAAE,mBAAmB;IACpC,WAAW,EAAE,eAAe;IAC5B,UAAU,EAAE,cAAc;IAC1B,UAAU,EAA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,WAAW,CAAC,MAAM,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC;QAC3D,IAAM,YAAY,GAAG,WAAW,CAAC,cAAc,GAAG,CAAC,CAAC;QACpD,IAAM,YAAY,GAAG,WAAW,CAAC,YAAY,GAAG,CAAC,CAAC;QAClD,OAAO,SAAS,IAAI,YAAY,IAAI,YAAY,CAAC;KACpD;IAED,6BAAY,GAAZ;QACI,IAAI,IAAI,CAAC,yBAAyB,EAAE,EAAE;YAClC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;SAC7D;QACD,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC;KAC9B;IAED,wBAAO,GAAP;;QAEI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QACjC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;KACjC;IACL,aAAC;AAAD,CAAC;;"} \ No newline at end of file diff --git a/assets/lightGallery/plugins/rotate/lg-rotate.min.js b/assets/lightGallery/plugins/rotate/lg-rotate.min.js new file mode 100644 index 0000000..9b3d4a8 --- /dev/null +++ b/assets/lightGallery/plugins/rotate/lg-rotate.min.js @@ -0,0 +1,8 @@ +/** + * lightgallery | 2.9.0 | October 1st 2025 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgRotate=e()}(this,(function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,i=1,o=arguments.length;i'),this.settings.flipHorizontal&&(t+=''),this.settings.rotateLeft&&(t+=''),this.settings.rotateRight&&(t+=''),this.core.$toolbar.append(t)},n.prototype.init=function(){var t=this;this.settings.rotate&&(this.buildTemplates(),this.rotateValuesList={},this.core.LGel.on(e+".rotate",(function(e){var i=e.detail.index;t.core.getSlideItem(i).find(".lg-img-rotate").get()||(t.core.getSlideItem(i).find(".lg-object").first().wrap("lg-img-rotate"),t.core.getSlideItem(t.core.index).find(".lg-img-rotate").css("transition-duration",t.settings.rotateSpeed+"ms"))})),this.core.outer.find("#lg-rotate-left").first().on("click.lg",this.rotateLeft.bind(this)),this.core.outer.find("#lg-rotate-right").first().on("click.lg",this.rotateRight.bind(this)),this.core.outer.find("#lg-flip-hor").first().on("click.lg",this.flipHorizontal.bind(this)),this.core.outer.find("#lg-flip-ver").first().on("click.lg",this.flipVertical.bind(this)),this.core.LGel.on(i+".rotate",(function(e){t.rotateValuesList[e.detail.index]||(t.rotateValuesList[e.detail.index]={rotate:0,flipHorizontal:1,flipVertical:1})})))},n.prototype.applyStyles=function(){this.core.getSlideItem(this.core.index).find(".lg-img-rotate").first().css("transform","rotate("+this.rotateValuesList[this.core.index].rotate+"deg) scale3d("+this.rotateValuesList[this.core.index].flipHorizontal+", "+this.rotateValuesList[this.core.index].flipVertical+", 1)")},n.prototype.rotateLeft=function(){this.rotateValuesList[this.core.index].rotate-=90,this.applyStyles(),this.triggerEvents(o,{rotate:this.rotateValuesList[this.core.index].rotate})},n.prototype.rotateRight=function(){this.rotateValuesList[this.core.index].rotate+=90,this.applyStyles(),this.triggerEvents(r,{rotate:this.rotateValuesList[this.core.index].rotate})},n.prototype.getCurrentRotation=function(t){if(!t)return 0;var e=this.$LG(t).style(),i=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("-moz-transform")||e.getPropertyValue("-ms-transform")||e.getPropertyValue("-o-transform")||e.getPropertyValue("transform")||"none";if("none"!==i){var o=i.split("(")[1].split(")")[0].split(",");if(o){var r=Math.round(Math.atan2(o[1],o[0])*(180/Math.PI));return r<0?r+360:r}}return 0},n.prototype.flipHorizontal=function(){var t=this.core.getSlideItem(this.core.index).find(".lg-img-rotate").first().get(),e=this.getCurrentRotation(t),i="flipHorizontal";90!==e&&270!==e||(i="flipVertical"),this.rotateValuesList[this.core.index][i]*=-1,this.applyStyles(),this.triggerEvents(s,{flipHorizontal:this.rotateValuesList[this.core.index][i]})},n.prototype.flipVertical=function(){var t=this.core.getSlideItem(this.core.index).find(".lg-img-rotate").first().get(),e=this.getCurrentRotation(t),i="flipVertical";90!==e&&270!==e||(i="flipHorizontal"),this.rotateValuesList[this.core.index][i]*=-1,this.applyStyles(),this.triggerEvents(a,{flipVertical:this.rotateValuesList[this.core.index][i]})},n.prototype.triggerEvents=function(t,e){var i=this;setTimeout((function(){i.core.LGel.trigger(t,e)}),this.settings.rotateSpeed+10)},n.prototype.isImageOrientationChanged=function(){var t=this.rotateValuesList[this.core.index],e=Math.abs(t.rotate)%360!=0,i=t.flipHorizontal<0,o=t.flipVertical<0;return e||i||o},n.prototype.closeGallery=function(){this.isImageOrientationChanged()&&this.core.getSlideItem(this.core.index).css("opacity",0),this.rotateValuesList={}},n.prototype.destroy=function(){this.core.LGel.off(".lg.rotate"),this.core.LGel.off(".rotate")},n}()})); diff --git a/assets/lightGallery/plugins/rotate/lg-rotate.umd.js b/assets/lightGallery/plugins/rotate/lg-rotate.umd.js new file mode 100644 index 0000000..85508af --- /dev/null +++ b/assets/lightGallery/plugins/rotate/lg-rotate.umd.js @@ -0,0 +1,282 @@ +/*! + * lightgallery | 2.9.0 | October 1st 2025 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgRotate = factory()); +}(this, (function () { 'use strict'; + + /*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */ + + var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); + }; + + /** + * List of lightGallery events + * All events should be documented here + * Below interfaces are used to build the website documentations + * */ + var lGEvents = { + afterAppendSlide: 'lgAfterAppendSlide', + init: 'lgInit', + hasVideo: 'lgHasVideo', + containerResize: 'lgContainerResize', + updateSlides: 'lgUpdateSlides', + afterAppendSubHtml: 'lgAfterAppendSubHtml', + beforeOpen: 'lgBeforeOpen', + afterOpen: 'lgAfterOpen', + slideItemLoad: 'lgSlideItemLoad', + beforeSlide: 'lgBeforeSlide', + afterSlide: 'lgAfterSlide', + posterClick: 'lgPosterClick', + dragStart: 'lgDragStart', + dragMove: 'lgDragMove', + dragEnd: 'lgDragEnd', + beforeNextSlide: 'lgBeforeNextSlide', + beforePrevSlide: 'lgBeforePrevSlide', + beforeClose: 'lgBeforeClose', + afterClose: 'lgAfterClose', + rotateLeft: 'lgRotateLeft', + rotateRight: 'lgRotateRight', + flipHorizontal: 'lgFlipHorizontal', + flipVertical: 'lgFlipVertical', + autoplay: 'lgAutoplay', + autoplayStart: 'lgAutoplayStart', + autoplayStop: 'lgAutoplayStop', + }; + + var rotateSettings = { + rotate: true, + rotateSpeed: 400, + rotateLeft: true, + rotateRight: true, + flipHorizontal: true, + flipVertical: true, + rotatePluginStrings: { + flipVertical: 'Flip vertical', + flipHorizontal: 'Flip horizontal', + rotateLeft: 'Rotate left', + rotateRight: 'Rotate right', + }, + }; + + var Rotate = /** @class */ (function () { + function Rotate(instance, $LG) { + // get lightGallery core plugin instance + this.core = instance; + this.$LG = $LG; + // extend module default settings with lightGallery core settings + this.settings = __assign(__assign({}, rotateSettings), this.core.settings); + return this; + } + Rotate.prototype.buildTemplates = function () { + var rotateIcons = ''; + if (this.settings.flipVertical) { + rotateIcons += ""; + } + if (this.settings.flipHorizontal) { + rotateIcons += ""; + } + if (this.settings.rotateLeft) { + rotateIcons += ""; + } + if (this.settings.rotateRight) { + rotateIcons += ""; + } + this.core.$toolbar.append(rotateIcons); + }; + Rotate.prototype.init = function () { + var _this = this; + if (!this.settings.rotate) { + return; + } + this.buildTemplates(); + // Save rotate config for each item to persist its rotate, flip values + // even after navigating to diferent slides + this.rotateValuesList = {}; + // event triggered after appending slide content + this.core.LGel.on(lGEvents.slideItemLoad + ".rotate", function (event) { + var index = event.detail.index; + var rotateEl = _this.core + .getSlideItem(index) + .find('.lg-img-rotate') + .get(); + if (!rotateEl) { + var imageWrap = _this.core + .getSlideItem(index) + .find('.lg-object') + .first(); + imageWrap.wrap('lg-img-rotate'); + //this.rotateValuesList[this.core.index] + _this.core + .getSlideItem(_this.core.index) + .find('.lg-img-rotate') + .css('transition-duration', _this.settings.rotateSpeed + 'ms'); + } + }); + this.core.outer + .find('#lg-rotate-left') + .first() + .on('click.lg', this.rotateLeft.bind(this)); + this.core.outer + .find('#lg-rotate-right') + .first() + .on('click.lg', this.rotateRight.bind(this)); + this.core.outer + .find('#lg-flip-hor') + .first() + .on('click.lg', this.flipHorizontal.bind(this)); + this.core.outer + .find('#lg-flip-ver') + .first() + .on('click.lg', this.flipVertical.bind(this)); + // Reset rotate on slide change + this.core.LGel.on(lGEvents.beforeSlide + ".rotate", function (event) { + if (!_this.rotateValuesList[event.detail.index]) { + _this.rotateValuesList[event.detail.index] = { + rotate: 0, + flipHorizontal: 1, + flipVertical: 1, + }; + } + }); + }; + Rotate.prototype.applyStyles = function () { + var $image = this.core + .getSlideItem(this.core.index) + .find('.lg-img-rotate') + .first(); + $image.css('transform', 'rotate(' + + this.rotateValuesList[this.core.index].rotate + + 'deg)' + + ' scale3d(' + + this.rotateValuesList[this.core.index].flipHorizontal + + ', ' + + this.rotateValuesList[this.core.index].flipVertical + + ', 1)'); + }; + Rotate.prototype.rotateLeft = function () { + this.rotateValuesList[this.core.index].rotate -= 90; + this.applyStyles(); + this.triggerEvents(lGEvents.rotateLeft, { + rotate: this.rotateValuesList[this.core.index].rotate, + }); + }; + Rotate.prototype.rotateRight = function () { + this.rotateValuesList[this.core.index].rotate += 90; + this.applyStyles(); + this.triggerEvents(lGEvents.rotateRight, { + rotate: this.rotateValuesList[this.core.index].rotate, + }); + }; + Rotate.prototype.getCurrentRotation = function (el) { + if (!el) { + return 0; + } + var st = this.$LG(el).style(); + var tm = st.getPropertyValue('-webkit-transform') || + st.getPropertyValue('-moz-transform') || + st.getPropertyValue('-ms-transform') || + st.getPropertyValue('-o-transform') || + st.getPropertyValue('transform') || + 'none'; + if (tm !== 'none') { + var values = tm.split('(')[1].split(')')[0].split(','); + if (values) { + var angle = Math.round(Math.atan2(values[1], values[0]) * (180 / Math.PI)); + return angle < 0 ? angle + 360 : angle; + } + } + return 0; + }; + Rotate.prototype.flipHorizontal = function () { + var rotateEl = this.core + .getSlideItem(this.core.index) + .find('.lg-img-rotate') + .first() + .get(); + var currentRotation = this.getCurrentRotation(rotateEl); + var rotateAxis = 'flipHorizontal'; + if (currentRotation === 90 || currentRotation === 270) { + rotateAxis = 'flipVertical'; + } + this.rotateValuesList[this.core.index][rotateAxis] *= -1; + this.applyStyles(); + this.triggerEvents(lGEvents.flipHorizontal, { + flipHorizontal: this.rotateValuesList[this.core.index][rotateAxis], + }); + }; + Rotate.prototype.flipVertical = function () { + var rotateEl = this.core + .getSlideItem(this.core.index) + .find('.lg-img-rotate') + .first() + .get(); + var currentRotation = this.getCurrentRotation(rotateEl); + var rotateAxis = 'flipVertical'; + if (currentRotation === 90 || currentRotation === 270) { + rotateAxis = 'flipHorizontal'; + } + this.rotateValuesList[this.core.index][rotateAxis] *= -1; + this.applyStyles(); + this.triggerEvents(lGEvents.flipVertical, { + flipVertical: this.rotateValuesList[this.core.index][rotateAxis], + }); + }; + Rotate.prototype.triggerEvents = function (event, detail) { + var _this = this; + setTimeout(function () { + _this.core.LGel.trigger(event, detail); + }, this.settings.rotateSpeed + 10); + }; + Rotate.prototype.isImageOrientationChanged = function () { + var rotateValue = this.rotateValuesList[this.core.index]; + var isRotated = Math.abs(rotateValue.rotate) % 360 !== 0; + var ifFlippedHor = rotateValue.flipHorizontal < 0; + var ifFlippedVer = rotateValue.flipVertical < 0; + return isRotated || ifFlippedHor || ifFlippedVer; + }; + Rotate.prototype.closeGallery = function () { + if (this.isImageOrientationChanged()) { + this.core.getSlideItem(this.core.index).css('opacity', 0); + } + this.rotateValuesList = {}; + }; + Rotate.prototype.destroy = function () { + // Unbind all events added by lightGallery rotate plugin + this.core.LGel.off('.lg.rotate'); + this.core.LGel.off('.rotate'); + }; + return Rotate; + }()); + + return Rotate; + +}))); +//# sourceMappingURL=lg-rotate.umd.js.map diff --git a/assets/lightGallery/plugins/rotate/lg-rotate.umd.js.map b/assets/lightGallery/plugins/rotate/lg-rotate.umd.js.map new file mode 100644 index 0000000..71a09bd --- /dev/null +++ b/assets/lightGallery/plugins/rotate/lg-rotate.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lg-rotate.umd.js","sources":["../../../src/lg-events.ts","../../../src/plugins/rotate/lg-rotate-settings.ts","../../../src/plugins/rotate/lg-rotate.ts"],"sourcesContent":["import { LightGallery } from './lightgallery';\nimport { VideoSource } from './plugins/video/types';\n\n/**\n * List of lightGallery events\n * All events should be documented here\n * Below interfaces are used to build the website documentations\n * */\nexport const lGEvents: {\n [key: string]: string;\n} = {\n afterAppendSlide: 'lgAfterAppendSlide',\n init: 'lgInit',\n hasVideo: 'lgHasVideo',\n containerResize: 'lgContainerResize',\n updateSlides: 'lgUpdateSlides',\n afterAppendSubHtml: 'lgAfterAppendSubHtml',\n beforeOpen: 'lgBeforeOpen',\n afterOpen: 'lgAfterOpen',\n slideItemLoad: 'lgSlideItemLoad',\n beforeSlide: 'lgBeforeSlide',\n afterSlide: 'lgAfterSlide',\n posterClick: 'lgPosterClick',\n dragStart: 'lgDragStart',\n dragMove: 'lgDragMove',\n dragEnd: 'lgDragEnd',\n beforeNextSlide: 'lgBeforeNextSlide',\n beforePrevSlide: 'lgBeforePrevSlide',\n beforeClose: 'lgBeforeClose',\n afterClose: 'lgAfterClose',\n rotateLeft: 'lgRotateLeft',\n rotateRight: 'lgRotateRight',\n flipHorizontal: 'lgFlipHorizontal',\n flipVertical: 'lgFlipVertical',\n autoplay: 'lgAutoplay',\n autoplayStart: 'lgAutoplayStart',\n autoplayStop: 'lgAutoplayStop',\n};\n\n// Follow the below format for the event documentation\n// @method is the method name when event is used with Angular/React components\n\n/**\n * Fired only once when lightGallery is initialized\n * @name lgInit\n * @method onInit\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action on lightGallery initialization.\n * // Init event returns the plugin instance that can be used to call any lightGalley public method\n * let pluginInstance = null;\n * lg.addEventListener('lgInit', (event) => {\n * pluginInstance = event.detail.instance;\n * });\n * lightGallery(lg);\n * @see
Methods\n */\nexport interface InitDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired when the slide content has been inserted into it's slide container.\n * @name lgAfterAppendSlide\n * @method onAfterAppendSlide\n */\nexport interface AfterAppendSlideEventDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired immediately before opening the gallery\n * @name lgBeforeOpen\n * @method onBeforeOpen\n */\nexport interface BeforeOpenDetail {}\n\n/**\n * Fired immediately after opening the gallery\n * @name lgAfterOpen\n * @method onAfterOpen\n */\nexport interface AfterOpenDetail {}\n\n/**\n * Fired once the media inside the slide has been completely loaded .\n * @name lgSlideItemLoad\n * @method onSlideItemLoad\n */\nexport interface SlideItemLoadDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * For the first slide, lightGallery adds some delay for displaying the loaded slide item.\n * This delay is required for the transition effect when the slide item is displayed\n * Respect the delay when you use this event\n */\n delay: number;\n\n // Will be true for the first slide\n isFirstSlide: boolean;\n}\n\n/**\n * Fired immediately before each slide transition.\n * @name lgBeforeSlide\n * @method onBeforeSlide\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action before each slide transition\n * lg.addEventListener('lgBeforeSlide', (event) => {\n * const { index, prevIndex } = event.detail;\n * alert(index, prevIndex);\n * });\n * lightGallery(lg);\n */\nexport interface BeforeSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired immediately after each slide transition.\n * @name lgAfterSlide\n * @method onAfterSlide\n */\nexport interface AfterSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired when the video poster is clicked.\n * @name lgPosterClick\n * @method onPosterClick\n */\nexport interface PosterClickDetail {}\n\n/**\n * Fired when the drag event to move to different slide starts.\n * @name lgDragStart\n * @method onDragStart\n */\nexport interface DragStartDetail {}\n\n/**\n * Fired periodically during the drag operation.\n * @name lgDragMove\n * @method onDragMove\n */\nexport interface DragMoveDetail {}\n\n/**\n * Fired when the user has finished the drag operation\n * @name lgDragEnd\n * @method onDragEnd\n */\nexport interface DragEndDetail {}\n\n/**\n * Fired immediately before the start of the close process.\n * @name lgBeforeClose\n * @method onBeforeClose\n */\nexport interface BeforeCloseDetail {}\n\n/**\n * Fired immediately once lightGallery is closed.\n * @name lgAfterClose\n * @method onAfterClose\n */\nexport interface AfterCloseDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired immediately before each \"next\" slide transition\n * @name lgBeforeNextSlide\n * @method onBeforeNextSlide\n */\nexport interface BeforeNextSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired immediately before each \"prev\" slide transition\n * @name lgBeforePrevSlide\n * @method onBeforePrevSlide\n */\nexport interface BeforePrevSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired when the sub-html content (ex : title/ description) has been appended into the slide.\n * @name lgAfterAppendSubHtml\n * @method onAfterAppendSubHtml\n */\nexport interface AfterAppendSubHtmlDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the lightGallery container has been resized.\n * @name lgContainerResize\n * @method onContainerResize\n */\nexport interface ContainerResizeDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when lightGallery detects video slide\n * @name lgHasVideo\n * @method onHasVideo\n */\nexport interface HasVideoDetail {\n /**\n * Index of the slide,\n */\n index: number;\n /**\n * Video source\n */\n src: string;\n /**\n * HTML5 video source if available\n *

\n HTML5 video source = source: {\n src: string;\n type: string;\n }[];\n attributes: HTMLVideoElement;\n *

\n */\n html5Video: VideoSource;\n /**\n * True if video has poster\n */\n hasPoster: boolean;\n}\n\n/**\n * Fired when the image is rotated in anticlockwise direction\n * @name lgRotateLeft\n * @method onRotateLeft\n */\nexport interface RotateLeftDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is rotated in clockwise direction\n * @name lgRotateRight\n * @method onRotateRight\n */\nexport interface RotateRightDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped horizontally\n * @name lgFlipHorizontal\n * @method onFlipHorizontal\n */\nexport interface FlipHorizontalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped vertically\n * @name lgFlipVertical\n * @method onFlipVertical\n */\nexport interface FlipVerticalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n","export interface RotateStrings {\n flipVertical: string;\n flipHorizontal: string;\n rotateLeft: string;\n rotateRight: string;\n}\n\nexport interface RotateSettings {\n /**\n * Enable/Disable rotate option\n */\n rotate: boolean;\n\n /**\n * Rotate speed in milliseconds\n */\n rotateSpeed: number;\n\n /**\n * Enable rotate left.\n */\n rotateLeft: boolean;\n\n /**\n * Enable rotate right.\n */\n rotateRight: boolean;\n\n /**\n * Enable flip horizontal.\n */\n flipHorizontal: boolean;\n\n /**\n * Enable flip vertical.\n */\n flipVertical: boolean;\n\n /**\n * Custom translation strings for aria-labels\n */\n rotatePluginStrings: RotateStrings;\n}\nexport const rotateSettings = {\n rotate: true,\n rotateSpeed: 400,\n rotateLeft: true,\n rotateRight: true,\n flipHorizontal: true,\n flipVertical: true,\n rotatePluginStrings: {\n flipVertical: 'Flip vertical',\n flipHorizontal: 'Flip horizontal',\n rotateLeft: 'Rotate left',\n rotateRight: 'Rotate right',\n } as RotateStrings,\n};\n","import { lGEvents } from '../../lg-events';\nimport { LgQuery } from '../../lgQuery';\nimport { LightGallery } from '../../lightgallery';\nimport { rotateSettings, RotateSettings } from './lg-rotate-settings';\n\nexport default class Rotate {\n core: LightGallery;\n settings: RotateSettings;\n rotateValuesList!: {\n [key: string]: any;\n };\n private $LG!: LgQuery;\n constructor(instance: LightGallery, $LG: LgQuery) {\n // get lightGallery core plugin instance\n this.core = instance;\n this.$LG = $LG;\n\n // extend module default settings with lightGallery core settings\n this.settings = {\n ...rotateSettings,\n ...this.core.settings,\n };\n\n return this;\n }\n buildTemplates(): void {\n let rotateIcons = '';\n if (this.settings.flipVertical) {\n rotateIcons += ``;\n }\n if (this.settings.flipHorizontal) {\n rotateIcons += ``;\n }\n if (this.settings.rotateLeft) {\n rotateIcons += ``;\n }\n if (this.settings.rotateRight) {\n rotateIcons += ``;\n }\n this.core.$toolbar.append(rotateIcons);\n }\n\n init(): void {\n if (!this.settings.rotate) {\n return;\n }\n this.buildTemplates();\n\n // Save rotate config for each item to persist its rotate, flip values\n // even after navigating to diferent slides\n this.rotateValuesList = {};\n\n // event triggered after appending slide content\n this.core.LGel.on(`${lGEvents.slideItemLoad}.rotate`, (event) => {\n const { index } = event.detail;\n\n const rotateEl = this.core\n .getSlideItem(index)\n .find('.lg-img-rotate')\n .get();\n if (!rotateEl) {\n const imageWrap = this.core\n .getSlideItem(index)\n .find('.lg-object')\n .first();\n\n imageWrap.wrap('lg-img-rotate');\n //this.rotateValuesList[this.core.index]\n this.core\n .getSlideItem(this.core.index)\n .find('.lg-img-rotate')\n .css(\n 'transition-duration',\n this.settings.rotateSpeed + 'ms',\n );\n }\n });\n\n this.core.outer\n .find('#lg-rotate-left')\n .first()\n .on('click.lg', this.rotateLeft.bind(this));\n\n this.core.outer\n .find('#lg-rotate-right')\n .first()\n .on('click.lg', this.rotateRight.bind(this));\n\n this.core.outer\n .find('#lg-flip-hor')\n .first()\n .on('click.lg', this.flipHorizontal.bind(this));\n\n this.core.outer\n .find('#lg-flip-ver')\n .first()\n .on('click.lg', this.flipVertical.bind(this));\n\n // Reset rotate on slide change\n this.core.LGel.on(`${lGEvents.beforeSlide}.rotate`, (event) => {\n if (!this.rotateValuesList[event.detail.index]) {\n this.rotateValuesList[event.detail.index] = {\n rotate: 0,\n flipHorizontal: 1,\n flipVertical: 1,\n };\n }\n });\n }\n\n applyStyles(): void {\n const $image = this.core\n .getSlideItem(this.core.index)\n .find('.lg-img-rotate')\n .first();\n\n $image.css(\n 'transform',\n 'rotate(' +\n this.rotateValuesList[this.core.index].rotate +\n 'deg)' +\n ' scale3d(' +\n this.rotateValuesList[this.core.index].flipHorizontal +\n ', ' +\n this.rotateValuesList[this.core.index].flipVertical +\n ', 1)',\n );\n }\n\n rotateLeft(): void {\n this.rotateValuesList[this.core.index].rotate -= 90;\n this.applyStyles();\n this.triggerEvents(lGEvents.rotateLeft, {\n rotate: this.rotateValuesList[this.core.index].rotate,\n });\n }\n\n rotateRight(): void {\n this.rotateValuesList[this.core.index].rotate += 90;\n this.applyStyles();\n this.triggerEvents(lGEvents.rotateRight, {\n rotate: this.rotateValuesList[this.core.index].rotate,\n });\n }\n\n getCurrentRotation(el: HTMLElement): number {\n if (!el) {\n return 0;\n }\n const st = this.$LG(el).style();\n const tm =\n st.getPropertyValue('-webkit-transform') ||\n st.getPropertyValue('-moz-transform') ||\n st.getPropertyValue('-ms-transform') ||\n st.getPropertyValue('-o-transform') ||\n st.getPropertyValue('transform') ||\n 'none';\n if (tm !== 'none') {\n const values = tm.split('(')[1].split(')')[0].split(',') as any;\n if (values) {\n const angle = Math.round(\n Math.atan2(values[1], values[0]) * (180 / Math.PI),\n );\n return angle < 0 ? angle + 360 : angle;\n }\n }\n return 0;\n }\n\n flipHorizontal(): void {\n const rotateEl = this.core\n .getSlideItem(this.core.index)\n .find('.lg-img-rotate')\n .first()\n .get();\n const currentRotation = this.getCurrentRotation(rotateEl);\n let rotateAxis = 'flipHorizontal';\n if (currentRotation === 90 || currentRotation === 270) {\n rotateAxis = 'flipVertical';\n }\n this.rotateValuesList[this.core.index][rotateAxis] *= -1;\n this.applyStyles();\n this.triggerEvents(lGEvents.flipHorizontal, {\n flipHorizontal: this.rotateValuesList[this.core.index][rotateAxis],\n });\n }\n\n flipVertical(): void {\n const rotateEl = this.core\n .getSlideItem(this.core.index)\n .find('.lg-img-rotate')\n .first()\n .get();\n const currentRotation = this.getCurrentRotation(rotateEl);\n let rotateAxis = 'flipVertical';\n if (currentRotation === 90 || currentRotation === 270) {\n rotateAxis = 'flipHorizontal';\n }\n this.rotateValuesList[this.core.index][rotateAxis] *= -1;\n\n this.applyStyles();\n\n this.triggerEvents(lGEvents.flipVertical, {\n flipVertical: this.rotateValuesList[this.core.index][rotateAxis],\n });\n }\n\n triggerEvents(event: string, detail: any): void {\n setTimeout(() => {\n this.core.LGel.trigger(event, detail);\n }, this.settings.rotateSpeed + 10);\n }\n\n isImageOrientationChanged(): boolean {\n const rotateValue = this.rotateValuesList[this.core.index];\n const isRotated = Math.abs(rotateValue.rotate) % 360 !== 0;\n const ifFlippedHor = rotateValue.flipHorizontal < 0;\n const ifFlippedVer = rotateValue.flipVertical < 0;\n return isRotated || ifFlippedHor || ifFlippedVer;\n }\n\n closeGallery(): void {\n if (this.isImageOrientationChanged()) {\n this.core.getSlideItem(this.core.index).css('opacity', 0);\n }\n this.rotateValuesList = {};\n }\n\n destroy(): void {\n // Unbind all events added by lightGallery rotate plugin\n this.core.LGel.off('.lg.rotate');\n this.core.LGel.off('.rotate');\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGA;;;;;IAKO,IAAM,QAAQ,GAEjB;QACA,gBAAgB,EAAE,oBAAoB;QACtC,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,YAAY;QACtB,eAAe,EAAE,mBAAmB;QACpC,YAAY,EAAE,gBAAgB;QAC9B,kBAAkB,EAAE,sBAAsB;QAC1C,UAAU,EAAE,cAAc;QAC1B,SAAS,EAAE,aAAa;QACxB,aAAa,EAAE,iBAAiB;QAChC,WAAW,EAAE,eAAe;QAC5B,UAAU,EAAE,cAAc;QAC1B,WAAW,EAAE,eAAe;QAC5B,SAAS,EAAE,aAAa;QACxB,QAAQ,EAAE,YAAY;QACtB,OAAO,EAAE,WAAW;QACpB,eAAe,EAAE,mBAAmB;QACpC,eAAe,EAAE,mBAAmB;QACpC,WAAW,EAAE,eAAe;QAC5B,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE,cAAc;QAC1B,WAAW,EAAE,eAAe;QAC5B,cAAc,EA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I,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC;YAC3D,IAAM,YAAY,GAAG,WAAW,CAAC,cAAc,GAAG,CAAC,CAAC;YACpD,IAAM,YAAY,GAAG,WAAW,CAAC,YAAY,GAAG,CAAC,CAAC;YAClD,OAAO,SAAS,IAAI,YAAY,IAAI,YAAY,CAAC;SACpD;QAED,6BAAY,GAAZ;YACI,IAAI,IAAI,CAAC,yBAAyB,EAAE,EAAE;gBAClC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;aAC7D;YACD,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC;SAC9B;QAED,wBAAO,GAAP;;YAEI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;YACjC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;SACjC;QACL,aAAC;IAAD,CAAC;;;;"} \ No newline at end of file diff --git a/assets/lightGallery/plugins/rotate/package.json b/assets/lightGallery/plugins/rotate/package.json new file mode 100644 index 0000000..003056f --- /dev/null +++ b/assets/lightGallery/plugins/rotate/package.json @@ -0,0 +1,7 @@ +{ + "name": "lightgallery/plugins/rotate", + "private": true, + "main": "lg-rotate.umd.js", + "module": "lg-rotate.es5.js", + "typings": "lg-rotate.d.ts" +} \ No newline at end of file diff --git a/assets/lightGallery/plugins/share/lg-fb-share-utils.d.ts b/assets/lightGallery/plugins/share/lg-fb-share-utils.d.ts new file mode 100644 index 0000000..0eb2bf4 --- /dev/null +++ b/assets/lightGallery/plugins/share/lg-fb-share-utils.d.ts @@ -0,0 +1,2 @@ +import { GalleryItem } from '../../lg-utils'; +export declare function getFacebookShareLink(galleryItem: GalleryItem): string; diff --git a/assets/lightGallery/plugins/share/lg-pinterest-share-utils.d.ts b/assets/lightGallery/plugins/share/lg-pinterest-share-utils.d.ts new file mode 100644 index 0000000..4233ce4 --- /dev/null +++ b/assets/lightGallery/plugins/share/lg-pinterest-share-utils.d.ts @@ -0,0 +1,2 @@ +import { GalleryItem } from '../../lg-utils'; +export declare function getPinterestShareLink(galleryItem: GalleryItem): string; diff --git a/assets/lightGallery/plugins/share/lg-share-settings.d.ts b/assets/lightGallery/plugins/share/lg-share-settings.d.ts new file mode 100644 index 0000000..85f47e3 --- /dev/null +++ b/assets/lightGallery/plugins/share/lg-share-settings.d.ts @@ -0,0 +1,57 @@ +import { ShareOption } from './types'; +export interface ShareStrings { + share: string; +} +export interface ShareSettings { + /** + * Enable/Disable share options + */ + share: boolean; + /** + * Enable Facebook share. + */ + facebook: boolean; + /** + * Facebook dropdown text. + */ + facebookDropdownText: string; + /** + * Enable twitter share. + */ + twitter: boolean; + /** + * Twitter dropdown text + */ + twitterDropdownText: string; + /** + * Enable pinterest share. + */ + pinterest: boolean; + /** + * Pinterest dropdown text + + */ + pinterestDropdownText: string; + /** + * Array of additional share options + * + * This can be used to build additional share options. + *
Demo + */ + additionalShareOptions: ShareOption[]; + /** + * Custom translation strings for aria-labels + */ + sharePluginStrings: ShareStrings; +} +export declare const shareSettings: { + share: boolean; + facebook: boolean; + facebookDropdownText: string; + twitter: boolean; + twitterDropdownText: string; + pinterest: boolean; + pinterestDropdownText: string; + additionalShareOptions: never[]; + sharePluginStrings: ShareStrings; +}; diff --git a/assets/lightGallery/plugins/share/lg-share.d.ts b/assets/lightGallery/plugins/share/lg-share.d.ts new file mode 100644 index 0000000..a91d6ce --- /dev/null +++ b/assets/lightGallery/plugins/share/lg-share.d.ts @@ -0,0 +1,15 @@ +import { ShareSettings } from './lg-share-settings'; +import { LightGallery } from '../../lightgallery'; +export default class Share { + core: LightGallery; + settings: ShareSettings; + private shareOptions; + constructor(instance: LightGallery); + init(): void; + private getShareListHtml; + setLgShareMarkup(): void; + private onAfterSlide; + private getShareListItemHTML; + private getDefaultShareOptions; + destroy(): void; +} diff --git a/assets/lightGallery/plugins/share/lg-share.es5.js b/assets/lightGallery/plugins/share/lg-share.es5.js new file mode 100644 index 0000000..b895745 --- /dev/null +++ b/assets/lightGallery/plugins/share/lg-share.es5.js @@ -0,0 +1,219 @@ +/*! + * lightgallery | 2.9.0 | October 1st 2025 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; + +function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +} + +var shareSettings = { + share: true, + facebook: true, + facebookDropdownText: 'Facebook', + twitter: true, + twitterDropdownText: 'Twitter', + pinterest: true, + pinterestDropdownText: 'Pinterest', + additionalShareOptions: [], + sharePluginStrings: { share: 'Share' }, +}; + +function getFacebookShareLink(galleryItem) { + var facebookBaseUrl = '//www.facebook.com/sharer/sharer.php?u='; + return (facebookBaseUrl + + encodeURIComponent(galleryItem.facebookShareUrl || window.location.href)); +} + +function getTwitterShareLink(galleryItem) { + var twitterBaseUrl = '//twitter.com/intent/tweet?text='; + var url = encodeURIComponent(galleryItem.twitterShareUrl || window.location.href); + var text = galleryItem.tweetText; + return twitterBaseUrl + text + '&url=' + url; +} + +function getPinterestShareLink(galleryItem) { + var pinterestBaseUrl = 'http://www.pinterest.com/pin/create/button/?url='; + var description = galleryItem.pinterestText; + var media = encodeURIComponent(galleryItem.src); + var url = encodeURIComponent(galleryItem.pinterestShareUrl || window.location.href); + return (pinterestBaseUrl + + url + + '&media=' + + media + + '&description=' + + description); +} + +/** + * List of lightGallery events + * All events should be documented here + * Below interfaces are used to build the website documentations + * */ +var lGEvents = { + afterAppendSlide: 'lgAfterAppendSlide', + init: 'lgInit', + hasVideo: 'lgHasVideo', + containerResize: 'lgContainerResize', + updateSlides: 'lgUpdateSlides', + afterAppendSubHtml: 'lgAfterAppendSubHtml', + beforeOpen: 'lgBeforeOpen', + afterOpen: 'lgAfterOpen', + slideItemLoad: 'lgSlideItemLoad', + beforeSlide: 'lgBeforeSlide', + afterSlide: 'lgAfterSlide', + posterClick: 'lgPosterClick', + dragStart: 'lgDragStart', + dragMove: 'lgDragMove', + dragEnd: 'lgDragEnd', + beforeNextSlide: 'lgBeforeNextSlide', + beforePrevSlide: 'lgBeforePrevSlide', + beforeClose: 'lgBeforeClose', + afterClose: 'lgAfterClose', + rotateLeft: 'lgRotateLeft', + rotateRight: 'lgRotateRight', + flipHorizontal: 'lgFlipHorizontal', + flipVertical: 'lgFlipVertical', + autoplay: 'lgAutoplay', + autoplayStart: 'lgAutoplayStart', + autoplayStop: 'lgAutoplayStop', +}; + +var Share = /** @class */ (function () { + function Share(instance) { + this.shareOptions = []; + // get lightGallery core plugin instance + this.core = instance; + // extend module default settings with lightGallery core settings + this.settings = __assign(__assign({}, shareSettings), this.core.settings); + return this; + } + Share.prototype.init = function () { + if (!this.settings.share) { + return; + } + this.shareOptions = __spreadArrays(this.getDefaultShareOptions(), this.settings.additionalShareOptions); + this.setLgShareMarkup(); + this.core.outer + .find('.lg-share .lg-dropdown') + .append(this.getShareListHtml()); + this.core.LGel.on(lGEvents.afterSlide + ".share", this.onAfterSlide.bind(this)); + }; + Share.prototype.getShareListHtml = function () { + var shareHtml = ''; + this.shareOptions.forEach(function (shareOption) { + shareHtml += shareOption.dropdownHTML; + }); + return shareHtml; + }; + Share.prototype.setLgShareMarkup = function () { + var _this = this; + this.core.$toolbar.append(""); + this.core.outer.append('
'); + var $shareButton = this.core.outer.find('.lg-share'); + $shareButton.first().on('click.lg', function () { + _this.core.outer.toggleClass('lg-dropdown-active'); + if (_this.core.outer.hasClass('lg-dropdown-active')) { + _this.core.outer.attr('aria-expanded', true); + } + else { + _this.core.outer.attr('aria-expanded', false); + } + }); + this.core.outer + .find('.lg-dropdown-overlay') + .first() + .on('click.lg', function () { + _this.core.outer.removeClass('lg-dropdown-active'); + _this.core.outer.attr('aria-expanded', false); + }); + }; + Share.prototype.onAfterSlide = function (event) { + var _this = this; + var index = event.detail.index; + var currentItem = this.core.galleryItems[index]; + setTimeout(function () { + _this.shareOptions.forEach(function (shareOption) { + var selector = shareOption.selector; + _this.core.outer + .find(selector) + .attr('href', shareOption.generateLink(currentItem)); + }); + }, 100); + }; + Share.prototype.getShareListItemHTML = function (type, text) { + return "
  • " + text + "
  • "; + }; + Share.prototype.getDefaultShareOptions = function () { + return __spreadArrays((this.settings.facebook + ? [ + { + type: 'facebook', + generateLink: getFacebookShareLink, + dropdownHTML: this.getShareListItemHTML('facebook', this.settings.facebookDropdownText), + selector: '.lg-share-facebook', + }, + ] + : []), (this.settings.twitter + ? [ + { + type: 'twitter', + generateLink: getTwitterShareLink, + dropdownHTML: this.getShareListItemHTML('twitter', this.settings.twitterDropdownText), + selector: '.lg-share-twitter', + }, + ] + : []), (this.settings.pinterest + ? [ + { + type: 'pinterest', + generateLink: getPinterestShareLink, + dropdownHTML: this.getShareListItemHTML('pinterest', this.settings.pinterestDropdownText), + selector: '.lg-share-pinterest', + }, + ] + : [])); + }; + Share.prototype.destroy = function () { + this.core.outer.find('.lg-dropdown-overlay').remove(); + this.core.outer.find('.lg-share').remove(); + this.core.LGel.off('.lg.share'); + this.core.LGel.off('.share'); + }; + return Share; +}()); + +export default Share; +//# sourceMappingURL=lg-share.es5.js.map diff --git a/assets/lightGallery/plugins/share/lg-share.es5.js.map b/assets/lightGallery/plugins/share/lg-share.es5.js.map new file mode 100644 index 0000000..7c2fab8 --- /dev/null +++ b/assets/lightGallery/plugins/share/lg-share.es5.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lg-share.es5.js","sources":["../../../src/plugins/share/lg-share-settings.ts","../../../src/plugins/share/lg-fb-share-utils.ts","../../../src/plugins/share/lg-twitter-share-utils.ts","../../../src/plugins/share/lg-pinterest-share-utils.ts","../../../src/lg-events.ts","../../../src/plugins/share/lg-share.ts"],"sourcesContent":["import { ShareOption } from './types';\n\nexport interface ShareStrings {\n share: string;\n}\n\nexport interface ShareSettings {\n /**\n * Enable/Disable share options\n */\n share: boolean;\n\n /**\n * Enable Facebook share.\n */\n facebook: boolean;\n\n /**\n * Facebook dropdown text.\n */\n facebookDropdownText: string;\n\n /**\n * Enable twitter share.\n */\n twitter: boolean;\n\n /**\n * Twitter dropdown text\n */\n twitterDropdownText: string;\n\n /**\n * Enable pinterest share.\n */\n pinterest: boolean;\n\n /**\n * Pinterest dropdown text\n\n */\n pinterestDropdownText: string;\n\n /**\n * Array of additional share options\n *\n * This can be used to build additional share options.\n * Demo\n */\n additionalShareOptions: ShareOption[];\n\n /**\n * Custom translation strings for aria-labels\n */\n sharePluginStrings: ShareStrings;\n}\n\nexport const shareSettings = {\n share: true,\n facebook: true,\n facebookDropdownText: 'Facebook',\n twitter: true,\n twitterDropdownText: 'Twitter',\n pinterest: true,\n pinterestDropdownText: 'Pinterest',\n additionalShareOptions: [],\n sharePluginStrings: { share: 'Share' } as ShareStrings,\n};\n","import { GalleryItem } from '../../lg-utils';\n\nexport function getFacebookShareLink(galleryItem: GalleryItem): string {\n const facebookBaseUrl = '//www.facebook.com/sharer/sharer.php?u=';\n return (\n facebookBaseUrl +\n encodeURIComponent(galleryItem.facebookShareUrl || window.location.href)\n );\n}\n","import { GalleryItem } from '../../lg-utils';\n\nexport function getTwitterShareLink(galleryItem: GalleryItem): string {\n const twitterBaseUrl = '//twitter.com/intent/tweet?text=';\n const url = encodeURIComponent(\n galleryItem.twitterShareUrl || window.location.href,\n );\n const text = galleryItem.tweetText;\n return twitterBaseUrl + text + '&url=' + url;\n}\n","import { GalleryItem } from '../../lg-utils';\n\nexport function getPinterestShareLink(galleryItem: GalleryItem): string {\n const pinterestBaseUrl = 'http://www.pinterest.com/pin/create/button/?url=';\n const description = galleryItem.pinterestText;\n const media = encodeURIComponent(galleryItem.src as string);\n const url = encodeURIComponent(\n galleryItem.pinterestShareUrl || window.location.href,\n );\n return (\n pinterestBaseUrl +\n url +\n '&media=' +\n media +\n '&description=' +\n description\n );\n}\n","import { LightGallery } from './lightgallery';\nimport { VideoSource } from './plugins/video/types';\n\n/**\n * List of lightGallery events\n * All events should be documented here\n * Below interfaces are used to build the website documentations\n * */\nexport const lGEvents: {\n [key: string]: string;\n} = {\n afterAppendSlide: 'lgAfterAppendSlide',\n init: 'lgInit',\n hasVideo: 'lgHasVideo',\n containerResize: 'lgContainerResize',\n updateSlides: 'lgUpdateSlides',\n afterAppendSubHtml: 'lgAfterAppendSubHtml',\n beforeOpen: 'lgBeforeOpen',\n afterOpen: 'lgAfterOpen',\n slideItemLoad: 'lgSlideItemLoad',\n beforeSlide: 'lgBeforeSlide',\n afterSlide: 'lgAfterSlide',\n posterClick: 'lgPosterClick',\n dragStart: 'lgDragStart',\n dragMove: 'lgDragMove',\n dragEnd: 'lgDragEnd',\n beforeNextSlide: 'lgBeforeNextSlide',\n beforePrevSlide: 'lgBeforePrevSlide',\n beforeClose: 'lgBeforeClose',\n afterClose: 'lgAfterClose',\n rotateLeft: 'lgRotateLeft',\n rotateRight: 'lgRotateRight',\n flipHorizontal: 'lgFlipHorizontal',\n flipVertical: 'lgFlipVertical',\n autoplay: 'lgAutoplay',\n autoplayStart: 'lgAutoplayStart',\n autoplayStop: 'lgAutoplayStop',\n};\n\n// Follow the below format for the event documentation\n// @method is the method name when event is used with Angular/React components\n\n/**\n * Fired only once when lightGallery is initialized\n * @name lgInit\n * @method onInit\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action on lightGallery initialization.\n * // Init event returns the plugin instance that can be used to call any lightGalley public method\n * let pluginInstance = null;\n * lg.addEventListener('lgInit', (event) => {\n * pluginInstance = event.detail.instance;\n * });\n * lightGallery(lg);\n * @see Methods\n */\nexport interface InitDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired when the slide content has been inserted into it's slide container.\n * @name lgAfterAppendSlide\n * @method onAfterAppendSlide\n */\nexport interface AfterAppendSlideEventDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired immediately before opening the gallery\n * @name lgBeforeOpen\n * @method onBeforeOpen\n */\nexport interface BeforeOpenDetail {}\n\n/**\n * Fired immediately after opening the gallery\n * @name lgAfterOpen\n * @method onAfterOpen\n */\nexport interface AfterOpenDetail {}\n\n/**\n * Fired once the media inside the slide has been completely loaded .\n * @name lgSlideItemLoad\n * @method onSlideItemLoad\n */\nexport interface SlideItemLoadDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * For the first slide, lightGallery adds some delay for displaying the loaded slide item.\n * This delay is required for the transition effect when the slide item is displayed\n * Respect the delay when you use this event\n */\n delay: number;\n\n // Will be true for the first slide\n isFirstSlide: boolean;\n}\n\n/**\n * Fired immediately before each slide transition.\n * @name lgBeforeSlide\n * @method onBeforeSlide\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action before each slide transition\n * lg.addEventListener('lgBeforeSlide', (event) => {\n * const { index, prevIndex } = event.detail;\n * alert(index, prevIndex);\n * });\n * lightGallery(lg);\n */\nexport interface BeforeSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired immediately after each slide transition.\n * @name lgAfterSlide\n * @method onAfterSlide\n */\nexport interface AfterSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired when the video poster is clicked.\n * @name lgPosterClick\n * @method onPosterClick\n */\nexport interface PosterClickDetail {}\n\n/**\n * Fired when the drag event to move to different slide starts.\n * @name lgDragStart\n * @method onDragStart\n */\nexport interface DragStartDetail {}\n\n/**\n * Fired periodically during the drag operation.\n * @name lgDragMove\n * @method onDragMove\n */\nexport interface DragMoveDetail {}\n\n/**\n * Fired when the user has finished the drag operation\n * @name lgDragEnd\n * @method onDragEnd\n */\nexport interface DragEndDetail {}\n\n/**\n * Fired immediately before the start of the close process.\n * @name lgBeforeClose\n * @method onBeforeClose\n */\nexport interface BeforeCloseDetail {}\n\n/**\n * Fired immediately once lightGallery is closed.\n * @name lgAfterClose\n * @method onAfterClose\n */\nexport interface AfterCloseDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired immediately before each \"next\" slide transition\n * @name lgBeforeNextSlide\n * @method onBeforeNextSlide\n */\nexport interface BeforeNextSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired immediately before each \"prev\" slide transition\n * @name lgBeforePrevSlide\n * @method onBeforePrevSlide\n */\nexport interface BeforePrevSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired when the sub-html content (ex : title/ description) has been appended into the slide.\n * @name lgAfterAppendSubHtml\n * @method onAfterAppendSubHtml\n */\nexport interface AfterAppendSubHtmlDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the lightGallery container has been resized.\n * @name lgContainerResize\n * @method onContainerResize\n */\nexport interface ContainerResizeDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when lightGallery detects video slide\n * @name lgHasVideo\n * @method onHasVideo\n */\nexport interface HasVideoDetail {\n /**\n * Index of the slide,\n */\n index: number;\n /**\n * Video source\n */\n src: string;\n /**\n * HTML5 video source if available\n *

    \n HTML5 video source = source: {\n src: string;\n type: string;\n }[];\n attributes: HTMLVideoElement;\n *

    \n */\n html5Video: VideoSource;\n /**\n * True if video has poster\n */\n hasPoster: boolean;\n}\n\n/**\n * Fired when the image is rotated in anticlockwise direction\n * @name lgRotateLeft\n * @method onRotateLeft\n */\nexport interface RotateLeftDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is rotated in clockwise direction\n * @name lgRotateRight\n * @method onRotateRight\n */\nexport interface RotateRightDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped horizontally\n * @name lgFlipHorizontal\n * @method onFlipHorizontal\n */\nexport interface FlipHorizontalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped vertically\n * @name lgFlipVertical\n * @method onFlipVertical\n */\nexport interface FlipVerticalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n","import { ShareSettings, shareSettings } from './lg-share-settings';\n\nimport { getFacebookShareLink } from './lg-fb-share-utils';\nimport { getTwitterShareLink } from './lg-twitter-share-utils';\nimport { getPinterestShareLink } from './lg-pinterest-share-utils';\nimport { LightGallery } from '../../lightgallery';\nimport { lGEvents } from '../../lg-events';\nimport { ShareOption } from './types';\n\ninterface DefaultShareOptions extends ShareOption {\n type: string;\n}\nexport default class Share {\n core: LightGallery;\n settings: ShareSettings;\n private shareOptions: ShareOption[] = [];\n constructor(instance: LightGallery) {\n // get lightGallery core plugin instance\n this.core = instance;\n\n // extend module default settings with lightGallery core settings\n this.settings = { ...shareSettings, ...this.core.settings };\n return this;\n }\n\n public init(): void {\n if (!this.settings.share) {\n return;\n }\n this.shareOptions = [\n ...this.getDefaultShareOptions(),\n ...this.settings.additionalShareOptions,\n ];\n this.setLgShareMarkup();\n this.core.outer\n .find('.lg-share .lg-dropdown')\n .append(this.getShareListHtml());\n\n this.core.LGel.on(\n `${lGEvents.afterSlide}.share`,\n this.onAfterSlide.bind(this),\n );\n }\n\n private getShareListHtml() {\n let shareHtml = '';\n this.shareOptions.forEach((shareOption) => {\n shareHtml += shareOption.dropdownHTML;\n });\n\n return shareHtml;\n }\n\n setLgShareMarkup(): void {\n this.core.$toolbar.append(\n ``,\n );\n\n this.core.outer.append('
    ');\n const $shareButton = this.core.outer.find('.lg-share');\n $shareButton.first().on('click.lg', () => {\n this.core.outer.toggleClass('lg-dropdown-active');\n if (this.core.outer.hasClass('lg-dropdown-active')) {\n this.core.outer.attr('aria-expanded', true);\n } else {\n this.core.outer.attr('aria-expanded', false);\n }\n });\n\n this.core.outer\n .find('.lg-dropdown-overlay')\n .first()\n .on('click.lg', () => {\n this.core.outer.removeClass('lg-dropdown-active');\n this.core.outer.attr('aria-expanded', false);\n });\n }\n\n private onAfterSlide(event: CustomEvent) {\n const { index } = event.detail;\n const currentItem = this.core.galleryItems[index];\n setTimeout(() => {\n this.shareOptions.forEach((shareOption) => {\n const selector = shareOption.selector;\n this.core.outer\n .find(selector)\n .attr('href', shareOption.generateLink(currentItem));\n });\n }, 100);\n }\n\n private getShareListItemHTML(type: string, text: string): string {\n return `
  • ${text}
  • `;\n }\n\n private getDefaultShareOptions(): DefaultShareOptions[] {\n return [\n ...(this.settings.facebook\n ? [\n {\n type: 'facebook',\n generateLink: getFacebookShareLink,\n dropdownHTML: this.getShareListItemHTML(\n 'facebook',\n this.settings.facebookDropdownText,\n ),\n selector: '.lg-share-facebook',\n },\n ]\n : []),\n ...(this.settings.twitter\n ? [\n {\n type: 'twitter',\n generateLink: getTwitterShareLink,\n dropdownHTML: this.getShareListItemHTML(\n 'twitter',\n this.settings.twitterDropdownText,\n ),\n selector: '.lg-share-twitter',\n },\n ]\n : []),\n ...(this.settings.pinterest\n ? [\n {\n type: 'pinterest',\n generateLink: getPinterestShareLink,\n dropdownHTML: this.getShareListItemHTML(\n 'pinterest',\n this.settings.pinterestDropdownText,\n ),\n selector: '.lg-share-pinterest',\n },\n ]\n : []),\n ];\n }\n\n public destroy(): void {\n this.core.outer.find('.lg-dropdown-overlay').remove();\n this.core.outer.find('.lg-share').remove();\n this.core.LGel.off('.lg.share');\n this.core.LGel.off('.share');\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDO,IAAM,aAAa,GAAG;IACzB,KAAK,EAAE,IAAI;IACX,QAAQ,EAAE,IAAI;IACd,oBAAoB,EAAE,UAAU;IAChC,OAAO,EAAE,IAAI;IACb,mBAAmB,EAAE,SAAS;IAC9B,SAAS,EAAE,IAAI;IACf,qBAAqB,EAAE,WAAW;IAClC,sBAAsB,EAAE,EAAE;IAC1B,kBAAkB,EAAE,EAAE,KAAK,EAAE,OAAO,EAAkB;CACzD;;SCjEe,oBAAoB,CAAC,WAAwB;IACzD,IAAM,eAAe,GAAG,yCAAyC,CAAC;IAClE,QACI,eAAe;QACf,kBAAkB,CAAC,WAAW,CAAC,gBAAgB,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,EAC1E;AACN;;SCNgB,mBAAmB,CAAC,WAAwB;IACxD,IAAM,cAAc,GAA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AAE,CAAC;QAC3C,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QAChC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;KAChC;IACL,YAAC;AAAD,CAAC;;"} \ No newline at end of file diff --git a/assets/lightGallery/plugins/share/lg-share.min.js b/assets/lightGallery/plugins/share/lg-share.min.js new file mode 100644 index 0000000..e7b7c0b --- /dev/null +++ b/assets/lightGallery/plugins/share/lg-share.min.js @@ -0,0 +1,8 @@ +/** + * lightgallery | 2.9.0 | October 1st 2025 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgShare=e()}(this,(function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,r=1,o=arguments.length;r