| Current Path : /home/smartconb/www/armencom33/media/com_eventgallery/dist/ |
| Current File : /home/smartconb/www/armencom33/media/com_eventgallery/dist/eventgallery.js |
/*! For license information please see eventgallery.js.LICENSE.txt */
(function(){var __webpack_modules__={9259:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";function removeElement(t,e){var i=t.indexOf(e);i>-1&&t.splice(i,1)}function mergeObjects(t,e){if(null===e||null===t)return t;for(var i in e)t[i]=e[i];return t}function getElementWidth(t){return t?parseFloat(getComputedStyle(t,null).width.replace("px","")):0}function getElementHeight(t){return t?parseFloat(getComputedStyle(t,null).height.replace("px","")):0}function calcBorderWidth(t,e){for(var i=0,n=0;n<t.length;n++)for(var o=getComputedStyle(t[n],null),r=0;r<e.length;r++){var s=parseFloat(o[e[r]]);isNaN(s)||(i+=s)}return i}function addUrlHashParameter(t,e,i){var n=removeUrlHashParameter(t,e).split("#"),o=n[0],r=n.length>1?n[1].split("&"):[];return r.push(encodeURIComponent(e)+"="+encodeURIComponent(i)),r.length>0?o+"#"+r.join("&"):o}function getUrlHashParameterValue(t,e){var i,n=t.split("#"),o=n.length>1?n[1].split("&"):[];if(o.length>0)for(var r=encodeURIComponent(e)+"=",s=0;s<o.length;s++)0===o[s].indexOf(r,0)&&(i=o[s].replace(r,""));return i}function removeUrlHashParameter(t,e){var i=t.split("#"),n=i[0],o=i.length>1?i[1].split("&"):[];if(o.length>0){for(var r=encodeURIComponent(e)+"=",s=[],a=0;a<o.length;a++)0===o[a].indexOf(r,0)||s.push(o[a]);o=s}return o.length>0?n+"#"+o.join("&"):n}function addUrlParameter(t,e,i){var n,o=removeUrlParameter(t,e).split("#"),r=o[0].split("?");return n=1===r.length?r[0]+"?"+encodeURIComponent(e)+"="+encodeURIComponent(i):r.join("?")+"&"+encodeURIComponent(e)+"="+encodeURIComponent(i),o.length>1?n+"#"+o[1]:n}function removeUrlParameter(t,e){var i,n=t.split("#"),o=n[0].split("?");if(o.length>1){for(var r=encodeURIComponent(e)+"=",s=o[1].split("&"),a=0;a<s.length;a++)0===s[a].indexOf(r,0)&&s.splice(a,1);i=s.length>0?o[0]+"?"+s.join("&"):o[0]}else i=o[0];return n.length>1?i+"#"+n[1]:i}function setCSSStyle(t,e,i){for(var n=0;n<t.length;n++)t[n].style[e]=i}function getOuterHeight(t){var e=t.offsetHeight,i=getComputedStyle(t);return e+(parseInt(i.marginTop)+parseInt(i.marginBottom))}function getParents(t){var e=[];if(null===t)return e;for(;null!=t.parentElement;){var i=t.parentElement;e.push(i),t=i}return e}function getParent(t,e){for(var i=getParents(t),n=0;n<i.length;n++)if(i[n].matches(e))return i[n];return null}function insertAndExecute(htmlElement,newContent){htmlElement.innerHTML=newContent;for(var scripts=Array.prototype.slice.call(htmlElement.getElementsByTagName("script")),i=0;i<scripts.length;i++)if(""!==scripts[i].src){var tag=document.createElement("script");tag.src=scripts[i].src,document.getElementsByTagName("head")[0].appendChild(tag)}else try{eval(scripts[i].innerHTML)}catch(t){console.error(t)}}function forEach(t,e){if(!t)return 0;for(var i=0;i<t.length;i++)e(t[i],i);return t.length}__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{addUrlHashParameter:function(){return addUrlHashParameter},addUrlParameter:function(){return addUrlParameter},calcBorderWidth:function(){return calcBorderWidth},forEach:function(){return forEach},getElementHeight:function(){return getElementHeight},getElementWidth:function(){return getElementWidth},getOuterHeight:function(){return getOuterHeight},getParent:function(){return getParent},getParents:function(){return getParents},getUrlHashParameterValue:function(){return getUrlHashParameterValue},insertAndExecute:function(){return insertAndExecute},mergeObjects:function(){return mergeObjects},removeElement:function(){return removeElement},removeUrlHashParameter:function(){return removeUrlHashParameter},removeUrlParameter:function(){return removeUrlParameter},serializeForm:function(){return serializeForm},setCSSStyle:function(){return setCSSStyle}});var serializeForm=function(t){for(var e=[],i=t.querySelectorAll("input,select,textarea"),n=0;n<i.length;n++){var o=i[n];if(o.name&&!o.disabled&&"file"!==o.type&&"reset"!==o.type&&"submit"!==o.type&&"button"!==o.type)if("select-multiple"===o.type)for(var r=0;r<o.options.length;r++)o.options[r].selected&&e.push(encodeURIComponent(o.name)+"="+encodeURIComponent(o.options[r].value));else("checkbox"!==o.type&&"radio"!==o.type||o.checked)&&e.push(encodeURIComponent(o.name)+"="+encodeURIComponent(o.value))}return e.join("&")}},2495:function(t,e,i){"use strict";var n=i(8409),o=i(3417),r=i(5296);function s(t,e,i){var n=new r.A,o=!1,s={mount:function(){this._a=e.Html.wrapper.querySelectorAll("a,span,img"),this.bind()},bind:function(){n.on("click",e.Html.wrapper,this.click,!0)},unbind:function(){n.off("click",e.Html.wrapper)},click:function(t){o&&(t.stopPropagation(),t.preventDefault())},detach:function(){return o=!0,this},attach:function(){return o=!1,this}};return Object.defineProperty(s,"items",{get:function(){return s._a}}),i.on("swipe.move",(function(){s.detach()})),i.on("swipe.end",(function(){e.Transition.after((function(){s.attach()}))})),i.on("destroy",(function(){s.attach(),s.unbind(),n.destroy()})),s}function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function l(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?a(Object(i),!0).forEach((function(e){p(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):a(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function d(t,e,i){return e&&h(t.prototype,e),i&&h(t,i),t}function p(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function m(t,e){return m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},m(t,e)}function v(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,n=f(t);if(e){var o=f(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,i)}}function y(){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,i){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:i):o.value}},y.apply(this,arguments)}var g={type:"slider",startAt:0,perView:1,focusAt:0,gap:10,autoplay:!1,hoverpause:!0,keyboard:!0,bound:!1,swipeThreshold:80,dragThreshold:120,perSwipe:"",touchRatio:.5,touchAngle:45,animationDuration:400,rewind:!0,rewindDuration:800,animationTimingFunc:"cubic-bezier(.165, .840, .440, 1)",waitForTransition:!0,throttle:10,direction:"ltr",peek:0,cloningRatio:1,breakpoints:{},classes:{swipeable:"glide--swipeable",dragging:"glide--dragging",direction:{ltr:"glide--ltr",rtl:"glide--rtl"},type:{slider:"glide--slider",carousel:"glide--carousel"},slide:{clone:"glide__slide--clone",active:"glide__slide--active"},arrow:{disabled:"glide__arrow--disabled"},nav:{active:"glide__bullet--active"}}};function b(t){console.error("[Glide warn]: ".concat(t))}function w(t){return parseInt(t)}function _(t){return"string"==typeof t}function S(t){var e=c(t);return"function"===e||"object"===e&&!!t}function P(t){return"function"==typeof t}function C(t){return void 0===t}function E(t){return t.constructor===Array}function x(t,e,i){Object.defineProperty(t,e,i)}function k(t,e){var i=Object.assign({},t,e);return e.hasOwnProperty("classes")&&(i.classes=Object.assign({},t.classes,e.classes),["direction","type","slide","arrow","nav"].forEach((function(n){e.classes.hasOwnProperty(n)&&(i.classes[n]=l(l({},t.classes[n]),e.classes[n]))}))),e.hasOwnProperty("breakpoints")&&(i.breakpoints=Object.assign({},t.breakpoints,e.breakpoints)),i}var A=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u(this,t),this.events=e,this.hop=e.hasOwnProperty}return d(t,[{key:"on",value:function(t,e){if(!E(t)){this.hop.call(this.events,t)||(this.events[t]=[]);var i=this.events[t].push(e)-1;return{remove:function(){delete this.events[t][i]}}}for(var n=0;n<t.length;n++)this.on(t[n],e)}},{key:"emit",value:function(t,e){if(E(t))for(var i=0;i<t.length;i++)this.emit(t[i],e);else this.hop.call(this.events,t)&&this.events[t].forEach((function(t){t(e||{})}))}}]),t}(),L=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u(this,t),this._c={},this._t=[],this._e=new A,this.disabled=!1,this.selector=e,this.settings=k(g,i),this.index=this.settings.startAt}return d(t,[{key:"mount",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._e.emit("mount.before"),S(t)?this._c=function(t,e,i){var n={};for(var o in e)P(e[o])?n[o]=e[o](t,n,i):b("Extension must be a function");for(var r in n)P(n[r].mount)&&n[r].mount();return n}(this,t,this._e):b("You need to provide a object on `mount()`"),this._e.emit("mount.after"),this}},{key:"mutate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return E(t)?this._t=t:b("You need to provide a array on `mutate()`"),this}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.settings=k(this.settings,t),t.hasOwnProperty("startAt")&&(this.index=t.startAt),this._e.emit("update"),this}},{key:"go",value:function(t){return this._c.Run.make(t),this}},{key:"move",value:function(t){return this._c.Transition.disable(),this._c.Move.make(t),this}},{key:"destroy",value:function(){return this._e.emit("destroy"),this}},{key:"play",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t&&(this.settings.autoplay=t),this._e.emit("play"),this}},{key:"pause",value:function(){return this._e.emit("pause"),this}},{key:"disable",value:function(){return this.disabled=!0,this}},{key:"enable",value:function(){return this.disabled=!1,this}},{key:"on",value:function(t,e){return this._e.on(t,e),this}},{key:"isType",value:function(t){return this.settings.type===t}},{key:"settings",get:function(){return this._o},set:function(t){S(t)?this._o=t:b("Options must be an `object` instance.")}},{key:"index",get:function(){return this._i},set:function(t){this._i=w(t)}},{key:"type",get:function(){return this.settings.type}},{key:"disabled",get:function(){return this._d},set:function(t){this._d=!!t}}]),t}();function O(){return(new Date).getTime()}function T(t,e){var i,n,o,r,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=0,l=function(){a=!1===s.leading?0:O(),i=null,r=t.apply(n,o),i||(n=o=null)},c=function(){var c=O();a||!1!==s.leading||(a=c);var u=e-(c-a);return n=this,o=arguments,u<=0||u>e?(i&&(clearTimeout(i),i=null),a=c,r=t.apply(n,o),i||(n=o=null)):i||!1===s.trailing||(i=setTimeout(l,u)),r};return c.cancel=function(){clearTimeout(i),a=0,i=n=o=null},c}var I={ltr:["marginLeft","marginRight"],rtl:["marginRight","marginLeft"]};function z(t){if(t&&t.parentNode){for(var e=t.parentNode.firstChild,i=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&i.push(e);return i}return[]}function j(t){return Array.prototype.slice.call(t)}var H=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u(this,t),this.listeners=e}return d(t,[{key:"on",value:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];_(t)&&(t=[t]);for(var o=0;o<t.length;o++)this.listeners[t[o]]=i,e.addEventListener(t[o],this.listeners[t[o]],n)}},{key:"off",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];_(t)&&(t=[t]);for(var n=0;n<t.length;n++)e.removeEventListener(t[n],this.listeners[t[n]],i)}},{key:"destroy",value:function(){delete this.listeners}}]),t}(),D=["ltr","rtl"],R={">":"<","<":">","=":"="};function B(t,e){return{modify:function(t){return e.Direction.is("rtl")?-t:t}}}function M(t,e){return{modify:function(t){var i=Math.floor(t/e.Sizes.slideWidth);return t+e.Gaps.value*i}}}function F(t,e){return{modify:function(t){return t+e.Clones.grow/2}}}function Z(t,e){return{modify:function(i){if(t.settings.focusAt>=0){var n=e.Peek.value;return S(n)?i-n.before:i-n}return i}}}function q(t,e){return{modify:function(i){var n=e.Gaps.value,o=e.Sizes.width,r=t.settings.focusAt,s=e.Sizes.slideWidth;return"center"===r?i-(o/2-s/2):i-s*r-n*r}}}var N=!1;try{var U=Object.defineProperty({},"passive",{get:function(){N=!0}});window.addEventListener("testPassive",null,U),window.removeEventListener("testPassive",null,U)}catch(t){}var W=N,G=["touchstart","mousedown"],V=["touchmove","mousemove"],K=["touchend","touchcancel","mouseup","mouseleave"],Y=["mousedown","mousemove","mouseup","mouseleave"];function X(t,e,i){var n=new H,o=0,r=0,s=0,a=!1,l=!!W&&{passive:!0},c={mount:function(){this.bindSwipeStart()},start:function(e){if(!a&&!t.disabled){this.disable();var n=this.touches(e);o=null,r=w(n.pageX),s=w(n.pageY),this.bindSwipeMove(),this.bindSwipeEnd(),i.emit("swipe.start")}},move:function(n){if(!t.disabled){var a=t.settings,l=a.touchAngle,c=a.touchRatio,u=a.classes,h=this.touches(n),d=w(h.pageX)-r,p=w(h.pageY)-s,f=Math.abs(d<<2),m=Math.abs(p<<2),v=Math.sqrt(f+m),y=Math.sqrt(m);if(!(180*(o=Math.asin(y/v))/Math.PI<l))return!1;n.stopPropagation(),e.Move.make(d*parseFloat(c)),e.Html.root.classList.add(u.dragging),i.emit("swipe.move")}},end:function(n){if(!t.disabled){var s=t.settings,a=s.perSwipe,l=s.touchAngle,c=s.classes,u=this.touches(n),h=this.threshold(n),d=u.pageX-r,p=180*o/Math.PI;this.enable(),d>h&&p<l?e.Run.make(e.Direction.resolve("".concat(a,"<"))):d<-h&&p<l?e.Run.make(e.Direction.resolve("".concat(a,">"))):e.Move.make(),e.Html.root.classList.remove(c.dragging),this.unbindSwipeMove(),this.unbindSwipeEnd(),i.emit("swipe.end")}},bindSwipeStart:function(){var i=this,o=t.settings,r=o.swipeThreshold,s=o.dragThreshold;r&&n.on(G[0],e.Html.wrapper,(function(t){i.start(t)}),l),s&&n.on(G[1],e.Html.wrapper,(function(t){i.start(t)}),l)},unbindSwipeStart:function(){n.off(G[0],e.Html.wrapper,l),n.off(G[1],e.Html.wrapper,l)},bindSwipeMove:function(){var i=this;n.on(V,e.Html.wrapper,T((function(t){i.move(t)}),t.settings.throttle),l)},unbindSwipeMove:function(){n.off(V,e.Html.wrapper,l)},bindSwipeEnd:function(){var t=this;n.on(K,e.Html.wrapper,(function(e){t.end(e)}))},unbindSwipeEnd:function(){n.off(K,e.Html.wrapper)},touches:function(t){return Y.indexOf(t.type)>-1?t:t.touches[0]||t.changedTouches[0]},threshold:function(e){var i=t.settings;return Y.indexOf(e.type)>-1?i.dragThreshold:i.swipeThreshold},enable:function(){return a=!1,e.Transition.enable(),this},disable:function(){return a=!0,e.Transition.disable(),this}};return i.on("build.after",(function(){e.Html.root.classList.add(t.settings.classes.swipeable)})),i.on("destroy",(function(){c.unbindSwipeStart(),c.unbindSwipeMove(),c.unbindSwipeEnd(),n.destroy()})),c}function $(t,e,i){var n=new H,o={mount:function(){this.bind()},bind:function(){n.on("dragstart",e.Html.wrapper,this.dragstart)},unbind:function(){n.off("dragstart",e.Html.wrapper)},dragstart:function(t){t.preventDefault()}};return i.on("destroy",(function(){o.unbind(),n.destroy()})),o}var J='[data-glide-el^="controls"]',Q="".concat(J,' [data-glide-dir*="<"]'),tt="".concat(J,' [data-glide-dir*=">"]');function et(t,e,i){var n=new H,o=!!W&&{passive:!0},r={mount:function(){this._n=e.Html.root.querySelectorAll('[data-glide-el="controls[nav]"]'),this._c=e.Html.root.querySelectorAll(J),this._arrowControls={previous:e.Html.root.querySelectorAll(Q),next:e.Html.root.querySelectorAll(tt)},this.addBindings()},setActive:function(){for(var t=0;t<this._n.length;t++)this.addClass(this._n[t].children)},removeActive:function(){for(var t=0;t<this._n.length;t++)this.removeClass(this._n[t].children)},addClass:function(e){var i=t.settings,n=e[t.index];n&&(n.classList.add(i.classes.nav.active),z(n).forEach((function(t){t.classList.remove(i.classes.nav.active)})))},removeClass:function(e){var i=e[t.index];null==i||i.classList.remove(t.settings.classes.nav.active)},setArrowState:function(){if(!t.settings.rewind){var i=r._arrowControls.next,n=r._arrowControls.previous;this.resetArrowState(i,n),0===t.index&&this.disableArrow(n),t.index===e.Run.length&&this.disableArrow(i)}},resetArrowState:function(){for(var e=t.settings,i=arguments.length,n=new Array(i),o=0;o<i;o++)n[o]=arguments[o];n.forEach((function(t){j(t).forEach((function(t){t.classList.remove(e.classes.arrow.disabled)}))}))},disableArrow:function(){for(var e=t.settings,i=arguments.length,n=new Array(i),o=0;o<i;o++)n[o]=arguments[o];n.forEach((function(t){j(t).forEach((function(t){t.classList.add(e.classes.arrow.disabled)}))}))},addBindings:function(){for(var t=0;t<this._c.length;t++)this.bind(this._c[t].children)},removeBindings:function(){for(var t=0;t<this._c.length;t++)this.unbind(this._c[t].children)},bind:function(t){for(var e=0;e<t.length;e++)n.on("click",t[e],this.click),n.on("touchstart",t[e],this.click,o)},unbind:function(t){for(var e=0;e<t.length;e++)n.off(["click","touchstart"],t[e])},click:function(t){W||"touchstart"!==t.type||t.preventDefault();var i=t.currentTarget.getAttribute("data-glide-dir");e.Run.make(e.Direction.resolve(i))}};return x(r,"items",{get:function(){return r._c}}),i.on(["mount.after","move.after"],(function(){r.setActive()})),i.on(["mount.after","run"],(function(){r.setArrowState()})),i.on("destroy",(function(){r.removeBindings(),r.removeActive(),n.destroy()})),r}function it(t,e,i){var n=new H,o={mount:function(){this.enable(),this.start(),t.settings.hoverpause&&this.bind()},enable:function(){this._e=!0},disable:function(){this._e=!1},start:function(){var n=this;this._e&&(this.enable(),t.settings.autoplay&&C(this._i)&&(this._i=setInterval((function(){n.stop(),e.Run.make(">"),n.start(),i.emit("autoplay")}),this.time)))},stop:function(){this._i=clearInterval(this._i)},bind:function(){var t=this;n.on("mouseover",e.Html.root,(function(){t._e&&t.stop()})),n.on("mouseout",e.Html.root,(function(){t._e&&t.start()}))},unbind:function(){n.off(["mouseover","mouseout"],e.Html.root)}};return x(o,"time",{get:function(){return w(e.Html.slides[t.index].getAttribute("data-glide-autoplay")||t.settings.autoplay)}}),i.on(["destroy","update"],(function(){o.unbind()})),i.on(["run.before","swipe.start","update"],(function(){o.stop()})),i.on(["pause","destroy"],(function(){o.disable(),o.stop()})),i.on(["run.after","swipe.end"],(function(){o.start()})),i.on(["play"],(function(){o.enable(),o.start()})),i.on("update",(function(){o.mount()})),i.on("destroy",(function(){n.destroy()})),o}function nt(t){return S(t)?(e=t,Object.keys(e).sort().reduce((function(t,i){return t[i]=e[i],t[i],t}),{})):(b("Breakpoints option must be an object"),{});var e}function ot(t,e,i){var n=new H,o=t.settings,r=nt(o.breakpoints),s=Object.assign({},o),a={match:function(t){if(void 0!==window.matchMedia)for(var e in t)if(t.hasOwnProperty(e)&&window.matchMedia("(max-width: ".concat(e,"px)")).matches)return t[e];return s}};return Object.assign(o,a.match(r)),n.on("resize",window,T((function(){t.settings=k(o,a.match(r))}),t.settings.throttle)),i.on("update",(function(){r=nt(r),s=Object.assign({},o)})),i.on("destroy",(function(){n.off("resize",window)})),a}var rt={Html:function(t,e,i){var n={mount:function(){this.root=t.selector,this.track=this.root.querySelector('[data-glide-el="track"]'),this.collectSlides()},collectSlides:function(){this.slides=j(this.wrapper.children).filter((function(e){return!e.classList.contains(t.settings.classes.slide.clone)}))}};return x(n,"root",{get:function(){return n._r},set:function(t){_(t)&&(t=document.querySelector(t)),null!==t?n._r=t:b("Root element must be a existing Html node")}}),x(n,"track",{get:function(){return n._t},set:function(t){n._t=t}}),x(n,"wrapper",{get:function(){return n.track.children[0]}}),i.on("update",(function(){n.collectSlides()})),n},Translate:function(t,e,i){var n={set:function(i){var n=function(t,e){var i=[M,F,Z,q].concat(t._t,[B]);return{mutate:function(n){for(var o=0;o<i.length;o++){var r=i[o];P(r)&&P(r().modify)?n=r(t,e,undefined).modify(n):b("Transformer should be a function that returns an object with `modify()` method")}return n}}}(t,e).mutate(i),o="translate3d(".concat(-1*n,"px, 0px, 0px)");e.Html.wrapper.style.mozTransform=o,e.Html.wrapper.style.webkitTransform=o,e.Html.wrapper.style.transform=o},remove:function(){e.Html.wrapper.style.transform=""},getStartIndex:function(){var i=e.Sizes.length,n=t.index,o=t.settings.perView;return e.Run.isOffset(">")||e.Run.isOffset("|>")?i+(n-o):(n+o)%i},getTravelDistance:function(){var i=e.Sizes.slideWidth*t.settings.perView;return e.Run.isOffset(">")||e.Run.isOffset("|>")?-1*i:i}};return i.on("move",(function(o){if(!t.isType("carousel")||!e.Run.isOffset())return n.set(o.movement);e.Transition.after((function(){i.emit("translate.jump"),n.set(e.Sizes.slideWidth*t.index)}));var r=e.Sizes.slideWidth*e.Translate.getStartIndex();return n.set(r-e.Translate.getTravelDistance())})),i.on("destroy",(function(){n.remove()})),n},Transition:function(t,e,i){var n=!1,o={compose:function(e){var i=t.settings;return n?"".concat(e," 0ms ").concat(i.animationTimingFunc):"".concat(e," ").concat(this.duration,"ms ").concat(i.animationTimingFunc)},set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";e.Html.wrapper.style.transition=this.compose(t)},remove:function(){e.Html.wrapper.style.transition=""},after:function(t){setTimeout((function(){t()}),this.duration)},enable:function(){n=!1,this.set()},disable:function(){n=!0,this.set()}};return x(o,"duration",{get:function(){var i=t.settings;return t.isType("slider")&&e.Run.offset?i.rewindDuration:i.animationDuration}}),i.on("move",(function(){o.set()})),i.on(["build.before","resize","translate.jump"],(function(){o.disable()})),i.on("run",(function(){o.enable()})),i.on("destroy",(function(){o.remove()})),o},Direction:function(t,e,i){var n={mount:function(){this.value=t.settings.direction},resolve:function(t){var e=t.slice(0,1);return this.is("rtl")?t.split(e).join(R[e]):t},is:function(t){return this.value===t},addClass:function(){e.Html.root.classList.add(t.settings.classes.direction[this.value])},removeClass:function(){e.Html.root.classList.remove(t.settings.classes.direction[this.value])}};return x(n,"value",{get:function(){return n._v},set:function(t){D.indexOf(t)>-1?n._v=t:b("Direction value must be `ltr` or `rtl`")}}),i.on(["destroy","update"],(function(){n.removeClass()})),i.on("update",(function(){n.mount()})),i.on(["build.before","update"],(function(){n.addClass()})),n},Peek:function(t,e,i){var n={mount:function(){this.value=t.settings.peek}};return x(n,"value",{get:function(){return n._v},set:function(t){S(t)?(t.before=w(t.before),t.after=w(t.after)):t=w(t),n._v=t}}),x(n,"reductor",{get:function(){var e=n.value,i=t.settings.perView;return S(e)?e.before/i+e.after/i:2*e/i}}),i.on(["resize","update"],(function(){n.mount()})),n},Sizes:function(t,e,i){var n={setupSlides:function(){for(var t="".concat(this.slideWidth,"px"),i=e.Html.slides,n=0;n<i.length;n++)i[n].style.width=t},setupWrapper:function(){e.Html.wrapper.style.width="".concat(this.wrapperSize,"px")},remove:function(){for(var t=e.Html.slides,i=0;i<t.length;i++)t[i].style.width="";e.Html.wrapper.style.width=""}};return x(n,"length",{get:function(){return e.Html.slides.length}}),x(n,"width",{get:function(){return e.Html.track.offsetWidth}}),x(n,"wrapperSize",{get:function(){return n.slideWidth*n.length+e.Gaps.grow+e.Clones.grow}}),x(n,"slideWidth",{get:function(){return n.width/t.settings.perView-e.Peek.reductor-e.Gaps.reductor}}),i.on(["build.before","resize","update"],(function(){n.setupSlides(),n.setupWrapper()})),i.on("destroy",(function(){n.remove()})),n},Gaps:function(t,e,i){var n={apply:function(t){for(var i=0,n=t.length;i<n;i++){var o=t[i].style,r=e.Direction.value;o[I[r][0]]=0!==i?"".concat(this.value/2,"px"):"",i!==t.length-1?o[I[r][1]]="".concat(this.value/2,"px"):o[I[r][1]]=""}},remove:function(t){for(var e=0,i=t.length;e<i;e++){var n=t[e].style;n.marginLeft="",n.marginRight=""}}};return x(n,"value",{get:function(){return w(t.settings.gap)}}),x(n,"grow",{get:function(){return n.value*e.Sizes.length}}),x(n,"reductor",{get:function(){var e=t.settings.perView;return n.value*(e-1)/e}}),i.on(["build.after","update"],T((function(){n.apply(e.Html.wrapper.children)}),30)),i.on("destroy",(function(){n.remove(e.Html.wrapper.children)})),n},Move:function(t,e,i){var n={mount:function(){this._o=0},make:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.offset=n,i.emit("move",{movement:this.value}),e.Transition.after((function(){i.emit("move.after",{movement:t.value})}))}};return x(n,"offset",{get:function(){return n._o},set:function(t){n._o=C(t)?0:w(t)}}),x(n,"translate",{get:function(){return e.Sizes.slideWidth*t.index}}),x(n,"value",{get:function(){var t=this.offset,i=this.translate;return e.Direction.is("rtl")?i+t:i-t}}),i.on(["build.before","run"],(function(){n.make()})),n},Clones:function(t,e,i){var n={mount:function(){this.items=[],t.isType("carousel")&&(this.items=this.collect())},collect:function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=e.Html.slides,o=t.settings,r=o.perView,s=o.classes,a=o.cloningRatio;if(n.length>0)for(var l=r+ +!!t.settings.peek+Math.round(r/2),c=n.slice(0,l).reverse(),u=n.slice(-1*l),h=0;h<Math.max(a,Math.floor(r/n.length));h++){for(var d=0;d<c.length;d++){var p=c[d].cloneNode(!0);p.classList.add(s.slide.clone),i.push(p)}for(var f=0;f<u.length;f++){var m=u[f].cloneNode(!0);m.classList.add(s.slide.clone),i.unshift(m)}}return i},append:function(){for(var t=this.items,i=e.Html,n=i.wrapper,o=i.slides,r=Math.floor(t.length/2),s=t.slice(0,r).reverse(),a=t.slice(-1*r).reverse(),l="".concat(e.Sizes.slideWidth,"px"),c=0;c<a.length;c++)n.appendChild(a[c]);for(var u=0;u<s.length;u++)n.insertBefore(s[u],o[0]);for(var h=0;h<t.length;h++)t[h].style.width=l},remove:function(){for(var t=this.items,i=0;i<t.length;i++)e.Html.wrapper.removeChild(t[i])}};return x(n,"grow",{get:function(){return(e.Sizes.slideWidth+e.Gaps.value)*n.items.length}}),i.on("update",(function(){n.remove(),n.mount(),n.append()})),i.on("build.before",(function(){t.isType("carousel")&&n.append()})),i.on("destroy",(function(){n.remove()})),n},Resize:function(t,e,i){var n=new H,o={mount:function(){this.bind()},bind:function(){n.on("resize",window,T((function(){i.emit("resize")}),t.settings.throttle))},unbind:function(){n.off("resize",window)}};return i.on("destroy",(function(){o.unbind(),n.destroy()})),o},Build:function(t,e,i){var n={mount:function(){i.emit("build.before"),this.typeClass(),this.activeClass(),i.emit("build.after")},typeClass:function(){e.Html.root.classList.add(t.settings.classes.type[t.settings.type])},activeClass:function(){var i=t.settings.classes,n=e.Html.slides[t.index];n&&(n.classList.add(i.slide.active),z(n).forEach((function(t){t.classList.remove(i.slide.active)})))},removeClasses:function(){var i=t.settings.classes,n=i.type,o=i.slide;e.Html.root.classList.remove(n[t.settings.type]),e.Html.slides.forEach((function(t){t.classList.remove(o.active)}))}};return i.on(["destroy","update"],(function(){n.removeClasses()})),i.on(["resize","update"],(function(){n.mount()})),i.on("move.after",(function(){n.activeClass()})),n},Run:function(t,e,i){var n={mount:function(){this._o=!1},make:function(n){var o=this;t.disabled||(!t.settings.waitForTransition||t.disable(),this.move=n,i.emit("run.before",this.move),this.calculate(),i.emit("run",this.move),e.Transition.after((function(){o.isStart()&&i.emit("run.start",o.move),o.isEnd()&&i.emit("run.end",o.move),o.isOffset()&&(o._o=!1,i.emit("run.offset",o.move)),i.emit("run.after",o.move),t.enable()})))},calculate:function(){var e=this.move,i=this.length,o=e.steps,r=e.direction,s=1;if("="===r)return t.settings.bound&&w(o)>i?void(t.index=i):void(t.index=o);if(">"!==r||">"!==o)if("<"!==r||"<"!==o){if("|"===r&&(s=t.settings.perView||1),">"===r||"|"===r&&">"===o){var a=function(e){var i=t.index;return t.isType("carousel")?i+e:i+(e-i%e)}(s);return a>i&&(this._o=!0),void(t.index=function(e,i){var o=n.length;return e<=o?e:t.isType("carousel")?e-(o+1):t.settings.rewind?n.isBound()&&!n.isEnd()?o:0:n.isBound()?o:Math.floor(o/i)*i}(a,s))}if("<"===r||"|"===r&&"<"===o){var l=function(e){var i=t.index;return t.isType("carousel")?i-e:(Math.ceil(i/e)-1)*e}(s);return l<0&&(this._o=!0),void(t.index=function(e,i){var o=n.length;return e>=0?e:t.isType("carousel")?e+(o+1):t.settings.rewind?n.isBound()&&n.isStart()?o:Math.floor(o/i)*i:0}(l,s))}b("Invalid direction pattern [".concat(r).concat(o,"] has been used"))}else t.index=0;else t.index=i},isStart:function(){return t.index<=0},isEnd:function(){return t.index>=this.length},isOffset:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return t?!!this._o&&("|>"===t?"|"===this.move.direction&&">"===this.move.steps:"|<"===t?"|"===this.move.direction&&"<"===this.move.steps:this.move.direction===t):this._o},isBound:function(){return t.isType("slider")&&"center"!==t.settings.focusAt&&t.settings.bound}};return x(n,"move",{get:function(){return this._m},set:function(t){var e=t.substr(1);this._m={direction:t.substr(0,1),steps:e?w(e)?w(e):e:0}}}),x(n,"length",{get:function(){var i=t.settings,n=e.Html.slides.length;return this.isBound()?n-1-(w(i.perView)-1)+w(i.focusAt):n-1}}),x(n,"offset",{get:function(){return this._o}}),n}},st=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e)}(i,t);var e=v(i);function i(){return u(this,i),e.apply(this,arguments)}return d(i,[{key:"mount",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return y(f(i.prototype),"mount",this).call(this,Object.assign({},rt,t))}}]),i}(L),at=i(5331);function lt(t){return lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lt(t)}function ct(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ut(n.key),n)}}function ut(t){var e=function(t){if("object"!=lt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=lt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==lt(e)?e:e+""}var ht=".glide",dt=function(){return t=function t(e,i,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.elementSelector=i,this.sourceGroupElement=e,this.doShowNav=n,this.sourceElements=this.getSourceElements()},(e=[{key:"getSourceElements",value:function(){return null===this.sourceGroupElement?null:this.sourceGroupElement.querySelectorAll(this.elementSelector)}},{key:"transform",value:function(t){if(null===this.sourceGroupElement||null===this.sourceElements)return null;if(0===this.sourceElements.length)return null;var e=this.sourceGroupElement.querySelector(ht);null!==e&&e.remove();var i=document.createRange().createContextualFragment('\n<div class="glide">\n <div class="glide__track" data-glide-el="track">\n <ul class="glide__slides"> \n </ul>\n </div>\n <div class="glide__arrows" data-glide-el="controls">\n <button class="glide__arrow glide__arrow--left" data-glide-dir="<">prev</button>\n <button class="glide__arrow glide__arrow--right" data-glide-dir=">">next</button>\n </div>\n</div>');if(!this.doShowNav){var n=i.querySelector(".glide__arrows");at.A.removeHtmlElementNode(n)}for(var o=i.querySelector(".glide__slides"),r=null,s=0;s<this.sourceElements.length;s++){var a=this.sourceElements[s];s%t==0&&((r=document.createElement("li")).className="glide__slide",o.appendChild(r)),r.appendChild(a)}return this.sourceGroupElement.appendChild(i),this.sourceGroupElement.querySelector(ht)}}])&&ct(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function pt(t){return pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pt(t)}function ft(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,mt(n.key),n)}}function mt(t){var e=function(t){if("object"!=pt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=pt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==pt(e)?e:e+""}var vt=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"toCamelCase",value:function(t){return t.replace(/-([a-z])/g,(function(t,e){return e.toUpperCase()}))}}],null&&ft(t.prototype,null),e&&ft(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function yt(t){return yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yt(t)}function gt(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,bt(n.key),n)}}function bt(t){var e=function(t){if("object"!=yt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=yt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==yt(e)?e:e+""}var wt="data-slider-",_t=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.element=e,this.options=Object.assign({autoplay:!1,slidesElementsSelector:"",numberOfRowsPerSlide:1,showNav:"true"},t._parseOptions(e))},i=[{key:"_parseOptions",value:function(t){for(var e={},i=t.attributes,n=0;n<i.length;n++)0===i[n].name.indexOf(wt)&&(e[vt.toCamelCase(i[n].name.replace(wt,""))]=i[n].value);return e}}],(e=[{key:"getAutoPlay",value:function(){return!1!==this.options.autoplay&&parseInt(this.options.autoplay)}},{key:"getSlidesElementsSelector",value:function(){return this.options.slidesElementsSelector}},{key:"doShowNav",value:function(){return"true"===this.options.showNav}},{key:"getNumberOfRowsPerSlide",value:function(){return parseInt(this.options.numberOfRowsPerSlide)}}])&>(t.prototype,e),i&>(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,i}();function St(t){return St="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},St(t)}function Pt(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ct(n.key),n)}}function Ct(t){var e=function(t){if("object"!=St(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=St(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==St(e)?e:e+""}var Et=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return e=t,i=[{key:"getOuterWidth",value:function(t){var e=t.getBoundingClientRect(),i=getComputedStyle(t),n=parseFloat(i.marginLeft),o=parseFloat(i.marginRight);return e.width+n+o}},{key:"calclateNumberOfFittingItemsPerSlide",value:function(e,i,n){if(null==i||null==e)return 1;var o=e.getBoundingClientRect(),r=Math.floor(o.width/t.getOuterWidth(i))*n;return r<1&&(r=1*n),r}}],null&&Pt(e.prototype,null),i&&Pt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,i}();function xt(t){return xt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xt(t)}function kt(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Lt(n.key),n)}}function At(t,e,i){return(e=Lt(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function Lt(t){var e=function(t){if("object"!=xt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=xt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xt(e)?e:e+""}var Ot=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options={elementSelector:"img.eventgallery-lazyme",classForLoaded:"eventgallery-lazyload-loaded",classForLoading:"eventgallery-lazyload-loading"},"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype&&("isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}}),this.imageObserver=new IntersectionObserver((function(e,i){e.forEach((function(e){if(e.isIntersecting){var i=e.target;if(i.dataset.src&&(i.setAttribute("srcset",i.dataset.src),!t.knownImageUrls.includes(i.dataset.src))){t.knownImageUrls.push(i.dataset.src),i.classList.add("eventgallery-lazyload-loading"),i.classList.remove("eventgallery-lazyload-loaded");var n=document.createElement("img");n.src=i.dataset.src,n.onload=function(){i.classList.remove("eventgallery-lazyload-loading"),i.classList.add("eventgallery-lazyload-loaded")}}}}))})))}return e=t,i=[{key:"watchImages",value:function(){if(!t.instance){t.instance=new t;for(var e=document.querySelectorAll(t.instance.options.elementSelector),i=0;i<e.length;i++){var n=e[i];n.dataset.src&&(t.instance.imageObserver?t.instance.imageObserver.observe(n):n.setAttribute("srcset",n.dataset.src))}}}}],null&&kt(e.prototype,null),i&&kt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,i}();function Tt(t){return Tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tt(t)}function It(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,zt(n.key),n)}}function zt(t){var e=function(t){if("object"!=Tt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=Tt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Tt(e)?e:e+""}At(Ot,"instance",null),At(Ot,"knownImageUrls",[]);var jt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sourceGroupElement=e,this.sliderTransformator=null}return e=t,n=[{key:"_loadOptions",value:function(t){return new _t(t)}}],(i=[{key:"start",value:function(){this.sliderOptions=t._loadOptions(this.sourceGroupElement);var e=this.sliderOptions.getSlidesElementsSelector(),i=this.sliderOptions.getAutoPlay(),n=this.sliderOptions.doShowNav(),o=Et.calclateNumberOfFittingItemsPerSlide(this.sourceGroupElement,this.sourceGroupElement.querySelector(e),this.sliderOptions.getNumberOfRowsPerSlide());null==this.sliderTransformator&&(this.sliderTransformator=new dt(this.sourceGroupElement,e,n));var r=this.sliderTransformator.transform(o);null!==r&&(Ot.watchImages(),new st(r,{type:"carousel",perView:1,gap:15,keyboard:!1,autoplay:i}).mount({Swipe:X,Controls:et,Breakpoints:ot,Autoplay:it,Anchor:s,Images:$}))}}])&&It(e.prototype,i),n&&It(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,i,n}(),Ht=i(9259),Dt=i(5598);function Rt(t){return Rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rt(t)}function Bt(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Mt(n.key),n)}}function Mt(t){var e=function(t){if("object"!=Rt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=Rt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Rt(e)?e:e+""}var Ft=function(){return t=function t(e,i,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=(0,Ht.mergeObjects)(this.options,n),this.imageTagContainer=e,this.index=i,this.calculatedWidth=0,this.calcSize()},(e=[{key:"calcSize",value:function(){var t=this.imageTagContainer.querySelector("img");if(t){var e=[this.imageTagContainer,t];this.glueLeft=(0,Ht.calcBorderWidth)(e,["paddingLeft","marginLeft","borderLeftWidth"]),this.glueRight=(0,Ht.calcBorderWidth)(e,["paddingRight","marginRight","borderRightWidth"]),this.glueTop=(0,Ht.calcBorderWidth)(e,["paddingTop","marginTop","borderTopWidth"]),this.glueBottom=(0,Ht.calcBorderWidth)(e,["paddingBottom","marginBottom","borderBottomWidth"]),this.width=parseInt(t.getAttribute("data-width")),this.height=parseInt(t.getAttribute("data-height")),void 0===this.width&&(this.width=(0,Ht.getElementWidth)(this.imageTagContainer)-this.glueLeft-this.glueRight),void 0===this.height&&(this.height=(0,Ht.getElementHeight)(this.imageTagContainer)-this.glueTop-this.glueBottom)}}},{key:"getImageTagHeight",value:function(){return parseFloat(window.getComputedStyle(this.imageTagContainer).height)+this.glueTop+this.glueBottom}},{key:"setSize",value:function(t,e){this.calcSize();var i=t-this.glueLeft-this.glueRight,n=e-this.glueTop-this.glueBottom,o=this.width/this.height,r=this.imageTagContainer.querySelector("img");if(r){var s=new Dt.A,a=r.getAttribute("data-src");a||(a="");var l=r.getAttribute("data-secret");if(null!==l){var c=r.getAttribute("data-secret_o"),u=r.getAttribute("data-secret_h"),h=r.getAttribute("data-secret_k"),d=r.getAttribute("data-farm"),p=(r.getAttribute("data-type"),r.getAttribute("data-server")),f=r.getAttribute("data-id");a=s.getFlickrURL(d,p,l,u,h,c,f,i,n,this.width,this.height)}else{var m=s.getSize(i,n,o);a=s.adjustImageURL(a,m)}r.setAttribute("data-src",a),r.setAttribute("srcset",a),r.style.display="block",r.style.margin="auto",i>0&&(r.style.width=i+"px"),n>0&&(r.style.height=n+"px")}}},{key:"hide",value:function(){this.imageTagContainer.style.display="none"}},{key:"show",value:function(){this.imageTagContainer.style.display="block"}}])&&Bt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Zt(t){return Zt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zt(t)}function qt(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Nt(n.key),n)}}function Nt(t){var e=function(t){if("object"!=Zt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=Zt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Zt(e)?e:e+""}var Ut=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options={maxWidth:960,maxHeight:250,heightJitter:0,adjustHeight:!0,doFillLastRow:!0},this.options=(0,Ht.mergeObjects)(this.options,e),this.isLastRow=!1,this.images=[],this.width=0,this.options.heightJitter>0&&(this.options.maxHeight=Math.floor(this.options.maxHeight+2*Math.random()*this.options.heightJitter-this.options.heightJitter))},(e=[{key:"add",value:function(t){var e=Math.floor(t.width/t.height*this.options.maxHeight),i=this.width+e<=this.options.maxWidth||0===this.images.length;return i||Math.abs(this.options.maxWidth-this.width-e)/this.options.maxWidth<.2&&(i=!0),!!i&&(this.images.push(t),t.calculatedWidth=e,this.width=this.width+e,!0)}},{key:"processRow",value:function(){var t,e,i;for(t=this.options.maxWidth-this.width,this.isLastRow&&!1===this.options.doFillLastRow&&t>=0?(t>=0&&(t=0),e=this.options.maxHeight):e=this.options.maxHeight/(this.width/this.options.maxWidth),!1===this.options.adjustHeight&&(e=this.options.maxHeight),i=0;i<this.images.length;i++){var n=this.images[i],o=n.calculatedWidth,r=o/this.width*t;n.setSize(o+r,e)}}}])&&qt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Wt(t){return Wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wt(t)}function Gt(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Vt(n.key),n)}}function Vt(t){var e=function(t){if("object"!=Wt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=Wt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Wt(e)?e:e+""}var Kt=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options={rowHeightPercentage:100,rowHeight:150,rowHeightJitter:0,minImageWidth:150,doFillLastRow:!1,imagesetContainer:null,imageset:null,firstImageRowHeight:2,initComplete:function(){},resizeStart:function(){},resizeComplete:function(){}},this.images=[],this.eventgalleryPageWidth=0,this.width=null,this.options=(0,Ht.mergeObjects)(this.options,e),void 0!==e&&this.initialize()},(e=[{key:"initialize",value:function(){var t=this;this.width=(0,Ht.getElementWidth)(this.options.imagesetContainer),this.eventgalleryPageWidth=this.width,this.images=[],(0,Ht.forEach)(this.options.imageset,(function(e,i){t.images.push(new Ft(e,i))})),window.addEventListener("resize",(function(){window.clearTimeout(t.eventgalleryTimer),t.eventgalleryTimer=setTimeout((function(){var e=(0,Ht.getElementWidth)(t.options.imagesetContainer);t.width=e,t.eventgalleryPageWidth!==e&&(t.options.resizeStart(),t.eventgalleryPageWidth=e,t.options.imagesetContainer.style.minHeight=t.options.rowHeight*t.images.length+"px",t.processList(),t.options.imagesetContainer.style.minHeight="0px",t.options.resizeComplete())}),500)})),this.options.imagesetContainer&&(this.options.imagesetContainer.style.minHeight=this.options.rowHeight*this.images.length+"px",this.processList(),this.options.imagesetContainer.style.minHeight="0px"),window.setTimeout(this.options.initComplete,1)}},{key:"getRowWidth",value:function(){var t=this.width;if(window.getComputedStyle){var e=window.getComputedStyle(this.options.imagesetContainer);if("border-box"===e.boxSizing){var i=parseFloat(e.paddingLeft),n=parseFloat(e.paddingRight),o=parseFloat(e.borderLeftWidth),r=parseFloat(e.borderRightWidth);t=Math.floor(parseFloat(e.width)-i-n-o-r)-1}else t=Math.floor(parseFloat(e.width))-1}else t-=1;return t}},{key:"processList",value:function(){var t,e=this.getRowWidth(),i=this.images.slice(0);if(0!==i.length){if(this.options.firstImageRowHeight>1){var n=i.shift();n.hide(),e=this.getRowWidth(),n.show();var o=this.options.firstImageRowHeight*this.options.rowHeight,r=Math.floor(n.width/n.height*o);r+this.options.minImageWidth>=e&&(r=e),n.setSize(r,o);var s=this.options.rowHeight;s=(o+.05)/this.options.firstImageRowHeight,o>n.getImageTagHeight()&&(s=(o+1)/this.options.firstImageRowHeight),(t={maxWidth:e-r,maxHeight:s,adjustHeight:!1}).maxWidth>0&&this.generateRows(i,this.options.firstImageRowHeight,t,!1)}t={maxWidth:e,maxHeight:this.options.rowHeight,heightJitter:this.options.rowHeightJitter,doFillLastRow:this.options.doFillLastRow},this.generateRows(i,99999,t,!0)}}},{key:"generateRows",value:function(t,e,i,n){for(var o=new Ut(i);t.length>0&&e>0;)if(o.add(t[0]))t.shift();else{if(o.processRow(),0==--e)break;o=new Ut(i)}n&&(o.isLastRow=!0),o.processRow()}}])&&Gt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Yt(t){return Yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yt(t)}function Xt(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,$t(n.key),n)}}function $t(t){var e=function(t){if("object"!=Yt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=Yt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Yt(e)?e:e+""}function Jt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Jt=function(){return!!t})()}function Qt(t){return Qt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Qt(t)}function te(t,e){return te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},te(t,e)}var ee=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,i){return e=Qt(e),function(t,e){if(e&&("object"==Yt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Jt()?Reflect.construct(e,i||[],Qt(t).constructor):e.apply(t,i))}(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&te(t,e)}(e,t),i=e,(n=[{key:"processList",value:function(){var t=this,e=this.width;(0,Ht.forEach)(this.images,(function(i){var n=Math.ceil(e*t.options.rowHeightPercentage/100);i.setSize(e,n)}))}}])&&Xt(i.prototype,n),Object.defineProperty(i,"prototype",{writable:!1}),i;var i,n}(Kt);function ie(t){return ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ie(t)}function ne(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,oe(n.key),n)}}function oe(t){var e=function(t){if("object"!=ie(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=ie(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ie(e)?e:e+""}function re(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(re=function(){return!!t})()}function se(t){return se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},se(t)}function ae(t,e){return ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ae(t,e)}var le=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,i){return e=se(e),function(t,e){if(e&&("object"==ie(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,re()?Reflect.construct(e,i||[],se(t).constructor):e.apply(t,i))}(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ae(t,e)}(e,t),i=e,(n=[{key:"processList",value:function(){var t=this,e=this.width;(0,Ht.forEach)(this.images,(function(i){var n=Math.round(i.height/i.width*e),o=e;"height"==t.options.adjustMode&&i.height>i.width&&(n=e,o=Math.round(i.width/i.height*n)),i.setSize(o,n)}))}}])&&ne(i.prototype,n),Object.defineProperty(i,"prototype",{writable:!1}),i;var i,n}(Kt);function ce(t){return ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ce(t)}function ue(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,he(n.key),n)}}function he(t){var e=function(t){if("object"!=ce(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=ce(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ce(e)?e:e+""}function de(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(de=function(){return!!t})()}function pe(t){return pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},pe(t)}function fe(t,e){return fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},fe(t,e)}var me=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,i){return e=pe(e),function(t,e){if(e&&("object"==ce(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,de()?Reflect.construct(e,i||[],pe(t).constructor):e.apply(t,i))}(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fe(t,e)}(e,t),i=e,(n=[{key:"processList",value:function(){var t=this.width;(0,Ht.forEach)(this.images,(function(e){e.setSize(t,t)}))}}])&&ue(i.prototype,n),Object.defineProperty(i,"prototype",{writable:!1}),i;var i,n}(Kt);function ve(t){return ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ve(t)}function ye(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ge(n.key),n)}}function ge(t){var e=function(t){if("object"!=ve(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=ve(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ve(e)?e:e+""}var be=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options={tiles:null,tilesContainer:[]},this.options=(0,Ht.mergeObjects)(this.options,e),this.tiles=this.options.tiles,this.tilesContainer=this.options.tilesContainer},(e=[{key:"calculate",value:function(){var t=this,e=1;if((0,Ht.forEach)(this.tiles,(function(t){t.style.visibility="hidden",t.style.position="static",t.style.float="left"})),this.tiles.length){for(var i=this.tiles[0],n=i.offsetWidth,o=i.offsetTop,r=1;r<this.tiles.length&&this.tiles[r].offsetTop===o;r++)e++;for(var s=[],a=0;a<e;a++)s.push(0);(0,Ht.forEach)(this.tiles,(function(e){var i=t.getSmallestColumn(s);e.style.left=i*n+"px",e.style.top=s[i]+"px",s[i]=s[i]+e.offsetHeight,e.style.visibility="visible",e.style.position="absolute",e.style.float="none"})),this.tilesContainer.style.height=s[this.getHighestColumn(s)]+"px"}}},{key:"getSmallestColumn",value:function(t){for(var e=t[0],i=0,n=0;n<t.length;n++)e>t[n]&&(e=t[n],i=n);return i}},{key:"getHighestColumn",value:function(t){for(var e=t[0],i=0,n=0;n<t.length;n++)e<t[n]&&(e=t[n],i=n);return i}}])&&ye(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function we(t){return we="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},we(t)}function _e(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Se(n.key),n)}}function Se(t){var e=function(t){if("object"!=we(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=we(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==we(e)?e:e+""}var Pe=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return e=t,i=[{key:"parseURLParameter",value:function(t){var e=t.split("&"),i=new Map;return e.forEach((function(t){var e=t.split("=");2===e.length&&i.set(e[0],e[1])})),i}},{key:"getParameters",value:function(e){var i=e.split("?");if(i.length<2)return new Map;var n=i[1].split("#");return t.parseURLParameter(n[0])}},{key:"extractBackgroudUrl",value:function(t){return t.replace(/(url\(|\)|"|')/g,"")}}],null&&_e(e.prototype,null),i&&_e(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,i}();function Ce(t,e,i){return e=xe(e),function(t,e){if(e&&("object"==Le(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ee()?Reflect.construct(e,i||[],xe(t).constructor):e.apply(t,i))}function Ee(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ee=function(){return!!t})()}function xe(t){return xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xe(t)}function ke(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ae(t,e)}function Ae(t,e){return Ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ae(t,e)}function Le(t){return Le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Le(t)}function Oe(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var n,o,r,s,a=[],l=!0,c=!1;try{if(r=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=r.call(i)).done)&&(a.push(n.value),a.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=i.return&&(s=i.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(t,e)||ze(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Te(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=ze(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw r}}}}function Ie(t){return function(t){if(Array.isArray(t))return je(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ze(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ze(t,e){if(t){if("string"==typeof t)return je(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?je(t,e):void 0}}function je(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function He(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function De(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Be(n.key),n)}}function Re(t,e,i){return e&&De(t.prototype,e),i&&De(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function Be(t){var e=function(t){if("object"!=Le(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=Le(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Le(e)?e:e+""}var Me="gp.svg",Fe="data-eg-gp-processing",Ze=function(){return Re((function t(){var e=this;He(this,t),this.albumUrl="",this.albumsUrl="",window.EventGalleryGooglePhotosConfiguration&&(this.albumUrl=window.EventGalleryGooglePhotosConfiguration.albumUrl,this.albumsUrl=window.EventGalleryGooglePhotosConfiguration.albumsUrl),this.imageAddedCallback=function(t){return e.processImages(t)},document.addEventListener("eventgallery-images-added",this.imageAddedCallback,!0)}),[{key:"destroy",value:function(){document.removeEventListener("eventgallery-images-added",this.imageAddedCallback,!0)}},{key:"processImages",value:function(t){var e,i=!0;null!=t&&null!==(e=t.detail)&&void 0!==e&&e.isOverlay&&(i=!1);var n=this._groupByAlbum(this._collectHTMLElements());this._markImagesAsInProgress(n),this._getMainImageDataFromServer(n,i)}},{key:"_collectHTMLElements",value:function(){var t=document.getElementsByTagName("IMG"),e=Ie(t).filter((function(t){var e=t.getAttribute("srcset"),i=t.getAttribute("data-src"),n=t.src;return"1"!==t.getAttribute(Fe)&&(e&&e.indexOf(Me)>0||i&&i.indexOf(Me)>0||n&&n.indexOf(Me)>0)})),i=Ie(t=document.getElementsByTagName("A"));return e.concat(i.filter((function(t){var e=t.getAttribute("data-src"),i=t.getAttribute("rel"),n=t.getAttribute("href");return"1"!==t.getAttribute(Fe)&&(n&&n.indexOf(Me)>0||e&&e.indexOf(Me)>0||i&&i.indexOf(Me)>0)})))}},{key:"_markImagesAsInProgress",value:function(t){var e,i=Te(t);try{for(i.s();!(e=i.n()).done;){var n=Oe(e.value,2);n[0],n[1].forEach((function(t){t.getHTMLElement().setAttribute(Fe,1)}))}}catch(t){i.e(t)}finally{i.f()}}},{key:"_groupByAlbum",value:function(t){var e=this,i=new Map;return t.forEach((function(t){var n=e._parseHTMLElement(t);n.updateParameters();var o=n.parameters.get("folder");i.get(o)||i.set(o,[]),i.get(o).push(n)})),i}},{key:"_parseHTMLElement",value:function(t){return"IMG"===t.tagName?new Ue(t):new Ne(t)}},{key:"_getAlbumDataFromServer",value:function(t,e){var i,n=Te(t);try{for(n.s();!(i=n.n()).done;){var o=Oe(i.value,2),r=o[0],s=o[1];this._doAlbumRequest(r,s,e)}}catch(t){n.e(t)}finally{n.f()}}},{key:"_doAlbumRequest",value:function(t,e,i){var n=this;this.albumUrl&&t&&fetch(this.albumUrl+"&folder="+t).then((function(t){return t.json()})).then((function(t){return n._processAlbumResult(e,t,i)}))}},{key:"_processAlbumResult",value:function(t,e,i){this._replaceImages(t,e,i)}},{key:"_getMainImageDataFromServer",value:function(t,e){var i=this._filterForAlbumsWithMainImageOnly(t);if(i.size>0){this._doAlbumsRequest(i,t,e);var n,o=Te(i);try{for(o.s();!(n=o.n()).done;){var r=Oe(n.value,2),s=r[0];r[1],t.delete(s)}}catch(t){o.e(t)}finally{o.f()}}this._getAlbumDataFromServer(t,e)}},{key:"_doAlbumsRequest",value:function(t,e,i){var n=this;this.albumsUrl&&fetch(this.albumsUrl).then((function(t){return t.json()})).then((function(o){return n._processAlbumsResult(t,e,o,i)}))}},{key:"_processAlbumsResult",value:function(t,e,i,n){var o,r=Te(t);try{for(r.s();!(o=r.n()).done;){var s=Oe(o.value,2),a=s[0],l=s[1];this._replaceImages(l,i[a],n)}}catch(t){r.e(t)}finally{r.f()}this._getAlbumDataFromServer(e,n)}},{key:"_filterForAlbumsWithMainImageOnly",value:function(t){var e,i=new Map,n=Te(t);try{for(n.s();!(e=n.n()).done;){var o=Oe(e.value,2),r=o[0],s=o[1],a=s.filter((function(t){return t.isMainImage()}));a.length>0&&a.length===s.length&&i.set(r,s)}}catch(t){n.e(t)}finally{n.f()}return i}},{key:"_replaceImages",value:function(t,e,i){var n;if(void 0!==t&&void 0!==e&&(t.forEach((function(t){var i=e[t.getFile()];if(void 0===i)return!1;t.updateParameters(),t.replaceElementLinks(i),t.getHTMLElement().setAttribute(Fe,0)})),i&&null!==(n=window.Eventgallery)&&void 0!==n&&n.lightbox&&Eventgallery.lightbox.isOpen())){var o=Eventgallery.lightbox.getCurrentSlide().thumbEl;Eventgallery.lightbox._gallery.close(),setTimeout((function(){return o.click()}),500)}}}])}(),qe=function(){return Re((function t(e){He(this,t),this.htmlElement=e,this.parameters=null,this.attributeNames=new Set}),[{key:"updateParametersWithUrl",value:function(t){var e=t.substring(t.indexOf("#")+1);this.parameters=Pe.parseURLParameter(e)}},{key:"updateParameters",value:function(){var t,e=Te(this.attributeNames);try{for(e.s();!(t=e.n()).done;){var i=t.value,n=this.getHTMLElement().getAttribute(i);if(n&&n.indexOf(Me)>0)return void this.updateParametersWithUrl(n)}}catch(t){e.e(t)}finally{e.f()}}},{key:"replaceElementLinks",value:function(t){var e,i=Te(this.attributeNames);try{for(i.s();!(e=i.n()).done;){var n=e.value,o=this.getHTMLElement().getAttribute(n);o&&o.indexOf(Me)>0&&this.getHTMLElement().setAttribute(n,this.getImageUrl(t,this.getWidth(o)))}}catch(t){i.e(t)}finally{i.f()}}},{key:"getHTMLElement",value:function(){return this.htmlElement}},{key:"getFolder",value:function(){return this.parameters.get("folder")}},{key:"getFile",value:function(){return this.parameters.get("file")}},{key:"getWidth",value:function(t){return Pe.parseURLParameter(t).get("width")}},{key:"getImageUrl",value:function(t,e){return t+"=w"+e}},{key:"isMainImage",value:function(){return"1"===this.parameters.get("m")}}])}(),Ne=function(t){function e(t){var i;return He(this,e),(i=Ce(this,e,[t])).attributeNames=new Set(["href","data-src","rel"]),i}return ke(e,t),Re(e)}(qe),Ue=function(t){function e(t){var i;return He(this,e),(i=Ce(this,e,[t])).attributeNames=new Set(["src","data-src","srcset"]),i}return ke(e,t),Re(e)}(qe);!function(t){document.addEventListener("DOMContentLoaded",(function(){function e(){Ot.watchImages()}(0,Ht.forEach)(document.querySelectorAll(".eventgallery-events-gridlist"),(function(t){var i=t.querySelectorAll(".event-thumbnails .event-thumbnail"),n={rowHeightPercentage:100,imagesetContainer:t.querySelector(".event-thumbnails"),imageset:i,initComplete:function(){e()},resizeStart:function(){},resizeComplete:function(){document.dispatchEvent(at.A.createNewEvent("scroll",null))}};i.length>0&&new ee(n)})),(0,Ht.forEach)(document.querySelectorAll(".eventgallery-events-tiles-list"),(function(t){var i={imagesetContainer:t.querySelector(".event-thumbnails"),imageset:t.querySelectorAll(".event-thumbnail"),eventgalleryTilesCollection:null,initComplete:function(){e();var n={tiles:t.querySelectorAll(".eventgallery-tiles .eventgallery-tile"),tilesContainer:t.querySelector(".eventgallery-tiles")};i.eventgalleryTilesCollection=new be(n),i.eventgalleryTilesCollection.calculate(),window.addEventListener("load",(function(){i.eventgalleryTilesCollection.calculate()}))},resizeStart:function(){},resizeComplete:function(){i.eventgalleryTilesCollection.calculate(),document.dispatchEvent(at.A.createNewEvent("scroll",null))}};new le(i)})),(0,Ht.forEach)(document.querySelectorAll(".eventgallery-event-tiles-list"),(function(t){var i={imagesetContainer:t.querySelector(".event-thumbnails"),imageset:t.querySelectorAll(".event-thumbnail"),adjustMode:"width",eventgalleryTilesCollection:null,initComplete:function(){var n={tiles:t.querySelectorAll(".eventgallery-tiles .eventgallery-tile"),tilesContainer:t.querySelector(".eventgallery-tiles")};i.eventgalleryTilesCollection=new be(n),i.eventgalleryTilesCollection.calculate(),window.addEventListener("load",(function(){i.eventgalleryTilesCollection.calculate()})),e()},resizeStart:function(){},resizeComplete:function(){i.eventgalleryTilesCollection.calculate(),document.dispatchEvent(at.A.createNewEvent("scroll",null))}};new le(i)})),(0,Ht.forEach)(document.querySelectorAll(".eventgallery-event-gridlist"),(function(t){var i={imagesetContainer:t.querySelector(".event-thumbnails"),imageset:t.querySelectorAll(".event-thumbnail"),adjustMode:"height",initComplete:function(){e()},resizeStart:function(){},resizeComplete:function(){document.dispatchEvent(at.A.createNewEvent("scroll",null))}};new le(i)})),(0,Ht.forEach)(document.querySelectorAll(".eventgallery-imagelist"),(function(t){var i={rowHeight:parseInt(t.getAttribute("data-rowheight")),rowHeightJitter:parseInt(t.getAttribute("data-rowheightjitter")),firstImageRowHeight:parseInt(t.getAttribute("data-firstimagerowheight")),doFillLastRow:"true"===t.getAttribute("data-dofilllastrow"),imagesetContainer:t,imageset:t.querySelectorAll(".thumbnail"),initComplete:function(){e()},resizeStart:function(){},resizeComplete:function(){document.dispatchEvent(at.A.createNewEvent("scroll",null))}};new Kt(i)})),(0,Ht.forEach)(document.querySelectorAll(".eventgallery-event-square-list"),(function(t){var i={imagesetContainer:t.querySelector(".event-thumbnails"),imageset:t.querySelectorAll(".event-thumbnail"),adjustMode:"width",initComplete:function(){e()},resizeStart:function(){},resizeComplete:function(){document.dispatchEvent(at.A.createNewEvent("scroll",null))}};new me(i)})),t.lightbox=new n.default,t.lightbox.initPhotoSwipe(),(0,Ht.forEach)(document.querySelectorAll(".singleimage-zoom"),(function(t){t.addEventListener("click",(function(t){t.preventDefault(),document.getElementById("bigimagelink").click()}))})),(0,Ht.forEach)(document.querySelectorAll("a[data-eventgallery-overlay]"),(function(t){var e=t.getAttribute("href");t.addEventListener("click",(function(t){t.preventDefault(),(new o.A).openOverlay(document.getElementById(e.replace("#","")).innerHTML)}))})),new Ze,document.dispatchEvent(at.A.createNewEvent("eventgallery-images-added"));for(var i=document.querySelectorAll('div[data-slider="1"]'),r=function(){var t=new jt(i[s]),e=null;t.start(),window.addEventListener("resize",(function(){null!=e&&clearTimeout(e),e=setTimeout((function(){return t.start()}),1e3)}),!1)},s=0;s<i.length;s++)r();for(var a=document.querySelectorAll("*[data-eg-link]"),l=0;l<a.length;l++)a[l].addEventListener("click",(function(t){if("A"!==t.target.nodeName){t.stopPropagation(),t.preventDefault();var e=t.currentTarget.getAttribute("data-eg-link");e&&(window.location.href=e)}}),!1)}))}(Eventgallery)},5598:function(t,e,i){"use strict";i.d(e,{A:function(){return a}});var n=i(9259);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,s(n.key),n)}}function s(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var a=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options={availableSizes:[48,104,160,288,320,400,512,640,720,800,1024,1280,1440],flickrSizes:{100:"t",240:"m",320:"n",500:"-",640:"z",800:"c",1024:"b",1600:"h",2048:"k"}},this.options=(0,n.mergeObjects)(this.options,e)},(e=[{key:"adjustImageURL",value:function(t,e){return(t=(t=(t=(t=(t=(t=t.replace(/=w(\d+)$/,"=w"+e)).replace(/=w(\d+)-nu$/,"=w"+e+"-nu")).replace(/\/s(\d*)\//,"/s"+e+"/")).replace(/\/s(\d*)-c\//,"/s"+e+"-c/")).replace(/width=(\d+)/,"width="+e)).replace(/\/mainimage_nocrop_(\d+)_/,"/mainimage_nocrop_"+e+"_")).replace(/\/nocrop_(\d+)_/,"/nocrop_"+e+"_")}},{key:"getFlickrURL",value:function(t,e,i,n,o,r,s,a,l,c,u){var h,d,p,f,m=this.getMinSizes(a,l,c,u);if(m.width>m.height?(h=m.width,d=c):(h=m.height,d=u),p="o",d>=h)for(var v in this.options.flickrSizes)if(v>h){p=this.options.flickrSizes[v];break}switch("o"===p&&""===r&&(p="k"),"k"===p&&""===o&&(p="h"),"h"===p&&""===n&&(p="b"),p){case"o":f=r;break;case"h":f=n;break;case"k":f=o;break;default:f=i}return"https://live.staticflickr.com/"+e+"/"+s+"_"+f+("-"==p?"":"_"+p)+".jpg"}},{key:"getSize",value:function(t,e,i){for(var n=this.options.availableSizes[0],o=0;o<this.options.availableSizes.length;o++){var r=this.options.availableSizes[o],s=void 0;if(n>this.options.availableSizes[0])break;var a=o==this.options.availableSizes.length-1;i>=1?(s=r/i>e,(r>t&&s||a)&&(n=r)):(s=r>e,(r*i>t&&s||a)&&(n=r))}return n}},{key:"getMinSizes",value:function(t,e,i,n){var o,r,s=i/n;return i>n?t>e?(r=t,(o=t/s)<e&&(o=e,r=e*s)):(o=e,(r=e*s)<t&&(r=t,o=e*s)):t>e?(r=t,(o=t/s)<e&&(o=e,r=e*s)):(o=e,(r=e*s)<t&&(r=t,o=t/s)),{width:Math.ceil(r),height:Math.ceil(o)}}}])&&r(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}()},3417:function(t,e,i){"use strict";i.d(e,{A:function(){return l}});var n=i(5331),o=i(9259);function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function s(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}function a(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}var l=function(){function t(){var e=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.isOpen=!1,this.myDiv=null,this.background=null,this.parent=i,this.onClosed=void 0,this.onLoad=void 0,this.repositionTimer=null,this.windowWidth=0,this.onResizeOverlay=function(){e._setRositionTimer(!1)}}return e=t,i=[{key:"openOverlay",value:function(e){var i=this;this.isOpen=!0,this.myDiv=document.createElement("div"),this.myDiv.id="eventgallery-overlay",this.myDiv.innerHTML='<i class="egfa egfa-2x egfa-cog egfa-spin"></i>',this.myDiv.style.opacity="1 !important",this.myDiv.style.position="absolute",this.myDiv.style.maxWidth="100%",this.background=document.createElement("div"),this.background.id="eventgallery-overlay-background",this.background.addEventListener("click",(function(){i.closeOverlay()})),this.parent.append(this.background),this.parent.append(this.myDiv),this.reposition(!0),e.startsWith("http")||e.startsWith("/")?t._getRemoteData(e,(function(t){i._addContent(t)})):this._addContent('<button class="btn-close-overlay eventgallery-close-overlay"><i class="egfa egfa-2x egfa-times-circle"></i></button>'+e),window.addEventListener("resize",this.onResizeOverlay)}},{key:"_setRositionTimer",value:function(t){var e=this;this.repositionTimer&&clearTimeout(this.repositionTimer),this.repositionTimer=setTimeout((function(){return e.reposition(t)}),500)}},{key:"_addContent",value:function(t){var e=this;(0,o.insertAndExecute)(this.myDiv,t);for(var i=this.myDiv.getElementsByClassName("eventgallery-close-overlay"),r=0;r<i.length;r++)i[r].addEventListener("click",(function(t){t.preventDefault(),e.closeOverlay()}));this.reposition(!0),void 0!==this.onLoad&&this.onLoad(),document.dispatchEvent(n.A.createNewEvent("eventgallery-images-added",{isOverlay:!0}))}},{key:"closeOverlay",value:function(){this.isOpen=!1,window.removeEventListener("resize",this.onResizeOverlay),n.A.removeHtmlElementNode(this.myDiv),n.A.removeHtmlElementNode(this.background),void 0!==this.onClosed&&this.onClosed()}},{key:"reposition",value:function(t){null!==this.repositionTimer&&clearTimeout(this.repositionTimer);var e=document.body.clientWidth;if(t||this.windowWidth!==e){this.windowWidth=e,this.myDiv.style.opacity=0,this.myDiv.style.top=0,this.myDiv.style.left=0;var i=window.innerHeight,n=this.myDiv.offsetWidth,o=this.myDiv.offsetHeight,r=0,s=0;this.parent==document.body&&(r=window.pageYOffset);var a=r;e-n>0&&(s=(e-n)/2),i-o>0&&(a=r+(i-o)/2),this.myDiv.style.top=a+"px",s>3&&(this.myDiv.style.left=s+"px"),this.myDiv.style.opacity=1}}}],r=[{key:"_getRemoteData",value:function(t,e){fetch(t).then((function(t){return t.text()})).then((function(t){return e(t)}))}}],i&&s(e.prototype,i),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,i,r}()},2846:function(t,e,i){"use strict";i.r(e),i.d(e,{JSGallery2:function(){return d}});var n=i(5331),o=i(1767),r=new(i(5296).A),s=i(3417),a=i(9259),l=i(5598);function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function u(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,h(n.key),n)}}function h(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=c(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}var d=function(){return t=function t(e,i,n,o,r){var s=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options={prevHandle:null,nextHandle:null,countHandle:null,titleTarget:null,initialIndex:-1,maxOpacity:.8,showSocialMediaButton:!0,showCartButton:!0,showCartConnector:!1,cartConnectorLinkRel:"",activeClass:"thumbnail-active",lightboxRel:"lightbo2",touchContainerSelector:"#bigimageContainer"},this.galleryElement=e,this.nav=e.querySelector(".navigation"),this.image=e.querySelector(".image"),this.options=(0,a.mergeObjects)(this.options,r);var l=o.children;this.running=!1,this.currentPageNumber=0,this.blockKeys=!1,this.imagesPerFirstPage=l[0].querySelectorAll("div.ajax-thumbnail-container").length,this.imagesPerPage=this.imagesPerFirstPage,l.length>1&&l[1].querySelectorAll("div.ajax-thumbnail-container").length>0&&(this.imagesPerPage=l[1].querySelectorAll("div.ajax-thumbnail-container").length),this.thumbs=[];for(var c=0;c<i.length;c++)this.thumbs.push(i[c]);this.bigImageContainer=n,this.bigImage=n.querySelector("img"),this.pageContainer=o,this.convertThumbs(),this.lastPage=Math.ceil((this.thumbs.length-this.imagesPerFirstPage)/this.imagesPerPage)+1;var u=document.location.href;this.initialIndex=parseInt((0,a.getUrlHashParameterValue)(u,"imageno")),isNaN(this.initialIndex)&&(this.initialIndex=0),this.createControls(),this.createGallerySlides(),this.adjustWidth(),this.adjustPageHeight(),this.adjustImageSize(),this.gotoPage(0),-1!==this.options.initialIndex?(this.unBlockKeys(),this.selectByIndex(this.options.initialIndex)):0!==this.initialIndex&&(this.unBlockKeys(),this.selectByIndex(this.initialIndex)),window.addEventListener("load",(function(){s.resizePage()})),window.addEventListener("resize",(function(){s.resizePage()}))},e=[{key:"adjustWidth",value:function(){var t=this.nav.offsetWidth;(0,a.forEach)(this.galleryElement.querySelectorAll(".navigation .page"),(function(e){e.style.width=t+2+"px"}))}},{key:"adjustImageSize",value:function(){var t=new l.A,e=(0,a.getElementWidth)(this.bigImageContainer);(0,a.forEach)(this.nav.querySelectorAll("#thumbs .ajax-thumbnail"),(function(i,n){var o,r=i.getAttribute("data-width"),s=i.getAttribute("data-height"),a=r/s,l=Math.round(e/a),c=i.getAttribute("data-secret");if(null!==c){var u=i.getAttribute("data-secret_o"),h=i.getAttribute("data-secret_h"),d=i.getAttribute("data-secret_k"),p=i.getAttribute("data-farm"),f=(i.getAttribute("data-type"),i.getAttribute("data-server")),m=i.getAttribute("data-file");o=t.getFlickrURL(p,f,c,h,d,u,m,e,l,r,s)}else{var v=t.getSize(e,l,a);o=t.adjustImageURL(i.getAttribute("rel"),v)}i.setAttribute("rel",o)}))}},{key:"resizePage",value:function(){var t=this;window.clearTimeout(this.eventgalleryAjaxResizeTimer),this.eventgalleryAjaxResizeTimer=setTimeout((function(){t.adjustWidth(),t.adjustImageSize(),t.resetThumbs(),t.gotoPage(t.currentPageNumber),t.adjustPageHeight()}),500)}},{key:"createGallerySlides",value:function(){var t=this;this.slides=[],(0,a.forEach)(this.thumbs,(function(e){var i=e.getElementsByTagName("A")[0],n=decodeURIComponent(i.getAttribute("data-description")),o={w:i.getAttribute("data-width"),h:i.getAttribute("data-height"),src:i.getAttribute("href"),title:n,type:i.getAttribute("data-type")};"video"===o.type&&i&&(i.dataset.pswpVideoSources?o.videoSources=JSON.parse(pswpVideoSources):i.dataset.pswpVideoSrc?o.videoSrc=i.dataset.pswpVideoSrc:o.videoSrc=i.getAttribute("href")),t.slides.push(o)}))}},{key:"createControls",value:function(){var t,e,i,a,l,c,u,h,d,p,f=this;if(this.prevLink=document.createElement("a"),this.prevLink.href="#",this.prevLink.classList.add("link","jsgallery-prev"),this.prevLink.addEventListener("click",(function(t){return f.prevImage(t)})),this.prevLink.addEventListener("mouseleave",(function(){return f.mouseLeaveHandler()})),this.prevLink.addEventListener("mouseover",(function(t){return f.focusControl(t,f.prevLink)})),this.zoomLink=document.createElement("a"),this.zoomLink.href="#",this.zoomLink.classList.add("link","jsgallery-zoom"),this.zoomLink.addEventListener("click",(function(t){return f.bigImageClickHandler(t)})),this.zoomLink.addEventListener("mouseleave",(function(t){return f.mouseLeaveHandler()})),this.zoomLink.addEventListener("mouseover",(function(t){return f.focusControl(t,f.zoomLink)})),this.nextLink=document.createElement("a"),this.nextLink.href="#",this.nextLink.classList.add("link","jsgallery-next"),this.nextLink.addEventListener("click",(function(t){return f.nextImage(t)})),this.nextLink.addEventListener("mouseleave",(function(){return f.mouseLeaveHandler()})),this.nextLink.addEventListener("mouseover",(function(t){return f.focusControl(t,f.nextLink)})),this.bigImage.parentElement.appendChild(this.prevLink),this.bigImage.parentElement.appendChild(this.zoomLink),this.bigImage.parentElement.appendChild(this.nextLink),this.bigImage.addEventListener("load",(function(){return f.showBigImage()})),this.options.showCartButton&&(this.add2cartLink=document.createElement("a"),this.add2cartLink.href="#",this.add2cartLink.classList.add("eventgallery-add2cart","eventgallery-openAdd2cart","jsgallery-add2cart"),this.add2cartLink.innerHTML='<i class="egfa egfa-2x egfa-cart-plus"></i>',this.bigImage.parentElement.appendChild(this.add2cartLink),document.dispatchEvent(n.A.createNewEvent(o.s.rebindAdd2CartButtons,null))),this.options.showCartConnector&&(this.cartConnectorLink=document.createElement("a"),this.cartConnectorLink.href="#",this.cartConnectorLink.id="ajax-cartconnector",this.cartConnectorLink.classList.add("button-cart-connector","jsgallery-cartconnector"),this.cartConnectorLink.innerHTML='<i class="egfa egfa-2x egfa-cart-plus"></i>',this.cartConnectorLink.setAttribute("rel",this.options.cartConnectorLinkRel),this.bigImage.parentElement.appendChild(this.cartConnectorLink)),this.options.showSocialMediaButton){var m=document.createElement("div");m.innerHTML='<a id="ajax-social-media-button" class="social-share-button jsgallery-socialmedia" rel="nofollow" href="#"><i class="egfa egfa-2x egfa-share-alt-square"></i></a>',this.socialmediabutton=m.firstChild,this.socialmediabutton.addEventListener("click",(function(t){t.preventDefault();var e=f.socialmediabutton.getAttribute("data-href");(new s.A).openOverlay(e)})),this.bigImage.parentElement.appendChild(this.socialmediabutton)}document.addEventListener("keydown",(function(t){return f.keyboardHandler(t)})),t=document.querySelector(this.options.touchContainerSelector),e=function(t){f.prevImage(t)},i=function(t){f.nextImage(t)},a=function(t){f.bigImage.click()},d=!1,p=!1,r.off("touchstart",t),r.off("touchend",t),r.on("touchstart",t,(function(t){u=t.targetTouches[0]}),!1,!0),r.on("touchend",t,(function(t){return!!(h=t.changedTouches[0])&&(h.pageY,u.pageY,h.pageX,u.pageX,c=h.pageY-u.pageY,Math.abs(c)>=50&&(d=!0),l=h.pageX-u.pageX,!d&&Math.abs(l)>=50&&(p=!0),d?(d=!1,Math.abs(c)):p?(p=!1,l>=50?e&&e():l<=-50&&i&&i()):Math.abs(c)<5&&Math.abs(l)<5&&(void 0!==a?a():t.target.click()),!0)}),!1,!0),this.mouseLeaveHandler()}},{key:"focusControl",value:function(t,e){e.style.opacity="1"}},{key:"mouseLeaveHandler",value:function(){this.nextLink.style.opacity="0",this.prevLink.style.opacity="0",this.zoomLink.style.opacity="0"}},{key:"keyboardHandler",value:function(t){var e;this.blockKeys||!0===(null===(e=Eventgallery.lightbox)||void 0===e?void 0:e.isOpen())||(t.keyCode>=49&&t.keyCode<=57?this.gotoPage(t.key-1):37==t.keyCode?this.prevImage(t):39==t.keyCode&&this.nextImage(t))}},{key:"adjustPageHeight",value:function(){var t=0;(0,a.forEach)(this.pageContainer.children,(function(e){var i=e.offsetHeight;i>t&&(t=i)})),this.pageContainer.style.height=t+"px",this.nav.style.opacity=1}},{key:"resetThumbs",value:function(){this.running=!1,this.convertThumbs(),this.select(this.selectedContainer,!0)}},{key:"convertThumbs",value:function(){var t=this;(0,a.forEach)(this.thumbs,(function(e,i){t.convertThumb(e,i)}))}},{key:"convertThumb",value:function(t,e){var i=this;void 0!==t&&(t.addEventListener("click",(function(e){e.preventDefault(),i.select(t)})),t.style.position="relative",t.setAttribute("data-counter",e),t.setAttribute("href","#"))}},{key:"unBlockKeys",value:function(){this.blockKeys=!1}},{key:"select",value:function(t,e){if(e=void 0!==e&&e,this.blockKeys||null===t)return!1;if(this.blockKeys=!0,void 0!==this.selectedContainer){if(t==this.selectedContainer&&!e)return this.unBlockKeys(),!1;this.deselect(this.selectedContainer)}history&&history.pushState&&history.pushState("","",(0,a.addUrlHashParameter)(window.location.href,"imageno",this.thumbs.indexOf(t)));var i=Math.floor((t.getAttribute("data-counter")-this.imagesPerFirstPage)/this.imagesPerPage)+1;this.currentPageNumber!=i&&this.gotoPage(i,t),this.selectedContainer=t,t.classList.add(this.options.activeClass);var r,s=t.children[0];this.options.showCartButton&&("image"===(null===(r=t.getElementsByTagName("A")[0])||void 0===r?void 0:r.getAttribute("data-type"))?(this.add2cartLink.setAttribute("data-id",s.getAttribute("data-id")),this.add2cartLink.style.display="block"):this.add2cartLink.style.display="none"),this.options.showCartConnector&&(this.cartConnectorLink.setAttribute("data-folder",s.getAttribute("data-folder")),this.cartConnectorLink.setAttribute("data-file",s.getAttribute("data-file")),this.cartConnectorLink.setAttribute("href",decodeURIComponent(s.getAttribute("data-cart-connector-link")))),this.options.showSocialMediaButton&&this.socialmediabutton.setAttribute("data-href",decodeURIComponent(s.getAttribute("data-social-sharing-link"))),document.dispatchEvent(n.A.createNewEvent(o.s.rebindAdd2CartButtons,null)),this.setImage(s)}},{key:"selectByIndex",value:function(t){(t<0||this.thumbs.length<=t)&&(t=0),this.select(this.thumbs[t])}},{key:"deselect",value:function(t){t.classList.remove(this.options.activeClass)}},{key:"bigImageClickHandler",value:function(t){var e=this;this.createGallerySlides();var i=this.thumbs.indexOf(this.selectedContainer);Eventgallery.lightbox.openPhotoSwipe(i,this.slides,!0,!1,!1),Eventgallery.lightbox.setAfterChangeEventListener((function(){var t=Eventgallery.lightbox.getCurrentSlide().gid;e.slides.length>0&&t===e.slides[0].gid&&e.selectByIndex(Eventgallery.lightbox.getCurrentIndex())}))}},{key:"setImage",value:function(t){var e;this.bigImage.style.opacity="0.1";var i=t.getAttribute("rel"),n=decodeURIComponent(t.getAttribute("data-description")),o=this.thumbs.indexOf(this.selectedContainer);!0===(null===(e=Eventgallery.lightbox)||void 0===e?void 0:e.isOpen())&&Eventgallery.lightbox.gotoSlide(o),this.galleryElement.querySelector(this.options.titleTarget).innerHTML=n,this.bigImage.setAttribute("src",i),this.unBlockKeys()}},{key:"showBigImage",value:function(){this.image.style.opacity=1,this.bigImage.style.opacity=1}},{key:"prevPage",value:function(){this.gotoPage(this.currentPageNumber-1)}},{key:"nextPage",value:function(){this.gotoPage(this.currentPageNumber+1)}},{key:"prevImage",value:function(t){void 0!==t&&t.preventDefault(),this.selectByIndex(this.thumbs.indexOf(this.selectedContainer)-1)}},{key:"nextImage",value:function(t){void 0!==t&&t.preventDefault(),this.selectByIndex(this.thumbs.indexOf(this.selectedContainer)+1)}},{key:"zoomImage",value:function(t){void 0!==t&&t.preventDefault()}},{key:"gotoPage",value:function(t,e){if(0===t)e=void 0===e?this.thumbs[0]:e;else{var i=(t-1)*this.imagesPerPage+this.imagesPerFirstPage;e=void 0===this.thumbs[i]?e:this.thumbs[i]}t>=0&&t<this.lastPage&&(this.pageContainer.style.marginLeft=(0,a.getElementWidth)(this.pageContainer.children[0])*t*-1+"px",this.currentPageNumber=t,this.select(e),this.updateHandles())}},{key:"updateHandles",value:function(){this.options.prevHandle&&(0===this.currentPageNumber?this.options.prevHandle.style.opacity=0:this.options.prevHandle.style.opacity=1),this.options.nextHandle&&(this.currentPageNumber==this.lastPage-1?this.options.nextHandle.style.opacity=0:this.options.nextHandle.style.opacity=1),this.options.countHandle&&this.updatePagingBar(this.currentPageNumber,this.lastPage)}},{key:"updatePagingBar",value:function(t,e){if(!(e<=1)){if(e>1&&""===this.options.countHandle.innerHTML)for(var i=0;i<e;i++)this.createCountLink(i);if(this.options.pageSpeed,e>9){for(var n=0;n<e;n++)this.galleryElement.querySelector("#count"+n).style.display=inline;var o=e,r=0,s=e-t-1;t>4&&s>4?(r=t-4,o=t+5):(t<=4&&(r=0,o=t+5+(4-t)),s<=4&&(r=t-4-(4-s),o=e));for(var l=0;l<r;l++)this.galleryElement.querySelector("#count"+l).style.display="none";for(var c=o;c<e;c++)this.galleryElement.querySelector("#count"+c).style.display="none"}(0,a.forEach)(this.options.countHandle.children,(function(t){return t.classList.remove("active")})),this.galleryElement.querySelector("#count"+t).classList.add("active")}}},{key:"createCountLink",value:function(t){var e=this,i=document.createElement("A");i.href="#",i.classList.add("page-link"),i.innerText=t+1,i.addEventListener("click",(function(i){return i.preventDefault(),e.gotoPage(t,null),!1}));var n=document.createElement("LI");n.classList.add("count"),n.classList.add("page-item"),n.id="count"+t,n.appendChild(i),this.options.countHandle.appendChild(n)}}],e&&u(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}()},9805:function(t,e,i){i(9259).forEach;var n=i(2846).JSGallery2;document.addEventListener("DOMContentLoaded",(function(){for(var t=document.querySelectorAll(".ajaxpaging"),e=0;e<t.length;e++){var i=t[e];new n(i,i.querySelectorAll(".ajax-thumbnail-container"),i.querySelector("#bigimageContainer"),i.querySelector("#pageContainer"),{prevHandle:i.querySelector("#prev"),nextHandle:i.querySelector("#next"),countHandle:i.querySelector("#count"),titleTarget:"#bigImageDescription",showSocialMediaButton:"true"==i.getAttribute("data-showSocialMediaButton"),showCartButton:"true"==i.getAttribute("data-showCartButton"),showCartConnector:"true"==i.getAttribute("data-showCartConnector"),cartConnectorLinkRel:i.getAttribute("data-cartConnectorLinkRel"),lightboxRel:"gallery"})}}))},8409:function(t,e,i){"use strict";function n(t,e,i){const n=document.createElement(e);return t&&(n.className=t),i&&i.appendChild(n),n}function o(t,e){return t.x=e.x,t.y=e.y,void 0!==e.id&&(t.id=e.id),t}function r(t){t.x=Math.round(t.x),t.y=Math.round(t.y)}function s(t,e){const i=Math.abs(t.x-e.x),n=Math.abs(t.y-e.y);return Math.sqrt(i*i+n*n)}function a(t,e){return t.x===e.x&&t.y===e.y}function l(t,e,i){return Math.min(Math.max(t,e),i)}function c(t,e,i){let n=`translate3d(${t}px,${e||0}px,0)`;return void 0!==i&&(n+=` scale3d(${i},${i},1)`),n}function u(t,e,i,n){t.style.transform=c(e,i,n)}function h(t,e,i,n){t.style.transition=e?`${e} ${i}ms ${n||"cubic-bezier(.4,0,.22,1)"}`:"none"}function d(t,e,i){t.style.width="number"==typeof e?`${e}px`:e,t.style.height="number"==typeof i?`${i}px`:i}i.r(e),i.d(e,{default:function(){return Nt}});const p="loading",f="loaded",m="error";function v(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}let y=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{y=!0}}))}catch(t){}class g{constructor(){this._pool=[]}add(t,e,i,n){this._toggleListener(t,e,i,n)}remove(t,e,i,n){this._toggleListener(t,e,i,n,!0)}removeAll(){this._pool.forEach((t=>{this._toggleListener(t.target,t.type,t.listener,t.passive,!0,!0)})),this._pool=[]}_toggleListener(t,e,i,n,o,r){if(!t)return;const s=o?"removeEventListener":"addEventListener";e.split(" ").forEach((e=>{if(e){r||(o?this._pool=this._pool.filter((n=>n.type!==e||n.listener!==i||n.target!==t)):this._pool.push({target:t,type:e,listener:i,passive:n}));const a=!!y&&{passive:n||!1};t[s](e,i,a)}}))}}function b(t,e){if(t.getViewportSizeFn){const i=t.getViewportSizeFn(t,e);if(i)return i}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function w(t,e,i,n,o){let r=0;if(e.paddingFn)r=e.paddingFn(i,n,o)[t];else if(e.padding)r=e.padding[t];else{const i="padding"+t[0].toUpperCase()+t.slice(1);e[i]&&(r=e[i])}return Number(r)||0}function _(t,e,i,n){return{x:e.x-w("left",t,e,i,n)-w("right",t,e,i,n),y:e.y-w("top",t,e,i,n)-w("bottom",t,e,i,n)}}class S{constructor(t){this.slide=t,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(t){this.currZoomLevel=t,this.slide.width?(this._updateAxis("x"),this._updateAxis("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}_updateAxis(t){const{pswp:e}=this.slide,i=this.slide["x"===t?"width":"height"]*this.currZoomLevel,n=w("x"===t?"left":"top",e.options,e.viewportSize,this.slide.data,this.slide.index),o=this.slide.panAreaSize[t];this.center[t]=Math.round((o-i)/2)+n,this.max[t]=i>o?Math.round(o-i)+n:this.center[t],this.min[t]=i>o?n:this.center[t]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(t,e){return l(e,this.max[t],this.min[t])}}class P{constructor(t,e,i,n){this.pswp=n,this.options=t,this.itemData=e,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,e,i){const n={x:t,y:e};this.elementSize=n,this.panAreaSize=i;const o=i.x/n.x,r=i.y/n.y;this.fit=Math.min(1,o<r?o:r),this.fill=Math.min(1,o>r?o:r),this.vFill=Math.min(1,r),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const e=t+"ZoomLevel",i=this.options[e];if(i)return"function"==typeof i?i(this):"fill"===i?this.fill:"fit"===i?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,3*this.fit),this.elementSize&&t*this.elementSize.x>4e3&&(t=4e3/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,4*this.fit)}}class C{constructor(t,e,i){this.data=t,this.index=e,this.pswp=i,this.isActive=e===i.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!i.opener.isOpen,this.zoomLevels=new P(i.options,t,e,i),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:e}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=n("pswp__zoom-wrap","div"),this.holderElement=null,this.currZoomLevel=1,this.width=this.content.width,this.height=this.content.height,this.heavyAppended=!1,this.bounds=new S(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(t){t&&!this.isActive?this.activate():!t&&this.isActive&&this.deactivate()}append(t){this.holderElement=t,this.container.style.transformOrigin="0 0",this.data&&(this.calculateSize(),this.load(),this.updateContentSize(),this.appendHeavy(),this.holderElement.appendChild(this.container),this.zoomAndPanToInitial(),this.pswp.dispatch("firstZoomPan",{slide:this}),this.applyCurrentZoomPan(),this.pswp.dispatch("afterSetContent",{slide:this}),this.isActive&&this.activate())}load(){this.content.load(!1),this.pswp.dispatch("slideLoad",{slide:this})}appendHeavy(){const{pswp:t}=this;!this.heavyAppended&&t.opener.isOpen&&!t.mainScroll.isShifted()&&(this.isActive,1)&&(this.pswp.dispatch("appendHeavy",{slide:this}).defaultPrevented||(this.heavyAppended=!0,this.content.append(),this.pswp.dispatch("appendHeavyContent",{slide:this})))}activate(){this.isActive=!0,this.appendHeavy(),this.content.activate(),this.pswp.dispatch("slideActivate",{slide:this})}deactivate(){this.isActive=!1,this.content.deactivate(),this.currZoomLevel!==this.zoomLevels.initial&&this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize(),this.pswp.dispatch("slideDeactivate",{slide:this})}destroy(){this.content.hasSlide=!1,this.content.remove(),this.container.remove(),this.pswp.dispatch("slideDestroy",{slide:this})}resize(){this.currZoomLevel!==this.zoomLevels.initial&&this.isActive?(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y)):(this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize())}updateContentSize(t){const e=this.currentResolution||this.zoomLevels.initial;if(!e)return;const i=Math.round(this.width*e)||this.pswp.viewportSize.x,n=Math.round(this.height*e)||this.pswp.viewportSize.y;(this.sizeChanged(i,n)||t)&&this.content.setDisplayedSize(i,n)}sizeChanged(t,e){return(t!==this.prevDisplayedWidth||e!==this.prevDisplayedHeight)&&(this.prevDisplayedWidth=t,this.prevDisplayedHeight=e,!0)}getPlaceholderElement(){var t;return null===(t=this.content.placeholder)||void 0===t?void 0:t.element}zoomTo(t,e,i,n){const{pswp:o}=this;if(!this.isZoomable()||o.mainScroll.isShifted())return;o.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:e,transitionDuration:i}),o.animations.stopAllPan();const s=this.currZoomLevel;n||(t=l(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",e,s),this.pan.y=this.calculateZoomToPanOffset("y",e,s),r(this.pan);const a=()=>{this._setResolution(t),this.applyCurrentZoomPan()};i?o.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:a,duration:i,easing:o.options.easing}):a()}toggleZoom(t){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,t,this.pswp.options.zoomAnimationDuration)}setZoomLevel(t){this.currZoomLevel=t,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(t,e,i){if(0==this.bounds.max[t]-this.bounds.min[t])return this.bounds.center[t];e||(e=this.pswp.getViewportCenterPoint()),i||(i=this.zoomLevels.initial);const n=this.currZoomLevel/i;return this.bounds.correctPan(t,(this.pan[t]-e[t])*n+e[t])}panTo(t,e){this.pan.x=this.bounds.correctPan("x",t),this.pan.y=this.bounds.correctPan("y",e),this.applyCurrentZoomPan()}isPannable(){return Boolean(this.width)&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return Boolean(this.width)&&this.content.isZoomable()}applyCurrentZoomPan(){this._applyZoomTransform(this.pan.x,this.pan.y,this.currZoomLevel),this===this.pswp.currSlide&&this.pswp.dispatch("zoomPanUpdate",{slide:this})}zoomAndPanToInitial(){this.currZoomLevel=this.zoomLevels.initial,this.bounds.update(this.currZoomLevel),o(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(t,e,i){i/=this.currentResolution||this.zoomLevels.initial,u(this.container,t,e,i)}calculateSize(){const{pswp:t}=this;o(this.panAreaSize,_(t.options,t.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),t.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){const t=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return c(this.pan.x,this.pan.y,t)}_setResolution(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}}class E{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&o(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:t,prevP1:e,dragAxis:i}=this.gestures,{currSlide:n}=this.pswp;if("y"===i&&this.pswp.options.closeOnVerticalDrag&&n&&n.currZoomLevel<=n.zoomLevels.fit&&!this.gestures.isMultitouch){const i=n.pan.y+(t.y-e.y);if(!this.pswp.dispatch("verticalDrag",{panY:i}).defaultPrevented){this._setPanWithFriction("y",i,.6);const t=1-Math.abs(this._getVerticalDragRatio(n.pan.y));this.pswp.applyBgOpacity(t),n.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),n&&(r(n.pan),n.applyCurrentZoomPan()))}end(){const{velocity:t}=this.gestures,{mainScroll:e,currSlide:i}=this.pswp;let n=0;if(this.pswp.animations.stopAll(),e.isShifted()){const i=(e.x-e.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-.5&&i<0||t.x<.1&&i<-.5?(n=1,t.x=Math.min(t.x,0)):(t.x>.5&&i>0||t.x>-.1&&i>.5)&&(n=-1,t.x=Math.max(t.x,0)),e.moveIndexBy(n,!0,t.x)}i&&i.currZoomLevel>i.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(t){const{velocity:e}=this.gestures,{currSlide:i}=this.pswp;if(!i)return;const{pan:n,bounds:o}=i,r=n[t],s=this.pswp.bgOpacity<1&&"y"===t,a=r+.995*e[t]/(1-.995);if(s){const t=this._getVerticalDragRatio(r),e=this._getVerticalDragRatio(a);if(t<0&&e<-.4||t>0&&e>.4)return void this.pswp.close()}const c=o.correctPan(t,a);if(r===c)return;const u=c===a?1:.82,h=this.pswp.bgOpacity,d=c-r;this.pswp.animations.startSpring({name:"panGesture"+t,isPan:!0,start:r,end:c,velocity:e[t],dampingRatio:u,onUpdate:e=>{if(s&&this.pswp.bgOpacity<1){const t=1-(c-e)/d;this.pswp.applyBgOpacity(l(h+(1-h)*t,0,1))}n[t]=Math.floor(e),i.applyCurrentZoomPan()}})}_panOrMoveMainScroll(t){const{p1:e,dragAxis:i,prevP1:n,isMultitouch:o}=this.gestures,{currSlide:r,mainScroll:s}=this.pswp,a=e[t]-n[t],l=s.x+a;if(!a||!r)return!1;if("x"===t&&!r.isPannable()&&!o)return s.moveTo(l,!0),!0;const{bounds:c}=r,u=r.pan[t]+a;if(this.pswp.options.allowPanToNext&&"x"===i&&"x"===t&&!o){const e=s.getCurrSlideX(),i=s.x-e,n=a>0,o=!n;if(u>c.min[t]&&n){if(c.min[t]<=this.startPan[t])return s.moveTo(l,!0),!0;this._setPanWithFriction(t,u)}else if(u<c.max[t]&&o){if(this.startPan[t]<=c.max[t])return s.moveTo(l,!0),!0;this._setPanWithFriction(t,u)}else if(0!==i){if(i>0)return s.moveTo(Math.max(l,e),!0),!0;if(i<0)return s.moveTo(Math.min(l,e),!0),!0}else this._setPanWithFriction(t,u)}else"y"===t&&(s.isShifted()||c.min.y===c.max.y)||this._setPanWithFriction(t,u);return!1}_getVerticalDragRatio(t){var e,i;return(t-(null!==(e=null===(i=this.pswp.currSlide)||void 0===i?void 0:i.bounds.center.y)&&void 0!==e?e:0))/(this.pswp.viewportSize.y/3)}_setPanWithFriction(t,e,i){const{currSlide:n}=this.pswp;if(!n)return;const{pan:o,bounds:r}=n;if(r.correctPan(t,e)!==e||i){const n=Math.round(e-o[t]);o[t]+=n*(i||.35)}else o[t]=e}}function x(t,e,i){return t.x=(e.x+i.x)/2,t.y=(e.y+i.y)/2,t}class k{constructor(t){this.gestures=t,this._startPan={x:0,y:0},this._startZoomPoint={x:0,y:0},this._zoomPoint={x:0,y:0},this._wasOverFitZoomLevel=!1,this._startZoomLevel=1}start(){const{currSlide:t}=this.gestures.pswp;t&&(this._startZoomLevel=t.currZoomLevel,o(this._startPan,t.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:t,startP1:e,p2:i,startP2:n,pswp:o}=this.gestures,{currSlide:r}=o;if(!r)return;const a=r.zoomLevels.min,l=r.zoomLevels.max;if(!r.isZoomable()||o.mainScroll.isShifted())return;x(this._startZoomPoint,e,n),x(this._zoomPoint,t,i);let c=1/s(e,n)*s(t,i)*this._startZoomLevel;if(c>r.zoomLevels.initial+r.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),c<a)if(o.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=r.zoomLevels.initial){const t=1-(a-c)/(a/1.2);o.dispatch("pinchClose",{bgOpacity:t}).defaultPrevented||o.applyBgOpacity(t)}else c=a-.15*(a-c);else c>l&&(c=l+.05*(c-l));r.pan.x=this._calculatePanForZoomLevel("x",c),r.pan.y=this._calculatePanForZoomLevel("y",c),r.setZoomLevel(c),r.applyCurrentZoomPan()}end(){const{pswp:t}=this.gestures,{currSlide:e}=t;(!e||e.currZoomLevel<e.zoomLevels.initial)&&!this._wasOverFitZoomLevel&&t.options.pinchToClose?t.close():this.correctZoomPan()}_calculatePanForZoomLevel(t,e){const i=e/this._startZoomLevel;return this._zoomPoint[t]-(this._startZoomPoint[t]-this._startPan[t])*i}correctZoomPan(t){const{pswp:e}=this.gestures,{currSlide:i}=e;if(null==i||!i.isZoomable())return;0===this._zoomPoint.x&&(t=!0);const n=i.currZoomLevel;let r,s=!0;n<i.zoomLevels.initial?r=i.zoomLevels.initial:n>i.zoomLevels.max?r=i.zoomLevels.max:(s=!1,r=n);const c=e.bgOpacity,u=e.bgOpacity<1,h=o({x:0,y:0},i.pan);let d=o({x:0,y:0},h);t&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=n,o(this._startPan,h)),s&&(d={x:this._calculatePanForZoomLevel("x",r),y:this._calculatePanForZoomLevel("y",r)}),i.setZoomLevel(r),d={x:i.bounds.correctPan("x",d.x),y:i.bounds.correctPan("y",d.y)},i.setZoomLevel(n);const p=!a(d,h);if(!p&&!s&&!u)return i._setResolution(r),void i.applyCurrentZoomPan();e.animations.stopAllPan(),e.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:t=>{if(t/=1e3,p||s){if(p&&(i.pan.x=h.x+(d.x-h.x)*t,i.pan.y=h.y+(d.y-h.y)*t),s){const e=n+(r-n)*t;i.setZoomLevel(e)}i.applyCurrentZoomPan()}u&&e.bgOpacity<1&&e.applyBgOpacity(l(c+(1-c)*t,0,1))},onComplete:()=>{i._setResolution(r),i.applyCurrentZoomPan()}})}}function A(t){return!!t.target.closest(".pswp__container")}class L{constructor(t){this.gestures=t}click(t,e){const i=e.target.classList,n=i.contains("pswp__img"),o=i.contains("pswp__item")||i.contains("pswp__zoom-wrap");n?this._doClickOrTapAction("imageClick",t,e):o&&this._doClickOrTapAction("bgClick",t,e)}tap(t,e){A(e)&&this._doClickOrTapAction("tap",t,e)}doubleTap(t,e){A(e)&&this._doClickOrTapAction("doubleTap",t,e)}_doClickOrTapAction(t,e,i){var n;const{pswp:o}=this.gestures,{currSlide:r}=o,s=t+"Action",a=o.options[s];if(!o.dispatch(s,{point:e,originalEvent:i}).defaultPrevented)if("function"!=typeof a)switch(a){case"close":case"next":o[a]();break;case"zoom":null==r||r.toggleZoom(e);break;case"zoom-or-close":null!=r&&r.isZoomable()&&r.zoomLevels.secondary!==r.zoomLevels.initial?r.toggleZoom(e):o.options.clickToCloseNonZoomable&&o.close();break;case"toggle-controls":null===(n=this.gestures.pswp.element)||void 0===n||n.classList.toggle("pswp--ui-visible")}else a.call(o,e,i)}}class O{constructor(t){this.pswp=t,this.dragAxis=null,this.p1={x:0,y:0},this.p2={x:0,y:0},this.prevP1={x:0,y:0},this.prevP2={x:0,y:0},this.startP1={x:0,y:0},this.startP2={x:0,y:0},this.velocity={x:0,y:0},this._lastStartP1={x:0,y:0},this._intervalP1={x:0,y:0},this._numActivePoints=0,this._ongoingPointers=[],this._touchEventEnabled="ontouchstart"in window,this._pointerEventEnabled=!!window.PointerEvent,this.supportsTouch=this._touchEventEnabled||this._pointerEventEnabled&&navigator.maxTouchPoints>1,this._numActivePoints=0,this._intervalTime=0,this._velocityCalculated=!1,this.isMultitouch=!1,this.isDragging=!1,this.isZooming=!1,this.raf=null,this._tapTimer=null,this.supportsTouch||(t.options.allowPanToNext=!1),this.drag=new E(this),this.zoomLevels=new k(this),this.tapHandler=new L(this),t.on("bindEvents",(()=>{t.events.add(t.scrollWrap,"click",this._onClick.bind(this)),this._pointerEventEnabled?this._bindEvents("pointer","down","up","cancel"):this._touchEventEnabled?(this._bindEvents("touch","start","end","cancel"),t.scrollWrap&&(t.scrollWrap.ontouchmove=()=>{},t.scrollWrap.ontouchend=()=>{})):this._bindEvents("mouse","down","up")}))}_bindEvents(t,e,i,n){const{pswp:o}=this,{events:r}=o,s=n?t+n:"";r.add(o.scrollWrap,t+e,this.onPointerDown.bind(this)),r.add(window,t+"move",this.onPointerMove.bind(this)),r.add(window,t+i,this.onPointerUp.bind(this)),s&&r.add(o.scrollWrap,s,this.onPointerUp.bind(this))}onPointerDown(t){const e="mousedown"===t.type||"mouse"===t.pointerType;if(e&&t.button>0)return;const{pswp:i}=this;i.opener.isOpen?i.dispatch("pointerDown",{originalEvent:t}).defaultPrevented||(e&&(i.mouseDetected(),this._preventPointerEventBehaviour(t,"down")),i.animations.stopAll(),this._updatePoints(t,"down"),1===this._numActivePoints&&(this.dragAxis=null,o(this.startP1,this.p1)),this._numActivePoints>1?(this._clearTapTimer(),this.isMultitouch=!0):this.isMultitouch=!1):t.preventDefault()}onPointerMove(t){this._preventPointerEventBehaviour(t,"move"),this._numActivePoints&&(this._updatePoints(t,"move"),this.pswp.dispatch("pointerMove",{originalEvent:t}).defaultPrevented||(1!==this._numActivePoints||this.isDragging?this._numActivePoints>1&&!this.isZooming&&(this._finishDrag(),this.isZooming=!0,this._updateStartPoints(),this.zoomLevels.start(),this._rafStopLoop(),this._rafRenderLoop()):(this.dragAxis||this._calculateDragDirection(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this._clearTapTimer(),this._updateStartPoints(),this._intervalTime=Date.now(),this._velocityCalculated=!1,o(this._intervalP1,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this._rafStopLoop(),this._rafRenderLoop()))))}_finishDrag(){this.isDragging&&(this.isDragging=!1,this._velocityCalculated||this._updateVelocity(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(t){this._numActivePoints&&(this._updatePoints(t,"up"),this.pswp.dispatch("pointerUp",{originalEvent:t}).defaultPrevented||(0===this._numActivePoints&&(this._rafStopLoop(),this.isDragging?this._finishDrag():this.isZooming||this.isMultitouch||this._finishTap(t)),this._numActivePoints<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),1===this._numActivePoints&&(this.dragAxis=null,this._updateStartPoints()))))}_rafRenderLoop(){(this.isDragging||this.isZooming)&&(this._updateVelocity(),this.isDragging?a(this.p1,this.prevP1)||this.drag.change():a(this.p1,this.prevP1)&&a(this.p2,this.prevP2)||this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(t){const e=Date.now(),i=e-this._intervalTime;i<50&&!t||(this.velocity.x=this._getVelocity("x",i),this.velocity.y=this._getVelocity("y",i),this._intervalTime=e,o(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(t){const{mainScroll:e}=this.pswp;if(e.isShifted())return void e.moveIndexBy(0,!0);if(t.type.indexOf("cancel")>0)return;if("mouseup"===t.type||"mouse"===t.pointerType)return void this.tapHandler.click(this.startP1,t);const i=this.pswp.options.doubleTapAction?300:0;this._tapTimer?(this._clearTapTimer(),s(this._lastStartP1,this.startP1)<25&&this.tapHandler.doubleTap(this.startP1,t)):(o(this._lastStartP1,this.startP1),this._tapTimer=setTimeout((()=>{this.tapHandler.tap(this.startP1,t),this._clearTapTimer()}),i))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(t,e){const i=this.p1[t]-this._intervalP1[t];return Math.abs(i)>1&&e>5?i/e:0}_rafStopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}_preventPointerEventBehaviour(t,e){this.pswp.applyFilters("preventPointerEvent",!0,t,e)&&t.preventDefault()}_updatePoints(t,e){if(this._pointerEventEnabled){const i=t,n=this._ongoingPointers.findIndex((t=>t.id===i.pointerId));"up"===e&&n>-1?this._ongoingPointers.splice(n,1):"down"===e&&-1===n?this._ongoingPointers.push(this._convertEventPosToPoint(i,{x:0,y:0})):n>-1&&this._convertEventPosToPoint(i,this._ongoingPointers[n]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&o(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&o(this.p2,this._ongoingPointers[1])}else{const i=t;this._numActivePoints=0,i.type.indexOf("touch")>-1?i.touches&&i.touches.length>0&&(this._convertEventPosToPoint(i.touches[0],this.p1),this._numActivePoints++,i.touches.length>1&&(this._convertEventPosToPoint(i.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(t,this.p1),"up"===e?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){o(this.prevP1,this.p1),o(this.prevP2,this.p2)}_updateStartPoints(){o(this.startP1,this.p1),o(this.startP2,this.p2),this._updatePrevPoints()}_calculateDragDirection(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{const t=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(0!==t){const e=t>0?"x":"y";Math.abs(this.p1[e]-this.startP1[e])>=10&&(this.dragAxis=e)}}}_convertEventPosToPoint(t,e){return e.x=t.pageX-this.pswp.offset.x,e.y=t.pageY-this.pswp.offset.y,"pointerId"in t?e.id=t.pointerId:void 0!==t.identifier&&(e.id=t.identifier),e}_onClick(t){this.pswp.mainScroll.isShifted()&&(t.preventDefault(),t.stopPropagation())}}class T{constructor(t){this.pswp=t,this.x=0,this.slideWidth=0,this._currPositionIndex=0,this._prevPositionIndex=0,this._containerShiftIndex=-1,this.itemHolders=[]}resize(t){const{pswp:e}=this,i=Math.round(e.viewportSize.x+e.viewportSize.x*e.options.spacing),n=i!==this.slideWidth;n&&(this.slideWidth=i,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach(((e,i)=>{n&&u(e.el,(i+this._containerShiftIndex)*this.slideWidth),t&&e.slide&&e.slide.resize()}))}resetPosition(){this._currPositionIndex=0,this._prevPositionIndex=0,this.slideWidth=0,this._containerShiftIndex=-1}appendHolders(){this.itemHolders=[];for(let t=0;t<3;t++){const e=n("pswp__item","div",this.pswp.container);e.setAttribute("role","group"),e.setAttribute("aria-roledescription","slide"),e.setAttribute("aria-hidden","true"),e.style.display=1===t?"block":"none",this.itemHolders.push({el:e})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(t,e,i){const{pswp:n}=this;let o=n.potentialIndex+t;const r=n.getNumItems();if(n.canLoop()){o=n.getLoopedIndex(o);const e=(t+r)%r;t=e<=r/2?e:e-r}else o<0?o=0:o>=r&&(o=r-1),t=o-n.potentialIndex;n.potentialIndex=o,this._currPositionIndex-=t,n.animations.stopMainScroll();const s=this.getCurrSlideX();if(e){n.animations.startSpring({isMainScroll:!0,start:this.x,end:s,velocity:i||0,naturalFrequency:30,dampingRatio:1,onUpdate:t=>{this.moveTo(t)},onComplete:()=>{this.updateCurrItem(),n.appendHeavy()}});let t=n.potentialIndex-n.currIndex;if(n.canLoop()){const e=(t+r)%r;t=e<=r/2?e:e-r}Math.abs(t)>1&&this.updateCurrItem()}else this.moveTo(s),this.updateCurrItem();return Boolean(t)}getCurrSlideX(){return this.slideWidth*this._currPositionIndex}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){var t;const{pswp:e}=this,i=this._prevPositionIndex-this._currPositionIndex;if(!i)return;this._prevPositionIndex=this._currPositionIndex,e.currIndex=e.potentialIndex;let n,o=Math.abs(i);o>=3&&(this._containerShiftIndex+=i+(i>0?-3:3),o=3,this.itemHolders.forEach((t=>{var e;null===(e=t.slide)||void 0===e||e.destroy(),t.slide=void 0})));for(let t=0;t<o;t++)i>0?(n=this.itemHolders.shift(),n&&(this.itemHolders[2]=n,this._containerShiftIndex++,u(n.el,(this._containerShiftIndex+2)*this.slideWidth),e.setContent(n,e.currIndex-o+t+2))):(n=this.itemHolders.pop(),n&&(this.itemHolders.unshift(n),this._containerShiftIndex--,u(n.el,this._containerShiftIndex*this.slideWidth),e.setContent(n,e.currIndex+o-t-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),e.animations.stopAllPan(),this.itemHolders.forEach(((t,e)=>{t.slide&&t.slide.setIsActive(1===e)})),e.currSlide=null===(t=this.itemHolders[1])||void 0===t?void 0:t.slide,e.contentLoader.updateLazy(i),e.currSlide&&e.currSlide.applyCurrentZoomPan(),e.dispatch("change")}moveTo(t,e){if(!this.pswp.canLoop()&&e){let e=(this.slideWidth*this._currPositionIndex-t)/this.slideWidth;e+=this.pswp.currIndex;const i=Math.round(t-this.x);(e<0&&i>0||e>=this.pswp.getNumItems()-1&&i<0)&&(t=this.x+.35*i)}this.x=t,this.pswp.container&&u(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:null!=e&&e})}}const I={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},z=(t,e)=>e?t:I[t];class j{constructor(t){this.pswp=t,this._wasFocused=!1,t.on("bindEvents",(()=>{t.options.trapFocus&&(t.options.initialPointerPos||this._focusRoot(),t.events.add(document,"focusin",this._onFocusIn.bind(this))),t.events.add(document,"keydown",this._onKeyDown.bind(this))}));const e=document.activeElement;t.on("destroy",(()=>{t.options.returnFocus&&e&&this._wasFocused&&e.focus()}))}_focusRoot(){!this._wasFocused&&this.pswp.element&&(this.pswp.element.focus(),this._wasFocused=!0)}_onKeyDown(t){const{pswp:e}=this;if(e.dispatch("keydown",{originalEvent:t}).defaultPrevented)return;if(function(t){return"button"in t&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}(t))return;let i,n,o=!1;const r="key"in t;switch(r?t.key:t.keyCode){case z("Escape",r):e.options.escKey&&(i="close");break;case z("z",r):i="toggleZoom";break;case z("ArrowLeft",r):n="x";break;case z("ArrowUp",r):n="y";break;case z("ArrowRight",r):n="x",o=!0;break;case z("ArrowDown",r):o=!0,n="y";break;case z("Tab",r):this._focusRoot()}if(n){t.preventDefault();const{currSlide:r}=e;e.options.arrowKeys&&"x"===n&&e.getNumItems()>1?i=o?"next":"prev":r&&r.currZoomLevel>r.zoomLevels.fit&&(r.pan[n]+=o?-80:80,r.panTo(r.pan.x,r.pan.y))}i&&(t.preventDefault(),e[i]())}_onFocusIn(t){const{template:e}=this.pswp;e&&document!==t.target&&e!==t.target&&!e.contains(t.target)&&e.focus()}}const H="cubic-bezier(.4,0,.22,1)";class D{constructor(t){var e;this.props=t;const{target:i,onComplete:n,transform:o,onFinish:r=()=>{},duration:s=333,easing:a=H}=t;this.onFinish=r;const l=o?"transform":"opacity",c=null!==(e=t[l])&&void 0!==e?e:"";this._target=i,this._onComplete=n,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout((()=>{h(i,l,s,a),this._helperTimeout=setTimeout((()=>{i.addEventListener("transitionend",this._onTransitionEnd,!1),i.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout((()=>{this._finalizeAnimation()}),s+500),i.style[l]=c}),30)}),0)}_onTransitionEnd(t){t.target===this._target&&this._finalizeAnimation()}_finalizeAnimation(){this._finished||(this._finished=!0,this.onFinish(),this._onComplete&&this._onComplete())}destroy(){this._helperTimeout&&clearTimeout(this._helperTimeout),h(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}}class R{constructor(t,e,i){this.velocity=1e3*t,this._dampingRatio=e||.75,this._naturalFrequency=i||12,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(t,e){let i,n=0;e/=1e3;const o=Math.E**(-this._dampingRatio*this._naturalFrequency*e);if(1===this._dampingRatio)i=this.velocity+this._naturalFrequency*t,n=(t+i*e)*o,this.velocity=n*-this._naturalFrequency+i*o;else if(this._dampingRatio<1){i=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*t+this.velocity);const r=Math.cos(this._dampedFrequency*e),s=Math.sin(this._dampedFrequency*e);n=o*(t*r+i*s),this.velocity=n*-this._naturalFrequency*this._dampingRatio+o*(-this._dampedFrequency*t*s+this._dampedFrequency*i*r)}return n}}class B{constructor(t){this.props=t,this._raf=0;const{start:e,end:i,velocity:n,onUpdate:o,onComplete:r,onFinish:s=()=>{},dampingRatio:a,naturalFrequency:l}=t;this.onFinish=s;const c=new R(n,a,l);let u=Date.now(),h=e-i;const d=()=>{this._raf&&(h=c.easeFrame(h,Date.now()-u),Math.abs(h)<1&&Math.abs(c.velocity)<50?(o(i),r&&r(),this.onFinish()):(u=Date.now(),o(h+i),this._raf=requestAnimationFrame(d)))};this._raf=requestAnimationFrame(d)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}}class M{constructor(){this.activeAnimations=[]}startSpring(t){this._start(t,!0)}startTransition(t){this._start(t)}_start(t,e){const i=e?new B(t):new D(t);return this.activeAnimations.push(i),i.onFinish=()=>this.stop(i),i}stop(t){t.destroy();const e=this.activeAnimations.indexOf(t);e>-1&&this.activeAnimations.splice(e,1)}stopAll(){this.activeAnimations.forEach((t=>{t.destroy()})),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter((t=>!t.props.isPan||(t.destroy(),!1)))}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter((t=>!t.props.isMainScroll||(t.destroy(),!1)))}isPanRunning(){return this.activeAnimations.some((t=>t.props.isPan))}}class F{constructor(t){this.pswp=t,t.events.add(t.element,"wheel",this._onWheel.bind(this))}_onWheel(t){t.preventDefault();const{currSlide:e}=this.pswp;let{deltaX:i,deltaY:n}=t;if(e&&!this.pswp.dispatch("wheel",{originalEvent:t}).defaultPrevented)if(t.ctrlKey||this.pswp.options.wheelToZoom){if(e.isZoomable()){let i=-n;1===t.deltaMode?i*=.05:i*=t.deltaMode?1:.002,i=2**i;const o=e.currZoomLevel*i;e.zoomTo(o,{x:t.clientX,y:t.clientY})}}else e.isPannable()&&(1===t.deltaMode&&(i*=18,n*=18),e.panTo(e.pan.x-i,e.pan.y-n))}}class Z{constructor(t,e){var i;const o=e.name||e.className;let r=e.html;if(!1===t.options[o])return;"string"==typeof t.options[o+"SVG"]&&(r=t.options[o+"SVG"]),t.dispatch("uiElementCreate",{data:e});let s="";e.isButton?(s+="pswp__button ",s+=e.className||`pswp__button--${e.name}`):s+=e.className||`pswp__${e.name}`;let a=e.isButton?e.tagName||"button":e.tagName||"div";a=a.toLowerCase();const l=n(s,a);if(e.isButton){"button"===a&&(l.type="button");let{title:i}=e;const{ariaLabel:n}=e;"string"==typeof t.options[o+"Title"]&&(i=t.options[o+"Title"]),i&&(l.title=i);const r=n||i;r&&l.setAttribute("aria-label",r)}l.innerHTML=function(t){if("string"==typeof t)return t;if(!t||!t.isCustomSVG)return"";const e=t;let i='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return i=i.split("%d").join(e.size||32),e.outlineID&&(i+='<use class="pswp__icn-shadow" xlink:href="#'+e.outlineID+'"/>'),i+=e.inner,i+="</svg>",i}(r),e.onInit&&e.onInit(l,t),e.onClick&&(l.onclick=i=>{"string"==typeof e.onClick?t[e.onClick]():"function"==typeof e.onClick&&e.onClick(i,l,t)});const c=e.appendTo||"bar";let u=t.element;"bar"===c?(t.topBar||(t.topBar=n("pswp__top-bar pswp__hide-on-close","div",t.scrollWrap)),u=t.topBar):(l.classList.add("pswp__hide-on-close"),"wrapper"===c&&(u=t.scrollWrap)),null===(i=u)||void 0===i||i.appendChild(t.applyFilters("uiElement",l,e))}}function q(t,e,i){t.classList.add("pswp__button--arrow"),t.setAttribute("aria-controls","pswp__items"),e.on("change",(()=>{e.options.loop||(t.disabled=i?!(e.currIndex<e.getNumItems()-1):!(e.currIndex>0))}))}const N={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<path d="M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z" id="pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:q},U={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<use xlink:href="#pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(t,e)=>{q(t,e,!0)}},W={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M24 10l-2-2-6 6-6-6-2 2 6 6-6 6 2 2 6-6 6 6 2-2-6-6z" id="pswp__icn-close"/>',outlineID:"pswp__icn-close"},onClick:"close"},G={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M17.426 19.926a6 6 0 1 1 1.5-1.5L23 22.5 21.5 24l-4.074-4.074z" id="pswp__icn-zoom"/><path fill="currentColor" class="pswp__zoom-icn-bar-h" d="M11 16v-2h6v2z"/><path fill="currentColor" class="pswp__zoom-icn-bar-v" d="M13 12h2v6h-2z"/>',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},V={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 16a5.2 5.2 0 1 1-5.2-5.2V8a8 8 0 1 0 8 8h-2.8Z" id="pswp__icn-loading"/>',outlineID:"pswp__icn-loading"},onInit:(t,e)=>{let i,n=null;const o=e=>{var n;i!==e&&(i=e,n=e,t.classList.toggle("pswp__preloader--active",n))},r=()=>{var t;if(null===(t=e.currSlide)||void 0===t||!t.content.isLoading())return o(!1),void(n&&(clearTimeout(n),n=null));n||(n=setTimeout((()=>{var t;o(Boolean(null===(t=e.currSlide)||void 0===t?void 0:t.content.isLoading())),n=null}),e.options.preloaderDelay))};e.on("change",r),e.on("loadComplete",(t=>{e.currSlide===t.slide&&r()})),e.ui&&(e.ui.updatePreloaderVisibility=r)}},K={name:"counter",order:5,onInit:(t,e)=>{e.on("change",(()=>{t.innerText=e.currIndex+1+e.options.indexIndicatorSep+e.getNumItems()}))}};function Y(t,e){t.classList.toggle("pswp--zoomed-in",e)}class X{constructor(t){this.pswp=t,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this._lastUpdatedZoomLevel=void 0}init(){const{pswp:t}=this;this.isRegistered=!1,this.uiElementsData=[W,N,U,G,V,K],t.dispatch("uiRegister"),this.uiElementsData.sort(((t,e)=>(t.order||0)-(e.order||0))),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach((t=>{this.registerElement(t)})),t.on("change",(()=>{var e;null===(e=t.element)||void 0===e||e.classList.toggle("pswp--one-slide",1===t.getNumItems())})),t.on("zoomPanUpdate",(()=>this._onZoomPanUpdate()))}registerElement(t){this.isRegistered?this.items.push(new Z(this.pswp,t)):this.uiElementsData.push(t)}_onZoomPanUpdate(){const{template:t,currSlide:e,options:i}=this.pswp;if(this.pswp.opener.isClosing||!t||!e)return;let{currZoomLevel:n}=e;if(this.pswp.opener.isOpen||(n=e.zoomLevels.initial),n===this._lastUpdatedZoomLevel)return;this._lastUpdatedZoomLevel=n;const o=e.zoomLevels.initial-e.zoomLevels.secondary;if(Math.abs(o)<.01||!e.isZoomable())return Y(t,!1),void t.classList.remove("pswp--zoom-allowed");t.classList.add("pswp--zoom-allowed"),Y(t,(n===e.zoomLevels.initial?e.zoomLevels.secondary:e.zoomLevels.initial)<=n),"zoom"!==i.imageClickAction&&"zoom-or-close"!==i.imageClickAction||t.classList.add("pswp--click-to-zoom")}}class ${constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}}class J{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){var n,o,r;this._filters[t]||(this._filters[t]=[]),null===(n=this._filters[t])||void 0===n||n.push({fn:e,priority:i}),null===(o=this._filters[t])||void 0===o||o.sort(((t,e)=>t.priority-e.priority)),null===(r=this.pswp)||void 0===r||r.addFilter(t,e,i)}removeFilter(t,e){this._filters[t]&&(this._filters[t]=this._filters[t].filter((t=>t.fn!==e))),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){var i;return null===(i=this._filters[t])||void 0===i||i.forEach((t=>{e[0]=t.fn.apply(this,e)})),e[0]}on(t,e){var i,n;this._listeners[t]||(this._listeners[t]=[]),null===(i=this._listeners[t])||void 0===i||i.push(e),null===(n=this.pswp)||void 0===n||n.on(t,e)}off(t,e){var i;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter((t=>e!==t))),null===(i=this.pswp)||void 0===i||i.off(t,e)}dispatch(t,e){var i;if(this.pswp)return this.pswp.dispatch(t,e);const n=new $(t,e);return null===(i=this._listeners[t])||void 0===i||i.forEach((t=>{t.call(this,n)})),n}}class Q{constructor(t,e){if(this.element=n("pswp__img pswp__img--placeholder",t?"img":"div",e),t){const e=this.element;e.decoding="async",e.alt="",e.src=t,e.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&("IMG"===this.element.tagName?(d(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=c(0,0,t/250)):d(this.element,t,e))}destroy(){var t;null!==(t=this.element)&&void 0!==t&&t.parentNode&&this.element.remove(),this.element=null}}class tt{constructor(t,e,i){this.instance=e,this.data=t,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state="idle",this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout((()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)}),1e3)}load(t,e){if(this.slide&&this.usePlaceholder())if(this.placeholder){const t=this.placeholder.element;t&&!t.parentElement&&this.slide.container.prepend(t)}else{const t=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new Q(t,this.slide.container)}this.element&&!e||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=n("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=n("pswp__content","div"),this.element.innerHTML=this.data.html||""),e&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var e,i;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const n=this.element;this.updateSrcsetSizes(),this.data.srcset&&(n.srcset=this.data.srcset),n.src=null!==(e=this.data.src)&&void 0!==e?e:"",n.alt=null!==(i=this.data.alt)&&void 0!==i?i:"",this.state=p,n.complete?this.onLoaded():(n.onload=()=>{this.onLoaded()},n.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=f,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),this.state!==f&&this.state!==m||this.removePlaceholder())}onError(){this.state=m,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===p,this)}isError(){return this.state===m}isImageContent(){return"image"===this.type}setDisplayedSize(t,e){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(d(this.element,t,e),this.isImageContent()&&!this.isError()))){const i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=e,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:e,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==m,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,e=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||e>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=e+"px",t.dataset.largestUsedSize=String(e))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented||(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var t,e;let i=n("pswp__error-msg","div");i.innerText=null!==(t=null===(e=this.instance.options)||void 0===e?void 0:e.errorMsg)&&void 0!==t?t:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=n("pswp__content pswp__error-msg-container","div"),this.element.appendChild(i),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===m)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||v())?(this.isDecoding=!0,this.element.decode().catch((()=>{})).finally((()=>{this.isDecoding=!1,this.appendImage()}))):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){!this.instance.dispatch("contentActivate",{content:this}).defaultPrevented&&this.slide&&(this.isImageContent()&&this.isDecoding&&!v()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,this.instance.dispatch("contentRemove",{content:this}).defaultPrevented||(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),this.state!==f&&this.state!==m||this.removePlaceholder()))}}function et(t,e,i){const n=e.createContentFromData(t,i);let o;const{options:r}=e;if(r){let s;o=new P(r,t,-1),s=e.pswp?e.pswp.viewportSize:b(r,e);const a=_(r,s,t,i);o.update(n.width,n.height,a)}return n.lazyLoad(),o&&n.setDisplayedSize(Math.ceil(n.width*o.initial),Math.ceil(n.height*o.initial)),n}class it{constructor(t){this.pswp=t,this.limit=Math.max(t.options.preload[0]+t.options.preload[1]+1,5),this._cachedItems=[]}updateLazy(t){const{pswp:e}=this;if(e.dispatch("lazyLoad").defaultPrevented)return;const{preload:i}=e.options,n=void 0===t||t>=0;let o;for(o=0;o<=i[1];o++)this.loadSlideByIndex(e.currIndex+(n?o:-o));for(o=1;o<=i[0];o++)this.loadSlideByIndex(e.currIndex+(n?-o:o))}loadSlideByIndex(t){const e=this.pswp.getLoopedIndex(t);let i=this.getContentByIndex(e);i||(i=function(t,e){const i=e.getItemData(t);if(!e.dispatch("lazyLoadSlide",{index:t,itemData:i}).defaultPrevented)return et(i,e,t)}(e,this.pswp),i&&this.addToCache(i))}getContentBySlide(t){let e=this.getContentByIndex(t.index);return e||(e=this.pswp.createContentFromData(t.data,t.index),this.addToCache(e)),e.setSlide(t),e}addToCache(t){if(this.removeByIndex(t.index),this._cachedItems.push(t),this._cachedItems.length>this.limit){const t=this._cachedItems.findIndex((t=>!t.isAttached&&!t.hasSlide));-1!==t&&this._cachedItems.splice(t,1)[0].destroy()}}removeByIndex(t){const e=this._cachedItems.findIndex((e=>e.index===t));-1!==e&&this._cachedItems.splice(e,1)}getContentByIndex(t){return this._cachedItems.find((e=>e.index===t))}destroy(){this._cachedItems.forEach((t=>t.destroy())),this._cachedItems=[]}}class nt extends J{getNumItems(){var t;let e=0;const i=null===(t=this.options)||void 0===t?void 0:t.dataSource;i&&"length"in i?e=i.length:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),i.items&&(e=i.items.length));const n=this.dispatch("numItems",{dataSource:i,numItems:e});return this.applyFilters("numItems",n.numItems,i)}createContentFromData(t,e){return new tt(t,this,e)}getItemData(t){var e;const i=null===(e=this.options)||void 0===e?void 0:e.dataSource;let n={};Array.isArray(i)?n=i[t]:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),n=i.items[t]);let o=n;o instanceof Element&&(o=this._domElementToItemData(o));const r=this.dispatch("itemData",{itemData:o||{},index:t});return this.applyFilters("itemData",r.itemData,t)}_getGalleryDOMElements(t){var e,i;return null!==(e=this.options)&&void 0!==e&&e.children||null!==(i=this.options)&&void 0!==i&&i.childSelector?function(t,e,i=document){let n=[];if(t instanceof Element)n=[t];else if(t instanceof NodeList||Array.isArray(t))n=Array.from(t);else{const o="string"==typeof t?t:e;o&&(n=Array.from(i.querySelectorAll(o)))}return n}(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){const e={element:t},i="A"===t.tagName?t:t.querySelector("a");if(i){e.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(e.srcset=i.dataset.pswpSrcset),e.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,e.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,e.w=e.width,e.h=e.height,i.dataset.pswpType&&(e.type=i.dataset.pswpType);const o=t.querySelector("img");var n;o&&(e.msrc=o.currentSrc||o.src,e.alt=null!==(n=o.getAttribute("alt"))&&void 0!==n?n:""),(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0)}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return et(t,this,e)}}const ot=.003;class rt{constructor(t){this.pswp=t,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this._duration=void 0,this._useAnimation=!1,this._croppedZoom=!1,this._animateRootOpacity=!1,this._animateBgOpacity=!1,this._placeholder=void 0,this._opacityElement=void 0,this._cropContainer1=void 0,this._cropContainer2=void 0,this._thumbBounds=void 0,this._prepareOpen=this._prepareOpen.bind(this),t.on("firstZoomPan",this._prepareOpen)}open(){this._prepareOpen(),this._start()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;const t=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this._duration=this.pswp.options.hideAnimationDuration,t&&t.currZoomLevel*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps(),setTimeout((()=>{this._start()}),this._croppedZoom?30:0)}_prepareOpen(){if(this.pswp.off("firstZoomPan",this._prepareOpen),!this.isOpening){const t=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this._duration=this.pswp.options.showAnimationDuration,t&&t.zoomLevels.initial*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps()}}_applyStartProps(){const{pswp:t}=this,e=this.pswp.currSlide,{options:i}=t;var n,o;if("fade"===i.showHideAnimationType?(i.showHideOpacity=!0,this._thumbBounds=void 0):"none"===i.showHideAnimationType?(i.showHideOpacity=!1,this._duration=0,this._thumbBounds=void 0):this.isOpening&&t._initialThumbBounds?this._thumbBounds=t._initialThumbBounds:this._thumbBounds=this.pswp.getThumbBounds(),this._placeholder=null==e?void 0:e.getPlaceholderElement(),t.animations.stopAll(),this._useAnimation=Boolean(this._duration&&this._duration>50),this._animateZoom=Boolean(this._thumbBounds)&&(null==e?void 0:e.content.usePlaceholder())&&(!this.isClosing||!t.mainScroll.isShifted()),this._animateZoom?this._animateRootOpacity=null!==(n=i.showHideOpacity)&&void 0!==n&&n:(this._animateRootOpacity=!0,this.isOpening&&e&&(e.zoomAndPanToInitial(),e.applyCurrentZoomPan())),this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>ot,this._opacityElement=this._animateRootOpacity?t.element:t.bg,!this._useAnimation)return this._duration=0,this._animateZoom=!1,this._animateBgOpacity=!1,this._animateRootOpacity=!0,void(this.isOpening&&(t.element&&(t.element.style.opacity=String(ot)),t.applyBgOpacity(1)));this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect?(this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=null===(o=this.pswp.currSlide)||void 0===o?void 0:o.holderElement,t.container&&(t.container.style.overflow="hidden",t.container.style.width=t.viewportSize.x+"px")):this._croppedZoom=!1,this.isOpening?(this._animateRootOpacity?(t.element&&(t.element.style.opacity=String(ot)),t.applyBgOpacity(1)):(this._animateBgOpacity&&t.bg&&(t.bg.style.opacity=String(ot)),t.element&&(t.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(ot)))):this.isClosing&&(t.mainScroll.itemHolders[0]&&(t.mainScroll.itemHolders[0].el.style.display="none"),t.mainScroll.itemHolders[2]&&(t.mainScroll.itemHolders[2].el.style.display="none"),this._croppedZoom&&0!==t.mainScroll.x&&(t.mainScroll.resetPosition(),t.mainScroll.resize()))}_start(){this.isOpening&&this._useAnimation&&this._placeholder&&"IMG"===this._placeholder.tagName?new Promise((t=>{let e=!1,i=!0;var n;(n=this._placeholder,"decode"in n?n.decode().catch((()=>{})):n.complete?Promise.resolve(n):new Promise(((t,e)=>{n.onload=()=>t(n),n.onerror=e}))).finally((()=>{e=!0,i||t(!0)})),setTimeout((()=>{i=!1,e&&t(!0)}),50),setTimeout(t,250)})).finally((()=>this._initiate())):this._initiate()}_initiate(){var t,e;null===(t=this.pswp.element)||void 0===t||t.style.setProperty("--pswp-transition-duration",this._duration+"ms"),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),null===(e=this.pswp.element)||void 0===e||e.classList.toggle("pswp--ui-visible",this.isOpening),this.isOpening?(this._placeholder&&(this._placeholder.style.opacity="1"),this._animateToOpenState()):this.isClosing&&this._animateToClosedState(),this._useAnimation||this._onAnimationComplete()}_onAnimationComplete(){const{pswp:t}=this;if(this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,t.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),t.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed)t.destroy();else if(this.isOpen){var e;this._animateZoom&&t.container&&(t.container.style.overflow="visible",t.container.style.width="100%"),null===(e=t.currSlide)||void 0===e||e.applyCurrentZoomPan()}}_animateToOpenState(){const{pswp:t}=this;this._animateZoom&&(this._croppedZoom&&this._cropContainer1&&this._cropContainer2&&(this._animateTo(this._cropContainer1,"transform","translate3d(0,0,0)"),this._animateTo(this._cropContainer2,"transform","none")),t.currSlide&&(t.currSlide.zoomAndPanToInitial(),this._animateTo(t.currSlide.container,"transform",t.currSlide.getCurrentTransform()))),this._animateBgOpacity&&t.bg&&this._animateTo(t.bg,"opacity",String(t.options.bgOpacity)),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","1")}_animateToClosedState(){const{pswp:t}=this;this._animateZoom&&this._setClosedStateZoomPan(!0),this._animateBgOpacity&&t.bgOpacity>.01&&t.bg&&this._animateTo(t.bg,"opacity","0"),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","0")}_setClosedStateZoomPan(t){if(!this._thumbBounds)return;const{pswp:e}=this,{innerRect:i}=this._thumbBounds,{currSlide:n,viewportSize:r}=e;if(this._croppedZoom&&i&&this._cropContainer1&&this._cropContainer2){const e=-r.x+(this._thumbBounds.x-i.x)+i.w,n=-r.y+(this._thumbBounds.y-i.y)+i.h,o=r.x-i.w,s=r.y-i.h;t?(this._animateTo(this._cropContainer1,"transform",c(e,n)),this._animateTo(this._cropContainer2,"transform",c(o,s))):(u(this._cropContainer1,e,n),u(this._cropContainer2,o,s))}n&&(o(n.pan,i||this._thumbBounds),n.currZoomLevel=this._thumbBounds.w/n.width,t?this._animateTo(n.container,"transform",n.getCurrentTransform()):n.applyCurrentZoomPan())}_animateTo(t,e,i){if(!this._duration)return void(t.style[e]=i);const{animations:n}=this.pswp,o={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{n.activeAnimations.length||this._onAnimationComplete()},target:t};o[e]=i,n.startTransition(o)}}const st={allowPanToNext:!0,spacing:.1,loop:!0,pinchToClose:!0,closeOnVerticalDrag:!0,hideAnimationDuration:333,showAnimationDuration:333,zoomAnimationDuration:333,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,maxWidthToAnimate:4e3,clickToCloseNonZoomable:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",indexIndicatorSep:" / ",preloaderDelay:2e3,bgOpacity:.8,index:0,errorMsg:"The image cannot be loaded",preload:[1,2],easing:"cubic-bezier(.4,0,.22,1)"};class at extends nt{constructor(t){super(),this.options=this._prepareOptions(t||{}),this.offset={x:0,y:0},this._prevViewportSize={x:0,y:0},this.viewportSize={x:0,y:0},this.bgOpacity=1,this.currIndex=0,this.potentialIndex=0,this.isOpen=!1,this.isDestroying=!1,this.hasMouse=!1,this._initialItemData={},this._initialThumbBounds=void 0,this.topBar=void 0,this.element=void 0,this.template=void 0,this.container=void 0,this.scrollWrap=void 0,this.currSlide=void 0,this.events=new g,this.animations=new M,this.mainScroll=new T(this),this.gestures=new O(this),this.opener=new rt(this),this.keyboard=new j(this),this.contentLoader=new it(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this._createMainStructure();let t="pswp--open";return this.gestures.supportsTouch&&(t+=" pswp--touch"),this.options.mainClass&&(t+=" "+this.options.mainClass),this.element&&(this.element.className+=" "+t),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new F(this),(Number.isNaN(this.currIndex)||this.currIndex<0||this.currIndex>=this.getNumItems())&&(this.currIndex=0),this.gestures.supportsTouch||this.mouseDetected(),this.updateSize(),this.offset.y=window.pageYOffset,this._initialItemData=this.getItemData(this.currIndex),this.dispatch("gettingData",{index:this.currIndex,data:this._initialItemData,slide:void 0}),this._initialThumbBounds=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",(()=>{const{itemHolders:t}=this.mainScroll;t[0]&&(t[0].el.style.display="block",this.setContent(t[0],this.currIndex-1)),t[2]&&(t[2].el.style.display="block",this.setContent(t[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this._handlePageResize.bind(this)),this.events.add(window,"scroll",this._updatePageScrollOffset.bind(this)),this.dispatch("bindEvents")})),this.mainScroll.itemHolders[1]&&this.setContent(this.mainScroll.itemHolders[1],this.currIndex),this.dispatch("change"),this.opener.open(),this.dispatch("afterInit"),!0}getLoopedIndex(t){const e=this.getNumItems();return this.options.loop&&(t>e-1&&(t-=e),t<0&&(t+=e)),l(t,0,e-1)}appendHeavy(){this.mainScroll.itemHolders.forEach((t=>{var e;null===(e=t.slide)||void 0===e||e.appendHeavy()}))}goTo(t){this.mainScroll.moveIndexBy(this.getLoopedIndex(t)-this.potentialIndex)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...t){var e;null===(e=this.currSlide)||void 0===e||e.zoomTo(...t)}toggleZoom(){var t;null===(t=this.currSlide)||void 0===t||t.toggleZoom()}close(){this.opener.isOpen&&!this.isDestroying&&(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){var t;if(!this.isDestroying)return this.options.showHideAnimationType="none",void this.close();this.dispatch("destroy"),this._listeners={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),null===(t=this.element)||void 0===t||t.remove(),this.mainScroll.itemHolders.forEach((t=>{var e;null===(e=t.slide)||void 0===e||e.destroy()})),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(t){this.contentLoader.removeByIndex(t),this.mainScroll.itemHolders.forEach(((e,i)=>{var n,o;let r=(null!==(n=null===(o=this.currSlide)||void 0===o?void 0:o.index)&&void 0!==n?n:0)-1+i;var s;this.canLoop()&&(r=this.getLoopedIndex(r)),r===t&&(this.setContent(e,t,!0),1===i&&(this.currSlide=e.slide,null===(s=e.slide)||void 0===s||s.setIsActive(!0)))})),this.dispatch("change")}setContent(t,e,i){if(this.canLoop()&&(e=this.getLoopedIndex(e)),t.slide){if(t.slide.index===e&&!i)return;t.slide.destroy(),t.slide=void 0}if(!this.canLoop()&&(e<0||e>=this.getNumItems()))return;const n=this.getItemData(e);t.slide=new C(n,e,this),e===this.currIndex&&(this.currSlide=t.slide),t.slide.append(t.el)}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(t){if(this.isDestroying)return;const e=b(this.options,this);!t&&a(e,this._prevViewportSize)||(o(this._prevViewportSize,e),this.dispatch("beforeResize"),o(this.viewportSize,this._prevViewportSize),this._updatePageScrollOffset(),this.dispatch("viewportSize"),this.mainScroll.resize(this.opener.isOpen),!this.hasMouse&&window.matchMedia("(any-hover: hover)").matches&&this.mouseDetected(),this.dispatch("resize"))}applyBgOpacity(t){this.bgOpacity=Math.max(t,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){var t;this.hasMouse||(this.hasMouse=!0,null===(t=this.element)||void 0===t||t.classList.add("pswp--has_mouse"))}_handlePageResize(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout((()=>{this.updateSize()}),500)}_updatePageScrollOffset(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(t,e){this.offset.x=t,this.offset.y=e,this.dispatch("updateScrollOffset")}_createMainStructure(){this.element=n("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=n("pswp__bg","div",this.element),this.scrollWrap=n("pswp__scroll-wrap","section",this.element),this.container=n("pswp__container","div",this.scrollWrap),this.scrollWrap.setAttribute("aria-roledescription","carousel"),this.container.setAttribute("aria-live","off"),this.container.setAttribute("id","pswp__items"),this.mainScroll.appendHolders(),this.ui=new X(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return function(t,e,i){const n=i.dispatch("thumbBounds",{index:t,itemData:e,instance:i});if(n.thumbBounds)return n.thumbBounds;const{element:o}=e;let r,s;if(o&&!1!==i.options.thumbSelector){const t=i.options.thumbSelector||"img";s=o.matches(t)?o:o.querySelector(t)}return s=i.applyFilters("thumbEl",s,e,t),s&&(r=e.thumbCropped?function(t,e,i){const n=t.getBoundingClientRect(),o=n.width/e,r=n.height/i,s=o>r?o:r,a=(n.width-e*s)/2,l=(n.height-i*s)/2,c={x:n.left+a,y:n.top+l,w:e*s};return c.innerRect={w:n.width,h:n.height,x:a,y:l},c}(s,e.width||e.w||0,e.height||e.h||0):function(t){const e=t.getBoundingClientRect();return{x:e.left,y:e.top,w:e.width}}(s)),i.applyFilters("thumbBounds",r,e,t)}(this.currIndex,this.currSlide?this.currSlide.data:this._initialItemData,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}_prepareOptions(t){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(t.showHideAnimationType="none",t.zoomAnimationDuration=0),{...st,...t}}}var lt={videoAttributes:{controls:"",playsinline:"",preload:"auto"},autoplay:!0,preventDragOffset:40};function ct(t){return ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ct(t)}function ut(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ht(n.key),n)}}function ht(t){var e=function(t){if("object"!=ct(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=ct(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ct(e)?e:e+""}function dt(t){return t&&t.data&&"video"===t.data.type}var pt=function(){return t=function t(e,i){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=i,this.initLightboxEvents(e),e.on("init",(function(){n.initPswpEvents(e)}))},e=[{key:"initLightboxEvents",value:function(t){t.on("contentLoad",this.onContentLoad.bind(this)),t.on("contentDestroy",this.onContentDestroy.bind(this)),t.on("contentActivate",this.onContentActivate.bind(this)),t.on("contentDeactivate",this.onContentDeactivate.bind(this)),t.on("contentAppend",this.onContentAppend.bind(this)),t.on("contentResize",this.onContentResize.bind(this)),t.addFilter("isKeepingPlaceholder",this.isKeepingPlaceholder.bind(this)),t.addFilter("isContentZoomable",this.isContentZoomable.bind(this)),t.addFilter("useContentPlaceholder",this.useContentPlaceholder.bind(this)),t.addFilter("domItemData",(function(t,e,i){return"video"===t.type&&i&&(i.dataset.pswpVideoSources?t.videoSources=JSON.parse(pswpVideoSources):i.dataset.pswpVideoSrc?t.videoSrc=i.dataset.pswpVideoSrc:t.videoSrc=i.href),t}))}},{key:"initPswpEvents",value:function(t){var e=this;t.on("pointerDown",(function(i){var n=t.currSlide;if(dt(n)&&e.options.preventDragOffset){var o=i.originalEvent;if("pointerdown"===o.type){var r=Math.ceil(n.height*n.currZoomLevel)+n.bounds.center.y,s=o.pageY-t.offset.y;s>r-e.options.preventDragOffset&&s<r&&i.preventDefault()}}})),t.on("appendHeavy",(function(t){dt(t.slide)&&!t.slide.isActive&&t.preventDefault()})),t.on("close",(function(){dt(t.currSlide.content)&&(t.options.showHideAnimationType&&"zoom"!==t.options.showHideAnimationType||(t.options.showHideAnimationType="fade"),e.pauseVideo(t.currSlide.content))}))}},{key:"onContentDestroy",value:function(t){var e=t.content;dt(e)&&e._videoPosterImg&&(e._videoPosterImg.onload=e._videoPosterImg.onerror=null,e._videoPosterImg=null)}},{key:"onContentResize",value:function(t){if(dt(t.content)){t.preventDefault();var e=t.width,i=t.height,n=t.content;if(n.element&&(n.element.style.width=e+"px",n.element.style.height=i+"px"),n.slide&&n.slide.placeholder){var o=n.slide.placeholder.element.style;o.transform="none",o.width=e+"px",o.height=i+"px"}}}},{key:"isKeepingPlaceholder",value:function(t,e){return!dt(e)&&t}},{key:"isContentZoomable",value:function(t,e){return!dt(e)&&t}},{key:"onContentActivate",value:function(t){var e=t.content;dt(e)&&this.options.autoplay&&this.playVideo(e)}},{key:"onContentDeactivate",value:function(t){var e=t.content;dt(e)&&this.pauseVideo(e)}},{key:"onContentAppend",value:function(t){dt(t.content)&&(t.preventDefault(),t.content.isAttached=!0,t.content.appendImage())}},{key:"onContentLoad",value:function(t){var e=t.content;if(dt(t.content)&&(t.preventDefault(),!e.element)){if(e.state="loading",e.type="video",e.element=document.createElement("video"),this.options.videoAttributes)for(var i in this.options.videoAttributes)e.element.setAttribute(i,this.options.videoAttributes[i]||"");e.data.msrc&&e.element.setAttribute("poster",e.data.msrc),this.preloadVideoPoster(e,e.data.msrc),e.element.style.position="absolute",e.element.style.left=0,e.element.style.top=0,e.data.videoSources?e.data.videoSources.forEach((function(t){var i=document.createElement("source");i.src=t.src,i.type=t.type,e.element.appendChild(i)})):e.data.videoSrc&&(e.element.src=e.data.videoSrc)}}},{key:"preloadVideoPoster",value:function(t,e){!t._videoPosterImg&&e&&(t._videoPosterImg=new Image,t._videoPosterImg.src=e,t._videoPosterImg.complete?t.onLoaded():t._videoPosterImg.onload=t._videoPosterImg.onerror=function(){t.onLoaded()})}},{key:"playVideo",value:function(t){t.element&&t.element.play()}},{key:"pauseVideo",value:function(t){t.element&&t.element.pause()}},{key:"useContentPlaceholder",value:function(t,e){return!!dt(e)||t}}],e&&ut(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function ft(t){return ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ft(t)}function mt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function vt(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?mt(Object(i),!0).forEach((function(e){yt(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):mt(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function yt(t,e,i){return(e=wt(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function gt(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,wt(n.key),n)}}function bt(t,e,i){return e&>(t.prototype,e),i&>(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function wt(t){var e=function(t){if("object"!=ft(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=ft(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ft(e)?e:e+""}var _t=bt((function t(e,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),new pt(e,vt(vt({},lt),i))})),St=i(9259),Pt=i(5331),Ct=i(3417);function Et(t){return Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Et(t)}function xt(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,kt(n.key),n)}}function kt(t){var e=function(t){if("object"!=Et(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=Et(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Et(e)?e:e+""}var At=function(){return t=function t(e){var i,n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),window.EventGalleryLightboxConfiguration&&window.EventGalleryLightboxConfiguration.doUseSlideshow&&(this._photoSwipe=e,this._SlideShow_Running=!1,this._currentTimer=null,this._SlideShow_Delay=(null===(i=window)||void 0===i||null===(i=i.EventGalleryLightboxConfiguration)||void 0===i?void 0:i.slideshowSpeed)||2e3,this._SlideShow_Button=null,this._photoSwipe.ui.registerElement({name:"playpause-button",order:9,isButton:!0,html:"",onInit:function(t){n._SlideShow_Button=t,n._adjustNavigation()},onClick:function(t,e){return n.toggleSlideShowState()}}),this._photoSwipe.on("change",(function(){n._planNextSwitch(!1)})),this._photoSwipe.on("destroy",(function(){return n._photoSwipeGallery=null})),this._photoSwipe.on("keydown",(function(t){t.originalEvent.target!==n._SlideShow_Button&&n._stopSlideshow()})),this._photoSwipe.on("pointerDown",(function(t){t.originalEvent.target!==n._SlideShow_Button&&n._stopSlideshow()})),window.EventGalleryLightboxConfiguration.doUseAutoplay&&this.toggleSlideShowState())},(e=[{key:"setDelay",value:function(t){this._SlideShow_Delay=t}},{key:"toggleSlideShowState",value:function(){this._SlideShow_Running?this._stopSlideshow():this._startSlideshow()}},{key:"_stopSlideshow",value:function(){this._SlideShow_Running=!1,this._adjustNavigation()}},{key:"_startSlideshow",value:function(){this._SlideShow_Running=!0,this._planNextSwitch(!0),this._adjustNavigation()}},{key:"_adjustNavigation",value:function(){this._SlideShow_Button&&(this._SlideShow_Button.classList.remove(this._SlideShow_Running?"play":"pause"),this._SlideShow_Button.classList.add(this._SlideShow_Running?"pause":"play"))}},{key:"_planNextSwitch",value:function(t){var e=this;clearTimeout(this._currentTimer),this._currentTimer=setTimeout((function(){return e._nextSlide()}),t?this._SlideShow_Delay/2:this._SlideShow_Delay)}},{key:"_nextSlide",value:function(){null!==this._photoSwipe&&this._SlideShow_Running&&this._photoSwipe.next()}}])&&xt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}(),Lt=i(8787);function Ot(t,e){return t&&(e(t)?t:Ot(t.parentNode,e))}function Tt(t){var e,i,n,o,r;if(1!==t.nodeType)return null;if(void 0===t.getElementsByTagName("IMG")[0])return null;if(i=t.getAttribute("data-height"),n=t.getAttribute("data-width"),o=t.getAttribute("data-pid"),r=t.getAttribute("data-gid"),null===i||null===n||null===o)return null;(e=new Lt.default).type=t.getAttribute("data-type"),"video"===e.type&&t&&(t.dataset.pswpVideoSources?e.videoSources=JSON.parse(pswpVideoSources):t.dataset.pswpVideoSrc?e.videoSrc=t.dataset.pswpVideoSrc:e.videoSrc=t.href),e.src=t.getAttribute("href"),e.width=parseInt(n,10),e.height=parseInt(i,10),e.title=decodeURIComponent(t.getAttribute("data-bs-title")||t.getAttribute("data-title")||""),e.pid=parseInt(o,10),e.gid=r,e.thumbEl=t;var s=t.querySelector(".social-share-button");s&&(e.shareUrl=s.getAttribute("data-href")),e.directDownloadButton=t.querySelector(".eg-download");var a,l=t.querySelector(".eventgallery-add2cart");return l&&(e.add2cartUrl=(null===(a=window.EventGalleryCartConfiguration)||void 0===a?void 0:a.add2cartdialogurl)+"&"+l.getAttribute("data-id")),e}var It=i(1767);function zt(t){return zt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zt(t)}function jt(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Dt(n.key),n)}}function Ht(t,e,i){return(e=Dt(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function Dt(t){var e=function(t){if("object"!=zt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=zt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zt(e)?e:e+""}var Rt=function(){return t=function t(e){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Ht(this,"browserBackHappened",!1),Ht(this,"_close",(function(){i.browserBackHappened=!0,i.options.onClose()})),this.options={onClose:function(){},window:window,history:history},this.options=(0,St.mergeObjects)(this.options,e)},(e=[{key:"startUrlHistory",value:function(){if(this.options.history){this.options.window.addEventListener("popstate",this._close),this.browserBackHappened=!1;var t=this.options.window.location.href;t=(0,St.removeUrlHashParameter)(t,"gid"),t=(0,St.removeUrlHashParameter)(t,"pid"),this.options.history.replaceState(null,"",t),this.options.history.pushState(null,"",null)}}},{key:"endUrlHistory",value:function(){this.options.history&&(this.options.window.removeEventListener("popstate",this._close),this.browserBackHappened||this.options.history.go(-1))}},{key:"adjustUrlHistory",value:function(t){if(this.options.history){var e=this.options.window.location.href;e=(0,St.addUrlHashParameter)(e,"gid",t.gid),e=(0,St.addUrlHashParameter)(e,"pid",t.pid),this.options.history.replaceState(null,"",e)}}}])&&jt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Bt(t){return Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bt(t)}function Mt(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Ft(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Ft(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw r}}}}function Ft(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function Zt(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,qt(n.key),n)}}function qt(t){var e=function(t){if("object"!=Bt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=Bt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Bt(e)?e:e+""}var Nt=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._isOpen=!1,this._gallery=null,this._videoPlugin=null,this.options=(0,St.mergeObjects)({doOverlapToolbar:!1,imagePadding:0,doOverlapImageWithCaption:!1,showHideAnimationType:"zoom"},e)},e=[{key:"initPhotoSwipe",value:function(){this.translations=this._translate(),this._registerClickEvents();var t=function(t){var e={};if(t.length<5)return e;for(var i=t.split("&"),n=0;n<i.length;n++)if(i[n]){var o=i[n].split("=");o.length<2||(e[o[0]]=o[1])}return e}(window.location.hash.substring(1));t.pid&&t.gid&&this.openPhotoSwipe(t.pid,this.getGalleries().get(t.gid),!0,!0)}},{key:"_translate",value:function(){return window.EventGalleryLightboxConfiguration?{closeTitle:EventGalleryLightboxConfiguration.KEY_CLOSE,zoomTitle:EventGalleryLightboxConfiguration.KEY_ZOOM,arrowPrevTitle:EventGalleryLightboxConfiguration.KEY_PREVIOUS,arrowNextTitle:EventGalleryLightboxConfiguration.KEY_NEXT,errorMsg:"The image cannot be loaded",indexIndicatorSep:" / ",share:EventGalleryLightboxConfiguration.KEY_SHARE,download:EventGalleryLightboxConfiguration.KEY_DOWNLOAD,buy:EventGalleryLightboxConfiguration.KEY_BUY,"playpause-buttonTitle":EventGalleryLightboxConfiguration.KEY_PLAYSLIDESHOW,pause:EventGalleryLightboxConfiguration.KEY_PAUSESLIDESHOW}:{}}},{key:"onThumbnailsClick",value:function(t){(t=t||window.event).preventDefault?t.preventDefault():t.returnValue=!1;var e=t.target||t.srcElement;if(null===Ot(e,(function(t){return t.classList&&t.classList.contains("eventgallery-icon-container")}))){var i=Ot(e,(function(t){return t.tagName&&"A"===t.tagName.toUpperCase()}));if(i){var n=this.getSlideBy(i),o=this.getIndexOfSlide(n),r=this.getGalleries().get(n.gid);return o>=0&&this.openPhotoSwipe(o,r),!1}}}},{key:"openPhotoSwipe",value:function(t,e,i,n){var o=this,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(void 0!==e&&0!==e.length){var s=(0,St.mergeObjects)({pswpModule:at,galleryPIDs:!0,bgOpacity:1,trapFocus:!1,showHideAnimationType:this.options.showHideAnimationType,galleryUID:e[0].gid,tapAction:function(){o._gallery.element.classList.toggle("pswp--ui-visible"),o._gallery.element.classList.contains("pswp--ui-visible")?o._gallery.element.classList.remove("pswp--ui-invisible"):o._gallery.element.classList.add("pswp--ui-invisible"),o._gallery.updateSize(!0)},paddingFn:function(t,e,i){var n=0,r=0;if(!o._gallery.element.classList.contains("pswp--ui-invisible")&&(!1===o.options.doOverlapToolbar&&(n=(0,St.getElementHeight)(document.querySelector(".pswp__top-bar"))),n+=o.options.imagePadding,!o.options.doOverlapImageWithCaption&&e.title)){var s=document.createElement("div");s.className="pswp__custom-caption",s.innerHTML=e.title,o._gallery.element.appendChild(s),r=(0,St.getElementHeight)(s);var a=getComputedStyle(s);a.bottom&&(r+=parseInt(a.bottom,10),r+=Math.max(0,4-o.options.imagePadding)),Pt.A.removeHtmlElementNode(s)}return{top:n,bottom:0+r,left:0,right:0}}},this.translations);if(s.pinchToClose=!s.add2cartEl,s.closeOnVerticalDrag=!s.add2cartEl,s.closeOnScroll=!s.add2cartEl,window.EventGalleryLightboxConfiguration&&parseInt(window.EventGalleryLightboxConfiguration.navigationFadeDelay)>0&&(s.timeToIdle=parseInt(window.EventGalleryLightboxConfiguration.navigationFadeDelay),s.timeToIdleOutside=parseInt(window.EventGalleryLightboxConfiguration.navigationFadeDelay)),n)if(s.galleryPIDs){t=parseInt(t,10);for(var a=0;a<e.length;a++)if(e[a].pid===t){s.index=a;break}}else s.index=parseInt(t,10)-1;else s.index=parseInt(t,10);if(!isNaN(s.index)){i&&(s.showAnimationDuration=0),s.dataSource=e,this._gallery=new at(s),this._gallery.addFilter("thumbEl",(function(t,e,i){if(e.thumbEl){var n=e.thumbEl.querySelector("img");if(n)return n}return t})),this._gallery.on("close",(function(){return o._isOpen=!1})),this._gallery.on("change",(function(){var t;null===(t=o.overlay)||void 0===t||t.closeOverlay()}));var l=new Rt({onClose:function(){return o._gallery.close()},history:r?history:null});this._gallery.on("afterInit",(function(){l.startUrlHistory(),l.adjustUrlHistory(o.getCurrentSlide())})),this._gallery.on("change",(function(){l.adjustUrlHistory(o.getCurrentSlide())})),this._gallery.on("close",(function(){l.endUrlHistory()})),this._gallery.on("keydown",(function(t){var e;null!==(e=o.overlay)&&void 0!==e&&e.isOpen&&(t.defaultPrevented=!0)})),this._gallery.on("close",(function(){var t;null===(t=o.overlay)||void 0===t||t.closeOverlay()})),this._gallery.on("change",(function(){document.dispatchEvent(Pt.A.createNewEvent("eventgallery-lightbox-changed"))})),this._registerUIElements(),this._videoPlugin=new _t(this._gallery,{}),this._gallery.init(),this._isOpen=!0,document.dispatchEvent(Pt.A.createNewEvent("eventgallery-lightbox-opened"))}}}},{key:"_registerUIElements",value:function(){var t=this;this._gallery.on("uiRegister",(function(){t._gallery.ui.registerElement({name:"custom-caption",order:9,isButton:!1,appendTo:"root",html:"Caption text",onInit:function(e,i){i.on("change",(function(){var i=t.getCurrentSlide(),n="";i&&(n=i.title),e.innerHTML=n||"",n.length>0?e.style.display="block":e.style.display="none"}))}}),t._gallery.ui.registerElement({name:"share-button",ariaLabel:t.translations.share,title:t.translations.share,order:10,isButton:!0,html:"",onInit:function(e,i){i.on("change",(function(i){t.getCurrentSlide().shareUrl?e.style.display="block":e.style.display="none"}))},onClick:function(e,i,n){t.overlay=new Ct.A;var o=t.getCurrentSlide().shareUrl;return t.overlay.openOverlay(o),!1}}),t._gallery.ui.registerElement({name:"add2cart-button",ariaLabel:t.translations.buy,title:t.translations.buy,order:11,isButton:!0,html:"",onInit:function(e,i){i.on("change",(function(i){t.getCurrentSlide().add2cartUrl?e.style.display="block":e.style.display="none"}))},onClick:function(e,i,n){t.overlay=new Ct.A,t.overlay.onLoad=function(){document.dispatchEvent(Pt.A.createNewEvent(It.s.prepareAdd2cartDialogContent,null))};var o=t.getCurrentSlide().add2cartUrl;return t.overlay.openOverlay(o),!1}}),t._gallery.ui.registerElement({name:"download-button",ariaLabel:t.translations.download,title:t.translations.download,order:12,isButton:!0,html:"",onInit:function(e,i){i.on("change",(function(i){t.getCurrentSlide().directDownloadButton?e.style.display="block":e.style.display="none"}))},onClick:function(e,i){var n;return null===(n=t.getCurrentSlide().directDownloadButton)||void 0===n||n.click(),!1}}),new At(t._gallery)}))}},{key:"_registerClickEvents",value:function(){var t,e=this,i=Mt(this.getGalleries().values());try{for(i.s();!(t=i.n()).done;)for(var n=t.value,o=0,r=n.length;o<r;o++)n[o].thumbEl.onclick=function(t){e.onThumbnailsClick(t)}}catch(t){i.e(t)}finally{i.f()}}},{key:"getSlideBy",value:function(t){var e,i=Mt(this.getGalleries().values());try{for(i.s();!(e=i.n()).done;)for(var n=e.value,o=0,r=n.length;o<r;o++)if(n[o].thumbEl===t)return n[o]}catch(t){i.e(t)}finally{i.f()}return null}},{key:"getIndexOfSlide",value:function(t){return this.getGalleries().get(t.gid).map((function(t){return t.hash()})).indexOf(t.hash())}},{key:"getGalleries",value:function(){for(var t=new Map,e=(r=void 0,r=document.querySelectorAll("a[data-eg-lightbox]"),Array.from(r).filter((function(t){var e=(0,St.getParents)(t),i=!0;return e.forEach((function(t){i&&t.classList.contains("glide__slide--clone")&&(i=!1)})),i}))),i=0;i<e.length;i++){var n=void 0,o=Tt(e[i]);null!==o&&(void 0===t.get(o.gid)&&t.set(o.gid,[]),(n=t.get(o.gid)).push(o),t.set(o.gid,n))}var r;return t}},{key:"getCurrentSlide",value:function(){return this._gallery.currSlide.data}},{key:"getCurrentIndex",value:function(){return this._gallery.currIndex}},{key:"reload",value:function(){this._registerClickEvents()}},{key:"isOpen",value:function(){return this._isOpen}},{key:"setAfterChangeEventListener",value:function(t){this._gallery.on("change",t)}},{key:"gotoSlide",value:function(t){this._gallery.goTo(t)}}],e&&Zt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}()},8787:function(t,e,i){"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,r(n.key),n)}}function r(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}i.r(e),i.d(e,{default:function(){return s}});var s=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.width=0,this.height=0,this.src="",this.alt="",this.title="",this.pid="",this.gid="",this.thumbEl=null,this.msrc="",this.shareUrl="",this.add2cartUrl="",this.directDownloadButton="",this.type="",this.videoSrc="",this.videoSources=null},(e=[{key:"hash",value:function(){return this.gid+this.src}}])&&o(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}()},5296:function(t,e,i){"use strict";function n(t){return"string"==typeof t}function o(t){return Array.isArray(t)}function r(t){return NodeList.prototype.isPrototypeOf(t)}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,l(n.key),n)}}function l(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=s(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}i.d(e,{A:function(){return c}});var c=function(){return t=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.listeners=e},e=[{key:"on",value:function(t,e,i){var s=this,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],l=arguments.length>4&&void 0!==arguments[4]&&arguments[4];n(t)&&(t=[t]),r(e)||o(e)||(e=[e]),t.forEach((function(t){s.listeners[t]={closure:i,options:{capture:a,passive:l}};for(var n=0;n<e.length;n++)e[n].addEventListener(t,s.listeners[t].closure,s.listeners[t].options)}))}},{key:"off",value:function(t,e){var i=this;n(t)&&(t=[t]),r(e)||o(e)||(e=[e]),t.forEach((function(t){for(var n=0;n<e.length;n++){var o=i.listeners[t];void 0!==o&&e[n].removeEventListener(t,o.closure,o.options)}}))}},{key:"destroy",value:function(){delete this.listeners}}],e&&a(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}()},8163:function(t,e,i){"use strict";i.r(e)},2898:function(t,e,i){"use strict";i.r(e)},5331:function(t,e){"use strict";var i=function(){function t(){}return t.removeHtmlElementNode=function(t){null!==t.parentNode&&t.parentNode.removeChild(t)},t.createNewEvent=function(t,e){var i=null;return"function"==typeof CustomEvent?i=new CustomEvent(t,{detail:e}):((i=document.createEvent("Event")).initEvent(t,!0,!0),i.detail=e),i},t}();e.A=i},1767:function(t,e,i){"use strict";var n;i.d(e,{s:function(){return n}}),function(t){t.reload="eventgallery-minicart-reload",t.prepareAdd2cartDialogContent="eventgallery-prepare-add2cartdialogcontent",t.rebindAdd2CartButtons="eventgallery-rebind-add2cart-buttons"}(n||(n={}))},3036:function(t,e,i){"use strict";var n,o=i(9259),r=i(5331),s=i(1767);!function(t){t[t.short=0]="short",t[t.long=1]="long"}(n||(n={}));var a=function(){this.buttonShowType="inline",this.emptyCartSelector=".eventgallery-empty-minicart",this.cartSelector=".eventgallery-minicart",this.cartItemContainerSelector=".cart-items-container",this.cartItemsSelector=".cart-items",this.cartItemSelector=".cart-items .cart-item",this.cartCountSelector=".itemscount",this.buttonDownSelector=".toggle-down",this.buttonUpSelector=".toggle-up",this.cartItemsMinHeight=null,this.removeLinkTitle="Remove"},l=function(){function t(t,e,i){var r=this;this.minicartMode=n.short,this.containerElement=e,this.cartProcessor=t,this.lineItems=[],this.options=(0,o.mergeObjects)(new a,i);var l=window.EventGalleryCartConfiguration;this.options=(0,o.mergeObjects)(this.options,l),this.initUI(),document.addEventListener(s.s.reload,(function(t){return r.updateCartData(t.detail)})),document.addEventListener(s.s.rebindAdd2CartButtons,(function(){r.updateAdd2CartIcons()}))}return t.prototype.initUI=function(){var t,e,i,o,r,s=this;this.cartElement=null===(t=this.containerElement)||void 0===t?void 0:t.querySelector(this.options.cartSelector),this.cartItemsElement=null===(e=this.cartElement)||void 0===e?void 0:e.querySelector(this.options.cartItemsSelector),this.emptyCartElement=null===(i=this.containerElement)||void 0===i?void 0:i.querySelector(this.options.emptyCartSelector),this.buttonToShort=null===(o=this.cartElement)||void 0===o?void 0:o.querySelector(this.options.buttonUpSelector),this.buttonToLong=null===(r=this.cartElement)||void 0===r?void 0:r.querySelector(this.options.buttonDownSelector),this.buttonToLong.addEventListener("click",(function(){s.resizeCartArea(n.long)})),this.buttonToShort.addEventListener("click",(function(){s.resizeCartArea(n.short)}))},t.prototype._generateId=function(t){return"folder="+encodeURIComponent(t.folder)+"&file="+encodeURIComponent(t.file)},t.prototype.updateAdd2CartIcons=function(){for(var t=document.querySelectorAll(".eventgallery-add2cart i.egfa"),e=0;e<t.length;e++)t[e].classList.remove("egfa-shopping-cart"),t[e].classList.add("egfa-cart-plus");for(e=0;e<this.lineItems.length;e++)for(var i=this._generateId(this.lineItems[e]),n=document.querySelectorAll(".eventgallery-add2cart[data-id*='".concat(i,"'] i.egfa")),o=0;o<n.length;o++)n[o].classList.add("egfa-shopping-cart"),n[o].classList.remove("egfa-cart-plus")},t.prototype.resizeCartArea=function(t){this.minicartMode=t;for(var e=1,i=-1,r=-1,s=this.cartItemsElement.querySelectorAll(this.options.cartItemSelector),a=0;a<s.length;a++){var l=s[a];i<0&&(i=(0,o.getOuterHeight)(l)),r>-1&&r!=l.offsetTop&&e++,r=l.offsetTop}var c=1;1===e?(this.buttonToShort.style.display="none",this.buttonToLong.style.display="none"):this.minicartMode==n.short?(this.buttonToShort.style.display="none",this.buttonToLong.style.display="inline"):(this.buttonToShort.style.display="inline",this.buttonToLong.style.display="none",c=e),this.cartItemsElement.style.height=c*i+"px"},t.prototype.updateCartData=function(t){var e=this;this.lineItems=t.cart,this.lineItems.length>0?(this.cartElement.style.display="block",this.emptyCartElement&&(this.emptyCartElement.style.display="none")):(this.cartElement.style.display="none",this.emptyCartElement&&(this.emptyCartElement.style.display="block"));for(var i="",n=this.lineItems.length-1;n>=0;n--)i+='<div>\n <div class="cart-item">\n <span class="badge badge-pill badge-info">'.concat(this.lineItems[n].count,"</span>\n ").concat(this.lineItems[n].imagetag,'\n <a href="#" title="').concat(this.options.removeLinkTitle,'" \n class="button-removeFromCart eventgallery-removeFromCart" \n data-id="lineitemid=').concat(this.lineItems[n].lineitemid,'">\n <i class="egfa egfa-2x egfa-remove"></i>\n </a>\n </div>\n </div>');this.cartItemsElement.innerHTML=i;var o=this.cartItemsElement.querySelectorAll(".eventgallery-removeFromCart");for(n=0;n<o.length;n++)o[n].addEventListener("click",(function(t){return e.remove(t)}));this.updateAdd2CartIcons(),this.resizeCartArea(this.minicartMode),this.cartElement.querySelector(".itemscount").innerHTML=this.lineItems.length,void 0!==Eventgallery&&void 0!==Eventgallery.lightbox&&Eventgallery.lightbox.reload(),document.dispatchEvent(r.A.createNewEvent("eventgallery-images-added",{isOverlay:!0}))},t.prototype.remove=function(t){t.preventDefault();var e,i=t.target;e=i.getAttribute("data-id")?i.getAttribute("data-id"):i.parentElement.getAttribute("data-id"),this.cartProcessor.remove(e)},t}(),c=function(){function t(t){this.inputFields=[],this.plusButtons=[],this.minusButtons=[],this.cartProcessor=t,this.initialize()}return t.prototype.initialize=function(){var e=this;this.cartButton=document.querySelector(t.CART_BUTTON_QUERY_SELECTOR);for(var i=document.getElementsByClassName("eventgallery-cartquantity"),n=0;n<i.length;n++)i[n].addEventListener("change",(function(t){return e.updateQuantity(t)})),this.inputFields.push(i[n]);var o=document.getElementsByClassName("eventgallery-qtyplus");for(n=0;n<o.length;n++)o[n].addEventListener("click",(function(t){return e.quantityPlus(t)}),{capture:!0}),this.plusButtons.push(o[n]);var r=document.getElementsByClassName("eventgallery-qtyminus");for(n=0;n<r.length;n++)r[n].addEventListener("click",(function(t){return e.quantityMinus(t)}),{capture:!0}),this.minusButtons.push(r[n]);document.querySelector("#eg-single-image-type-action-needed")&&this.cartProcessor.loadCart(),this.updateToCartButton()},t.prototype.updateToCartButton=function(){var t=0;this.inputFields.forEach((function(e){t+=parseInt(e.value)})),t>0||0===this.inputFields.length?this.cartButton.disabled=!1:this.cartButton.disabled=!0},t.prototype.updateQuantity=function(t){t.preventDefault();var e=t.target,i=parseInt(e.value);isNaN(i)&&(i=1);var n=e.getAttribute("data-id");this.cartProcessor.add(n,i),this.updateToCartButton()},t.prototype.quantityPlus=function(t){t.preventDefault();var e=t.target.getAttribute("field"),i=document.getElementsByName(e)[0],n=parseInt(i.value);if(isNaN(n))i.value="0";else{var o=parseInt(i.getAttribute("data-maxorderquantity"));(0===o||n<o)&&(i.value=String(n+1));var r=new Event("change");i.dispatchEvent(r)}this.updateToCartButton()},t.prototype.quantityMinus=function(t){t.preventDefault();var e=t.target.getAttribute("field"),i=document.getElementsByName(e)[0],n=parseInt(i.value);if(!isNaN(n)&&n>0){i.value=String(n-1);var o=new Event("change");i.dispatchEvent(o)}else i.value="0";this.updateToCartButton()},t.CART_BUTTON_QUERY_SELECTOR=".eventgallery-opencart",t}(),u=i(3417),h=i(5296),d=function(){function t(t,e){var i=this;this.eventHandler=new h.A,this.cartProcessor=t,this.add2cartdialogurl=e,this.initializeCartButtons(),document.addEventListener(s.s.rebindAdd2CartButtons,(function(){i.initializeCartButtons()}))}return t.prototype.initializeCartButtons=function(){var t=this,e=document.getElementsByClassName("eventgallery-openAdd2cart");Array.prototype.forEach.call(e,(function(e){t.eventHandler.off("click",e),t.eventHandler.on("click",e,(function(e){t.openAdd2CartDialog(e)}))}))},t.prototype.openAdd2CartDialog=function(t){var e=this;t.preventDefault(),t.stopPropagation();var i=t.target;i.getAttribute("data-id")||(i=i.parentElement);var n=new u.A;return n.onLoad=function(){new c(e.cartProcessor)},n.openOverlay(this.add2cartdialogurl+"&"+i.getAttribute("data-id")),!1},t}(),p=function(){function t(){var t=this;this.eventHandler=new h.A,this.initializeCartConnectorButtons(),document.addEventListener(s.s.rebindAdd2CartButtons,(function(){t.initializeCartConnectorButtons()}))}return t.prototype.initializeCartConnectorButtons=function(){var t=this,e=document.getElementsByClassName("eventgallery-cart-connector");Array.prototype.forEach.call(e,(function(e){t.eventHandler.off("click",e),t.eventHandler.on("click",e,(function(e){t.openLink(e)}))}))},t.prototype.openLink=function(t){t.preventDefault(),t.stopPropagation();var e=t.target;e.getAttribute("data-href")||(e=(0,o.getParent)(e,"SPAN")),window.location.href=e.getAttribute("data-href")},t}(),f=function(){this.removeUrl="",this.add2cartUrl="",this.getCartUrl="",this.add2cartdialogurl=""},m=function(){function t(){var t;this.urls=window.EventGalleryCartConfiguration||f,this.add2CartButtonHandler=new d(this,null===(t=this.urls)||void 0===t?void 0:t.add2cartdialogurl),this.cartConnectorButtonHandler=new p}return t.prototype.add=function(t,e){var i=this;fetch(this.urls.add2cartUrl+"&"+t+"&quantity="+e).then((function(t){return t.json()})).then((function(t){return i.dispatchCartData(t)}))},t.prototype.remove=function(t){var e=this;fetch(this.urls.removeUrl+"&"+t).then((function(t){return t.json()})).then((function(t){return e.dispatchCartData(t)}))},t.prototype.loadCart=function(){var t=this;fetch(this.urls.getCartUrl).then((function(t){return t.json()})).then((function(e){return t.dispatchCartData(e)}))},t.prototype.dispatchCartData=function(t){document.dispatchEvent(r.A.createNewEvent(s.s.reload,{cart:t}))},t}();document.addEventListener("DOMContentLoaded",(function(){try{var t=new m;document.addEventListener(s.s.prepareAdd2cartDialogContent,(function(){new c(t)}));var e=document.getElementsByClassName("eventgallery-minicart-container");if(0==e.length)return;for(var i=0;i<e.length;i++)new l(t,e[i],null);t.loadCart()}catch(t){console.log(t)}})),document.addEventListener("DOMContentLoaded",(function(){var t=document.querySelector(".orderimages-container");if(t){var e="true"===t.getAttribute("data-sticky-image-type-selection"),i=t.querySelector(".orderimages-hide"),n=t.querySelector(".orderimages-show"),o=t.querySelector(".orderimages-help");n.addEventListener("click",(function(t){t&&t.preventDefault(),i.style.display="block",o.style.display="block",n.style.display="none",s(!0)})),i.addEventListener("click",r),e?(n.style.display="none",i.style.display="none",s(!0)):r(null)}function r(t){t&&t.preventDefault(),i.style.display="none",o.style.display="none",n.style.display="block",s(!1)}function s(t){for(var e=document.querySelectorAll(".eventgallery-add2cart"),i=0;i<e.length;i++)e[i].style.display=t?"inline-block":"none"}}))},4354:function(t,e,i){"use strict";var n=function(){function t(){}return t.download=function(t,e,i){t.preventDefault();var n=document.createElement("a");n.href=e,n.setAttribute("target","_blank"),n.download=i,document.body.appendChild(n),n.click(),document.body.removeChild(n)},t}(),o=function(){function t(){}return t.click=function(t,e){t.preventDefault(),document.location.href=e},t}(),r=i(3417);document.addEventListener("DOMContentLoaded",(function(){for(var t=document.querySelectorAll(".social-share-button-open"),e=function(e){var i=t[e].getAttribute("data-href");t[e].addEventListener("click",(function(t){t.preventDefault(),(new r.A).openOverlay(i)}),!0)},i=0;i<t.length;i++)e(i);t=document.querySelectorAll(".eg-download");var s=function(e){var i=t[e],r=i.getAttribute("data-href"),s=i.getAttribute("data-download");null!=s?i.addEventListener("click",(function(t){n.download(t,r,s)}),!0):i.addEventListener("click",(function(t){o.click(t,r)}),!0)};for(i=0;i<t.length;i++)s(i)}))}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var i=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t](i,i.exports,__webpack_require__),i.exports}__webpack_require__.d=function(t,e){for(var i in e)__webpack_require__.o(e,i)&&!__webpack_require__.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var __webpack_exports__={};!function(){"use strict";window.Eventgallery=window.Eventgallery||{},__webpack_require__(2495),__webpack_require__(8409),__webpack_require__(8787),__webpack_require__(8163),__webpack_require__(2898),__webpack_require__(3036),__webpack_require__(4354),__webpack_require__(9805)}()})();
//# sourceMappingURL=eventgallery.js.map