Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fslightbox

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fslightbox - npm Package Compare versions

Comparing version 1.4.3 to 1.4.4

2

fslightbox.min.js

@@ -1,1 +0,1 @@

!function(){return function e(t,i,s){function n(o,r){if(!i[o]){if(!t[o]){var d="function"==typeof require&&require;if(!r&&d)return d(o,!0);if(a)return a(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=i[o]={exports:{}};t[o][0].call(c.exports,function(e){return n(t[o][1][e]||e)},c,c.exports,e,t,i,s)}return i[o].exports}for(var a="function"==typeof require&&require,o=0;o<s.length;o++)n(s[o]);return n}}()({1:[function(e,t,i){t.exports={loader:'<div class="lds-ring"><div></div><div></div><div></div><div></div></div>',DOMObject:"",createHolder:function(e,t){let i=new this.DOMObject("div").addClassesAndCreate(["fslightbox-source-holder"]);return i.innerHTML=this.loader,e.data.sources[t]=i,i},renderHolderInitial:function(e,t,i){this.DOMObject=i;const s=e.getSourcesIndexes.all(t),n=e.data.total_slides;if(n>=3){const t=this.createHolder(e,s.previous);e.transforms.transformMinus(t),e.data.mediaHolder.holder.appendChild(t)}if(n>=1){const t=this.createHolder(e,s.current);e.data.mediaHolder.holder.appendChild(t)}if(n>=2){const t=this.createHolder(e,s.next);e.transforms.transformPlus(t),e.data.mediaHolder.holder.appendChild(t)}},renderHolder:function(e,t,i){switch(i){case"previous":this.renderHolderPrevious(e,t);break;case"current":this.renderHolderCurrent(e,t);break;case"next":this.renderHolderNext(e,t)}},renderHolderPrevious:function(e,t){const i=e.getSourcesIndexes.previous(t),s=this.createHolder(e,i);e.transforms.transformMinus(s),e.data.mediaHolder.holder.insertAdjacentElement("afterbegin",s)},renderHolderNext:function(e,t){const i=e.getSourcesIndexes.next(t),s=this.createHolder(e,i);e.transforms.transformPlus(s),e.data.mediaHolder.holder.appendChild(s)},renderHolderCurrent:function(e,t){const i=e.getSourcesIndexes.all(t),s=this.createHolder(e,i.current);e.transforms.transformNull(s),e.data.mediaHolder.holder.insertBefore(s,e.data.sources[i.next])},previousSlideViaButton:function(e,t){1===t?e.data.slide=e.data.total_slides:e.data.slide-=1,e.stopVideos(),e.data.updateSlideNumber(e.data.slide);const i=e.getSourcesIndexes.all(e.data.slide);void 0===e.data.sources[i.previous]&&e.loadsources("previous",e.data.slide);const s=e.data.sources,n=s[i.current],a=s[i.next];a.classList.remove("fslightbox-transform-transition"),n.classList.remove("fslightbox-transform-transition"),s[i.previous].classList.remove("fslightbox-transform-transition"),a.classList.remove("fslightbox-fade-in-animation"),a.offsetWidth,a.classList.add("fslightbox-fade-in-animation"),n.classList.remove("fslightbox-fade-in-animation"),n.offsetWidth,n.classList.add("fslightbox-fade-in-animation"),e.transforms.transformNull(n),e.transforms.transformPlus(a)},nextSlideViaButton:function(e,t){t===e.data.total_slides?e.data.slide=1:e.data.slide+=1,e.stopVideos(),e.data.updateSlideNumber(e.data.slide);const i=e.getSourcesIndexes.all(e.data.slide);void 0===e.data.sources[i.next]&&e.loadsources("next",e.data.slide);const s=e.data.sources,n=s[i.current],a=s[i.previous];a.classList.remove("fslightbox-transform-transition"),n.classList.remove("fslightbox-transform-transition"),s[i.next].classList.remove("fslightbox-transform-transition"),a.classList.remove("fslightbox-fade-in-animation"),a.offsetWidth,a.classList.add("fslightbox-fade-in-animation"),n.classList.remove("fslightbox-fade-in-animation"),n.offsetWidth,n.classList.add("fslightbox-fade-in-animation"),e.transforms.transformNull(n),e.transforms.transformMinus(a)}}},{}],2:[function(e,t,i){t.exports=function(e,t){const i=new t("div").addClassesAndCreate(["fslightbox-invisible-hover"]),s={mediaHolder:e.data.mediaHolder.holder,invisibleHover:i,holderWrapper:e.data.holderWrapper},n=e.data.sources,a=e.data.urls.length;let o,r,d=!1,l=!0,c=function(t){"VIDEO"===t.target.tagName||e.data.isMobile||t.preventDefault();for(let e in s)s[e].classList.add("fslightbox-cursor-grabbing");d=!0,o=e.data.isMobile?t.touches[0].clientX:t.clientX,r=0},u=function(){e.element.contains(i)&&e.element.removeChild(i);let t=e.getSourcesIndexes.all(e.data.slide);for(let e in s)s[e].classList.remove("fslightbox-cursor-grabbing");d=!1,0!==r&&l&&(l=!1,n[t.previous].classList.add("fslightbox-transform-transition"),n[t.current].classList.add("fslightbox-transform-transition"),n[t.next].classList.add("fslightbox-transform-transition"),r>0?(1===e.data.slide?e.data.updateSlideNumber(e.data.total_slides):e.data.updateSlideNumber(e.data.slide-1),a>=2?(e.transforms.transformPlus(n[t.current]),e.transforms.transformNull(n[t.previous])):e.transforms.transformNull(n[t.current]),t=e.getSourcesIndexes.all(e.data.slide),void 0===e.data.sources[t.previous]&&e.loadsources("previous",e.data.slide)):r<0&&(e.data.slide===e.data.total_slides?e.data.updateSlideNumber(1):e.data.updateSlideNumber(e.data.slide+1),a>1?(e.transforms.transformMinus(n[t.current]),e.transforms.transformNull(n[t.next])):e.transforms.transformNull(n[t.current]),t=e.getSourcesIndexes.all(e.data.slide),void 0===e.data.sources[t.next]&&e.loadsources("next",e.data.slide)),r=0,e.stopVideos(),setTimeout(function(){n[t.previous].classList.remove("fslightbox-transform-transition"),n[t.current].classList.remove("fslightbox-transform-transition"),n[t.next].classList.remove("fslightbox-transform-transition"),l=!0},250))},h=function(t){if(!d||!l)return;let s;s=e.data.isMobile?t.touches[0].clientX:t.clientX,e.element.appendChild(i),r=s-o;const c=e.getSourcesIndexes.all(e.data.slide);a>=3&&(n[c.previous].style.transform="translate("+(-e.data.slideDistance*window.innerWidth+r)+"px,0)"),a>=1&&(n[c.current].style.transform="translate("+r+"px,0)"),a>=2&&(n[c.next].style.transform="translate("+(e.data.slideDistance*window.innerWidth+r)+"px,0)")},m=function(e){e.preventDefault()};for(let e in s)s[e].addEventListener("mousedown",c),s[e].addEventListener("touchstart",c,{passive:!0});window.addEventListener("mouseup",u),window.addEventListener("touchend",u),i.addEventListener("mouseup",u),i.addEventListener("touchend",u),window.addEventListener("mousemove",h),window.addEventListener("touchmove",h),e.data.nav.addEventListener("mousedown",m)}},{}],3:[function(e,t,i){window.fsLightboxObject=function(){this.element=new i("div").addClassesAndCreate(["fslightbox-container"]),this.data={slide:1,total_slides:1,slideDistance:1.3,slideCounter:!0,slideButtons:!0,isFirstTimeLoad:!1,moveSlidesViaDrag:!0,toolbarButtons:{close:!0,fullscreen:!0},name:"",isMobile:!1,urls:[],sources:[],sourcesLoaded:[],rememberedSourcesDimensions:[],videos:[],holderWrapper:{},mediaHolder:{},nav:{},toolbar:{},slideCounterElem:{},initiated:!1,fullscreen:!1,fadingOut:!1,onResizeEvent:{},updateSlideNumber:function(){}};let t=this;function i(e){this.elem=document.createElement(e),this.addClassesAndCreate=function(e){for(let t in e)this.elem.classList.add(e[t]);return this.elem}}function s(){let e=this;const i=t.data.sources;this.transforms=function(){const e=t.data.sources,i=t.getSourcesIndexes.all(t.data.slide);for(let s in e)parseInt(s)!==i.previous&&parseInt(s)!==i.current&&parseInt(s)!==i.next&&(e[s].classList.remove("fslightbox-transform-transition"),t.transforms.transformMinus(e[s]))},this.mediaHolderDimensions=function(){window.innerWidth>1e3?(t.data.mediaHolder.holder.style.width=window.innerWidth-.1*window.innerWidth+"px",t.data.mediaHolder.holder.style.height=window.innerHeight-.1*window.innerHeight+"px"):(t.data.mediaHolder.holder.style.width=window.innerWidth+"px",t.data.mediaHolder.holder.style.height=window.innerHeight+"px")},this.sourcesDimensions=function(){const e=t.getSourcesIndexes.all(t.data.slide),s=t.data.rememberedSourcesDimensions;for(let n in i){t.data.urls.length>2&&t.transforms.transformMinus(i[e.previous]),t.transforms.transformNull(i[e.current]),t.data.urls.length>1&&t.transforms.transformPlus(i[e.next]);const a=i[n].firstChild;const o=s[n].width/s[n].height,r=parseInt(t.data.mediaHolder.holder.style.width),d=parseInt(t.data.mediaHolder.holder.style.height);let l=r/o;l<d-60?(a.style.height=l+"px",a.style.width=r+"px"):(l=d-60,a.style.height=l+"px",a.style.width=l*o+"px")}},window.onresize=function(){var i;i=navigator.userAgent||navigator.vendor||window.opera,/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(i)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(i.substr(0,4))?t.data.isMobile=!0:t.data.isMobile=!1,e.mediaHolderDimensions(),e.sourcesDimensions(),e.transforms()}}this.init=function(n){if(t.data.initiated)return t.initSetSlide(n),void t.show();!function(e){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t.data.isMobile=!0)}(navigator.userAgent||navigator.vendor||window.opera),t.data.onResizeEvent=new s;let a=t.data.name,o=[];const r=fsLightboxHelpers.a;for(let e=0;e<r.length;e++)r[e].hasAttribute("data-fslightbox")&&r[e].getAttribute("data-fslightbox")===a&&o.push(r[e].getAttribute("href"));t.data.urls=o,t.data.total_slides=o.length,new t.dom,t.throwEvent("init"),t.throwEvent("open"),e("./changeSlideByDragging.js")(t,i),t.initSetSlide(n),t.data.initiated=!0},this.initSetSlide=function(e){switch(typeof e){case"string":t.setSlide(t.data.urls.indexOf(e)+1);break;case"number":t.setSlide(e);break;case"undefined":t.setSlide(1)}},this.show=function(){const e=t.element;t.scrollbar.showScrollbar(),e.classList.remove("fslightbox-container-fadeout"),document.body.appendChild(e),t.throwEvent("show"),t.throwEvent("open"),e.classList.remove(["fslightbox-fade-in-animation"]),e.classList.add(["fslightbox-fade-in-animation"])},this.hide=function(){t.data.fullscreen&&t.toolbar.closeFullscreen(),t.element.classList.add("fslightbox-container-fadeout"),t.data.fadingOut=!0,t.throwEvent("close"),setTimeout(function(){t.scrollbar.hideScrollbar(),t.data.fadingOut=!1,document.body.removeChild(t.element)},250)},this.dom=function(){e("./renderDOM.js")(t,i)},this.throwEvent=function(e){let i;"function"==typeof Event?i=new Event(e):(i=document.createEvent("Event")).initEvent(e,!0,!0),t.element.dispatchEvent(i)},this.scrollbar={hideScrollbar:function(){if(document.documentElement.classList.remove("fslightbox-open"),!t.data.isMobile){let e=document.querySelector(".recompense-for-scrollbar");e&&(e.style.paddingRight="0"),document.documentElement.classList.remove("fslightbox-scrollbarfix")}},showScrollbar:function(){if(document.documentElement.classList.add("fslightbox-open"),!t.data.isMobile){let e=document.querySelector(".recompense-for-scrollbar");e&&(e.style.paddingRight="17px"),document.documentElement.classList.add("fslightbox-scrollbarfix")}}},this.SVGIcon=function(){this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.path=document.createElementNS("http://www.w3.org/2000/svg","path"),this.svg.setAttributeNS(null,"class","fslightbox-svg-icon"),this.svg.setAttributeNS(null,"viewBox","0 0 15 15"),this.getSVGIcon=function(e,t,i){return this.path.setAttributeNS(null,"d",i),this.svg.setAttributeNS(null,"viewBox",e),this.svg.setAttributeNS(null,"width",t),this.svg.setAttributeNS(null,"height",t),this.svg.appendChild(this.path),this.svg}};let n=e("./toolbar");this.toolbar=new n(t,i),this.mediaHolder=function(){this.holder=new i("div").addClassesAndCreate(["fslightbox-media-holder"]),window.innerWidth>1e3?(this.holder.style.width=window.innerWidth-.1*window.innerWidth+"px",this.holder.style.height=window.innerHeight-.1*window.innerHeight+"px"):(this.holder.style.width=window.innerWidth+"px",this.holder.style.height=window.innerHeight+"px"),this.renderHolder=function(e){e.appendChild(this.holder)}},this.getSourcesIndexes={previous:function(e){let i;const s=e-1;return i=0===s?t.data.total_slides-1:s-1},next:function(e){let i;const s=e-1;return i=e===t.data.total_slides?0:s+1},all:function(e){const i=e-1,s={previous:0,current:0,next:0};return s.previous=0===i?t.data.total_slides-1:i-1,s.current=i,e===t.data.total_slides?s.next=0:s.next=i+1,s}},this.transforms={transformMinus:function(e){e.style.transform="translate("+-t.data.slideDistance*window.innerWidth+"px,0)"},transformNull:function(e){e.style.transform="translate(0,0)"},transformPlus:function(e){e.style.transform="translate("+t.data.slideDistance*window.innerWidth+"px,0)"}},this.stopVideos=function(){const e=t.data.videos;for(let i in e)!0===e[i]?void 0!==t.data.sources[i].firstChild.pause&&t.data.sources[i].firstChild.pause():t.data.sources[i].firstChild.contentWindow.postMessage('{"event":"command","func":"stopVideo","args":""}',"*")},this.setSlide=function(e){t.data.slide=e,t.data.updateSlideNumber(e);const i=t.getSourcesIndexes.all(e),s=t.data.sources;0===s.length?t.loadsources("initial",e):(void 0===s[i.previous]&&t.loadsources("previous",e),void 0===s[i.current]&&t.loadsources("current",e),void 0===s[i.next]&&t.loadsources("next",e));for(let e in s)s[e].classList.remove("fslightbox-transform-transition"),e==i.previous&&s.length>1?t.transforms.transformMinus(s[i.previous]):e!=i.current?e!=i.next?t.transforms.transformMinus(s[e]):t.transforms.transformPlus(s[i.next]):t.transforms.transformNull(s[i.current])},this.appendMethods=e("./appendSource"),this.loadsources=function(s,n){return new(e("./loadSource.js"))(t,i,s,n)}},function(){window.fsLightboxInstances=[],window.fsLightboxHelpers={a:document.getElementsByTagName("a")};let e=fsLightboxHelpers.a;for(let t=0;t<e.length;t++){if(!e[t].hasAttribute("data-fslightbox"))continue;e[t].classList.add("fslightbox-fix-webkit-highlight");const i=e[t].getAttribute("data-fslightbox");void 0===fsLightboxInstances[i]&&(fsLightbox=new fsLightboxObject,fsLightbox.data.name=i,fsLightboxInstances[i]=fsLightbox),e[t].addEventListener("click",function(e){e.preventDefault();let t=this.getAttribute("data-fslightbox");if(fsLightboxInstances[t].data.initiated)return fsLightboxInstances[t].setSlide(fsLightboxInstances[t].data.urls.indexOf(this.getAttribute("href"))+1),void fsLightboxInstances[t].show();fsLightboxInstances[t].init(this.getAttribute("href"))})}}(document,window)},{"./appendSource":1,"./changeSlideByDragging.js":2,"./loadSource.js":4,"./renderDOM.js":5,"./toolbar":6}],4:[function(e,t,i){t.exports=function(e,t,i,s){const n=this,a=e.getSourcesIndexes.all(s),o=e.data.urls,r=e.data.sources;let d=function(s,n,a,o){let d=new t("div").addClassesAndCreate(["fslightbox-source-holder"]);e.data.rememberedSourcesDimensions[o]={width:n,height:a},function(t,i,s){const n=i/s,a=parseInt(e.data.mediaHolder.holder.style.width),o=parseInt(e.data.mediaHolder.holder.style.height);let r=a/n;r<o-60?(t.style.height=r+"px",t.style.width=a+"px"):(r=o-60,t.style.height=r+"px",t.style.width=r*n+"px")}(s,n,a),d.appendChild(s),"initial"===i?function(e,t){e.innerHTML="",e.appendChild(t),e.firstChild.classList.add("fslightbox-fade-in-animation")}(r[o],s):function(e,t){e.innerHTML="",e.appendChild(t),e.firstChild.offsetWidth,e.firstChild.classList.add("fslightbox-fade-in-animation")}(r[o],s)};if(this.loadYoutubevideo=function(i,s){let n=new t("iframe").addClassesAndCreate(["fslightbox-single-source"]);n.src="//www.youtube.com/embed/"+i+"?enablejsapi=1",n.setAttribute("allowfullscreen",""),n.setAttribute("frameborder","0"),e.data.mediaHolder.holder.appendChild(n),d(n,1920,1080,s)},this.imageLoad=function(e,i){let s=new t("img").addClassesAndCreate(["fslightbox-single-source"]);s.src=e,s.addEventListener("load",function(){d(s,this.width,this.height,i)})},this.videoLoad=function(e,i,s){let n,a,o=!1,r=new t("video").addClassesAndCreate(["fslightbox-single-source"]),l=new t("source").elem;l.src=e,l.type=s,r.appendChild(l),r.onloadedmetadata=function(){o||(this.videoWidth&&0!==this.videoWidth?(n=this.videoWidth,a=this.videoHeight):(n=1920,a=1080),o=!0,d(r,n,a,i))};let c=0,u=setInterval(function(){if(o)clearInterval(u);else{if(r.videoWidth&&0!==r.videoWidth)n=r.videoWidth,a=r.videoHeight;else{if(c<31)return void c++;n=1920,a=1080}o=!0,d(r,n,a,i),clearInterval(u)}},100);r.setAttribute("controls","")},this.invalidFile=function(e){let i=new t("div").addClassesAndCreate(["fslightbox-invalid-file-wrapper"]);i.innerHTML="Invalid file",d(i,window.innerWidth,window.innerHeight,e)},this.createSourceElem=function(t){const i=document.createElement("a"),s=e.data.urls[t];if(i.href=s,"www.youtube.com"===i.hostname)e.data.videos[t]=!1,this.loadYoutubevideo(function(e){let t=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);return t&&11==t[2].length?t[2]:"error"}(s),t);else{const i=new XMLHttpRequest;i.onreadystatechange=function(){if(2===i.readyState)if(200===i.status||206===i.status){const s=i.getResponseHeader("content-type"),a=s.slice(0,s.indexOf("/"));"image"===a?n.imageLoad(o[t],t):"video"===a?(n.videoLoad(o[t],t,s),e.data.videos[t]=!0):n.invalidFile(t)}else n.invalidFile(t)},i.open("get",s,!0),i.send(null)}},"initial"===i)e.appendMethods.renderHolderInitial(e,s,t),o.length>=1&&this.createSourceElem(a.current),o.length>=2&&this.createSourceElem(a.next),o.length>=3&&this.createSourceElem(a.previous);else switch(e.appendMethods.renderHolder(e,s,i),i){case"previous":this.createSourceElem(a.previous);break;case"current":this.createSourceElem(a.current);break;case"next":this.createSourceElem(a.next)}}},{}],5:[function(e,t,i){t.exports=function(e,t){let i={renderNav:function(i){e.data.nav=new t("div").addClassesAndCreate(["fslightbox-nav"]),e.toolbar.renderToolbar(e.data.nav),(new this.slideCounter).renderSlideCounter(e.data.nav),i.appendChild(e.data.nav)},createBTN:function(i,s,n){let a=new t("div").addClassesAndCreate(["fslightbox-slide-btn","button-style"]);a.appendChild((new e.SVGIcon).getSVGIcon("0 0 20 20","1em",n)),i.appendChild(a),s.appendChild(i)},renderSlideButtons:function(i){if(!1===e.data.slideButtons)return!1;let s=new t("div").addClassesAndCreate(["fslightbox-slide-btn-container","fslightbox-slide-btn-left-container"]);this.createBTN(s,i,"M8.388,10.049l4.76-4.873c0.303-0.31,0.297-0.804-0.012-1.105c-0.309-0.304-0.803-0.293-1.105,0.012L6.726,9.516c-0.303,0.31-0.296,0.805,0.012,1.105l5.433,5.307c0.152,0.148,0.35,0.223,0.547,0.223c0.203,0,0.406-0.08,0.559-0.236c0.303-0.309,0.295-0.803-0.012-1.104L8.388,10.049z"),s.onclick=function(){e.appendMethods.previousSlideViaButton(e,e.data.slide)};let n=new t("div").addClassesAndCreate(["fslightbox-slide-btn-container","fslightbox-slide-btn-right-container"]);this.createBTN(n,i,"M11.611,10.049l-4.76-4.873c-0.303-0.31-0.297-0.804,0.012-1.105c0.309-0.304,0.803-0.293,1.105,0.012l5.306,5.433c0.304,0.31,0.296,0.805-0.012,1.105L7.83,15.928c-0.152,0.148-0.35,0.223-0.547,0.223c-0.203,0-0.406-0.08-0.559-0.236c-0.303-0.309-0.295-0.803,0.012-1.104L11.611,10.049z"),n.onclick=function(){e.appendMethods.nextSlideViaButton(e,e.data.slide)}},slideCounter:function(){let i=new t("div").addClassesAndCreate(["fslightbox-slide-number-container"]);e.data.slideCounterElem=new t("div").addClassesAndCreate(["fslightbox-slide-slide-number"]),e.data.slideCounterElem.innerHTML=e.data.slide,e.data.slideCounterElem.id="current_slide";let s=new t("div").addClassesAndCreate(["fslightbox-slide-slide-number","fslightbox-slash"]);s.innerHTML="/";let n=new t("div").addClassesAndCreate(["fslightbox-slide-slide-number"]);n.innerHTML=e.data.total_slides,i.appendChild(e.data.slideCounterElem),i.appendChild(s),i.appendChild(n),e.data.updateSlideNumber=function(t){e.data.slide=t,e.data.slideCounterElem.innerHTML=t},this.renderSlideCounter=function(t){e.data.slideCounter&&t.appendChild(i)}}};e.scrollbar.showScrollbar(),e.element.id="fslightbox-container",document.body.appendChild(e.element),i.renderNav(e.element),e.data.total_slides>1&&i.renderSlideButtons(e.element),e.data.holderWrapper=new t("div").addClassesAndCreate(["fslightbox-holder-wrapper"]),e.element.appendChild(e.data.holderWrapper),e.data.mediaHolder=new e.mediaHolder,e.data.mediaHolder.renderHolder(e.data.holderWrapper),e.element.classList.add(["fslightbox-fade-in-animation"]),e.data.isfirstTimeLoad=!0}},{}],6:[function(e,t,i){t.exports=function(e,t){this.toolbarElem=new t("div").addClassesAndCreate(["fslightbox-toolbar"]);const i=this;this.renderDefaultButtons=function(){let s=e.data.toolbarButtons;if(!0===s.fullscreen){let s=new t("div").addClassesAndCreate(["fslightbox-toolbar-button","button-style"]),n=(new e.SVGIcon).getSVGIcon("0 0 17.5 17.5","1.25em","M4.5 11H3v4h4v-1.5H4.5V11zM3 7h1.5V4.5H7V3H3v4zm10.5 6.5H11V15h4v-4h-1.5v2.5zM11 3v1.5h2.5V7H15V3h-4z");s.appendChild(n),s.onclick=function(){e.data.fullscreen?i.closeFullscreen():i.openFullscreen()},this.toolbarElem.appendChild(s)}if(!0===s.close){let i=new t("div").addClassesAndCreate(["fslightbox-toolbar-button","button-style"]),s=(new e.SVGIcon).getSVGIcon("0 0 20 20","1em","M 11.469 10 l 7.08 -7.08 c 0.406 -0.406 0.406 -1.064 0 -1.469 c -0.406 -0.406 -1.063 -0.406 -1.469 0 L 10 8.53 l -7.081 -7.08 c -0.406 -0.406 -1.064 -0.406 -1.469 0 c -0.406 0.406 -0.406 1.063 0 1.469 L 8.531 10 L 1.45 17.081 c -0.406 0.406 -0.406 1.064 0 1.469 c 0.203 0.203 0.469 0.304 0.735 0.304 c 0.266 0 0.531 -0.101 0.735 -0.304 L 10 11.469 l 7.08 7.081 c 0.203 0.203 0.469 0.304 0.735 0.304 c 0.267 0 0.532 -0.101 0.735 -0.304 c 0.406 -0.406 0.406 -1.064 0 -1.469 L 11.469 10 Z");i.appendChild(s),i.onclick=function(){e.data.fadingOut||e.hide()},this.toolbarElem.appendChild(i)}},this.openFullscreen=function(){e.data.fullscreen=!0;let t=document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen()},this.closeFullscreen=function(){e.data.fullscreen=!1,document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},this.renderToolbar=function(e){this.renderDefaultButtons(),e.appendChild(this.toolbarElem)}}},{}]},{},[3,5,4,1,2,6]);
!function(){return function e(t,s,n){function i(o,r){if(!s[o]){if(!t[o]){var d="function"==typeof require&&require;if(!r&&d)return d(o,!0);if(a)return a(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=s[o]={exports:{}};t[o][0].call(c.exports,function(e){return i(t[o][1][e]||e)},c,c.exports,e,t,s,n)}return s[o].exports}for(var a="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}}()({1:[function(e,t,s){t.exports={loader:'<div class="lds-ring"><div></div><div></div><div></div><div></div></div>',DOMObject:"",createHolder:function(e,t){let s=new this.DOMObject("div").addClassesAndCreate(["fslightbox-source-holder"]);return s.innerHTML=this.loader,e.data.sources[t]=s,s},renderHolderInitial:function(e,t,s){this.DOMObject=s;const n=e.getSourcesIndexes.all(t),i=e.data.total_slides;if(i>=3){const t=this.createHolder(e,n.previous);e.transforms.transformMinus(t),e.data.mediaHolder.holder.appendChild(t)}if(i>=1){const t=this.createHolder(e,n.current);e.data.mediaHolder.holder.appendChild(t)}if(i>=2){const t=this.createHolder(e,n.next);e.transforms.transformPlus(t),e.data.mediaHolder.holder.appendChild(t)}},renderHolder:function(e,t,s){switch(s){case"previous":this.renderHolderPrevious(e,t);break;case"current":this.renderHolderCurrent(e,t);break;case"next":this.renderHolderNext(e,t)}},renderHolderPrevious:function(e,t){const s=e.getSourcesIndexes.previous(t),n=this.createHolder(e,s);e.transforms.transformMinus(n),e.data.mediaHolder.holder.insertAdjacentElement("afterbegin",n)},renderHolderNext:function(e,t){const s=e.getSourcesIndexes.next(t),n=this.createHolder(e,s);e.transforms.transformPlus(n),e.data.mediaHolder.holder.appendChild(n)},renderHolderCurrent:function(e,t){const s=e.getSourcesIndexes.all(t),n=this.createHolder(e,s.current);e.transforms.transformNull(n),e.data.mediaHolder.holder.insertBefore(n,e.data.sources[s.next])},previousSlideViaButton:function(e,t){1===t?e.data.slide=e.data.total_slides:e.data.slide-=1,e.stopVideos(),e.data.updateSlideNumber(e.data.slide);const s=e.getSourcesIndexes.all(e.data.slide);void 0===e.data.sources[s.previous]&&e.loadsources("previous",e.data.slide);const n=e.data.sources,i=n[s.current],a=n[s.next];a.classList.remove("fslightbox-transform-transition"),i.classList.remove("fslightbox-transform-transition"),n[s.previous].classList.remove("fslightbox-transform-transition"),a.classList.remove("fslightbox-fade-in-animation"),a.offsetWidth,a.classList.add("fslightbox-fade-in-animation"),i.classList.remove("fslightbox-fade-in-animation"),i.offsetWidth,i.classList.add("fslightbox-fade-in-animation"),e.transforms.transformNull(i),e.transforms.transformPlus(a)},nextSlideViaButton:function(e,t){t===e.data.total_slides?e.data.slide=1:e.data.slide+=1,e.stopVideos(),e.data.updateSlideNumber(e.data.slide);const s=e.getSourcesIndexes.all(e.data.slide);void 0===e.data.sources[s.next]&&e.loadsources("next",e.data.slide);const n=e.data.sources,i=n[s.current],a=n[s.previous];a.classList.remove("fslightbox-transform-transition"),i.classList.remove("fslightbox-transform-transition"),n[s.next].classList.remove("fslightbox-transform-transition"),a.classList.remove("fslightbox-fade-in-animation"),a.offsetWidth,a.classList.add("fslightbox-fade-in-animation"),i.classList.remove("fslightbox-fade-in-animation"),i.offsetWidth,i.classList.add("fslightbox-fade-in-animation"),e.transforms.transformNull(i),e.transforms.transformMinus(a)}}},{}],2:[function(e,t,s){t.exports=function(e,t){const s=new t("div").addClassesAndCreate(["fslightbox-invisible-hover"]),n={mediaHolder:e.data.mediaHolder.holder,invisibleHover:s,holderWrapper:e.data.holderWrapper},i=e.data.sources,a=e.data.urls.length;let o,r,d=!1,l=!0,c=function(t){"VIDEO"===t.target.tagName||e.data.isMobile||t.preventDefault();for(let e in n)n[e].classList.add("fslightbox-cursor-grabbing");d=!0,o=e.data.isMobile?t.touches[0].clientX:t.clientX,r=0},u=function(){e.element.contains(s)&&e.element.removeChild(s);let t=e.getSourcesIndexes.all(e.data.slide);for(let e in n)n[e].classList.remove("fslightbox-cursor-grabbing");d=!1,0!==r&&l&&(l=!1,i[t.previous].classList.add("fslightbox-transform-transition"),i[t.current].classList.add("fslightbox-transform-transition"),i[t.next].classList.add("fslightbox-transform-transition"),r>0?(1===e.data.slide?e.data.updateSlideNumber(e.data.total_slides):e.data.updateSlideNumber(e.data.slide-1),a>=2?(e.transforms.transformPlus(i[t.current]),e.transforms.transformNull(i[t.previous])):e.transforms.transformNull(i[t.current]),t=e.getSourcesIndexes.all(e.data.slide),void 0===e.data.sources[t.previous]&&e.loadsources("previous",e.data.slide)):r<0&&(e.data.slide===e.data.total_slides?e.data.updateSlideNumber(1):e.data.updateSlideNumber(e.data.slide+1),a>1?(e.transforms.transformMinus(i[t.current]),e.transforms.transformNull(i[t.next])):e.transforms.transformNull(i[t.current]),t=e.getSourcesIndexes.all(e.data.slide),void 0===e.data.sources[t.next]&&e.loadsources("next",e.data.slide)),r=0,e.stopVideos(),setTimeout(function(){i[t.previous].classList.remove("fslightbox-transform-transition"),i[t.current].classList.remove("fslightbox-transform-transition"),i[t.next].classList.remove("fslightbox-transform-transition"),l=!0},250))},h=function(t){if(!d||!l)return;let n;n=e.data.isMobile?t.touches[0].clientX:t.clientX,e.element.appendChild(s),r=n-o;const c=e.getSourcesIndexes.all(e.data.slide);a>=3&&(i[c.previous].style.transform="translate("+(-e.data.slideDistance*window.innerWidth+r)+"px,0)"),a>=1&&(i[c.current].style.transform="translate("+r+"px,0)"),a>=2&&(i[c.next].style.transform="translate("+(e.data.slideDistance*window.innerWidth+r)+"px,0)")},f=function(e){e.preventDefault()};for(let e in n)n[e].addEventListener("mousedown",c),n[e].addEventListener("touchstart",c,{passive:!0});window.addEventListener("mouseup",u),window.addEventListener("touchend",u),s.addEventListener("mouseup",u),s.addEventListener("touchend",u),window.addEventListener("mousemove",h),window.addEventListener("touchmove",h),e.data.nav.addEventListener("mousedown",f)}},{}],3:[function(e,t,s){window.fsLightboxObject=function(){this.element=new s("div").addClassesAndCreate(["fslightbox-container"]),this.data={slide:1,total_slides:1,slideDistance:1.3,slideCounter:!0,slideButtons:!0,isFirstTimeLoad:!1,moveSlidesViaDrag:!0,toolbarButtons:{close:!0,fullscreen:!0},name:"",isMobile:!1,urls:[],sources:[],sourcesLoaded:[],rememberedSourcesDimensions:[],videos:[],holderWrapper:{},mediaHolder:{},nav:{},toolbar:{},slideCounterElem:{},initiated:!1,fullscreen:!1,fadingOut:!1,onResizeEvent:{},updateSlideNumber:function(){}};let t=this;function s(e){this.elem=document.createElement(e),this.addClassesAndCreate=function(e){for(let t in e)this.elem.classList.add(e[t]);return this.elem}}function n(){let e=this;const s=t.data.sources;this.transforms=function(){const e=t.data.sources,s=t.getSourcesIndexes.all(t.data.slide);for(let n in e)parseInt(n)!==s.previous&&parseInt(n)!==s.current&&parseInt(n)!==s.next&&(e[n].classList.remove("fslightbox-transform-transition"),t.transforms.transformMinus(e[n]))},this.mediaHolderDimensions=function(){window.innerWidth>1e3?(t.data.mediaHolder.holder.style.width=window.innerWidth-.1*window.innerWidth+"px",t.data.mediaHolder.holder.style.height=window.innerHeight-.1*window.innerHeight+"px"):(t.data.mediaHolder.holder.style.width=window.innerWidth+"px",t.data.mediaHolder.holder.style.height=window.innerHeight+"px")},this.sourcesDimensions=function(){const e=t.getSourcesIndexes.all(t.data.slide),n=t.data.rememberedSourcesDimensions;for(let i in s){t.data.urls.length>2&&t.transforms.transformMinus(s[e.previous]),t.transforms.transformNull(s[e.current]),t.data.urls.length>1&&t.transforms.transformPlus(s[e.next]);const a=s[i].firstChild;const o=n[i].width/n[i].height,r=parseInt(t.data.mediaHolder.holder.style.width),d=parseInt(t.data.mediaHolder.holder.style.height);let l=r/o;l<d-60?(a.style.height=l+"px",a.style.width=r+"px"):(l=d-60,a.style.height=l+"px",a.style.width=l*o+"px")}},window.onresize=function(){t.checkIfMobile(),e.mediaHolderDimensions(),e.sourcesDimensions(),e.transforms()}}this.init=function(i){if(t.data.initiated)return t.initSetSlide(i),void t.show();t.checkIfMobile(),t.data.onResizeEvent=new n;let a=t.data.name,o=[];const r=fsLightboxHelpers.a;for(let e=0;e<r.length;e++)r[e].hasAttribute("data-fslightbox")&&r[e].getAttribute("data-fslightbox")===a&&o.push(r[e].getAttribute("href"));t.data.urls=o,t.data.total_slides=o.length,new t.dom,t.throwEvent("init"),t.throwEvent("open"),e("./changeSlideByDragging.js")(t,s),t.initSetSlide(i),t.data.initiated=!0},this.initSetSlide=function(e){switch(typeof e){case"string":t.setSlide(t.data.urls.indexOf(e)+1);break;case"number":t.setSlide(e);break;case"undefined":t.setSlide(1)}},this.show=function(){const e=t.element;t.scrollbar.showScrollbar(),e.classList.remove("fslightbox-container-fadeout"),document.body.appendChild(e),t.throwEvent("show"),t.throwEvent("open"),e.classList.remove(["fslightbox-fade-in-animation"]),e.classList.add(["fslightbox-fade-in-animation"])},this.hide=function(){t.data.fullscreen&&t.toolbar.closeFullscreen(),t.element.classList.add("fslightbox-container-fadeout"),t.data.fadingOut=!0,t.throwEvent("close"),setTimeout(function(){t.scrollbar.hideScrollbar(),t.data.fadingOut=!1,document.body.removeChild(t.element)},250)},this.dom=function(){e("./renderDOM.js")(t,s)},this.throwEvent=function(e){let s;"function"==typeof Event?s=new Event(e):(s=document.createEvent("Event")).initEvent(e,!0,!0),t.element.dispatchEvent(s)},this.checkIfMobile=function(){/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?t.data.isMobile=!0:t.data.isMobile=!1},this.scrollbar={hideScrollbar:function(){if(document.documentElement.classList.contains("fslightbox-scrollbarfix")){let e=document.querySelector(".recompense-for-scrollbar");e&&(e.style.paddingRight="0"),document.documentElement.classList.remove("fslightbox-scrollbarfix")}document.documentElement.classList.remove("fslightbox-open")},showScrollbar:function(){if(!t.data.isMobile&&document.documentElement.offsetHeight>=window.innerHeight){let e=document.querySelector(".recompense-for-scrollbar");e&&(e.style.paddingRight="17px"),document.documentElement.classList.add("fslightbox-scrollbarfix")}document.documentElement.classList.add("fslightbox-open")}},this.SVGIcon=function(){this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.path=document.createElementNS("http://www.w3.org/2000/svg","path"),this.svg.setAttributeNS(null,"class","fslightbox-svg-icon"),this.svg.setAttributeNS(null,"viewBox","0 0 15 15"),this.getSVGIcon=function(e,t,s){return this.path.setAttributeNS(null,"d",s),this.svg.setAttributeNS(null,"viewBox",e),this.svg.setAttributeNS(null,"width",t),this.svg.setAttributeNS(null,"height",t),this.svg.appendChild(this.path),this.svg}};let i=e("./toolbar");this.toolbar=new i(t,s),this.mediaHolder=function(){this.holder=new s("div").addClassesAndCreate(["fslightbox-media-holder"]),window.innerWidth>1e3?(this.holder.style.width=window.innerWidth-.1*window.innerWidth+"px",this.holder.style.height=window.innerHeight-.1*window.innerHeight+"px"):(this.holder.style.width=window.innerWidth+"px",this.holder.style.height=window.innerHeight+"px"),this.renderHolder=function(e){e.appendChild(this.holder)}},this.getSourcesIndexes={previous:function(e){let s;const n=e-1;return s=0===n?t.data.total_slides-1:n-1},next:function(e){let s;const n=e-1;return s=e===t.data.total_slides?0:n+1},all:function(e){const s=e-1,n={previous:0,current:0,next:0};return n.previous=0===s?t.data.total_slides-1:s-1,n.current=s,e===t.data.total_slides?n.next=0:n.next=s+1,n}},this.transforms={transformMinus:function(e){e.style.transform="translate("+-t.data.slideDistance*window.innerWidth+"px,0)"},transformNull:function(e){e.style.transform="translate(0,0)"},transformPlus:function(e){e.style.transform="translate("+t.data.slideDistance*window.innerWidth+"px,0)"}},this.stopVideos=function(){const e=t.data.videos;for(let s in e)!0===e[s]?void 0!==t.data.sources[s].firstChild.pause&&t.data.sources[s].firstChild.pause():t.data.sources[s].firstChild.contentWindow.postMessage('{"event":"command","func":"stopVideo","args":""}',"*")},this.setSlide=function(e){t.data.slide=e,t.data.updateSlideNumber(e);const s=t.getSourcesIndexes.all(e),n=t.data.sources;0===n.length?t.loadsources("initial",e):(void 0===n[s.previous]&&t.loadsources("previous",e),void 0===n[s.current]&&t.loadsources("current",e),void 0===n[s.next]&&t.loadsources("next",e));for(let e in n)n[e].classList.remove("fslightbox-transform-transition"),e==s.previous&&n.length>1?t.transforms.transformMinus(n[s.previous]):e!=s.current?e!=s.next?t.transforms.transformMinus(n[e]):t.transforms.transformPlus(n[s.next]):t.transforms.transformNull(n[s.current])},this.appendMethods=e("./appendSource"),this.loadsources=function(n,i){return new(e("./loadSource.js"))(t,s,n,i)}},function(){window.fsLightboxInstances=[],window.fsLightboxHelpers={a:document.getElementsByTagName("a")};let e=fsLightboxHelpers.a;for(let t=0;t<e.length;t++){if(!e[t].hasAttribute("data-fslightbox"))continue;e[t].classList.add("fslightbox-fix-webkit-highlight");const s=e[t].getAttribute("data-fslightbox");void 0===fsLightboxInstances[s]&&(fsLightbox=new fsLightboxObject,fsLightbox.data.name=s,fsLightboxInstances[s]=fsLightbox),e[t].addEventListener("click",function(e){e.preventDefault();let t=this.getAttribute("data-fslightbox");if(fsLightboxInstances[t].data.initiated)return fsLightboxInstances[t].setSlide(fsLightboxInstances[t].data.urls.indexOf(this.getAttribute("href"))+1),void fsLightboxInstances[t].show();fsLightboxInstances[t].init(this.getAttribute("href"))})}}(document,window)},{"./appendSource":1,"./changeSlideByDragging.js":2,"./loadSource.js":4,"./renderDOM.js":5,"./toolbar":6}],4:[function(e,t,s){t.exports=function(e,t,s,n){const i=this,a=e.getSourcesIndexes.all(n),o=e.data.urls,r=e.data.sources;let d=function(n,i,a,o){let d=new t("div").addClassesAndCreate(["fslightbox-source-holder"]);e.data.rememberedSourcesDimensions[o]={width:i,height:a},function(t,s,n){const i=s/n,a=parseInt(e.data.mediaHolder.holder.style.width),o=parseInt(e.data.mediaHolder.holder.style.height);let r=a/i;r<o-60?(t.style.height=r+"px",t.style.width=a+"px"):(r=o-60,t.style.height=r+"px",t.style.width=r*i+"px")}(n,i,a),d.appendChild(n),"initial"===s?function(e,t){e.innerHTML="",e.appendChild(t),e.firstChild.classList.add("fslightbox-fade-in-animation")}(r[o],n):function(e,t){e.innerHTML="",e.appendChild(t),e.firstChild.offsetWidth,e.firstChild.classList.add("fslightbox-fade-in-animation")}(r[o],n)};if(this.loadYoutubevideo=function(s,n){let i=new t("iframe").addClassesAndCreate(["fslightbox-single-source"]);i.src="//www.youtube.com/embed/"+s+"?enablejsapi=1",i.setAttribute("allowfullscreen",""),i.setAttribute("frameborder","0"),e.data.mediaHolder.holder.appendChild(i),d(i,1920,1080,n)},this.imageLoad=function(e,s){let n=new t("img").addClassesAndCreate(["fslightbox-single-source"]);n.src=e,n.addEventListener("load",function(){d(n,this.width,this.height,s)})},this.videoLoad=function(e,s,n){let i,a,o=!1,r=new t("video").addClassesAndCreate(["fslightbox-single-source"]),l=new t("source").elem;l.src=e,l.type=n,r.appendChild(l),r.onloadedmetadata=function(){o||(this.videoWidth&&0!==this.videoWidth?(i=this.videoWidth,a=this.videoHeight):(i=1920,a=1080),o=!0,d(r,i,a,s))};let c=0,u=setInterval(function(){if(o)clearInterval(u);else{if(r.videoWidth&&0!==r.videoWidth)i=r.videoWidth,a=r.videoHeight;else{if(c<31)return void c++;i=1920,a=1080}o=!0,d(r,i,a,s),clearInterval(u)}},100);r.setAttribute("controls","")},this.invalidFile=function(e){let s=new t("div").addClassesAndCreate(["fslightbox-invalid-file-wrapper"]);s.innerHTML="Invalid file",d(s,window.innerWidth,window.innerHeight,e)},this.createSourceElem=function(t){const s=document.createElement("a"),n=e.data.urls[t];if(s.href=n,"www.youtube.com"===s.hostname)e.data.videos[t]=!1,this.loadYoutubevideo(function(e){let t=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);return t&&11==t[2].length?t[2]:"error"}(n),t);else{const s=new XMLHttpRequest;s.onreadystatechange=function(){if(2===s.readyState){if(200===s.status||206===s.status){const n=s.getResponseHeader("content-type"),a=n.slice(0,n.indexOf("/"));"image"===a?i.imageLoad(o[t],t):"video"===a?(i.videoLoad(o[t],t,n),e.data.videos[t]=!0):i.invalidFile(t)}else i.invalidFile(t);s.abort()}},s.open("get",n,!0),s.send(null)}},"initial"===s)e.appendMethods.renderHolderInitial(e,n,t),o.length>=1&&this.createSourceElem(a.current),o.length>=2&&this.createSourceElem(a.next),o.length>=3&&this.createSourceElem(a.previous);else switch(e.appendMethods.renderHolder(e,n,s),s){case"previous":this.createSourceElem(a.previous);break;case"current":this.createSourceElem(a.current);break;case"next":this.createSourceElem(a.next)}}},{}],5:[function(e,t,s){t.exports=function(e,t){let s={renderNav:function(s){e.data.nav=new t("div").addClassesAndCreate(["fslightbox-nav"]),e.toolbar.renderToolbar(e.data.nav),(new this.slideCounter).renderSlideCounter(e.data.nav),s.appendChild(e.data.nav)},createBTN:function(s,n,i){let a=new t("div").addClassesAndCreate(["fslightbox-slide-btn","button-style"]);a.appendChild((new e.SVGIcon).getSVGIcon("0 0 20 20","1em",i)),s.appendChild(a),n.appendChild(s)},renderSlideButtons:function(s){if(!1===e.data.slideButtons)return!1;let n=new t("div").addClassesAndCreate(["fslightbox-slide-btn-container","fslightbox-slide-btn-left-container"]);this.createBTN(n,s,"M8.388,10.049l4.76-4.873c0.303-0.31,0.297-0.804-0.012-1.105c-0.309-0.304-0.803-0.293-1.105,0.012L6.726,9.516c-0.303,0.31-0.296,0.805,0.012,1.105l5.433,5.307c0.152,0.148,0.35,0.223,0.547,0.223c0.203,0,0.406-0.08,0.559-0.236c0.303-0.309,0.295-0.803-0.012-1.104L8.388,10.049z"),n.onclick=function(){e.appendMethods.previousSlideViaButton(e,e.data.slide)};let i=new t("div").addClassesAndCreate(["fslightbox-slide-btn-container","fslightbox-slide-btn-right-container"]);this.createBTN(i,s,"M11.611,10.049l-4.76-4.873c-0.303-0.31-0.297-0.804,0.012-1.105c0.309-0.304,0.803-0.293,1.105,0.012l5.306,5.433c0.304,0.31,0.296,0.805-0.012,1.105L7.83,15.928c-0.152,0.148-0.35,0.223-0.547,0.223c-0.203,0-0.406-0.08-0.559-0.236c-0.303-0.309-0.295-0.803,0.012-1.104L11.611,10.049z"),i.onclick=function(){e.appendMethods.nextSlideViaButton(e,e.data.slide)}},slideCounter:function(){let s=new t("div").addClassesAndCreate(["fslightbox-slide-number-container"]);e.data.slideCounterElem=new t("div").addClassesAndCreate(["fslightbox-slide-slide-number"]),e.data.slideCounterElem.innerHTML=e.data.slide,e.data.slideCounterElem.id="current_slide";let n=new t("div").addClassesAndCreate(["fslightbox-slide-slide-number","fslightbox-slash"]);n.innerHTML="/";let i=new t("div").addClassesAndCreate(["fslightbox-slide-slide-number"]);i.innerHTML=e.data.total_slides,s.appendChild(e.data.slideCounterElem),s.appendChild(n),s.appendChild(i),e.data.updateSlideNumber=function(t){e.data.slide=t,e.data.slideCounterElem.innerHTML=t},this.renderSlideCounter=function(t){e.data.slideCounter&&t.appendChild(s)}}};e.scrollbar.showScrollbar(),e.element.id="fslightbox-container",document.body.appendChild(e.element),s.renderNav(e.element),e.data.total_slides>1&&s.renderSlideButtons(e.element),e.data.holderWrapper=new t("div").addClassesAndCreate(["fslightbox-holder-wrapper"]),e.element.appendChild(e.data.holderWrapper),e.data.mediaHolder=new e.mediaHolder,e.data.mediaHolder.renderHolder(e.data.holderWrapper),e.element.classList.add(["fslightbox-fade-in-animation"]),e.data.isfirstTimeLoad=!0}},{}],6:[function(e,t,s){t.exports=function(e,t){this.toolbarElem=new t("div").addClassesAndCreate(["fslightbox-toolbar"]);const s=this;this.renderDefaultButtons=function(){let n=e.data.toolbarButtons;if(!0===n.fullscreen){let n=new t("div").addClassesAndCreate(["fslightbox-toolbar-button","button-style"]),i=(new e.SVGIcon).getSVGIcon("0 0 17.5 17.5","1.25em","M4.5 11H3v4h4v-1.5H4.5V11zM3 7h1.5V4.5H7V3H3v4zm10.5 6.5H11V15h4v-4h-1.5v2.5zM11 3v1.5h2.5V7H15V3h-4z");n.appendChild(i),n.onclick=function(){e.data.fullscreen?s.closeFullscreen():s.openFullscreen()},this.toolbarElem.appendChild(n)}if(!0===n.close){let s=new t("div").addClassesAndCreate(["fslightbox-toolbar-button","button-style"]),n=(new e.SVGIcon).getSVGIcon("0 0 20 20","1em","M 11.469 10 l 7.08 -7.08 c 0.406 -0.406 0.406 -1.064 0 -1.469 c -0.406 -0.406 -1.063 -0.406 -1.469 0 L 10 8.53 l -7.081 -7.08 c -0.406 -0.406 -1.064 -0.406 -1.469 0 c -0.406 0.406 -0.406 1.063 0 1.469 L 8.531 10 L 1.45 17.081 c -0.406 0.406 -0.406 1.064 0 1.469 c 0.203 0.203 0.469 0.304 0.735 0.304 c 0.266 0 0.531 -0.101 0.735 -0.304 L 10 11.469 l 7.08 7.081 c 0.203 0.203 0.469 0.304 0.735 0.304 c 0.267 0 0.532 -0.101 0.735 -0.304 c 0.406 -0.406 0.406 -1.064 0 -1.469 L 11.469 10 Z");s.appendChild(n),s.onclick=function(){e.data.fadingOut||e.hide()},this.toolbarElem.appendChild(s)}},this.openFullscreen=function(){e.data.fullscreen=!0;let t=document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen()},this.closeFullscreen=function(){e.data.fullscreen=!1,document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},this.renderToolbar=function(e){this.renderDefaultButtons(),e.appendChild(this.toolbarElem)}}},{}]},{},[3,5,4,1,2,6]);
{
"name": "fslightbox",
"version": "1.4.3",
"description": "Fullscreen media lightbox library in vanilla JS. Fullscreen Lightbox is a tool for displaying images, videos in nice overlaying box. Technologies: JavaScript, SCSS",
"version": "1.4.4",
"description": "Fullscreen media lightbox library written in vanilla JS. Technologies: JavaScript, SCSS",
"main": "index.js",
"dist-tags": {
"latest": "1.4.3"
"latest": "1.4.4"
},

@@ -17,9 +17,11 @@ "scripts": {

"author": "",
"license": "ISC",
"license": "MIT",
"bugs": {
"url": "https://github.com/PiotrZdziarski/FullscreenLightbox/issues"
},
"homepage": "http://fslightbox.com",
"homepage": "https://fslightbox.com",
"keywords": [
"lightbox",
"javascript lightbox",
"vanilla js lightbox",
"fullscreen lightbox",

@@ -26,0 +28,0 @@ "fslightbox",

@@ -1,8 +0,10 @@

# Fullscreen Lightbox
# Fullscreen Lightbox Basic
## Version - 1.4.3
## Version - 1.4.4
## Description
JavaScript media box library for presenting images, videos.
JavaScript lightbox library for presenting images, videos in overlaying box.
Websites: https://fslightbox.com
Open source project.

@@ -9,0 +11,0 @@ Technologies:

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc