1!function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,(function(r){return o(e[i][1][r]||r)}),p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}({1:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FixedMobileBanner=void 0;var _Utils=require("./base/Utils"),_config=require("../config");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}function _defineProperty(obj,key,value){return(key=_toPropertyKey(key))in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _toPropertyKey(t){var i=function(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==_typeof(i)?i:String(i)}exports.FixedMobileBanner=_createClass((function FixedMobileBanner(){var _this=this;!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,FixedMobileBanner),_defineProperty(this,"init",(function(_){["scroll","load","DOMContentLoaded"].forEach((function(event){return window.addEventListener(event,(function(_){return _this.detectVisibility()}))}))})),_defineProperty(this,"detectVisibility",(function(_){_this.offset=_Utils.Utils.$root.style.getPropertyValue("--scroll-header-height")?parseInt(_Utils.Utils.$root.style.getPropertyValue("--scroll-header-height")):0,_this.isVisible=_this.$el.closest(".fixed-mobile-banner").getBoundingClientRect().bottom-_this.offset<0,_this.setHeight(),_this.isEnabledFixedBanner&&(_this.isVisible?(_Utils.Utils.$html.classList.add("is-fixed-mobile-banner-showed"),setTimeout((function(){_this.isEnabledFixedBanner=!1,_Utils.Utils.$html.classList.remove("is-fixed-mobile-banner-showed")}),_config.CONFIG.bannerDelay)):_Utils.Utils.$html.classList.remove("is-fixed-mobile-banner-showed"))})),_defineProperty(this,"setHeight",(function(_){new ResizeObserver((function(entries){entries.forEach((function(entry){var contentRect=entry.contentRect;_Utils.Utils.$root.style.setProperty("--fixed-mobile-banner-height","".concat(contentRect.height,"px"))}))})).observe(_this.$el)})),this.$el=document.querySelector(".js-fixed-mobile-banner"),this.$el&&(this.isVisible=!1,this.isEnabledFixedBanner=!0,this.offset=0,this.init())}))},{"../config":9,"./base/Utils":7}],2:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Header=void 0;var _Utils=require("./base/Utils"),_config=require("../config");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}
1),Constructor}function _defineProperty(obj,key,value){return(key=_toPropertyKey(key))in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _toPropertyKey(t){var i=function(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==_typeof(i)?i:String(i)}exports.Header=_createClass((function Header(){var _this=this;!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,Header),_defineProperty(this,"initListeners",(function(_){if(_this.scrollHeader){["scroll","load","DOMContentLoaded"].forEach((function(event){return window.addEventListener(event,(function(_){return _this.detectVisibility()}))})),_this.scrollHeaderButton.addEventListener("click",(function(_){return _Utils.Utils.$html.classList.toggle("is-scroll-header-menu-showed")}))}})),_defineProperty(this,"detectVisibility",(function(_){_this.isVisible=_this.mainHeader.getBoundingClientRect().bottom>0,_Utils.Utils.$html.classList.toggle("is-scroll-header-showed",!_this.isVisible),_this.isVisible&&_Utils.Utils.$html.classList.remove("is-scroll-header-menu-showed"),_this.setFixedHeaderBanner()})),_defineProperty(this,"setFixedHeaderBanner",(function(_){_this.mainHeaderBanner&&_this.isEnabledFixedHeaderBanner&&(_this.isVisible?_this.mainHeaderBanner.classList.remove("is-fixed"):_this.mainHeaderBanner.classList.add("is-fixed"),setTimeout((function(){_this.isEnabledFixedHeaderBanner=!1,_this.mainHeaderBanner.classList.remove("is-fixed")}),_config.CONFIG.bannerDelay))})),_defineProperty(this,"setScrollHeaderHeight",(function(_){var scrollHeader=document.querySelector(".scroll-header");scrollHeader&&new ResizeObserver((function(entries){entries.forEach((function(entry){var contentRect=entry.contentRect;_Utils.Utils.$root.style.setProperty("--scroll-header-height","".concat(contentRect.height,"px"))}))})).observe(scrollHeader)})),this.scrollHeader=document.querySelector(".scroll-header"),this.mainHeader=document.querySelector(".main-header"),this.scrollHeaderButton=document.querySelector(".scroll-header__button"),this.mainHeaderBanner=document.querySelector(".js-main-header-banner"),this.isVisible=!1,this.isEnabledFixedHeaderBanner=!0,this.initListeners(),this.setScrollHeaderHeight()}))},{"../config":9,"./base/Utils":7}],3:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.HeaderBanner=void 0;var _Utils=require("./base/Utils");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}function _toPropertyKey(t){var i=function(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==_typeof(i)?i:String(i)}exports.HeaderBanner=_createClass((function HeaderBanner(){var obj,key,value,_this=this;!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,HeaderBanner),obj=this,value=function(_){_this.observer=new ResizeObserver((function(entries){entries.forEac
1h((function(entry){var contentRect=entry.contentRect;_Utils.Utils.$root.style.setProperty("--main-header-banner-height","".concat(contentRect.height,"px"))}))})),_this.observer.observe(_this.$el)},(key=_toPropertyKey(key="initObserver"))in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,this.$el=document.querySelector(".js-main-header-banner"),this.$el&&this.initObserver()}))},{"./base/Utils":7}],4:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Home=void 0;var obj,_macy=(obj=require("macy"))&&obj.__esModule?obj:{default:obj};function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _toConsumableArray(arr){return function(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}(arr)||function(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||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 _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}function _defineProperty(obj,key,value){return(key=_toPropertyKey(key))in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _toPropertyKey(t){var i=function(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==_typeof(i)?i:String(i)}exports.Home=_createClass((function Home(){var _this=this;!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,Home),_defineProperty(this,"activeIframe",(function(swiper){var slides=swiper.slides,activeIndex=swiper.activeIndex;_toConsumableArray(slides).map((function(slide,index){var iframe=slide.querySelector("iframe");iframe&&(iframe.src=index===activeIndex?iframe.dataset.src:"")}))})),_defineProperty(this,"initSlide",(function(slideClass,parentClass){var $slide=document.querySelector(slideClass);if($slide){var nextEl=$slide.closest(parentClass).querySelector(".swiper-button-next"),prevEl=$slide.closest(parentClass).querySelector(".swiper-button-prev");new Swiper($slide,{navigation:{nextEl:nextEl,prevEl:prevEl},on:{slideChange:function(swiper){return _this.activeIframe(swiper)},afterInit:function(swiper){return _this.activeIframe(swiper)}}})}})),_defineProperty(this,"initSlideLoNuevo",(function(_){return _this.initSlide(".js-main-frame-slide--lo-nuevo",".main-frame--lo-nuevo")})),_defineProperty(this,"initSlideMejoresMomentos",(function(_){return _this.initSlide(".js-main-frame-slide--mejores-momentos",".main-frame--mejores-momentos")})),_defineProperty(this,"initMainMasonry",(function(_){var $el=document.querySelector(".js-main-masonry");if($el)new _macy.default({container:$el,margin:8,columns:5,breakAt:{1200:4,940:3,520:2,400:2}})})),this.initSlideLoNuevo(),this.initSlideMejoresMomentos(),this.initMainMasonry()}))},{macy:13}],5:[function(require,module,exports){"use strict";function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _toConsumableArray(arr){return function(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}(arr)||function(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||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 _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}
1),Constructor}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperty(obj,key,value){return(key=_toPropertyKey(key))in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _toPropertyKey(t){var i=function(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==_typeof(i)?i:String(i)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.MainPlayerBox=void 0;exports.MainPlayerBox=_createClass((function MainPlayerBox(){var _this=this,_ref=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_ref$index=_ref.index,_index=void 0===_ref$index?0:_ref$index;_classCallCheck(this,MainPlayerBox),_defineProperty(this,"updateMainPlayerBox",(function(){_toConsumableArray(document.querySelectorAll(_this.buttonSelector)).map((function(child,index){return child.classList.toggle("is-actived",index==_this.index)})),_toConsumableArray(document.querySelectorAll(_this.itemSelector)).map((function(child,index){child.classList.toggle("is-showed",index==_this.index);var iframe=child.querySelector("iframe");iframe&&(iframe.src=index==_this.index?iframe.dataset.src:"")}))})),_defineProperty(this,"setIndex",(function(index){_this.index=index})),_defineProperty(this,"initListener",(function(_){_this.el.addEventListener("click",(function(event){var target=event.target;target.closest(_this.buttonSelector);var children=_toConsumableArray(target.parentElement.children);_this.index=children.indexOf(target),_this.updateMainPlayerBox()}))})),this.el=document.querySelector(".main-player-box"),this.el&&(this.buttonSelector=".main-player-box__button",this.itemSelector=".main-player-box__item",this.index=_index,this.initListener())}))},{}],6:[function(require,module,exports){"use strict";function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Effects=void 0;var _Utils=require("./Utils");function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}function _toPropertyKey(t){var i=function(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==_typeof(i)?i:String(i)}function _classPrivateFieldInitSpec(obj,privateMap,value){!function(obj,privateCollection){if(privateCollection.has(obj))throw new TypeError("Cannot initialize the same private elements twice on an object")}(obj,privateMap),privateMap.set(obj,value)}function _classPrivateFieldGet(s,a){return s.get(function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}(s,a))}var _delayTime=new WeakMap,_enabledEffects=new WeakMap,_addListeners=new WeakMap,_init=new WeakMap;exports.Effects=_createClass((function Effects(){var _this=this;!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,Effects),_classPrivateFieldInitSpec(this,_delayTime,300),_classPrivateFieldInitSpec(this,_enabledEffects,(function(){window.addEventListener("load",(function(){return _Utils.Utils.$html.classList.remove("u-disable-effects")}))}
1)),_classPrivateFieldInitSpec(this,_addListeners,(function(){var timer;window.addEventListener("resize",(function(){clearTimeout(timer),_Utils.Utils.$html.classList.add("u-disable-effects"),timer=setTimeout((function(){_Utils.Utils.$html.classList.remove("u-disable-effects")}),_classPrivateFieldGet(_delayTime,_this))}))})),_classPrivateFieldInitSpec(this,_init,(function(){_classPrivateFieldGet(_enabledEffects,_this).call(_this),_classPrivateFieldGet(_addListeners,_this).call(_this)})),_classPrivateFieldGet(_init,this).call(this)}))},{"./Utils":7}],7:[function(require,module,exports){"use strict";function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}function _defineProperty(obj,key,value){return(key=_toPropertyKey(key))in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _toPropertyKey(t){var i=function(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==_typeof(i)?i:String(i)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Utils=void 0;var Utils=exports.Utils=_createClass((function Utils(){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,Utils)}));_defineProperty(Utils,"$root",document.documentElement),_defineProperty(Utils,"$html",document.querySelector("html"))},{}],8:[function(require,module,exports){"use strict";function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Viewport=void 0;var _Utils=require("./Utils");function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}function _toPropertyKey(t){var i=function(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==_typeof(i)?i:String(i)}function _classPrivateFieldInitSpec(obj,privateMap,value){!function(obj,privateCollection){if(privateCollection.has(obj))throw new TypeError("Cannot initialize the same private elements twice on an object")}(obj,privateMap),privateMap.set(obj,value)}function _classPrivateFieldGet(s,a){return s.get(_assertClassBrand(s,a))}function _assertClassBrand(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}
1var _sizes=new WeakMap,_getViewportSizes=new WeakMap,_setViewportHandle=new WeakMap,_setViewportProps=new WeakMap,_addListeners=new WeakMap,_init=new WeakMap;exports.Viewport=_createClass((function Viewport(){var _this=this;!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,Viewport),_classPrivateFieldInitSpec(this,_sizes,void 0),_classPrivateFieldInitSpec(this,_getViewportSizes,(function(){return{vw:_Utils.Utils.$root.clientWidth,vh:_Utils.Utils.$root.clientHeight}})),_classPrivateFieldInitSpec(this,_setViewportHandle,(function(){var s,a,r;s=_sizes,a=_this,r=_classPrivateFieldGet(_getViewportSizes,_this).call(_this),s.set(_assertClassBrand(s,a),r),_classPrivateFieldGet(_setViewportProps,_this).call(_this)})),_classPrivateFieldInitSpec(this,_setViewportProps,(function(){var _classPrivateFieldGet2=_classPrivateFieldGet(_sizes,_this),vw=_classPrivateFieldGet2.vw,vh=_classPrivateFieldGet2.vh,$rootStyle=_Utils.Utils.$root.style;$rootStyle.setProperty("--vw","".concat(vw,"px")),$rootStyle.setProperty("--vh","".concat(vh,"px"))})),_classPrivateFieldInitSpec(this,_addListeners,(function(){window.addEventListener("resize",_classPrivateFieldGet(_setViewportHandle,_this)),window.addEventListener("DOMContentLoaded",_classPrivateFieldGet(_setViewportHandle,_this)),window.addEventListener("load",_classPrivateFieldGet(_setViewportHandle,_this))})),_classPrivateFieldInitSpec(this,_init,(function(_){_classPrivateFieldGet(_setViewportHandle,_this).call(_this),_classPrivateFieldGet(_addListeners,_this).call(_this)})),_classPrivateFieldGet(_init,this).call(this)}))},{"./Utils":7}],9:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CONFIG=void 0;exports.CONFIG={bannerDelay:6e3}},{}],10:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.es=void 0;exports.es={PANUP:"Mover hacia arriba",PANDOWN:"Mover hacia abajo",PANLEFT:"Mover hacia la izquierda",PANRIGHT:"Mover hacia la derecha",ZOOMIN:"Mover a la derecha",ZOOMOUT:"Disminuir el zoom",TOGGLEZOOM:"Alternar nivel de zoom",TOGGLE1TO1:"Alternar nivel de zoom",ITERATEZOOM:"Alternar nivel de zoom",ROTATECCW:"Girar en sentido antihorario",ROTATECW:"Rotar las agujas del reloj",FLIPX:"Voltear horizontalmente",FLIPY:"Voltear verticalmente",FITX:"Ajustar horizontalmente",FITY:"Ajustar verticalmente",RESET:"Reiniciar",TOGGLEFS:"Alternar pantalla completa",CLOSE:"Cerrar",NEXT:"Siguiente",PREV:"Anterior",MODAL:"Puedes cerrar esta ventana con la tecla ESC",ERROR:"Algo salió mal, inténtalo de nuevo más tarde",IMAGE_ERROR:"Imagen no encontrada",ELEMENT_NOT_FOUND:"Elemento HTML no encontrado",AJAX_NOT_FOUND:"Error al cargar el AJAX : No encontrado",AJAX_FORBIDDEN:"Error al cargar el AJAX : Prohibido",IFRAME_ERROR:"Error al cargar la página",TOGGLE_ZOOM:"Cambiar el nivel de zoom",TOGGLE_THUMBS:"Cambiar a miniaturas",TOGGLE_SLIDESHOW:"Cambiar a modo presentación",TOGGLE_FULLSCREEN:"Cambiar a modo pantalla completa",DOWNLOAD:"Descargar"}},{}],11:[function(require,module,exports){"use strict";var _ui=require("@fancyapps/ui"),_es=require("./l10n/fancybox/es"),_Viewport=require("./classes/base/Viewport"),_Effects=require("./classes/base/Effects"),_Home=require("./classes/Home"),_Header=require("./classes/Header"),_HeaderBanner=require("./classes/HeaderBanner"),_MainPlayerBox=require("./classes/MainPlayerBox"),_FixedMobileBanner=require("./classes/FixedMobileBanner"),MAIN_PLAYER_BOX=(new _Viewport.Viewport,new _Effects.Effects,new _Home.Home,new _Header.Header,new _HeaderBanner.HeaderBanner,new _FixedMobileBanner.FixedMobileBanner,new _MainPlayerBox.MainPlayerBox({index:0}));window.MAIN_PLAYER_BOX=MAIN_PLAYER_BOX,_ui.Fancybox.bind("[data-fancybox]",{l10n:_es.es})},{"./classes/FixedMobileBanner":1,"./classes/Header":2,"./classes/HeaderBanner":3,"./classes/Home":4,"./classes/MainPlayerBox":5,"./classes/base/Effects":6,"./classes/base/Viewport":8,"./l10n/fancybox/es":10,"@fancyapps/ui":12}],12:[function(require,module,exports){"use strict";function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(target,property,receiver){var base=_superPropBase(target,property);if(base){var desc=Object.getOwnPropertyDescriptor(base,property);return desc.get?desc.get.call(arguments.length<3?target:receiver):desc.value}},_get.apply(this,arguments)}function _superPropBase(object,property){for(;!Object.prototype.hasOwnProperty.call(object,property)&&null!==(object=_getPrototypeOf(object)););return object}
1function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e))}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_isNativeReflectConstruct=function(){return!!t})()}function _getPrototypeOf(o){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},_getPrototypeOf(o)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _toConsumableArray(arr){return function(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}(arr)||_unsupportedIterableToArray(arr)||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 _defineProperty(obj,key,value){return(key=_toPropertyKey(key))in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _slicedToArray(arr,i){return function(arr){if(Array.isArray(arr))return arr}(arr)||function(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||_unsupportedIterableToArray(arr,i)||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 _createForOfIteratorHelper(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0,F=function(){};return{s:F,n:function(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}},e:function(_e70){throw _e70},f:F}}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 err,normalCompletion=!0,didErr=!1;return{s:function(){it=it.call(o)},n:function(){var step=it.next();return normalCompletion=step.done,step},e:function(_e71){didErr=!0,err=_e71},f:function(){try{normalCompletion||null==it.return||it.return()}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(o){if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return"Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(o):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(o,minLen):void 0}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}
1),Constructor}function _toPropertyKey(t){var i=function(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==_typeof(i)?i:String(i)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var t,e;t=void 0,e=function(t){var e=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e4;return t=parseFloat(t+"")||0,Math.round((t+Number.EPSILON)*e)/e},i=function(t){if(!(t&&t instanceof Element&&t.offsetParent))return!1;var e=t.scrollHeight>t.clientHeight,i=window.getComputedStyle(t).overflowY,n=-1!==i.indexOf("hidden"),s=-1!==i.indexOf("visible");return e&&!n&&!s},n=function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return!(!t||t===document.body||e&&t===e)&&(i(t)?t:n(t.parentElement,e))},s=function(t){var e=(new DOMParser).parseFromString(t,"text/html").body;if(e.childElementCount>1){for(var i=document.createElement("div");e.firstChild;)i.appendChild(e.firstChild);return i}return e.firstChild},o=function(t){return"".concat(t||"").split(" ").filter((function(t){return!!t}))},a=function(t,e,i){t&&o(e).forEach((function(e){t.classList.toggle(e,i||!1)}))},r=_createClass((function r(t){_classCallCheck(this,r),Object.defineProperty(this,"pageX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pageY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"time",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"nativePointer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.nativePointer=t,this.pageX=t.pageX,this.pageY=t.pageY,this.clientX=t.clientX,this.clientY=t.clientY,this.id=self.Touch&&t instanceof Touch?t.identifier:-1,this.time=Date.now()})),l={passive:!1},c=function(){function c(t,_ref){var _ref$start=_ref.start,e=void 0===_ref$start?function(){return!0}:_ref$start,_ref$move=_ref.move,i=void 0===_ref$move?function(){}:_ref$move,_ref$end=_ref.end,n=void 0===_ref$end?function(){}:_ref$end;
1_classCallCheck(this,c),Object.defineProperty(this,"element",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"startCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"moveCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"endCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"currentPointers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"startPointers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),this.element=t,this.startCallback=e,this.moveCallback=i,this.endCallback=n;for(var _i=0,_arr=["onPointerStart","onTouchStart","onMove","onTouchEnd","onPointerEnd","onWindowBlur"];_i<_arr.length;_i++){var _t2=_arr[_i];this[_t2]=this[_t2].bind(this)}this.element.addEventListener("mousedown",this.onPointerStart,l),this.element.addEventListener("touchstart",this.onTouchStart,l),this.element.addEventListener("touchmove",this.onMove,l),this.element.addEventListener("touchend",this.onTouchEnd),this.element.addEventListener("touchcancel",this.onTouchEnd)}return _createClass(c,[{key:"onPointerStart",value:function(t){if(t.buttons&&0===t.button){var e=new r(t);this.currentPointers.some((function(t){return t.id===e.id}))||this.triggerPointerStart(e,t)&&(window.addEventListener("mousemove",this.onMove),window.addEventListener("mouseup",this.onPointerEnd),window.addEventListener("blur",this.onWindowBlur))}}},{key:"onTouchStart",value:function(t){for(var _i2=0,_Array$from=Array.from(t.changedTouches||[]);_i2<_Array$from.length;_i2++){var _e=_Array$from[_i2];this.triggerPointerStart(new r(_e),t)}window.addEventListener("blur",this.onWindowBlur)}},{key:"onMove",value:function(t){var _step,_this=this,e=this.currentPointers.slice(),i="changedTouches"in t?Array.from(t.changedTouches||[]).map((function(t){return new r(t)})):[new r(t)],n=[],_iterator=_createForOfIteratorHelper(i);try{var _loop=function(){var t=_step.value,e=_this.currentPointers.findIndex((function(e){return e.id===t.id}));e<0||(n.push(t),_this.currentPointers[e]=t)};for(_iterator.s();!(_step=_iterator.n()).done;)_loop()}catch(err){_iterator.e(err)}finally{_iterator.f()}n.length&&this.moveCallback(t,this.currentPointers.slice(),e)}},{key:"onPointerEnd",value:function(t){t.buttons>0&&0!==t.button||(this.triggerPointerEnd(t,new r(t)),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseup",this.onPointerEnd),window.removeEventListener("blur",this.onWindowBlur))}},{key:"onTouchEnd",value:function(t){for(var _i3=0,_Array$from2=Array.from(t.changedTouches||[]);_i3<_Array$from2.length;_i3++){var _e2=_Array$from2[_i3];this.triggerPointerEnd(t,new r(_e2))}}},{key:"triggerPointerStart",value:function(t,e){return!!this.startCallback(e,t,this.currentPointers.slice())&&(this.currentPointers.push(t),this.startPointers.push(t),!0)}},{key:"triggerPointerEnd",value:function(t,e){var i=this.currentPointers.findIndex((function(t){return t.id===e.id}));i<0||(this.currentPointers.splice(i,1),this.startPointers.splice(i,1),this.endCallback(t,e,this.currentPointers.slice()))}},{key:"onWindowBlur",value:function(){this.clear()}},{key:"clear",value:function(){for(;this.currentPointers.length;){var _t3=this.currentPointers[this.currentPointers.length-1];this.currentPointers.splice(this.currentPointers.length-1,1),this.startPointers.splice(this.currentPointers.length-1,1),this.endCallback(new Event("touchend",{bubbles:!0,cancelable:!0,clientX:_t3.clientX,clientY:_t3.clientY}),_t3,this.currentPointers.slice())}}},{key:"stop",value:function(){this.element.removeEventListener("mousedown",this.onPointerStart,l),this.element.removeEventListener("touchstart",this.onTouchStart,l),this.element.removeEventListener("touchmove",this.onMove,l),this.element.removeEventListener("touchend",this.onTouchEnd),this.element.removeEventListener("touchcancel",this.onTouchEnd),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseup",this.onPointerEnd),window.removeEventListener("blur",this.onWindowBlur)}}]),c}();function h(t,e){return e?Math.sqrt(Math.pow(e.clientX-t.clientX,2)+Math.pow(e.clientY-t.clientY,2)):0}function d(t,e){return e?{clientX:(t.clientX+e.clientX)/2,clientY:(t.clientY+e.clientY)/2}:t}var u=function(t){return"object"==_typeof(t)&&null!==t&&t.constructor===Object&&"[object Object]"===Object.prototype.toString.call(t)},p=function p(t){for(var i=arguments.length<=1?0:arguments.length-1,_n=0;_n<i;_n++){var _i4=(_n+1<1||arguments.length<=_n+1?void 0:arguments[_n+1]
1)||{};Object.entries(_i4).forEach((function(_ref2){var _ref3=_slicedToArray(_ref2,2),e=_ref3[0],i=_ref3[1],n=Array.isArray(i)?[]:{};t[e]||Object.assign(t,_defineProperty({},e,n)),u(i)?Object.assign(t[e],p(n,i)):Array.isArray(i)?Object.assign(t,_defineProperty({},e,_toConsumableArray(i))):Object.assign(t,_defineProperty({},e,i))}))}return t},f=function(t,e){return t.split(".").reduce((function(t,e){return"object"==_typeof(t)?t[e]:void 0}),e)},g=function(){function g(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck(this,g),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),this.setOptions(t);var _step2,_iterator2=_createForOfIteratorHelper(Object.getOwnPropertyNames(Object.getPrototypeOf(this)));try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var _t4=_step2.value;_t4.startsWith("on")&&"function"==typeof this[_t4]&&(this[_t4]=this[_t4].bind(this))}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}}return _createClass(g,[{key:"setOptions",value:function(t){this.options=t?p({},this.constructor.defaults,t):{};for(var _i5=0,_Object$entries=Object.entries(this.option("on")||{});_i5<_Object$entries.length;_i5++){var _Object$entries$_i=_slicedToArray(_Object$entries[_i5],2),_t5=_Object$entries$_i[0],_e3=_Object$entries$_i[1];this.on(_t5,_e3)}}},{key:"option",value:function(t){for(var _i6,i=f(t,this.options),_len=arguments.length,e=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)e[_key-1]=arguments[_key];return i&&"function"==typeof i&&(i=(_i6=i).call.apply(_i6,[this,this].concat(e))),i}},{key:"optionFor",value:function(t,e,i){for(var _s,o,s=f(e,t),_len2=arguments.length,n=new Array(_len2>3?_len2-3:0),_key2=3;_key2<_len2;_key2++)n[_key2-3]=arguments[_key2];"string"!=typeof(o=s)||isNaN(o)||isNaN(parseFloat(o))||(s=parseFloat(s)),"true"===s&&(s=!0),"false"===s&&(s=!1),s&&"function"==typeof s&&(s=(_s=s).call.apply(_s,[this,this,t].concat(n)));var a=f(e,this.options);return a&&"function"==typeof a?s=a.call.apply(a,[this,this,t].concat(n,[s])):void 0===s&&(s=a),void 0===s?i:s}},{key:"cn",value:function(t){var e=this.options.classes;return e&&e[t]||""}},{key:"localize",value:function(t){var _this2=this,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];t=String(t).replace(/\{\{(\w+).?(\w+)?\}\}/g,(function(t,e,i){var n="";return i?n=_this2.option("".concat(e[0]+e.toLowerCase().substring(1),".l10n.").concat(i)):e&&(n=_this2.option("l10n.".concat(e))),n||(n=t),n}));for(var _i7=0;_i7<e.length;_i7++)t=t.split(e[_i7][0]).join(e[_i7][1]);return t.replace(/\{\{(.*?)\}\}/g,(function(t,e){return e}))}},{key:"on",value:function(t,e){var _this3=this,i=[];"string"==typeof t?i=t.split(" "):Array.isArray(t)&&(i=t),this.events||(this.events=new Map),i.forEac
1h((function(t){var i=_this3.events.get(t);i||(_this3.events.set(t,[]),i=[]),i.includes(e)||i.push(e),_this3.events.set(t,i)}))}},{key:"off",value:function(t,e){var _this4=this,i=[];"string"==typeof t?i=t.split(" "):Array.isArray(t)&&(i=t),i.forEach((function(t){var i=_this4.events.get(t);if(Array.isArray(i)){var _t6=i.indexOf(e);_t6>-1&&i.splice(_t6,1)}}))}},{key:"emit",value:function(t){for(var _this5=this,_len3=arguments.length,e=new Array(_len3>1?_len3-1:0),_key3=1;_key3<_len3;_key3++)e[_key3-1]=arguments[_key3];_toConsumableArray(this.events.get(t)||[]).forEach((function(t){return t.apply(void 0,[_this5].concat(e))})),"*"!==t&&this.emit.apply(this,["*",t].concat(e))}}]),g}();Object.defineProperty(g,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.36"}),Object.defineProperty(g,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});var v,m=function(_g){function m(){var _this6,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,m),_this6=_callSuper(this,m,[t]),Object.defineProperty(_assertThisInitialized(_this6),"plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),_this6}return _inherits(m,_g),_createClass(m,[{key:"attachPlugins",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new Map,_i8=0,_Object$entries2=Object.entries(t);_i8<_Object$entries2.length;_i8++){var _Object$entries2$_i=_slicedToArray(_Object$entries2[_i8],2),_i9=_Object$entries2$_i[0],_n2=_Object$entries2$_i[1],_t7=this.option(_i9),_s2=this.plugins[_i9];_s2||!1===_t7?_s2&&!1===_t7&&(_s2.detach(),delete this.plugins[_i9]):e.set(_i9,new _n2(this,_t7||{}))}var _step3,_iterator3=_createForOfIteratorHelper(e);try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var _step3$value=_slicedToArray(_step3.value,2),_t8=_step3$value[0],_i10=_step3$value[1];this.plugins[_t8]=_i10,_i10.attach()}}catch(err){_iterator3.e(err)}finally{_iterator3.f()}}},{key:"detachPlugins",value:function(t){var _step4,_iterator4=_createForOfIteratorHelper(t=t||Object.keys(this.plugins));try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var _e4=_step4.value,_t9=this.plugins[_e4];_t9&&_t9.detach(),delete this.plugins[_e4]}}catch(err){_iterator4.e(err)}finally{_iterator4.f()}return this.emit("detachPlugins"),this}}]),m}(g);!function(t){t[t.Init=0]="Init",t[t.Error=1]="Error",t[t.Ready=2]="Ready",t[t.Panning=3]="Panning",t[t.Mousemove=4]="Mousemove",t[t.Destroy=5]="Destroy"}(v||(v={}));var b=["a","b","c","d","e","f"],y={PANUP:"Move up",PANDOWN:"Move down",PANLEFT:"Move left",PANRIGHT:"Move right",ZOOMIN:"Zoom in",ZOOMOUT:"Zoom out",TOGGLEZOOM:"Toggle zoom level",TOGGLE1TO1:"Toggle zoom level",ITERATEZOOM:"Toggle zoom level",ROTATECCW:"Rotate counterclockwise",ROTATECW:"Rotate clockwise",FLIPX:"Flip horizontally",FLIPY:"Flip vertically",FITX:"Fit horizontally",FITY:"Fit vertically",RESET:"Reset",TOGGLEFS:"Toggle fullscreen"},w={content:null,width:"auto",height:"auto",panMode:"drag",touch:!0,dragMinThreshold:3,lockAxis:!1,mouseMoveFactor:1,mouseMoveFriction:.12,zoom:!0,pinchToZoom:!0,panOnlyZoomed:"auto",minScale:1,maxScale:2,friction:.25,dragFriction:.35,decelFriction:.05,click:"toggleZoom",dblClick:!1,wheel:"zoom",wheelLimit:7,spinner:!0,bounds:"auto",infinite:!1,rubberband:!0,bounce:!0,maxVelocity:75,transformParent:!1,classes:{content:"f-panzoom__content",isLoading:"is-loading",canZoomIn:"can-zoom_in",canZoomOut:"can-zoom_out",isDraggable:"is-draggable",isDragging:"is-dragging",inFullscreen:"in-fullscreen",htmlHasFullscreen:"with-panzoom-in-fullscreen"},l10n:y},x='<circle cx="25" cy="25" r="20"></circle>',E='<div class="f-spinner"><svg viewBox="0 0 50 50">'+x+x+"</svg></div>",S=function(t){return t&&null!==t&&t instanceof Element&&"nodeType"in t},P=function(t,e){t&&o(e).forEach((function(e){t.classList.remove(e)}))},C=function(t,e){t&&o(e).forEach((function(e){t.classList.add(e)}))},T={a:1,b:0,c:0,d:1,e:0,f:0},O=1e4,A="mousemove",L="drag",z="content",R="auto",k=null,I=null,D=function(_m){function D(t){var _this7,n,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(_classCallCheck(this,D),_this7=_callSuper(this,D,[e]),Object.defineProperty(_assertThisInitialized(_this7),"pointerTracker",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this7),"resizeObserver",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this7),"updateTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this7),"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this7),"rAF",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this7),"isTicking",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(_assertThisInitialized(_this7),"ignoreBounds",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(_assertThisInitialized(_this7),"isBouncingX",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(_assertThisInitialized(_this7),"isBouncingY",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(_assertThisInitialized(_this7),"clicks",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(_assertThisInitialized(_this7),"trackingPoints",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(_assertThisInitialized(_this7),"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(_assertThisInitialized(_this7),"cwd",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(_assertThisInitialized(_this7),"pmme",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(_assertThisInitialized(_this7),"friction",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(_assertThisInitialized(_this7),"state",{enumerable:!0,configurable:!0,writable:!0,value:v.Init}),Object.defineProperty(_assertThisInitialized(_this7),"isDragging",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(_assertThisInitialized(_this7),"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(_assertThisInitialized(_this7),"content",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(_assertThisInitialized(_this7),"spinner",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this7),"containerRect",{enumerable:!0,configurable:!0,writable:!0,value:{width:0,height:0,innerWidth:0,innerHeight:0}}),Object.defineProperty(_assertThisInitialized(_this7),"contentRect",{enumerable:!0,configurable:!0,writable:!0,value:{top:0,right:0,bottom:0,left:0,fullWidth:0,fullHeight:0,fitWidth:0,fitHeight:0,width:0,height:0}}),Object.defineProperty(_assertThisInitialized(_this7),"dragStart",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0,top:0,left:0,time:0}}),Object.defineProperty(_assertThisInitialized(_this7),"dragOffset",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0,time:0}}),Object.defineProperty(_assertThisInitialized(_this7),"current",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},T)}),Object.defineProperty(_assertThisInitialized(_this7),"target",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},T)}),Object.defineProperty(_assertThisInitialized(_this7),"velocity",{enumerable:!0,configurable:!0,writable:!0,value:{a:0,b:0,c:0,d:0,e:0,f:0}}),Object.defineProperty(_assertThisInitialized(_this7),"lockedAxis",{enumerable:!0,configurable:!0,writable:!0,value:!1}),!t)throw new Error("Container Element Not Found");_this7.container=t,_this7.initContent(),_this7.attachPlugins(Object.assign(Object.assign({},D.Plugins),i)),_this7.emit("attachPlugins"),_this7.emit("init");var o=_this7.content;if(o.addEventListener("load",_this7.onLoad),o.addEventListener("error",_this7.onError),_this7.isContentLoading){if(_this7.option("spinner")){t.classList.add(_this7.cn("isLoading"));var _e5=s(E);!t.contains(o)||o.parentElement instanceof HTMLPictureElement?_this7.spinner=t.appendChild(_e5):_this7.spinner=(null===(n=o.parentElement)||void 0===n?void 0:n.insertBefore(_e5,o))||null}_this7.emit("beforeLoad")}else queueMicrotask((function(){_this7.enable()}));return _possibleConstructorReturn(_this7)}return _inherits(D,_m),_createClass(D,[{key:"fits",get:function(){return this.contentRect.width-this.contentRect.fitWidth<1&&this.contentRect.height-this.contentRect.fitHeight<1}},{key:"isTouchDevice",get:function(){return null===I&&(I=window.matchMedia("(hover: none)").matches),I}},{key:"isMobile",get:function(){return null===k&&(k=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)),k}},{key:"panMode",get:function(){return this.options.panMode!==A||this.isTouchDevice?L:A}},{key:"panOnlyZoomed",get:function(){var t=this.options.panOnlyZoomed;return t===R?this.isTouchDevice:t}},{key:"isInfinite",get:function(){return this.option("infinite")}},{key:"angle",get:function(){return 180*Math.atan2(this.current.b,this.current.a)/Math.PI||
10}},{key:"targetAngle",get:function(){return 180*Math.atan2(this.target.b,this.target.a)/Math.PI||0}},{key:"scale",get:function(){var _this$current=this.current,t=_this$current.a,e=_this$current.b;return Math.sqrt(t*t+e*e)||1}},{key:"targetScale",get:function(){var _this$target=this.target,t=_this$target.a,e=_this$target.b;return Math.sqrt(t*t+e*e)||1}},{key:"minScale",get:function(){return this.option("minScale")||1}},{key:"fullScale",get:function(){var t=this.contentRect;return t.fullWidth/t.fitWidth||1}},{key:"maxScale",get:function(){return this.fullScale*(this.option("maxScale")||1)||1}},{key:"coverScale",get:function(){var t=this.containerRect,e=this.contentRect,i=Math.max(t.height/e.fitHeight,t.width/e.fitWidth)||1;return Math.min(this.fullScale,i)}},{key:"isScaling",get:function(){return Math.abs(this.targetScale-this.scale)>1e-5&&!this.isResting}},{key:"isContentLoading",get:function(){var t=this.content;return!!(t&&t instanceof HTMLImageElement)&&!t.complete}},{key:"isResting",get:function(){if(this.isBouncingX||this.isBouncingY)return!1;for(var _i11=0,_b=b;_i11<_b.length;_i11++){var _t10=_b[_i11],_e6="e"==_t10||"f"===_t10?1e-4:1e-5;if(Math.abs(this.target[_t10]-this.current[_t10])>_e6)return!1}return!(!this.ignoreBounds&&!this.checkBounds().inBounds)}},{key:"initContent",value:function(){var t=this.container,e=this.cn(z),i=this.option(z)||t.querySelector(".".concat(e));if(i||(i=t.querySelector("img,picture")||t.firstElementChild)&&C(i,e),i instanceof HTMLPictureElement&&(i=i.querySelector("img")),!i)throw new Error("No content found");this.content=i}},{key:"onLoad",value:function(){var t=this.spinner,e=this.container,i=this.state;t&&(t.remove(),this.spinner=null),this.option("spinner")&&e.classList.remove(this.cn("isLoading")),this.emit("afterLoad"),i===v.Init?this.enable():this.updateMetrics()}},{key:"onError",value:function(){this.state!==v.Destroy&&(this.spinner&&(this.spinner.remove(),this.spinner=null),this.stop(),this.detachEvents(),this.state=v.Error,this.emit("error"))}},{key:"getNextScale",value:function(t){var e=this.fullScale,i=this.targetScale,n=this.coverScale,s=this.maxScale,o=this.minScale,a=o;switch(t){case"toggleMax":a=i-o<.5*(s-o)?s:o;break;case"toggleCover":a=i-o<.5*(n-o)?n:o;break;case"toggleZoom":a=i-o<.5*(e-o)?e:o;break;case"iterateZoom":var _t11=[1,e,s].sort((function(t,e){return t-e})),_r=_t11.findIndex((function(t){return t>i+1e-5}));a=_t11[_r]||1}return a}},{key:"attachObserver",value:function(){var t,_this8=this,e=function(){var t=_this8.container,e=_this8.containerRect;return Math.abs(e.width-t.getBoundingClientRect().width)>.1||Math.abs(e.height-t.getBoundingClientRect().height)>.1};this.resizeObserver||void 0===window.ResizeObserver||(this.resizeObserver=new ResizeObserver((function(){_this8.updateTimer||(e()?(_this8.onResize(),_this8.isMobile&&(_this8.updateTimer=setTimeout((function(){e()&&_this8.onResize(),_this8.updateTimer=null}),500))):_this8.updateTimer&&(clearTimeout(_this8.updateTimer),_this8.updateTimer=null))}))),null===(t=this.resizeObserver)||void 0===t||t.observe(this.container)}},{key:"detachObserver",value:function(){var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect()}},{key:"attachEvents",value:function(){var t=this.container;t.addEventListener("click",this.onClick,{passive:!1,capture:!1}),t.addEventListener("wheel",this.onWheel,{passive:!1}),this.pointerTracker=new c(t,{start:this.onPointerDown,move:this.onPointerMove,end:this.onPointerUp}),document.addEventListener(A,this.onMouseMove)}},{key:"detachEvents",value:function(){var t,e=this.container;e.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),e.removeEventListener("wheel",this.onWheel,{passive:!1}),null===(t=this.pointerTracker)||void 0===t||t.stop(),this.pointerTracker=null,document.removeEventListener(A,this.onMouseMove),document.removeEventListener("keydown",this.onKeydown,!0),this.clickTimer&&(clearTimeout(this.clickTimer),this.clickTimer=null),this.updateTimer&&(clearTimeout(this.updateTimer),this.updateTimer=null)}},{key:"animate",value:function(){var _this9=this;this.setTargetForce();for(var t=this.friction,e=this.option("maxVelocity"),_i12=0,_b2=b;_i12<_b2.length;_i12++){var _i13=_b2[_i12];t?(this.velocity[_i13]*=1-t,e&&!this.isScaling&&(this.velocity[_i13]=Math.max(Math.min(this.velocity[_i13],e),-1*e)),this.current[_i13]+=this.velocity[_i13]):this.current[_i13]=this.target[_i13]}this.setTransform(),this.setEdgeForce(),!this.isResting||this.isDragging?this.rAF=requestAnimationFrame((function(){return _this9.animate()})):this.stop("current")}},{key:"setTargetForce",value:function(){for(var _i14=0,_b3=b;_i14<_b3.length;_i14++){var _t12=_b3[_i14];"e"===_t12&&this.isBouncingX||"f"===_t12&&this.isBouncingY||(this.velocity[_t12]=(1/(1-this.friction)-1)*(this.target[_t12]-this.current[_t12]))}}},{key:"checkBounds",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=this.current,n=i.e+t,s=i.f+e,o=this.getBounds(),a=o.x,r=o.y,l=a.min,c=a.max,h=r.min,d=r.max,u=0,p=0;return l!==1/0&&n<l?u=l-n:c!==1/0&&n>c&&(u=c-n),h!==1/0&&s<h?p=h-s:d!==1/0&&s>d&&(p=d-s),Math.abs(u)<1e-4&&(u=0),Math.abs(p)<1e-4&&(p=0),Object.assign(Object.assign({},o),{xDiff:u,yDiff:p,inBounds:!u&&!p})}},{key:"clampTargetBounds",value:function(){var t=this.target,_this$getBounds=this.getBounds(),e=_this$getBounds.x,i=_this$getBounds.y;e.min!==1/0&&(t.e=Math.max(t.e,e.min)),e.max!==1/0&&(t.e=Math.min(t.e,e.max)),i.min!==1/0&&(t.f=Math.max(t.f,i.min)),i.max!==1/0&&(t.f=Math.min(t.f,i.max))}},{key:"calculateContentDim",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.current,e=this.content,i=this.contentRect,n=i.fitWidth,s=i.fitHeight,o=i.fullWidth,a=i.fullHeight,r=o,l=a;
1if(this.option("zoom")||0!==this.angle){var _i15=!(e instanceof HTMLImageElement||"none"!==window.getComputedStyle(e).maxWidth&&"none"!==window.getComputedStyle(e).maxHeight),_c=_i15?o:n,_h=_i15?a:s,_d=this.getMatrix(t),_u=new DOMPoint(0,0).matrixTransform(_d),_p=new DOMPoint(0+_c,0).matrixTransform(_d),_f=new DOMPoint(0+_c,0+_h).matrixTransform(_d),_g2=new DOMPoint(0,0+_h).matrixTransform(_d),_m2=Math.abs(_f.x-_u.x),_v=Math.abs(_f.y-_u.y),_b4=Math.abs(_g2.x-_p.x),_y=Math.abs(_g2.y-_p.y);r=Math.max(_m2,_b4),l=Math.max(_v,_y)}return{contentWidth:r,contentHeight:l}}},{key:"setEdgeForce",value:function(){if(this.ignoreBounds||this.isDragging||this.panMode===A||this.targetScale<this.scale)return this.isBouncingX=!1,void(this.isBouncingY=!1);var t=this.target,_this$checkBounds=this.checkBounds(),e=_this$checkBounds.x,i=_this$checkBounds.y,n=_this$checkBounds.xDiff,s=_this$checkBounds.yDiff,o=this.option("maxVelocity"),a=this.velocity.e,r=this.velocity.f;0!==n?(this.isBouncingX=!0,n*a<=0?a+=.14*n:(a=.14*n,e.min!==1/0&&(this.target.e=Math.max(t.e,e.min)),e.max!==1/0&&(this.target.e=Math.min(t.e,e.max))),o&&(a=Math.max(Math.min(a,o),-1*o))):this.isBouncingX=!1,0!==s?(this.isBouncingY=!0,s*r<=0?r+=.14*s:(r=.14*s,i.min!==1/0&&(this.target.f=Math.max(t.f,i.min)),i.max!==1/0&&(this.target.f=Math.min(t.f,i.max))),o&&(r=Math.max(Math.min(r,o),-1*o))):this.isBouncingY=!1,this.isBouncingX&&(this.velocity.e=a),this.isBouncingY&&(this.velocity.f=r)}},{key:"enable",value:function(){for(var t=this.content,e=new DOMMatrixReadOnly(window.getComputedStyle(t).transform),_i16=0,_b5=b;_i16<_b5.length;_i16++){var _t13=_b5[_i16];this.current[_t13]=this.target[_t13]=e[_t13]}this.updateMetrics(),this.attachObserver(),this.attachEvents(),this.state=v.Ready,this.emit("ready")}},{key:"onClick",value:function(t){var e,_this10=this;"click"===t.type&&0===t.detail&&(this.dragOffset.x=0,this.dragOffset.y=0),this.isDragging&&(null===(e=this.pointerTracker)||void 0===e||e.clear(),this.trackingPoints=[],this.startDecelAnim());var i=t.target;if(i&&!t.defaultPrevented){if(i.hasAttribute("disabled"))return t.preventDefault(),void t.stopPropagation();if(!function(){var t=window.getSelection();return t&&"Range"===t.type}()||i.closest("button")){var n=i.closest("[data-panzoom-action]"),s=i.closest("[data-panzoom-change]"),o=n||s,a=o&&S(o)?o.dataset:null;if(a){var _e7=a.panzoomChange,_i17=a.panzoomAction;if((_e7||_i17)&&t.preventDefault(),_e7){var _t14={};try{_t14=JSON.parse(_e7)}catch(t){console&&console.warn("The given data was not valid JSON")}return void this.applyChange(_t14)}if(_i17)return void(this[_i17]&&this[_i17]())}if(Math.abs(this.dragOffset.x)>3||Math.abs(this.dragOffset.y)>3)return t.preventDefault(),void t.stopPropagation();if(!i.closest("[data-fancybox]")){var r=this.content.getBoundingClientRect(),l=this.dragStart;if(!l.time||this.canZoomOut()||!(Math.abs(r.x-l.x)>2||Math.abs(r.y-l.y)>2)){this.dragStart.time=0;var c=function(e){_this10.option("zoom",t)&&e&&"string"==typeof e&&/(iterateZoom)|(toggle(Zoom|Full|Cover|Max)|(zoomTo(Fit|Cover|Max)))/.test(e)&&"function"==typeof _this10[e]&&(t.preventDefault(),_this10[e]({event:t}))},h=this.option("click",t),d=this.option("dblClick",t);d?(this.clicks++,1==this.clicks&&(this.clickTimer=setTimeout((function(){1===_this10.clicks?(_this10.emit("click",t),!t.defaultPrevented&&h&&c(h)):(_this10.emit("dblClick",t),t.defaultPrevented||c(d)),_this10.clicks=0,_this10.clickTimer=null}),350))):(this.emit("click",t),!t.defaultPrevented&&h&&c(h))}}}}}},{key:"addTrackingPoint",value:function(t){var e=this.trackingPoints.filter((function(t){return t.time>Date.now()-100}));e.push(t),this.trackingPoints=e}},{key:"onPointerDown",value:function(t,e,i){var n;if(!1===this.option("touch",t))return!1;this.pwt=0,this.dragOffset={x:0,y:0,time:0},this.trackingPoints=[];var s=this.content.getBoundingClientRect();if(this.dragStart={x:s.x,y:s.y,top:s.top,left:s.left,time:Date.now()},this.clickTimer)return!1;if(this.panMode===A&&this.targetScale>1)return t.preventDefault(),t.stopPropagation(),!1;var o=t.composedPath()[0];if(!i.length){if(["TEXTAREA","OPTION","INPUT","SELECT","VIDEO","IFRAME"].includes(o.nodeName)||o.closest("[contenteditable],[data-selectable],[data-draggable],[data-clickable],[data-panzoom-change],[data-panzoom-action]"))return!1;null===(n=window.getSelection())||void 0===n||n.removeAllRanges()}if("mousedown"===t.type)["A","BUTTON"].includes(o.nodeName)||t.preventDefault();else if(Math.abs(this.velocity.a)>.3)return!1;return this.target.e=this.current.e,this.target.f=this.current.f,this.stop(),this.isDragging||(this.isDragging=!0,this.addTrackingPoint(e),this.emit
1("touchStart",t)),!0}},{key:"onPointerMove",value:function(t,i,s){if(!1!==this.option("touch",t)&&this.isDragging&&!(i.length<2&&this.panOnlyZoomed&&e(this.targetScale)<=e(this.minScale)||(this.emit("touchMove",t),t.defaultPrevented))){this.addTrackingPoint(i[0]);var o=this.content,a=d(s[0],s[1]),r=d(i[0],i[1]),l=0,c=0;if(i.length>1){var _t15=o.getBoundingClientRect();l=a.clientX-_t15.left-.5*_t15.width,c=a.clientY-_t15.top-.5*_t15.height}var u=h(s[0],s[1]),p=h(i[0],i[1]),f=u?p/u:1,g=r.clientX-a.clientX,m=r.clientY-a.clientY;this.dragOffset.x+=g,this.dragOffset.y+=m,this.dragOffset.time=Date.now()-this.dragStart.time;var v=e(this.targetScale)===e(this.minScale)&&this.option("lockAxis");if(v&&!this.lockedAxis)if("xy"===v||"y"===v||"touchmove"===t.type){if(Math.abs(this.dragOffset.x)<6&&Math.abs(this.dragOffset.y)<6)return void t.preventDefault();var _e8=Math.abs(180*Math.atan2(this.dragOffset.y,this.dragOffset.x)/Math.PI);this.lockedAxis=_e8>45&&_e8<135?"y":"x",this.dragOffset.x=0,this.dragOffset.y=0,g=0,m=0}else this.lockedAxis=v;if(n(t.target,this.content)&&(v="x",this.dragOffset.y=0),!v||"xy"===v||this.lockedAxis===v||e(this.targetScale)!==e(this.minScale)){t.cancelable&&t.preventDefault(),this.container.classList.add(this.cn("isDragging"));var b=this.checkBounds(g,m);this.option("rubberband")?("x"!==this.isInfinite&&(b.xDiff>0&&g<0||b.xDiff<0&&g>0)&&(g*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitWidth*b.xDiff))),"y"!==this.isInfinite&&(b.yDiff>0&&m<0||b.yDiff<0&&m>0)&&(m*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitHeight*b.yDiff)))):(b.xDiff&&(g=0),b.yDiff&&(m=0));var y=this.targetScale,w=this.minScale,x=this.maxScale;y<.5*w&&(f=Math.max(f,w)),y>
11.5*x&&(f=Math.min(f,x)),"y"===this.lockedAxis&&e(y)===e(w)&&(g=0),"x"===this.lockedAxis&&e(y)===e(w)&&(m=0),this.applyChange({originX:l,originY:c,panX:g,panY:m,scale:f,friction:this.option("dragFriction"),ignoreBounds:!0})}}}},{key:"onPointerUp",value:function(t,e,i){if(i.length)return this.dragOffset.x=0,this.dragOffset.y=0,void(this.trackingPoints=[]);this.container.classList.remove(this.cn("isDragging")),this.isDragging&&(this.addTrackingPoint(e),this.panOnlyZoomed&&this.contentRect.width-this.contentRect.fitWidth<1&&this.contentRect.height-this.contentRect.fitHeight<1&&(this.trackingPoints=[]),n(t.target,this.content)&&"y"===this.lockedAxis&&(this.trackingPoints=[]),this.emit("touchEnd",t),this.isDragging=!1,this.lockedAxis=!1,this.state!==v.Destroy&&(t.defaultPrevented||this.startDecelAnim()))}},{key:"startDecelAnim",value:function(){var t,i=this.isScaling;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1;for(var _i18=0,_b6=b;_i18<_b6.length;_i18++){var _t16=_b6[_i18];this.velocity[_t16]=0}this.target.e=this.current.e,this.target.f=this.current.f,P(this.container,"is-scaling"),P(this.container,"is-animating"),this.isTicking=!1;var n=this.trackingPoints,s=n[0],o=n[n.length-1],a=0,r=0,l=0;o&&s&&(a=o.clientX-s.clientX,r=o.clientY-s.clientY,l=o.time-s.time);var c=(null===(t=window.visualViewport)||void 0===t?void 0:t.scale)||1;1!==c&&(a*=c,r*=c);var h=0,d=0,u=0,p=0,f=this.option("decelFriction"),g=this.targetScale;if(l>0){u=Math.abs(a)>3?a/(l/30):0,p=Math.abs(r)>3?r/(l/30):0;var _t17=this.option("maxVelocity");_t17&&(u=Math.max(Math.min(u,_t17),-1*_t17),p=Math.max(Math.min(p,_t17),-1*_t17))}u&&(h=u/(1/(1-f)-1)),p&&(d=p/(1/(1-f)-1)),("y"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"y"===this.lockedAxis&&e(g)===this.minScale)&&(h=u=0),("x"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"x"===this.lockedAxis&&e(g)===this.minScale)&&(d=p=0);var m=this.dragOffset.x,v=this.dragOffset.y,y=this.option("dragMinThreshold")||0;Math.abs(m)<y&&Math.abs(v)<y&&(h=d=0,u=p=0),(this.option("zoom")&&(g<this.minScale-1e-5||g>this.maxScale+1e-5)||i&&!h&&!d)&&(f=.35),this.applyChange({panX:h,panY:d,friction:f}),this.emit("decel",u,p,m,v)}},{key:"onWheel",value:function(t){var e=[-t.deltaX||0,-t.deltaY||0,-t.detail||0].reduce((function(t,e){return Math.abs(e)>Math.abs(t)?e:t})),i=Math.max(-1,Math.min(1,e));if(this.emit("wheel",t,i),this.panMode!==A&&!t.defaultPrevented){var n=this.option("wheel");"pan"===n?(t.preventDefault(),this.panOnlyZoomed&&!this.canZoomOut()||this.applyChange({panX:2*-t.deltaX,panY:2*-t.deltaY,bounce:!1})):"zoom"===n&&!1!==this.option("zoom")&&this.zoomWithWheel(t)}}},{key:"onMouseMove",value:function(t){this.panWithMouse(t)}},{key:"onKeydown",value:function(t){"Escape"===t.key&&this.toggleFS()}},{key:"onResize",value:function(){this.updateMetrics(),this.checkBounds().inBounds||this.requestTick()}},{key:"setTransform",value:function(){this.emit("beforeTransform");for(var t=this.current,i=this.target,n=this.content,s=this.contentRect,o=Object.assign({},T),_i19=0,_b7=b;_i19<_b7.length;_i19++){var _n3=_b7[_i19],_s3="e"==_n3||"f"===_n3?O:1e5;o[_n3]=e(t[_n3],_s3),Math.abs(i[_n3]-t[_n3])<("e"==_n3||"f"===_n3?.51:.001)&&(t[_n3]=i[_n3])}var a=o.a,r=o.b,l=o.c,c=o.d,h=o.e,d=o.f,u="matrix(".concat(a,", ").concat(r,", ").concat(l,", ").concat(c,", ").concat(h,", ").concat(d,")"),p=n.parentElement instanceof HTMLPictureElement?n.parentElement:n;if(this.option("transformParent")&&(p=p.parentElement||p),p.style.transform!==u){p.style.transform=u;var _this$calculateConten=this.calculateContentDim(),f=_this$calculateConten.contentWidth,g=_this$calculateConten.contentHeight;s.width=f,s.height=g,this.emit("afterTransform")}}},{key:"updateMetrics",value:function(){var _ref4,i,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this&&this.state!==v.Destroy&&!this.isContentLoading){var n=Math.max(1,(null===(i=window.visualViewport)||void 0===i?void 0:i.scale)||1),s=this.container,o=this.content,a=o instanceof HTMLImageElement,r=s.getBoundingClientRect(),l=getComputedStyle(this.container),c=r.width*n,h=r.height*n,d=parseFloat(l.paddingTop)+parseFloat(l.paddingBottom),u=c-(parseFloat(l.paddingLeft)+parseFloat(l.paddingRight)),p=h-d;
1this.containerRect={width:c,height:h,innerWidth:u,innerHeight:p};var f=parseFloat(o.dataset.width||"")||function(t){return(t instanceof HTMLImageElement?t.naturalWidth:t instanceof SVGElement?t.width.baseVal.value:Math.max(t.offsetWidth,t.scrollWidth))||0}(o),g=parseFloat(o.dataset.height||"")||function(t){return(t instanceof HTMLImageElement?t.naturalHeight:t instanceof SVGElement?t.height.baseVal.value:Math.max(t.offsetHeight,t.scrollHeight))||0}(o),m=this.option("width",f)||R,b=this.option("height",g)||R,y=m===R,w=b===R;"number"!=typeof m&&(m=f),"number"!=typeof b&&(b=g),y&&(m=f*(b/g)),w&&(b=g/(f/m));var x=o.parentElement instanceof HTMLPictureElement?o.parentElement:o;this.option("transformParent")&&(x=x.parentElement||x);var E=x.getAttribute("style")||"";x.style.setProperty("transform","none","important"),a&&(x.style.width="",x.style.height=""),x.offsetHeight;var S=o.getBoundingClientRect(),P=S.width*n,C=S.height*n,T=P,M=C;P=Math.min(P,m),C=Math.min(C,b),a?(_ref4=function(t,e,i,n){var s=i/t,o=n/e,a=Math.min(s,o);return{width:t*=a,height:e*=a}}(m,b,P,C),P=_ref4.width,C=_ref4.height):(P=Math.min(P,m),C=Math.min(C,b));var O=.5*(M-C),A=.5*(T-P);this.contentRect=Object.assign(Object.assign({},this.contentRect),{top:S.top-r.top+O,bottom:r.bottom-S.bottom+O,left:S.left-r.left+A,right:r.right-S.right+A,fitWidth:P,fitHeight:C,width:P,height:C,fullWidth:m,fullHeight:b}),x.style.cssText=E,a&&(x.style.width="".concat(P,"px"),x.style.height="".concat(C,"px")),this.setTransform(),!0!==t&&this.emit("refresh"),this.ignoreBounds||(e(this.targetScale)<e(this.minScale)?this.zoomTo(this.minScale,{friction:0}):this.targetScale>this.maxScale?this.zoomTo(this.maxScale,{friction:0}):this.state===v.Init||this.checkBounds().inBounds||this.requestTick()),this.updateControls()}}},{key:"calculateBounds",value:function(){var _this$calculateConten2=this.calculateContentDim(this.target),t=_this$calculateConten2.contentWidth,i=_this$calculateConten2.contentHeight,n=this.targetScale,s=this.lockedAxis,_this$contentRect=this.contentRect,o=_this$contentRect.fitWidth,a=_this$contentRect.fitHeight,r=0,l=0,c=0,h=0,d=this.option("infinite");if(!0===d||s&&d===s)r=-1/0,c=1/0,l=-1/0,h=1/0;else{var _s4=this.containerRect,_d2=this.contentRect,_u2=e(o*n,O),_p2=e(a*n,O),_f2=_s4.innerWidth,_g3=_s4.innerHeight;if(_s4.width===_u2&&(_f2=_s4.width),_s4.width===_p2&&(_g3=_s4.height),t>_f2){r=-1*(c=.5*(t-_f2));var _e9=.5*(_d2.right-_d2.left);r+=_e9,c+=_e9}if(o>_f2&&t<_f2&&(r-=.5*(o-_f2),c-=.5*(o-_f2)),i>_g3){l=-1*(h=.5*(i-_g3));var _t18=.5*(_d2.bottom-_d2.top);l+=_t18,h+=_t18}a>_g3&&i<_g3&&(r-=.5*(a-_g3),c-=.5*(a-_g3))}return{x:{min:r,max:c},y:{min:l,max:h}}}},{key:"getBounds",value:function(){var t=this.option("bounds");return t!==R?t:this.calculateBounds()}},{key:"updateControls",value:function(){var t=this,i=t.container,n=t.panMode,s=t.contentRect,o=t.targetScale,r=t.minScale,l=r,c=t.option("click")||!1;c&&(l=t.getNextScale(c));var h=t.canZoomIn(),d=t.canZoomOut(),u=n===L&&!!this.option("touch"),p=d&&u;if(u&&(e(o)<e(r)&&!this.panOnlyZoomed&&(p=!0),(e(s.width,1)>e(s.fitWidth,1)||e(s.height,1)>e(s.fitHeight,1))&&(p=!0)),e(s.width*o,1)<e(s.fitWidth,1)&&(p=!1),n===A&&(p=!1),a(i,this.cn("isDraggable"),p),this.option("zoom")){var f=h&&e(l)>e(o),g=!f&&!p&&d&&e(l)<e(o);a(i,this.cn("canZoomIn"),f),a(i,this.cn("canZoomOut"),g);var _step5,_iterator5=_createForOfIteratorHelper(i.querySelectorAll("[data-panzoom-action]"));try{for(_iterator5.s();!(_step5=_iterator5.n()).done;){var _t19=_step5.value,_e10=!1,_i20=!1;switch(_t19.dataset.panzoomAction){case"zoomIn":h?_e10=!0:_i20=!0;break;case"zoomOut":d?_e10=!0:_i20=!0;break;case"toggleZoom":case"iterateZoom":h||d?_e10=!0:_i20=!0;var _n4=_t19.querySelector("g");_n4&&(_n4.style.display=h?"":"none")}_e10?(_t19.removeAttribute("disabled"),_t19.removeAttribute("tabindex")):_i20&&(_t19.setAttribute("disabled",""),_t19.setAttribute("tabindex","-1"))}}catch(err){_iterator5.e(err)}finally{_iterator5.f()}}}},{key:"panTo",value:function(_ref5){var _ref5$x=_ref5.x,t=void 0===_ref5$x?this.target.e:_ref5$x,_ref5$y=_ref5.y,e=void 0===_ref5$y?this.target.f:_ref5$y,_ref5$scale=_ref5.scale,i=void 0===_ref5$scale?this.targetScale:_ref5$scale,_ref5$friction=_ref5.friction,n=void 0===_ref5$friction?this.option("friction"):_ref5$friction,_ref5$angle=_ref5.angle,s=void 0===_ref5$angle?0:_ref5$angle,_ref5$originX=_ref5.originX,o=void 0===_ref5$originX?0:_ref5$originX,_ref5$originY=_ref5.originY,a=void 0===_ref5$originY?0:_ref5$originY,_ref5$flipX=_ref5.flipX,r=void 0!==_ref5$flipX&&_ref5$flipX,_ref5$flipY=_ref5.flipY,l=void 0!==_ref5$flipY&&_ref5$flipY,_ref5$ignoreBounds=_ref5.ignoreBounds,c=void 0!==_ref5$ignoreBounds&&_ref5$ignoreBounds;this.state!==v.Destroy&&this.applyChange({panX:t-this.target.e,panY:e-this.target.f,scale:i/this.targetScale,angle:s,originX:o,originY:a,friction:n,flipX:r,flipY:l,ignoreBounds:c})}},{key:"applyChange",value:function(_ref6){var _ref6$panX=_ref6.panX,t=void 0===_ref6$panX?0:_ref6$panX,_ref6$panY=_ref6.panY,i=void 0===_ref6$panY?0:_ref6$panY,_ref6$scale=_ref6.scale,n=void 0===_ref6$scale?1:_ref6$scale,_ref6$angle=_ref6.angle,s=void 0===_ref6$angle?0:_ref6$angle,_ref6$originX=_ref6.originX,o=void 0===_ref6$originX?-this.current.e:_ref6$originX,_ref6$originY=_ref6.originY,a=void 0===_ref6$originY?-this.current.f:_ref6$originY,_ref6$friction=_ref6.friction,r=void 0===_ref6$friction?this.option("friction"):_ref6$friction,_ref6$flipX=_ref6.flipX,l=void 0!==_ref6$flipX&&_ref6$flipX,_ref6$flipY=_ref6.flipY,c=void 0!==_ref6$flipY&&_ref6$flipY,_ref6$ignoreBounds=_ref6.ignoreBounds,h=void 0!==_ref6$ignoreBounds&&_ref6$ignoreBounds,_ref6$bounce=_ref6.bounce,d=void 0===_ref6$bounce?this.option("bounce"):_ref6$bounce,u=this.state;if(u!==v.Destroy){this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.friction=r||0,this.ignoreBounds=h;var p=this.current,f=p.e,g=p.f,m=this.getMatrix(this.target),y=(new DOMMatrix).translate(f,g).translate(o,a).translate(t,i);
1if(this.option("zoom")){if(!h){var _t20=this.targetScale,_e11=this.minScale,_i21=this.maxScale;_t20*n<_e11&&(n=_e11/_t20),_t20*n>_i21&&(n=_i21/_t20)}y=y.scale(n)}y=y.translate(-o,-a).translate(-f,-g).multiply(m),s&&(y=y.rotate(s)),l&&(y=y.scale(-1,1)),c&&(y=y.scale(1,-1));for(var _i22=0,_b8=b;_i22<_b8.length;_i22++){var _t21=_b8[_i22];"e"!==_t21&&"f"!==_t21&&(y[_t21]>this.minScale+1e-5||y[_t21]<this.minScale-1e-5)?this.target[_t21]=y[_t21]:this.target[_t21]=e(y[_t21],O)}(this.targetScale<this.scale||Math.abs(n-1)>.1||this.panMode===A||!1===d)&&!h&&this.clampTargetBounds(),u===v.Init?this.animate():this.isResting||(this.state=v.Panning,this.requestTick())}}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.state!==v.Init&&this.state!==v.Destroy){var e=this.isTicking;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1;for(var _i23=0,_b9=b;_i23<_b9.length;_i23++){var _e12=_b9[_i23];this.velocity[_e12]=0,"current"===t?this.current[_e12]=this.target[_e12]:"target"===t&&(this.target[_e12]=this.current[_e12])}this.setTransform(),P(this.container,"is-scaling"),P(this.container,"is-animating"),this.isTicking=!1,this.state=v.Ready,e&&(this.emit
1("endAnimation"),this.updateControls())}}},{key:"requestTick",value:function(){var _this11=this;this.isTicking||(this.emit("startAnimation"),this.updateControls(),C(this.container,"is-animating"),this.isScaling&&C(this.container,"is-scaling")),this.isTicking=!0,this.rAF||(this.rAF=requestAnimationFrame((function(){return _this11.animate()})))}},{key:"panWithMouse",value:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.option("mouseMoveFriction");if(this.pmme=t,this.panMode===A&&t&&!(e(this.targetScale)<=e(this.minScale))){this.emit("mouseMove",t);var n=this.container,s=this.containerRect,o=this.contentRect,a=s.width,r=s.height,l=n.getBoundingClientRect(),c=(t.clientX||0)-l.left,h=(t.clientY||0)-l.top,_this$calculateConten3=this.calculateContentDim(this.target),d=_this$calculateConten3.contentWidth,u=_this$calculateConten3.contentHeight,p=this.option("mouseMoveFactor");p>1&&(d!==a&&(d*=p),u!==r&&(u*=p));var f=.5*(d-a)-c/a*100/100*(d-a);f+=.5*(o.right-o.left);var g=.5*(u-r)-h/r*100/100*(u-r);g+=.5*(o.bottom-o.top),this.applyChange({panX:f-this.target.e,panY:g-this.target.f,friction:i})}}},{key:"zoomWithWheel",value:function(t){if(this.state!==v.Destroy&&this.state!==v.Init){var i=Date.now();if(i-this.pwt<45)t.preventDefault();else{this.pwt=i;var n=[-t.deltaX||0,-t.deltaY||0,-t.detail||0].reduce((function(t,e){return Math.abs(e)>Math.abs(t)?e:t})),s=Math.max(-1,Math.min(1,n)),o=this.targetScale,a=this.maxScale,r=this.minScale,l=o*(100+45*s)/100;e(l)<e(r)&&e(o)<=e(r)?(this.cwd+=Math.abs(s),l=r):e(l)>e(a)&&e(o)>=e(a)?(this.cwd+=Math.abs(s),l=a):(this.cwd=0,l=Math.max(Math.min(l,a),r)),this.cwd>this.option("wheelLimit")||(t.preventDefault(),e(l)!==e(o)&&this.zoomTo(l,{event:t}))}}}},{key:"canZoomIn",value:function(){return this.option("zoom")&&(e(this.contentRect.width,1)<e(this.contentRect.fitWidth,1)||e(this.targetScale)<e(this.maxScale))}},{key:"canZoomOut",value:function(){return this.option("zoom")&&e(this.targetScale)>e(this.minScale)}},{key:"zoomIn",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1.25,e=arguments.length>1?arguments[1]:void 0;this.zoomTo(this.targetScale*t,e)}},{key:"zoomOut",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.8,e=arguments.length>1?arguments[1]:void 0;this.zoomTo(this.targetScale*t,e)}},{key:"zoomToFit",value:function(t){this.zoomTo("fit",t)}},{key:"zoomToCover",value:function(t){this.zoomTo("cover",t)}},{key:"zoomToFull",value:function(t){this.zoomTo("full",t)}},{key:"zoomToMax",value:function(t){this.zoomTo("max",t)}},{key:"toggleZoom",value:function(t){this.zoomTo(this.getNextScale("toggleZoom"),t)}},{key:"toggleMax",value:function(t){this.zoomTo(this.getNextScale("toggleMax"),t)}},{key:"toggleCover",value:function(t){this.zoomTo(this.getNextScale("toggleCover"),t)}},{key:"iterateZoom",value:function(t){this.zoomTo("next",t)}},{key:"zoomTo",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,_ref7=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},_ref7$friction=_ref7.friction,e=void 0===_ref7$friction?R:_ref7$friction,_ref7$originX=_ref7.originX,i=void 0===_ref7$originX?R:_ref7$originX,_ref7$originY=_ref7.originY,n=void 0===_ref7$originY?R:_ref7$originY,s=_ref7.event;if(!this.isContentLoading&&this.state!==v.Destroy){var o=this.targetScale,a=this.fullScale,r=this.maxScale,l=this.coverScale;if(this.stop(),this.panMode===A&&(s=this.pmme||s),s||i===R||n===R){var _t22=this.content.getBoundingClientRect(),_e13=this.container.getBoundingClientRect(),_o=s?s.clientX:_e13.left+.5*_e13.width,_a=s?s.clientY:_e13.top+.5*_e13.height;i=_o-_t22.left-.5*_t22.width,n=_a-_t22.top-.5*_t22.height}var c=1;"number"==typeof t?c=t:"full"===t?c=a:"cover"===t?c=l:"max"===t?c=r:"fit"===t?c=1:"next"===t&&(c=this.getNextScale("iterateZoom")),c=c/o||1,e=e===R?c>1?.15:.25:e,this.applyChange({scale:c,originX:i,originY:n,friction:e}),s&&this.panMode===A&&this.panWithMouse(s,e)}}},{key:"rotateCCW",value:function(){this.applyChange({angle:-90})}},{key:"rotateCW",value:function(){this.applyChange({angle:90})}},{key:"flipX",value:function(){this.applyChange({flipX:!0})}},{key:"flipY",value:function(){this.applyChange({flipY:!0})}},{key:"fitX",value:function(){this.stop("target");var t=this.containerRect,e=this.contentRect,i=this.target;this.applyChange({panX:.5*t.width-(e.left+.5*e.fitWidth)-i.e,panY:.5*t.height-(e.top+.5*e.fitHeight)-i.f,scale:t.width/e.fitWidth/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}},{key:"fitY",value:function(){this.stop("target");var t=this.containerRect,e=this.contentRect,i=this.target;this.applyChange({panX:.5*t.width-(e.left+.5*e.fitWidth)-i.e,panY:.5*t.innerHe
1ight-(e.top+.5*e.fitHeight)-i.f,scale:t.height/e.fitHeight/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}},{key:"toggleFS",value:function(){var t=this.container,e=this.cn("inFullscreen"),i=this.cn("htmlHasFullscreen");t.classList.toggle(e);var n=t.classList.contains(e);n?(document.documentElement.classList.add(i),document.addEventListener("keydown",this.onKeydown,!0)):(document.documentElement.classList.remove(i),document.removeEventListener("keydown",this.onKeydown,!0)),this.updateMetrics(),this.emit(n?"enterFS":"exitFS")}},{key:"getMatrix",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.current,e=t.a,i=t.b,n=t.c,s=t.d,o=t.e,a=t.f;return new DOMMatrix([e,i,n,s,o,a])}},{key:"reset",value:function(t){if(this.state!==v.Init&&this.state!==v.Destroy){this.stop("current");for(var _i24=0,_b10=b;_i24<_b10.length;_i24++){var _t23=_b10[_i24];this.target[_t23]=T[_t23]}this.target.a=this.minScale,this.target.d=this.minScale,this.clampTargetBounds(),this.isResting||(this.friction=void 0===t?this.option("friction"):t,this.state=v.Panning,this.requestTick())}}},{key:"destroy",value:function(){this.stop(),this.state=v.Destroy,this.detachEvents(),this.detachObserver();for(var t=this.container,e=this.content,i=this.option("classes")||{},_i25=0,_Object$values=Object.values(i);_i25<_Object$values.length;_i25++){var _e14=_Object$values[_i25];t.classList.remove(_e14+"")}e&&(e.removeEventListener("load",this.onLoad),e.removeEventListener("error",this.onError)),this.detachPlugins()}}]),D}(m);Object.defineProperty(D,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:w}),Object.defineProperty(D,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}});var H,F=function(t,e){var i=!0;return function(){i&&(i=!1,t.apply(void 0,arguments),setTimeout((function(){i=!0}),e))}},j=function(t,e){var i=[];return t.childNodes.forEach((function(t){t.nodeType!==Node.ELEMENT_NODE||e&&!t.matches(e)||i.push(t)})),i};!function(t){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Destroy=2]="Destroy"}(H||(H={}));var N=function(t){if("string"==typeof t||t instanceof HTMLElement)t={html:t};else{var _e15=t.thumb;void 0!==_e15&&("string"==typeof _e15&&(t.thumbSrc=_e15),_e15 instanceof HTMLImageElement&&(t.thumbEl=_e15,t.thumbElSrc=_e15.src,t.thumbSrc=_e15.src),delete t.thumb)}return Object.assign({html:"",el:null,isDom:!1,class:"",customClass:"",index:-1,dim:0,gap:0,pos:0,transition:!1},t)},_=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.assign({index:-1,slides:[],dim:0,pos:-1},t)},$=function(_g4){function $(t,e){var _this12;return _classCallCheck(this,$),_this12=_callSuper(this,$,[e]),Object.defineProperty(_assertThisInitialized(_this12),"instance",{enumerable:!0,configurable:!0,writable:!0,value:t}),_this12}return _inherits($,_g4),_createClass($,[{key:"attach",value:function(){}},{key:"detach",value:function(){}}]),$}(g),X=function(_$){function X(){var _this13;return _classCallCheck(this,X),_this13=_callSuper(this,X,arguments),Object.defineProperty(_assertThisInitialized(_this13),"isDynamic",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(_assertThisInitialized(_this13),"list",{enumerable:!0,configurable:!0,writable:!0,value:null}),_this13}return _inherits(X,_$),_createClass(X,[{key:"onRefresh",value:function(){this.refresh()}},{key:"build",value:function(){var t=this.list;if(!t){t=document.createElement("ul"),C(t,this.cn("list")),t.setAttribute("role","tablist");var _e16=this.instance.container;_e16.appendChild(t),C(_e16,this.cn("hasDots")),this.list=t}return t}},{key:"refresh",value:function(){var t,e=this.instance.pages.length,i=Math.min(2,this.option("minCount")),n=Math.max(2e3,this.option("maxCount")),s=this.option("dynamicFrom");if(e<i||e>n)this.cleanup();else{var o="number"==typeof s&&e>5&&e>=s,r=!this.list||this.isDynamic!==o||this.list.children.length!==e;r&&this.cleanup();var l=this.build();if(a(l,this.cn("isDynamic"),!!o),r)for(var _t24=0;_t24<e;_t24++)l.append(this.createItem(_t24));for(var c,h=0,_i26=0,_arr2=_toConsumableArray(l.children);_i26<_arr2.length;_i26++){var _e17=_arr2[_i26],_i27=h===this.instance.page;_i27&&(c=_e17),a(_e17,this.cn("isCurrent"),_i27),null===(t=_e17.children[0])||void 0===t||t.setAttribute("aria-selected",_i27?"true":"false");for(var _i28=0,_arr3=["isBeforePrev","isPrev","isNext","isAfterNext"];_i28<_arr3.length;_i28++){var _t25=_arr3[_i28];P(_e17,this.cn(_t25))}h++}if(c=c||l.firstChild,o&&c){var _t26=c.previousElementSibling,_e18=_t26&&_t26.previousElementSibling;C(_t26,this.cn("isPrev")),C(_e18,this.cn("isBeforePrev"));var _i29=c.nextElementSibling,_n5=_i29&&_i29.nextElementSibling;C(_i29,this.cn("isNext")),C(_n5,this.cn("isAfterNext"))}this.isDynamic=o}}},{key:"createItem",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=document.createElement("li");i.setAttribute("role","presentation");var n=s(this.instance.localize(this.option("dotTpl"),[["%d",t+1]]).replace(/\%i/g,t+""));return i.appendChild(n),null===(e=i.children[0])||void 0===e||e.setAttribute("role","tab"),i}},{key:"cleanup",value:function(){this.list&&(this.list.remove(),this.list=null),this.isDynamic=!1,P(this.instance.container,this.cn("hasDots"))}},{key:"attach",value:function(){this.instance.on(["refresh","change"],this.onRefresh)}},{key:"detach",value:function(){this.instance.off(["refresh","change"],this.onRefresh),this.cleanup()}}]),X}($);Object.defineProperty(X,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{classes:{list:"f-carousel__dots",isDynamic:"is-dynamic",hasDots:"has-dots",dot:"f-carousel__dot",isBeforePrev:"is-before-prev",isPrev:"is-prev",isCurrent:"is-current",isNext:"is-next",isAfterNext:"is-after-next"},dotTpl:'<button type="button" data-carousel-page="%i" aria-label="{{GOTO}}"><span class="f-carousel__dot" aria-hidden="true"></span></button>',dynamicFrom:11,maxCount:1/0,minCount:2}});var q="disabled",Y="next",V="prev",Z=function(_$2){function Z(){var _this14;return _classCallCheck(this,Z),_this14=_callSuper(this,Z,arguments),Object.defineProperty(_assertThisInitialized(_this14),"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this14),"prev",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this14),"next",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this14),"isDom",{enumerable:!0,configurable:!0,writable:!0,value:!1}),_this14}return _inherits(Z,_$2),_createClass(Z,[{key:"onRefresh",value:function(){var t=this.instance,e=t.pages.length,i=t.page;if(e<2)this.cleanup();else{this.build();var n=this.prev,s=this.next;n&&s&&(n.removeAttribute(q),s.removeAttribute(q),t.isInfinite||(i<=0&&n.setAttribute(q,""),i>=e-1&&s.setAttribute(q,"")))}}},{key:"addBtn",value:function(t){var e,i=this.instance,n=document.createElement("button");n.setAttribute("tabindex","0"),n.setAttribute("title",i.localize("{{".concat(t.toUpperCase(),"}}"))),C(n,this.cn("button")+" "+this.cn(t===Y?"isNext":"isPrev"));var o,s=i.isRTL?t===Y?V:Y:t;return n.innerHTML=i.localize(this.option("".concat(s,"Tpl"))),n.dataset["carousel".concat((o=t,o?o.match("^[a-z]")?o.charAt(0).toUpperCase()+o.substring(1):o:""))]="true",null===(e=this.container)||void 0===e||e.appendChild(n),n}},{key:"build",value:function(){var t=this.instance.container,e=this.cn("container"),i=this.container,n=this.prev,s=this.next;i||(i=t.querySelector("."+e),this.isDom=!!i),i||(i=document.createElement("div"),C(i,e),t.appendChild(i)),this.container=i,s||(s=i.querySelector("[data-carousel-next]")),s||(s=this.addBtn(Y)),this.next=s,n||(n=i.querySelector("[data-carousel-prev]")),n||(n=this.addBtn(V)),this.prev=n}},{key:"cleanup",value:function(){this.isDom||(this.prev&&this.prev.remove(),this.next&&this.next.remove(),this.container&&this.container.remove()),this.prev=null,this.next=null,this.container=null,this.isDom=!1}},{key:"attach",value:function(){this.instance.on(["refresh","change"],this.onRefresh)}},{key:"detach",value:function(){this.instance.off(["refresh","change"],this.onRefresh),this.cleanup()}}]),Z}($);Object.defineProperty(Z,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{classes:{container:"f-carousel__nav",button:"f-button",isNext:"is-next",isPrev:"is-prev"},nextTpl:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M9 3l9 9-9 9"/></svg>
1',prevTpl:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M15 3l-9 9 9 9"/></svg>'}});var U=function(_$3){function U(){var _this15;return _classCallCheck(this,U),_this15=_callSuper(this,U,arguments),Object.defineProperty(_assertThisInitialized(_this15),"selectedIndex",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this15),"target",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this15),"nav",{enumerable:!0,configurable:!0,writable:!0,value:null}),_this15}return _inherits(U,_$3),_createClass(U,[{key:"addAsTargetFor",value:function(t){this.target=this.instance,this.nav=t,this.attachEvents()}},{key:"addAsNavFor",value:function(t){this.nav=this.instance,this.target=t,this.attachEvents()}},{key:"attachEvents",value:function(){var t=this.nav,e=this.target;t&&e&&(t.options.initialSlide=e.options.initialPage,t.state===H.Ready?this.onNavReady(t):t.on("ready",this.onNavReady),e.state===H.Ready?this.onTargetReady(e):e.on("ready",this.onTargetReady))}},{key:"onNavReady",value:function(t){t.on("createSlide",this.onNavCreateSlide),t.on("Panzoom.click",this.onNavClick),t.on("Panzoom.touchEnd",this.onNavTouch),this.onTargetChange()}},{key:"onTargetReady",value:function(t){t.on("change",this.onTargetChange),t.on("Panzoom.refresh",this.onTargetChange),this.onTargetChange()}},{key:"onNavClick",value:function(t,e,i){this.onNavTouch(t,t.panzoom,i)}},{key:"onNavTouch",value:function(t,e,i){var n,s;if(!(Math.abs(e.dragOffset.x)>3||Math.abs(e.dragOffset.y)>3)){var o=i.target,a=this.nav,r=this.target;if(a&&r&&o){var l=o.closest("[data-index]");if(i.stopPropagation(),i.preventDefault(),l){var c=parseInt(l.dataset.index||"",10)||0,h=r.getPageForSlide(c),d=a.getPageForSlide(c);a.slideTo(d),r.slideTo(h,{friction:(null===(s=null===(n=this.nav)||void 0===n?void 0:n.plugins)||void 0===s?void 0:s.Sync.option("friction"))||0}),this.markSelectedSlide(c)}}}}},{key:"onNavCreateSlide",value:function(t,e){e.index===this.selectedIndex&&this.markSelectedSlide(e.index)}},{key:"onTargetChange",value:function(){var t,e,i=this.target,n=this.nav;if(i&&n&&n.state===H.Ready&&i.state===H.Ready){var s=null===(e=null===(t=i.pages[i.page])||void 0===t?void 0:t.slides[0])||void 0===e?void 0:e.index,o=n.getPageForSlide(s);this.markSelectedSlide(s),n.slideTo(o,null===n.prevPage&&null===i.prevPage?{friction:0}:void 0)}}},{key:"markSelectedSlide",value:function(t){var e=this.nav;e&&e.state===H.Ready&&(this.selectedIndex=t,_toConsumableArray(e.slides).map((function(e){e.el&&e.el.classList[e.index===t?"add":"remove"]("is-nav-selected")})))}},{key:"attach",value:function(){var t=this,e=t.options.target,i=t.options.nav;e?t.addAsNavFor(e):i&&t.addAsTargetFor(i)}},{key:"detach",value:function(){var t=this,e=t.nav,i=t.target;e&&(e.off("ready",t.onNavReady),e.off("createSlide",t.onNavCreateSlide),e.off("Panzoom.click",t.onNavClick),e.off("Panzoom.touchEnd",t.onNavTouch)),t.nav=null,i&&(i.off("ready",t.onTargetReady),i.off("refresh",t.onTargetChange),i.off("change",t.onTargetChange)),t.target=null}}]),U}($);Object.defineProperty(U,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{friction:.35}});var G={Navigation:Z,Dots:X,Sync:U},K="animationend",J="isSelected",Q="slide",tt=function(_m3){function tt(t){var _this16,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(_classCallCheck(this,tt),_this16=_callSuper(this,tt),Object.defineProperty(_assertThisInitialized(_this16),"bp",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(_assertThisInitialized(_this16),"lp",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(_assertThisInitialized(_this16),"userOptions",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(_assertThisInitialized(_this16),"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(_assertThisInitialized(_this16),"state",{enumerable:!0,configurable:!0,writable:!0,value:H.Init}),Object.defineProperty(_assertThisInitialized(_this16),"page",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(_assertThisInitialized(_this16),"prevPage",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this16),"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(_assertThisInitialized(_this16),"viewport",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this16),"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this16),"slides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(_assertThisInitialized(_this16),"pages",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(_assertThisInitialized(_this16),"panzoom",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this16),"inTransition",{enumerable:!0,configurable:!0,writable:!0,value:new Set}),Object.defineProperty(_assertThisInitialized(_this16),"contentDim",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(_assertThisInitialized(_this16),"viewportDim",{enumerable:!0,configurable:!0,writable:!0,value:0}),"string"==typeof t&&(t=document.querySelector(t)),!t||!S(t))throw new Error("No Element found");return _this16.container=t,_this16.slideNext=F(_this16.slideNext.bind(_assertThisInitialized(_this16)),150),_this16.slidePrev=F(_this16.slidePrev.bind(_assertThisInitialized(_this16)),150),_this16.userOptions=e,_this16.userPlugins=i,queueMicrotask((function(){_this16.processOptions()})),_possibleConstructorReturn(_this16)}return _inherits(tt,_m3),_createClass(tt,[{key:"axis",get:function(){return this.isHorizontal?"e":"f"}},{key:"isEnabled",get:function(){return this.state===H.Ready}},{key:"isInfinite",get:function(){var t=!1,e=this.contentDim,i=this.viewportDim,n=this.pages,o=this.slides[0];return n.length>=2&&o&&e+o.dim>=i&&(t=this.option("infinite")),t}},{key:"isRTL",get:function(){return"rtl"===this.option("direction")}},{key:"isHorizontal",get:function(){return"x"===this.option("axis")}},{key:"processOptions",value:function(){var t,e,_this17=this,i=p({},tt.defaults,this.userOptions),n="",s=i.breakpoints;if(s&&u(s))for(var _i30=0,_Object$entries3=Object.entries(s);_i30<_Object$entries3.length;_i30++){var _Object$entries3$_i=_slicedToArray(_Object$entries3[_i30],2),_t27=_Object$entries3$_i[0],_e19=_Object$entries3$_i[1];window.matchMedia(_t27).matches&&u(_e19)&&(n+=_t27,p(i,_e19))}n===this.bp&&this.state!==H.Init||(this.bp=n,this.state===H.Ready&&(i.initialSlide=(null===(e=null===(t=this.pages[this.page])||void 0===t?void 0:t.slides[0])||void 0===e?void 0:e.index)||0),this.state!==H.Init&&this.destroy(),_get(_getPrototypeOf(tt.prototype),"setOptions",this).call(this,i),!1===this.option("enabled")?this.attachEvents():setTimeout((function(){_this17.init()}),0))}}
1,{key:"init",value:function(){this.state=H.Init,this.emit("init"),this.attachPlugins(Object.assign(Object.assign({},tt.Plugins),this.userPlugins)),this.emit("attachPlugins"),this.initLayout(),this.initSlides(),this.updateMetrics(),this.setInitialPosition(),this.initPanzoom(),this.attachEvents(),this.state=H.Ready,this.emit("ready")}},{key:"initLayout",value:function(){var _i31,_n6,t=this.container,e=this.option("classes");C(t,this.cn("container")),a(t,e.isLTR,!this.isRTL),a(t,e.isRTL,this.isRTL),a(t,e.isVertical,!this.isHorizontal),a(t,e.isHorizontal,this.isHorizontal);var i=this.option("viewport")||t.querySelector(".".concat(e.viewport));i||(i=document.createElement("div"),C(i,e.viewport),(_i31=i).append.apply(_i31,_toConsumableArray(j(t,".".concat(e.slide)))),t.prepend(i)),i.addEventListener("scroll",this.onScroll);var n=this.option("track")||t.querySelector(".".concat(e.track));n||(n=document.createElement("div"),C(n,e.track),(_n6=n).append.apply(_n6,_toConsumableArray(Array.from(i.childNodes)))),n.setAttribute("aria-live","polite"),i.contains(n)||i.prepend(n),this.viewport=i,this.track=n,this.emit("initLayout")}},{key:"initSlides",value:function(){var _this18=this,t=this.track;if(t){var e=_toConsumableArray(this.slides),i=[];_toConsumableArray(j(t,".".concat(this.cn(Q)))).forEach((function(t){if(S(t)){var _e20=N({el:t,isDom:!0,index:_this18.slides.length});i.push(_e20)}}));for(var _i32=0,_arr4=[].concat(_toConsumableArray(this.option("slides",[])||[]),_toConsumableArray(e));_i32<_arr4.length;_i32++){var _t28=_arr4[_i32];i.push(N(_t28))}this.slides=i;for(var _t29=0;_t29<this.slides.length;_t29++)this.slides[_t29].index=_t29;for(var _i34=0,_i33=i;_i34<_i33.length;_i34++){var _t30=_i33[_i34];this.emit("beforeInitSlide",_t30,_t30.index),this.emit("initSlide",_t30,_t30.index)}this.emit("initSlides")}}},{key:"setInitialPage",value:function(){var t=this.option("initialSlide");this.page="number"==typeof t?this.getPageForSlide(t):parseInt(this.option("initialPage",0)+"",10)||0}},{key:"setInitialPosition",value:function(){var t=this.track,e=this.pages,i=this.isHorizontal;if(t&&e.length){var n=this.page;e[n]||(this.page=n=0);var s=(e[n].pos||0)*(this.isRTL&&i?1:-1),o=i?"".concat(s,"px"):"0",a=i?"0":"".concat(s,"px");t.style.transform="translate3d(".concat(o,", ").concat(a,", 0) scale(1)"),this.option("adaptiveHeight")&&this.setViewportHeight()}}},{key:"initPanzoom",value:function(){var _this19=this;this.panzoom&&(this.panzoom.destroy(),this.panzoom=null);var t=this.option("Panzoom")||{};this.panzoom=new D(this.viewport,p({},{content:this.track,zoom:!1,panOnlyZoomed:!1,lockAxis:this.isHorizontal?"x":"y",infinite:this.isInfinite,click:!1,dblClick:!1,touch:function(t){return!(_this19.pages.length<2&&!t.options.infinite)},bounds:function(){return _this19.getBounds()},maxVelocity:function(t){return Math.abs(t.target[_this19.axis]-t.current[_this19.axis])<2*_this19.viewportDim?100:0}},t)),this.panzoom.on("*",(function(t,e){for(var _len4=arguments.length,i=new Array(_len4>2?_len4-2:0),_key4=2;_key4<_len4;_key4++)i[_key4-2]=arguments[_key4];_this19.emit.apply(_this19,["Panzoom.".concat(e),t].concat(i))})),this.panzoom.on("decel",this.onDecel),this.panzoom.on("refresh",this.onRefresh),this.panzoom.on("beforeTransform",this.onBeforeTransform),this.panzoom.on("endAnimation",this.onEndAnimation)}},{key:"attachEvents",value:function(){var t=this.container;t&&(t.addEventListener("click",this.onClick,{passive:!1,capture:!1}),t.addEventListener("slideTo",this.onSlideTo)),window.addEventListener("resize",this.onResize)}},{key:"createPages",value:function(){var t=[],e=this.contentDim,i=this.viewportDim,n=this.option("slidesPerPage");n=("auto"===n||e<=i)&&!1!==this.option("fill")?1/0:parseFloat(n+"");var _step6,s=0,o=0,a=0,_iterator6=_createForOfIteratorHelper(this.slides);try{for(_iterator6.s();!(_step6=_iterator6.n()).done;){var _e21=_step6.value;(!t.length||o+_e21.dim-i>.05||a>=n)&&(t.push(_()),s=t.length-1,o=0,a=0),t[s].slides.push(_e21),o+=_e21.dim+_e21.gap,a++}}catch(err){_iterator6.e(err)}finally{_iterator6.f()}return t}},{key:"processPages",value:function(){var t=this.pages,i=this.contentDim,n=this.viewportDim,s=this.isInfinite,o=this.option("center"),a=this.option("fill"),r=a&&o&&i>n&&!s;if(t.forEach((function(t,e){var s;t.index=e,t.pos=(null===(s=t.slides[0])||void 0===s?void 0:s.pos)||0,t.dim=0;var _step7,_iterator7=_createForOfIteratorHelper(t.slides.entries());try{for(_iterator7.s();!(_step7=_iterator7.n()).done;){var _step7$value=_slicedToArray(_step7.value,2),_e22=_step7$value[0],_i35=_step7$value[1];t.dim+=_i35.dim,_e22<t.slides.length-1&&(t.dim+=_i35.gap)}}catch(err){_iterator7.e(err)}finally{_iterator7.f()}r&&t.pos+.5*t.dim<.5*n?t.pos=0:r&&t.pos+.5*t.dim>=i-.5*n?t.pos=i-n:o&&(t.pos+=-.5*(n-t.dim))})),t.forEach((function(t){a&&!s&&i>n&&(t.pos=Math.max(t.pos,0),t.pos=Math.min(t.pos,i-n)),t.pos=e(t.pos,1e3),t.dim=e(t.dim,1e3),Math.abs(t.pos)<=.1&&(t.pos=0)})),s)return t;var c,l=[];return t.forEach((function(t){var e=Object.assign({},t);c&&e.pos===c.pos?(c.dim+=e.dim,c.slides=[].concat(_toConsumableArray(c.slides),_toConsumableArray(e.slides))):(e.index=l.length,c=e,l.push(e))})),l}},{key:"getPageFromIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this.pages.length;return t=parseInt((t||0).toString())||0,this.isInfinite?(t%e+e)%e:Math.max(Math.min(t,e-1),0)}},{key:"getSlideMetrics",value:function(t){var i,n,a,s=this.isHorizontal?"width":"height",o=0,r=t.el,l=!(!r||r.parentNode);
1if(r?o=parseFloat(r.dataset[s]||"")||0:((r=document.createElement("div")).style.visibility="hidden",(this.track||document.body).prepend(r)),C(r,this.cn(Q)+" "+t.class+" "+t.customClass),o)r.style[s]="".concat(o,"px"),r.style["width"===s?"height":"width"]="";else{l&&(this.track||document.body).prepend(r),o=r.getBoundingClientRect()[s]*Math.max(1,(null===(i=window.visualViewport)||void 0===i?void 0:i.scale)||1);var _t31=r[this.isHorizontal?"offsetWidth":"offsetHeight"];_t31-1>o&&(o=_t31)}var c=getComputedStyle(r);return"content-box"===c.boxSizing&&(this.isHorizontal?(o+=parseFloat(c.paddingLeft)||0,o+=parseFloat(c.paddingRight)||0):(o+=parseFloat(c.paddingTop)||0,o+=parseFloat(c.paddingBottom)||0)),a=parseFloat(c[this.isHorizontal?"marginRight":"marginBottom"])||0,l?null===(n=r.parentElement)||void 0===n||n.removeChild(r):t.el||r.remove(),{dim:e(o,1e3),gap:e(a,1e3)}}},{key:"getBounds",value:function(){var t=this.isInfinite,e=this.isRTL,i=this.isHorizontal,n=this.pages,s={min:0,max:0};if(t)s={min:-1/0,max:1/0};else if(n.length){var _t32=n[0].pos,_o2=n[n.length-1].pos;s=e&&i?{min:_t32,max:_o2}:{min:-1*_o2,max:-1*_t32}}return{x:i?s:{min:0,max:0},y:i?{min:0,max:0}:s}}},{key:"repositionSlides",value:function(){var t,i=this.isHorizontal,n=this.isRTL,s=this.isInfinite,o=this.viewport,a=this.viewportDim,r=this.contentDim,l=this.page,c=this.pages,h=this.slides,d=this.panzoom,u=0,p=0,f=0,g=0;d?g=-1*d.current[this.axis]:c[l]&&(g=c[l].pos||0),t=i?n?"right":"left":"top",n&&i&&(g*=-1);var _step8,_iterator8=_createForOfIteratorHelper(h);try{for(_iterator8.s();!(_step8=_iterator8.n()).done;){var _i38=_step8.value,_n9=_i38.el;_n9?("top"===t?(_n9.style.right="",_n9.style.left=""):_n9.style.top="",_i38.index!==u?_n9.style[t]=0===p?"":"".concat(e(p,1e3),"px"):_n9.style[t]="",f+=_i38.dim+_i38.gap,u++):p+=_i38.dim+_i38.gap}}catch(err){_iterator8.e(err)}finally{_iterator8.f()}if(s&&f&&o){var _n7=getComputedStyle(o),_l=i?"Right":"Bottom",_c2=parseFloat(_n7["padding"+(i?"Left":"Top")]);g-=_c2,a+=_c2,a+=parseFloat(_n7["padding"+_l]);var _step9,_iterator9=_createForOfIteratorHelper(h);try{for(_iterator9.s();!(_step9=_iterator9.n()).done;){var _i36=_step9.value;_i36.el&&(e(_i36.pos)<e(a)&&e(_i36.pos+_i36.dim+_i36.gap)<e(g)&&e(g)>e(r-a)&&(_i36.el.style[t]="".concat(e(p+f,1e3),"px")),e(_i36.pos+_i36.gap)>=e(r-a)&&e(_i36.pos)>e(g+a)&&e(g)<e(a)&&(_i36.el.style[t]="-".concat(e(f,1e3),"px")))}}catch(err){_iterator9.e(err)}finally{_iterator9.f()}}var m,v,b=_toConsumableArray(this.inTransition);if(b.length>1&&(m=c[b[0]],v=c[b[1]]),m&&v){var _step10,_i37=0,_iterator10=_createForOfIteratorHelper(h);try{for(_iterator10.s();!(_step10=_iterator10.n()).done;){var _n8=_step10.value;_n8.el?this.inTransition.has(_n8.index)&&m.slides.indexOf(_n8)<0&&(_n8.el.style[t]="".concat(e(_i37+(m.pos-v.pos),1e3),"px")):_i37+=_n8.dim+_n8.gap}}catch(err){_iterator10.e(err)}finally{_iterator10.f()}}}},{key:"createSlideEl",value:function(t){var e=this.track,i=this.slides;if(e&&t&&(!t.el||!t.el.parentNode)){var n=t.el||document.createElement("div");
1C(n,this.cn(Q)),C(n,t.class),C(n,t.customClass);var s=t.html;s&&(s instanceof HTMLElement?n.appendChild(s):n.innerHTML=t.html+"");var o=[];i.forEach((function(t,e){t.el&&o.push(e)}));var a=t.index,r=null;o.length&&(r=i[o.reduce((function(t,e){return Math.abs(e-a)<Math.abs(t-a)?e:t}))]);var l=r&&r.el&&r.el.parentNode?r.index<t.index?r.el.nextSibling:r.el:null;e.insertBefore(n,e.contains(l)?l:null),t.el=n,this.emit("createSlide",t)}}},{key:"removeSlideEl",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=null==t?void 0:t.el;if(i&&i.parentNode){var n=this.cn(J);if(i.classList.contains(n)&&(P(i,n),this.emit("unselectSlide",t)),t.isDom&&!e)return i.removeAttribute("aria-hidden"),i.removeAttribute("data-index"),void(i.style.left="");this.emit("removeSlide",t);var s=new CustomEvent(K);i.dispatchEvent(s),t.el&&(t.el.remove(),t.el=null)}}},{key:"transitionTo",value:function(){var i,n,s,o,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.option("transition");if(!e)return!1;var a=this.page,r=this.pages,l=this.panzoom;t=parseInt((t||0).toString())||0;var c=this.getPageFromIndex(t);if(!l||!r[c]||r.length<2||Math.abs(((null===(n=null===(i=r[a])||void 0===i?void 0:i.slides[0])||void 0===n?void 0:n.dim)||0)-this.viewportDim)>1)return!1;var h=t>a?1:-1;this.isInfinite&&(0===a&&t===r.length-1&&(h=-1),a===r.length-1&&0===t&&(h=1));var d=r[c].pos*(this.isRTL?1:-1);if(a===c&&Math.abs(d-l.target[this.axis])<1)return!1;this.clearTransitions();var u=l.isResting;C(this.container,this.cn("inTransition"));var p=(null===(s=r[a])||void 0===s?void 0:s.slides[0])||null,f=(null===(o=r[c])||void 0===o?void 0:o.slides[0])||null;this.inTransition.add(f.index),this.createSlideEl(f);var g=p.el,m=f.el;u||e===Q||(e="fadeFast",g=null);var v=this.isRTL?"next":"prev",b=this.isRTL?"prev":"next";return g&&(this.inTransition.add(p.index),p.transition=e,g.addEventListener(K,this.onAnimationEnd),g.classList.add("f-".concat(e,"Out"),"to-".concat(h>0?b:v))),m&&(f.transition=e,m.addEventListener(K,this.onAnimationEnd),m.classList.add("f-".concat(e,"In"),"from-".concat(h>0?v:b))),l.current[this.axis]=d,l.target[this.axis]=d,l.requestTick(),this.onChange(c),!0}},{key:"manageSlideVisiblity",value:function(){var _step11,t=new Set,e=new Set,i=this.getVisibleSlides(parseFloat(this.option("preload",0)+"")||0),_iterator11=_createForOfIteratorHelper(this.slides);try{for(_iterator11.s();!(_step11=_iterator11.n()).done;){var _n10=_step11.value;i.has(_n10)?t.add(_n10):e.add(_n10)}}catch(err){_iterator11.e(err)}finally{_iterator11.f()}var _step12,_iterator12=_createForOfIteratorHelper(this.inTransition);try{for(_iterator12.s();!(_step12=_iterator12.n()).done;){var _e23=_step12.value;t.add(this.slides[_e23])}}catch(err){_iterator12.e(err)}finally{_iterator12.f()}var _step13,_iterator13=_createForOfIteratorHelper(t);try{for(_iterator13.s();!(_step13=_iterator13.n()).done;){var _e24=_step13.value;this.createSlideEl(_e24),this.lazyLoadSlide(_e24)}}catch(err){_iterator13.e(err)}finally{_iterator13.f()}var _step14,_iterator14=_createForOfIteratorHelper(e);try{for(_iterator14.s();!(_step14=_iterator14.n()).done;){var _i39=_step14.value;t.has(_i39)||this.removeSlideEl(_i39)}}catch(err){_iterator14.e(err)}finally{_iterator14.f()}this.markSelectedSlides(),this.repositionSlides()}},{key:"markSelectedSlides",value:function(){if(this.pages[this.page]&&this.pages[this.page].slides){var t="aria-hidden",e=this.cn(J);if(e){var _step15,_iterator15=_createForOfIteratorHelper(this.slides);try{for(_iterator15.s();!(_step15=_iterator15.n()).done;){var _i40=_step15.value,_n11=_i40.el;_n11&&(_n11.dataset.index="".concat(_i40.index),_n11.classList.contains("f-thumbs__slide")?this.getVisibleSlides(0).has(_i40)?_n11.removeAttribute(t):_n11.setAttribute(t,"true"):this.pages[this.page].slides.includes(_i40)?(_n11.classList.contains(e)||(C(_n11,e),this.emit("selectSlide",_i40)),_n11.removeAttribute(t)):(_n11.classList.contains(e)&&(P(_n11,e),this.emit("unselectSlide",_i40)),_n11.setAttribute(t,"true")))}}catch(err){_iterator15.e(err)}finally{_iterator15.f()}}}}},{key:"flipInfiniteTrack",value:function(){var t=this.axis,e=this.isHorizontal,i=this.isInfinite,n=this.isRTL,s=this.viewportDim,o=this.contentDim,a=this.panzoom;if(a&&i){var r=a.current[t],l=a.target[t]-r,c=0,h=.5*s;n&&e?(r<-h&&(c=-1,r+=o),r>o-h&&(c=1,r-=o)):(r>
1h&&(c=1,r-=o),r<-o+h&&(c=-1,r+=o)),c&&(a.current[t]=r,a.target[t]=r+l)}}},{key:"lazyLoadImg",value:function(t,e){var _this20=this,i=this,n="f-fadeIn",o="is-preloading",a=!1,r=null,l=function(){a||(a=!0,r&&(r.remove(),r=null),P(e,o),e.complete&&(C(e,n),setTimeout((function(){P(e,n)}),350)),_this20.option("adaptiveHeight")&&t.el&&_this20.pages[_this20.page].slides.indexOf(t)>-1&&(i.updateMetrics(),i.setViewportHeight()),_this20.emit("load",t))};C(e,o),e.src=e.dataset.lazySrcset||e.dataset.lazySrc||"",delete e.dataset.lazySrc,delete e.dataset.lazySrcset,e.addEventListener("error",(function(){l()})),e.addEventListener("load",(function(){l()})),setTimeout((function(){var i=e.parentNode;i&&t.el&&(e.complete?l():a||(r=s(E),i.insertBefore(r,e)))}),300)}},{key:"lazyLoadSlide",value:function(t){var e=t&&t.el;if(e){var i=new Set,n=Array.from(e.querySelectorAll("[data-lazy-src],[data-lazy-srcset]"));e.dataset.lazySrc&&n.push(e),n.map((function(t){t instanceof HTMLImageElement?i.add(t):t instanceof HTMLElement&&t.dataset.lazySrc&&(t.style.backgroundImage="url('".concat(t.dataset.lazySrc,"')"),delete t.dataset.lazySrc)}));var _step16,_iterator16=_createForOfIteratorHelper(i);try{for(_iterator16.s();!(_step16=_iterator16.n()).done;){var _e25=_step16.value;this.lazyLoadImg(t,_e25)}}catch(err){_iterator16.e(err)}finally{_iterator16.f()}}}},{key:"onAnimationEnd",value:function(t){var e,i=t.target,n=i?parseInt(i.dataset.index||"",10)||0:-1,s=this.slides[n],o=t.animationName;if(i&&s&&o){var a=!!this.inTransition.has(n)&&s.transition;a&&o.substring(0,a.length+2)==="f-".concat(a)&&this.inTransition.delete(n),this.inTransition.size||this.clearTransitions(),n===this.page&&(null===(e=this.panzoom)||void 0===e?void 0:e.isResting)&&this.emit("settle")}}},{key:"onDecel",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(this.option("dragFree"))this.setPageFromPosition();else{var o=this.isRTL,a=this.isHorizontal,r=this.axis,l=this.pages,c=l.length,h=Math.abs(Math.atan2(i,e)/(Math.PI/180)),d=0;if(d=h>45&&h<135?a?0:i:a?e:0,c){var u=this.page,p=o&&a?1:-1,f=t.current[r]*p,_this$getPageFromPosi=this.getPageFromPosition(f),g=_this$getPageFromPosi.pageIndex;Math.abs(d)>5?(l[u].dim<document.documentElement["client"+(this.isHorizontal?"Width":"Height")]-1&&(u=g),u=o&&a?d<0?u-1:u+1:d<0?u+1:u-1):u=0===n&&0===s?u:g,this.slideTo(u,{transition:!1,friction:t.option("decelFriction")})}}}},{key:"onClick",value:function(t){var n,s,e=t.target,i=e&&S(e)?e.dataset:null;i&&(void 0!==i.carouselPage?(s="slideTo",n=i.carouselPage):void 0!==i.carouselNext?s="slideNext":void 0!==i.carouselPrev&&(s="slidePrev")),s?(t.preventDefault(),t.stopPropagation(),e&&!e.hasAttribute("disabled")&&this[s](n)):this.emit("click",t)}},{key:"onSlideTo",value:function(t){var e=t.detail||0;this.slideTo(this.getPageForSlide(e),{friction:0})}},{key:"onChange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=this.page;this.prevPage=i,this.page=t,this.option("adaptiveHeight")&&this.setViewportHeight(),t!==i&&(this.markSelectedSlides(),this.emit("change",t,i,e))}},{key:"onRefresh",value:function(){var t=this.contentDim,e=this.viewportDim;this.updateMetrics(),this.contentDim===t&&this.viewportDim===e||this.slideTo(this.page,{friction:0,transition:!1})}},{key:"onScroll",value:function(){var t;null===(t=this.viewport)||void 0===t||t.scroll(0,0)}},{key:"onResize",value:function(){this.option("breakpoints")&&this.processOptions()}},{key:"onBeforeTransform",value:function(t){this.lp!==t.current[this.axis]&&(this.flipInfiniteTrack(),this.manageSlideVisiblity()),this.lp=t.current.e}},{key:"onEndAnimation",value:function(){this.inTransition.size||this.emit("settle")}},{key:"reInit",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.destroy(),this.state=H.Init,this.prevPage=null,this.userOptions=t||this.userOptions,this.userPlugins=e||this.userPlugins,this.processOptions()}},{key:"slideTo",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,_ref8=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},_ref8$friction=_ref8.friction,e=void 0===_ref8$friction?this.option("friction"):_ref8$friction,_ref8$transition=_ref8.transition,i=void 0===_ref8$transition?this.option("transition"):_ref8$transition;if(this.state!==H.Destroy){t=parseInt((t||0).toString())||0;var n=this.getPageFromIndex(t),s=this.axis,o=this.isHorizontal,a=this.isRTL,r=this.pages,l=this.panzoom,c=r.length,h=a&&o?1:-1;if(l&&c){if(this.page!==n){var _e26=new Event("beforeChange",{bubbles:!0,cancelable:!0});
1if(this.emit("beforeChange",_e26,t),_e26.defaultPrevented)return}if(!this.transitionTo(t,i)){var d=r[n].pos;if(this.isInfinite){var _e27=this.contentDim,_i41=l.target[s]*h;2===c?d+=_e27*Math.floor(parseFloat(t+"")/2):d=[d,d-_e27,d+_e27].reduce((function(t,e){return Math.abs(e-_i41)<Math.abs(t-_i41)?e:t}))}d*=h,Math.abs(l.target[s]-d)<1||(l.panTo({x:o?d:0,y:o?0:d,friction:e}),this.onChange(n))}}}}},{key:"slideToClosest",value:function(t){if(this.panzoom){var _e28=this.getPageFromPosition().pageIndex;this.slideTo(_e28,t)}}},{key:"slideNext",value:function(){this.slideTo(this.page+1)}},{key:"slidePrev",value:function(){this.slideTo(this.page-1)}},{key:"clearTransitions",value:function(){this.inTransition.clear(),P(this.container,this.cn("inTransition"));var _step17,t=["to-prev","to-next","from-prev","from-next"],_iterator17=_createForOfIteratorHelper(this.slides);try{for(_iterator17.s();!(_step17=_iterator17.n()).done;){var _e29=_step17.value,_i42=_e29.el;if(_i42){var _i42$classList;_i42.removeEventListener(K,this.onAnimationEnd),(_i42$classList=_i42.classList).remove.apply(_i42$classList,t);var _n12=_e29.transition;_n12&&_i42.classList.remove("f-".concat(_n12,"Out"),"f-".concat(_n12,"In"))}}}catch(err){_iterator17.e(err)}finally{_iterator17.f()}this.manageSlideVisiblity()}},{key:"addSlide",value:function(t,e){var _this$slides,i,n,s,o,_step18,a=this.panzoom,r=(null===(i=this.pages[this.page])||void 0===i?void 0:i.pos)||0,l=(null===(n=this.pages[this.page])||void 0===n?void 0:n.dim)||0,c=this.contentDim<this.viewportDim,d=[],_iterator18=_createForOfIteratorHelper(Array.isArray(e)?e:[e]);try{for(_iterator18.s();!(_step18=_iterator18.n()).done;){var _t36=_step18.value;d.push(N(_t36))}}catch(err){_iterator18.e(err)}finally{_iterator18.f()}(_this$slides=this.slides).splice.apply(_this$slides,[t,0].concat(d));for(var _t33=0;_t33<this.slides.length;_t33++)this.slides[_t33].index=_t33;for(var _i43=0,_d3=d;_i43<_d3.length;_i43++){var _t34=_d3[_i43];this.emit("beforeInitSlide",_t34,_t34.index)}if(this.page>=t&&(this.page+=d.length),this.updateMetrics(),a){var _e30=(null===(s=this.pages[this.page])||void 0===s?void 0:s.pos)||0,_i44=(null===(o=this.pages[this.page])||void 0===o?void 0:o.dim)||0,_n13=this.pages.length||1,_h2=this.isRTL?l-_i44:_i44-l,_d4=this.isRTL?r-_e30:_e30-r;c&&1===_n13?(t<=this.page&&(a.current[this.axis]-=_h2,a.target[this.axis]-=_h2),a.panTo(_defineProperty({},this.isHorizontal?"x":"y",-1*_e30))):_d4&&t<=this.page&&(a.target[this.axis]-=_d4,a.current[this.axis]-=_d4,a.requestTick())}for(var _i45=0,_d5=d;_i45<_d5.length;_i45++){var _t35=_d5[_i45];this.emit("initSlide",_t35,_t35.index)}}},{key:"prependSlide",value:function(t){this.addSlide(0,t)}},{key:"appendSlide",value:function(t){this.addSlide(this.slides.length,t)}},{key:"removeSlide",value:function(t){var e=this.slides.length;t=(t%e+e)%e;var i=this.slides[t];if(i){this.removeSlideEl(i,!0),this.slides.splice(t,1);for(var _t37=0;_t37<this.slides.length;_t37++)this.slides[_t37].index=_t37;this.updateMetrics(),this.slideTo(this.page,{friction:0,transition:!1}),this.emit("destroySlide",i)}}},{key:"updateMetrics",value:function(){var t=this.panzoom,i=this.viewport,n=this.track,s=this.slides,o=this.isHorizontal,a=this.isInfinite;if(n){var r=o?"width":"height",l=o?"offsetWidth":"offsetHeight";if(i){var _t38=Math.max(i[l],e(i.getBoundingClientRect()[r],1e3)),_n14=getComputedStyle(i),_a2=o?"Right":"Bottom";_t38-=parseFloat(_n14["padding"+(o?"Left":"Top")])+parseFloat(_n14["padding"+_a2]),this.viewportDim=_t38}var c,_step19,h=0,_iterator19=_createForOfIteratorHelper(s.entries());try{for(_iterator19.s();!(_step19=_iterator19.n()).done;){var _this$getSlideMetrics,_step19$value=_slicedToArray(_step19.value,2),_t39=_step19$value[0],_i46=_step19$value[1],_n15=0,_o3=0;!_i46.el&&c?(_n15=c.dim,_o3=c.gap):(_n15=(_this$getSlideMetrics=this.getSlideMetrics(_i46)).dim,_o3=_this$getSlideMetrics.gap,c=_i46),_n15=e(_n15,1e3),_o3=e(_o3,1e3),_i46.dim=_n15,_i46.gap=_o3,_i46.pos=h,h+=_n15,(a||_t39<s.length-1)&&(h+=_o3)}}catch(err){_iterator19.e(err)}finally{_iterator19.f()}h=e(h,1e3),this.contentDim=h,t&&(t.contentRect[r]=h,t.contentRect[o?"fullWidth":"fullHeight"]=h),this.pages=this.createPages(),this.pages=this.processPages(),this.state===H.Init&&this.setInitialPage(),this.page=Math.max(0,Math.min(this.page,this.pages.length-1)),this.manageSlideVisiblity(),this.emit
1("refresh")}}},{key:"getProgress",value:function(t){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];void 0===t&&(t=this.page);var s=this,o=s.panzoom,a=s.contentDim,r=s.pages[t]||0;if(!r||!o)return t>this.page?-1:1;var l=-1*o.current.e,c=e((l-r.pos)/(1*r.dim),1e3),h=c,d=c;this.isInfinite&&!0!==n&&(h=e((l-r.pos+a)/(1*r.dim),1e3),d=e((l-r.pos-a)/(1*r.dim),1e3));var u=[c,h,d].reduce((function(t,e){return Math.abs(e)<Math.abs(t)?e:t}));return i?u:u>1?1:u<-1?-1:u}},{key:"setViewportHeight",value:function(){var t=this.page,e=this.pages,i=this.viewport,n=this.isHorizontal;if(i&&e[t]){var s=0;n&&this.track&&(this.track.style.height="auto",e[t].slides.forEach((function(t){t.el&&(s=Math.max(s,t.el.offsetHeight))}))),i.style.height=s?"".concat(s,"px"):""}}},{key:"getPageForSlide",value:function(t){var _step20,_iterator20=_createForOfIteratorHelper(this.pages);try{for(_iterator20.s();!(_step20=_iterator20.n()).done;){var _step21,_e31=_step20.value,_iterator21=_createForOfIteratorHelper(_e31.slides);try{for(_iterator21.s();!(_step21=_iterator21.n()).done;)if(_step21.value.index===t)return _e31.index}catch(err){_iterator21.e(err)}finally{_iterator21.f()}}}catch(err){_iterator20.e(err)}finally{_iterator20.f()}return-1}},{key:"getVisibleSlides",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=new Set,n=this.panzoom,s=this.contentDim,o=this.viewportDim,a=this.pages,r=this.page;if(o){s=s+(null===(e=this.slides[this.slides.length-1])||void 0===e?void 0:e.gap)||0;var _l2=0;_l2=n&&n.state!==v.Init&&n.state!==v.Destroy?-1*n.current[this.axis]:a[r]&&a[r].pos||0,this.isInfinite&&(_l2-=Math.floor(_l2/s)*s),this.isRTL&&this.isHorizontal&&(_l2*=-1);var _step22,_c3=_l2-o*t,_h3=_l2+o*(t+1),_d6=this.isInfinite?[-1,0,1]:[0],_iterator22=_createForOfIteratorHelper(this.slides);try{for(_iterator22.s();!(_step22=_iterator22.n()).done;){var _step23,_t40=_step22.value,_iterator23=_createForOfIteratorHelper(_d6);try{for(_iterator23.s();!(_step23=_iterator23.n()).done;){var _e32=_step23.value,_n16=_t40.pos+_e32*s,_o4=_n16+_t40.dim+_t40.gap;_n16<_h3&&_o4>_c3&&i.add(_t40)}}catch(err){_iterator23.e(err)}finally{_iterator23.f()}}}catch(err){_iterator22.e(err)}finally{_iterator22.f()}}return i}},{key:"getPageFromPosition",value:function(t){var u,e=this.viewportDim,i=this.contentDim,n=this.slides,s=this.pages,o=this.panzoom,a=s.length,r=n.length,l=n[0],c=n[r-1],h=this.option("center"),p=0,f=void 0===t?-1*((null==o?void 0:o.target[this.axis])||0):t;h&&(f+=.5*e),this.isInfinite?(f<l.pos-.5*c.gap&&(f-=i,p=-1),f>c.pos+c.dim+.5*c.gap&&(f-=i,p=1)):f=Math.max(l.pos||0,Math.min(f,c.pos));var g=c,m=n.find((function(t){var e=t.pos-.5*g.gap,i=t.pos+t.dim+.5*t.gap;return g=t,f>=e&&f<i}));return m||(m=c),{page:(u=this.getPageForSlide(m.index))+p*a,pageIndex:u}}},{key:"setPageFromPosition",value:function(){var t=this.getPageFromPosition().pageIndex;this.onChange(t)}},{key:"destroy",value:function(){var _this21=this;if(![H.Destroy].includes(this.state)){this.state=H.Destroy;var t=this.container,e=this.viewport,i=this.track,n=this.slides,s=this.panzoom,o=this.option("classes");t.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),t.removeEventListener("slideTo",this.onSlideTo),window.removeEventListener("resize",this.onResize),s&&(s.destroy(),this.panzoom=null),n&&n.forEach((function(t){_this21.removeSlideEl(t)})),this.detachPlugins(),e&&(e.removeEventListener("scroll",this.onScroll),e.offsetParent&&i&&i.offsetParent&&e.replaceWith.apply(e,_toConsumableArray(i.childNodes)));for(var _i48=0,_Object$entries4=Object.entries(o);_i48<_Object$entries4.length;_i48++){var _Object$entries4$_i=_slicedToArray(_Object$entries4[_i48],2),_e33=_Object$entries4$_i[0],_i49=_Object$entries4$_i[1];"container"!==_e33&&_i49&&t.classList.remove(_i49)}this.track=null,this.viewport=null,this.page=0,this.slides=[];var a=this.events.get("ready");this.events=new Map,a&&this.events.set("ready",a)}}}]),tt}(m);Object.defineProperty(tt,"Panzoom",{enumerable:!0,configurable:!0,writable:!0,value:D}),Object.defineProperty(tt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{viewport:null,track:null,enabled:!0,slides:[],axis:"x",transition:"fade",preload:1,slidesPerPage:"auto",initialPage:0,friction:.12,Panzoom:{decelFriction:.12},center:!0,infinite:!0,fill:!0,dragFree:!1,adaptiveHeight:!1,direction:"ltr",classes:{container:"f-carousel",viewport:"f-carousel__viewport",track:"f-carousel__track",slide:"f-carousel__slide",isLTR:"is-ltr",isRTL:"is-rtl",isHorizontal:"is-horizontal",isVertical:"is-vertical",inTransition:"in-transition",isSelected:"is-selected"},l10n:{NEXT:"Next slide",PREV:"Previous slide",GOTO:"Go to slide #%d"}}}),Object.defineProperty(tt,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:G});var nt,lt,ct,et=function(t){if(!S(t))return 0;var e=window.scrollY,i=window.innerHeight,n=e+i,s=t.getBoundingClientRect(),o=s.y+e,a=s.height,r=o+a;if(e>r||n<o)return 0;if(e<o&&n>r)return 100;if(o<e&&r>n)return 100;var l=a;o<e&&(l-=e-o),r>n&&(l-=r-n);var c=l/i*100;return Math.round(c)},it=!("undefined"==typeof window||!window.document||!window.document.createElement),st=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden]):not(.fancybox-focus-guard)","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not
1([tabindex^="-"]):not([disabled]):not([aria-hidden])'].join(","),ot=function(t){if(t&&it){void 0===nt&&document.createElement("div").focus({get preventScroll(){return nt=!0,!1}});try{if(nt)t.focus({preventScroll:!0});else{var _e34=window.scrollY||document.body.scrollTop,_i50=window.scrollX||document.body.scrollLeft;t.focus(),document.body.scrollTo({top:_e34,left:_i50,behavior:"auto"})}}catch(t){}}},at=function(){var e,t=document,i="",n="",s="";return t.fullscreenEnabled?(i="requestFullscreen",n="exitFullscreen",s="fullscreenElement"):t.webkitFullscreenEnabled&&(i="webkitRequestFullscreen",n="webkitExitFullscreen",s="webkitFullscreenElement"),i&&(e={request:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.documentElement;return"webkitRequestFullscreen"===i?e[i](Element.ALLOW_KEYBOARD_INPUT):e[i]()},exit:function(){return t[s]&&t[n]()},isFullscreen:function(){return t[s]}}),e},rt={animated:!0,autoFocus:!0,backdropClick:"close",Carousel:{classes:{container:"fancybox__carousel",viewport:"fancybox__viewport",track:"fancybox__track",slide:"fancybox__slide"}},closeButton:"auto",closeExisting:!1,commonCaption:!1,compact:function(){return window.matchMedia("(max-width: 578px), (max-height: 578px)").matches},contentClick:"toggleZoom",contentDblClick:!1,defaultType:"image",defaultDisplay:"flex",dragToClose:!0,Fullscreen:{autoStart:!1},groupAll:!1,groupAttr:"data-fancybox",hideClass:"f-fadeOut",hideScrollbar:!0,idle:3500,keyboard:{Escape:"close",Delete:"close",Backspace:"close",PageUp:"next",PageDown:"prev",ArrowUp:"prev",ArrowDown:"next",ArrowRight:"next",ArrowLeft:"prev"},l10n:Object.assign(Object.assign({},y),{CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ERROR:"Something Went Wrong, Please Try Again Later",IMAGE_ERROR:"Image Not Found",ELEMENT_NOT_FOUND:"HTML Element Not Found",AJAX_NOT_FOUND:"Error Loading AJAX : Not Found",AJAX_FORBIDDEN:"Error Loading AJAX : Forbidden",IFRAME_ERROR:"Error Loading Page",TOGGLE_ZOOM:"Toggle zoom level",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_SLIDESHOW:"Toggle slideshow",TOGGLE_FULLSCREEN:"Toggle full-screen mode",DOWNLOAD:"Download"}),parentEl:null,placeFocusBack:!0,showClass:"f-zoomInUp",startIndex:0,tpl:{closeButton:'<button data-fancybox-close class="f-button is-close-btn" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M20 20L4 4m16 0L4 20"/></svg></button>',main:'<div class="fancybox__container" role="dialog" aria-modal="true" aria-label="{{MODAL}}" tabindex="-1">\n <div class="fancybox__backdrop"></div>\n <div class="fancybox__carousel"></div>\n <div class="fancybox__footer"></div>\n </div>'},trapFocus:!0,wheel:"zoom"};!function(t){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Closing=2]="Closing",t[t.CustomClosing=3]="CustomClosing",t[t.Destroy=4]="Destroy"}(lt||(lt={})),function(t){t[t.Loading=0]="Loading",t[t.Opening=1]="Opening",t[t.Ready=2]="Ready",t[t.Closing=3]="Closing"}(ct||(ct={}));var ht="",dt=!1,ut=!1,pt=null,ft=function(){var t="",e="",i=Ae.getInstance();if(i){var _n17=i.carousel,_s7=i.getSlide();if(_n17&&_s7){var _o5=_s7.slug||void 0,_a3=_s7.triggerEl||void 0;!(e=_o5||i.option("slug")||"")&&_a3&&_a3.dataset&&(e=_a3.dataset.fancybox||""),e&&"true"!==e&&(t="#"+e+(!_o5&&_n17.slides.length>1?"-"+(_s7.index+1):""))}}return{hash:t,slug:e,index:1}},gt=function(){var t=new URL(document.URL).hash,e=t.slice(1).split("-"),i=e[e.length-1],n=i&&/^\+?\d+$/.test(i)&&parseInt(e.pop()||"1",10)||1;return{hash:t,slug:e.join("-"),index:n}},mt=function(){var _gt=gt(),t=_gt.slug,e=_gt.index;if(t){var i=document.querySelector('[data-slug="'.concat(t,'"]'));if(i&&i.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})),!Ae.getInstance()){var n=document.querySelectorAll('[data-fancybox="'.concat(t,'"]'));n.length&&(i=n[e-1])&&i.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0}))}}},vt=function(){if(!1!==Ae.defaults.Hash){var t=Ae.getInstance();if(!1!==(null==t?void 0:t.options.Hash)){var _gt2=gt(),e=_gt2.slug,i=_gt2.index,n=ft().slug;t&&(e===n?t.jumpTo(i-1):(dt=!0,t.close())),mt()}}},bt=function(){pt&&clearTimeout(pt),queueMicrotask((function(){vt()}))},yt=function(){window.addEventListener("hashchange",bt,!1),setTimeout((function(){vt()}),500)};it&&(/complete|interactive|loaded/.test(document.readyState)?yt():document.addEventListener("DOMContentLoaded",yt));
1var wt="is-zooming-in",xt=function(_$4){function xt(){return _classCallCheck(this,xt),_callSuper(this,xt,arguments)}return _inherits(xt,_$4),_createClass(xt,[{key:"onCreateSlide",value:function(t,e,i){var n=this.instance.optionFor(i,"src")||"";i.el&&"image"===i.type&&"string"==typeof n&&this.setImage(i,n)}},{key:"onRemoveSlide",value:function(t,e,i){i.panzoom&&i.panzoom.destroy(),i.panzoom=void 0,i.imageEl=void 0}},{key:"onChange",value:function(t,e,i,n){P(this.instance.container,wt);var _step24,_iterator24=_createForOfIteratorHelper(e.slides);try{for(_iterator24.s();!(_step24=_iterator24.n()).done;){var _t41=_step24.value,_e35=_t41.panzoom;_e35&&_t41.index!==i&&_e35.reset(.35)}}catch(err){_iterator24.e(err)}finally{_iterator24.f()}}},{key:"onClose",value:function(){var t,e=this.instance,i=e.container,n=e.getSlide();if(i&&i.parentElement&&n){var s=n.el,o=n.contentEl,a=n.panzoom,r=n.thumbElSrc;if(s&&r&&o&&a&&!a.isContentLoading&&a.state!==v.Init&&a.state!==v.Destroy){a.updateMetrics();var l=this.getZoomInfo(n);if(l){this.instance.state=lt.CustomClosing,i.classList.remove(wt),i.classList.add("is-zooming-out"),o.style.backgroundImage="url('".concat(r,"')");var c=i.getBoundingClientRect();1===((null===(t=window.visualViewport)||void 0===t?void 0:t.scale)||1)&&Object.assign(i.style,{position:"absolute",top:"".concat(i.offsetTop+window.scrollY,"px"),left:"".concat(i.offsetLeft+window.scrollX,"px"),bottom:"auto",right:"auto",width:"".concat(c.width,"px"),height:"".concat(c.height,"px"),overflow:"hidden"});var h=l.x,d=l.y,u=l.scale,p=l.opacity;if(p){var _t42=function(t,e,i,n){var s=e-t;return function(e){return 1+((e-t)/s*-1||0)}}(a.scale,u);a.on("afterTransform",(function(){o.style.opacity=_t42(a.scale)+""}))}a.on("endAnimation",(function(){e.destroy()})),a.target.a=u,a.target.b=0,a.target.c=0,a.target.d=u,a.panTo({x:h,y:d,scale:u,friction:p?.2:.33,ignoreBounds:!0}),a.isResting&&e.destroy()}}}}},{key:"setImage",value:function(t,e){var _this22=this,i=this.instance;t.src=e,this.process(t,e).then((function(e){var n=t.contentEl,s=t.imageEl,o=t.thumbElSrc,a=t.el;if(!i.isClosing()&&n&&s){n.offsetHeight;var l,r=!!i.isOpeningSlide(t)&&_this22.getZoomInfo(t);if(_this22.option("protected")&&a){a.addEventListener("contextmenu",(function(t){t.preventDefault()}));var _t43=document.createElement("div");C(_t43,"fancybox-protected"),n.appendChild(_t43)}if(o&&r){var _s8=e.contentRect,_a4=Math.max(_s8.fullWidth,_s8.fullHeight),_c4=null;!r.opacity&&_a4>1200&&(_c4=document.createElement("img"),C(_c4,"fancybox-ghost"),_c4.src=o,n.appendChild(_c4));var _h4=function(){_c4&&(C(_c4,"f-fadeFastOut"),setTimeout((function(){_c4&&(_c4.remove(),_c4=null)}),200))};(l=o,new Promise((function(t,e){var i=new Image;i.onload=t,i.onerror=e,i.src=l}))).then((function(){i.hideLoading(t),t.state=ct.Opening,_this22.instance.emit("reveal",t),_this22.zoomIn(t).then((function(){_h4(),_this22.instance.done(t)}),(function(){})),_c4&&setTimeout((function(){_h4()}),_a4>2500?800:200)}),(function(){i.hideLoading(t),i.revealContent(t)}))}else{var _n18=_this22.optionFor(t,"initialSize"),_s9=_this22.optionFor(t,"zoom"),_o6={event:i.prevMouseMoveEvent||i.options.event,friction:_s9?.12:0},_a5=i.optionFor(t,"showClass")||void 0,_r2=!0;i.isOpeningSlide(t)&&("full"===_n18?e.zoomToFull(_o6):"cover"===_n18?e.zoomToCover(_o6):"max"===_n18?e.zoomToMax(_o6):_r2=!1,e.stop("current")),_r2&&_a5&&(_a5=e.isDragging?"f-fadeIn":""),i.hideLoading(t),i.revealContent(t,_a5)}}}),(function(){i.setError(t,"{{IMAGE_ERROR}}")}))}},{key:"process",value:function(t,e){var _this23=this;return new Promise((function(i,n){var o,a=_this23.instance,r=t.el;a.clearContent(t),a.showLoading(t);var l=_this23.optionFor(t,"content");if("string"==typeof l&&(l=s(l)),!l||!S(l)){if((l=document.createElement("img"))instanceof HTMLImageElement){var _i51,_n19=t.caption;_i51="string"==typeof _n19&&_n19?_n19.replace(/<[^>]+>/gi,"").substring(0,1e3):"Image ".concat(t.index+1," of ").concat((null===(o=a.carousel)||void 0===o?void 0:o.pages.length)||1),l.src=e||"",l.alt=_i51,l.draggable=!1,t.srcset&&l.setAttribute("srcset",t.srcset),_this23.instance.isOpeningSlide(t)&&(l.fetchPriority="high")}t.sizes&&l.setAttribute("sizes",t.sizes)}C(l,"fancybox-image"),t.imageEl=l,a.setContent(t,l,!1),t.panzoom=new D(r,p({transformParent:!0},_this23.option("Panzoom")||{},{content:l,width:function(e,i){return a.optionFor(t,"width","auto",i)||"auto"},height:function(e,i){return a.optionFor(t,"height","auto",i)||"auto"},wheel:function(){var t=a.option("wheel");return("zoom"===t||"pan"==t)&&t},click:function(e,i){var n,s;if(a.isCompact||a.isClosing())return!1;if(t.index!==(null===(n=a.getSlide())||void 0===n?void 0:n.index))return!1;if(i){var _t44=i.composedPath()[0];if(["A","BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].includes(_t44.nodeName))return!1}var o=!i||i.target&&(null===(s=t.contentEl)||void 0===s?void 0:s.contains(i.target));return a.option(o?"contentClick":"backdropClick")||!1},dblClick:function(){return a.isCompact?"toggleZoom":a.option("contentDblClick")||!1},spinner:!1,panOnlyZoomed:!0,wheelLimit:1/0,on:{ready:function(t){i(t)},error:function(){n()},destroy:function(){n()}}}))}))}},{key:"zoomIn",value:function(t){var _this24=this;return new Promise((function(e,i){var n=_this24.instance,s=n.container,o=t.panzoom,a=t.contentEl,r=t.el;o&&o.updateMetrics();var l=_this24.getZoomInfo(t);if(l&&r&&a&&o&&s){var c=l.x,h=l.y,d=l.scale,u=l.opacity,p=function(){t.state!==ct.Closing&&(u&&(a.style.opacity=Math.max(Math.min(1,1-(1-o.scale)/(1-d)),0)+""),o.scale>=1&&o.scale>o.targetScale-.1&&e(o))},f=function f(t){(t.scale<.99||t.scale>1.01)&&!t.isDragging||(P(s,wt),a.style.opacity="",t.off("endAnimation",f),t.off("touchStart",f),t.off("afterTransform",p),e(t))};o.on("endAnimation",f),o.on("touchStart",f),o.on("afterTransform",p),o.on(["error","destroy"],(function(){i()})),o.panTo({x:c,y:h,scale:d,friction:0,ignoreBounds:!0}),o.stop("current");
1var g={event:"mousemove"===o.panMode?n.prevMouseMoveEvent||n.options.event:void 0},m=_this24.optionFor(t,"initialSize");C(s,wt),n.hideLoading(t),"full"===m?o.zoomToFull(g):"cover"===m?o.zoomToCover(g):"max"===m?o.zoomToMax(g):o.reset(.172)}else i()}))}},{key:"getZoomInfo",value:function(t){var e=t.el,i=t.imageEl,n=t.thumbEl,s=t.panzoom,o=this.instance,a=o.container;if(!e||!i||!n||!s||et(n)<3||!this.optionFor(t,"zoom")||!a||o.state===lt.Destroy)return!1;if("0"===getComputedStyle(a).getPropertyValue("--f-images-zoom"))return!1;var r=window.visualViewport||null;if(1!==(r?r.scale:1))return!1;var _n$getBoundingClientR=n.getBoundingClientRect(),l=_n$getBoundingClientR.top,c=_n$getBoundingClientR.left,h=_n$getBoundingClientR.width,d=_n$getBoundingClientR.height,_s$contentRect=s.contentRect,u=_s$contentRect.top,p=_s$contentRect.left,f=_s$contentRect.fitWidth,g=_s$contentRect.fitHeight;if(!(h&&d&&f&&g))return!1;var m=s.container.getBoundingClientRect(),v=-1*((p+=m.left)+.5*f-(c+.5*h)),b=-1*((u+=m.top)+.5*g-(l+.5*d)),y=h/f,w=this.option("zoomOpacity")||!1;return"auto"===w&&(w=Math.abs(h/d-f/g)>.1),{x:v,y:b,scale:y,opacity:w}}},{key:"attach",value:function(){var t=this,e=t.instance;e.on("Carousel.change",t.onChange),e.on("Carousel.createSlide",t.onCreateSlide),e.on("Carousel.removeSlide",t.onRemoveSlide),e.on("close",t.onClose)}},{key:"detach",value:function(){var t=this,e=t.instance;e.off("Carousel.change",t.onChange),e.off("Carousel.createSlide",t.onCreateSlide),e.off("Carousel.removeSlide",t.onRemoveSlide),e.off("close",t.onClose)}}]),xt}($);Object.defineProperty(xt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{initialSize:"fit",Panzoom:{maxScale:1},protected:!1,zoom:!0,zoomOpacity:"auto"}}),"function"==typeof SuppressedError&&SuppressedError;var Et="html",Ct="youtube",Tt="vimeo",Mt="html5video",Ot=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=new URL(t),n=new URLSearchParams(i.search),s=new URLSearchParams,_i52=0,_arr5=[].concat(_toConsumableArray(n),_toConsumableArray(Object.entries(e)));_i52<_arr5.length;_i52++){var _arr5$_i=_slicedToArray(_arr5[_i52],2),_t45=_arr5$_i[0],_i53=_arr5$_i[1],_e36=_i53+"";if("t"===_t45){var _t46=_e36.match(/((\d*)m)?(\d*)s?/);_t46&&s.set("start",60*parseInt(_t46[2]||"0")+parseInt(_t46[3]||"0")+"")}else s.set(_t45,_e36)}var o=s+"",a=t.match(/#t=((.*)?\d+s)/);return a&&(o+="#t=".concat(a[1])),o},Lt=["image","html","ajax","inline","clone","iframe","map","pdf","html5video","youtube","vimeo"],zt=function(_$5){function zt(){return _classCallCheck(this,zt),_callSuper(this,zt,arguments)}return _inherits(zt,_$5),_createClass(zt,[{key:"onBeforeInitSlide",value:function(t,e,i){this.processType(i)}},{key:"onCreateSlide",value:function(t,e,i){this.setContent(i)}},{key:"onClearContent",value:function(t,e){e.xhr&&(e.xhr.abort(),e.xhr=null);var i=e.iframeEl;i&&(i.onload=i.onerror=null,i.src="//about:blank",e.iframeEl=null);var n=e.contentEl,s=e.placeholderEl;if("inline"===e.type&&n&&s)n.classList.remove("fancybox__content"),"none"!==getComputedStyle(n).getPropertyValue("display")&&(n.style.display="none"),setTimeout((function(){s&&(n&&s.parentNode&&s.parentNode.insertBefore(n,s),s.remove())}),0),e.contentEl=void 0,e.placeholderEl=void 0;else for(;e.el&&e.el.firstChild;)e.el.removeChild(e.el.firstChild)}},{key:"onSelectSlide",value:function(t,e,i){i.state===ct.Ready&&this.playVideo()}},{key:"onUnselectSlide",value:function(t,e,i){var n,s,o;if(i.type!==Mt)i.type===Tt?o={method:"pause",value:"true"}:i.type===Ct&&(o={event:"command",func:"pauseVideo"}),o&&i.iframeEl&&i.iframeEl.contentWindow&&i.iframeEl.contentWindow.postMessage(JSON.stringify(o),"*"),i.poller&&clearTimeout(i.poller);else try{null===(s=null===(n=i.el)||void 0===n?void 0:n.querySelector("video"))||void 0===s||s.pause()}catch(t){}}},{key:"onDone",value:function(t,e){t.isCurrentSlide(e)&&!t.isClosing()&&this.playVideo()}},{key:"onRefresh",value:function(t,e){var _this25=this;e.slides.forEach((function(t){t.el&&(_this25.resizeIframe(t),_this25.setAspectRatio(t))}))}},{key:"onMessage",value:function(t){try{var _e37=JSON.parse(t.data);if("https://player.vimeo.com"===t.origin){if("ready"===_e37.event)for(var _i54=0,_Array$from3=Array.from(document.getElementsByClassName("fancybox__iframe"));_i54<_Array$from3.length;_i54++){var _e38=_Array$from3[_i54];_e38 instanceof HTMLIFrameElement&&_e38.contentWindow===t.source&&(_e38.dataset.ready="true")}}else if(t.origin.match(/^https:\/\/(www.)?youtube(-nocookie)?.com$/)&&"onReady"===_e37.event){var _t47=document.getElementById(_e37.id);_t47&&(_t47.dataset.ready="true")}}catch(t){}}},{key:"loadAjaxContent",value:function(t){var e=this.instance.optionFor(t,"src")||"";this.instance.showLoading(t);var i=this.instance,n=new XMLHttpRequest;i.showLoading(t),n.onreadystatechange=function(){n.readyState===XMLHttpRequest.DONE&&i.state===lt.Ready&&(i.hideLoading(t),200===n.status?i.setContent(t,n.responseText):i.setError(t,404===n.status?"{{AJAX_NOT_FOUND}}":"{{AJAX_FORBIDDEN}}"))};var s=t.ajax||null;n.open(s?"POST":"GET",e+""),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.send(s),t.xhr=n}},{key:"setInlineContent",value:function(t){var e=null;if(S(t.src))e=t.src;else if("string"==typeof t.src){var _i55=t.src.split("#",2).pop();e=_i55?document.getElementById(_i55):null}if(e){if("clone"===t.type||e.closest(".fancybox__slide")){var _i56=(e=e.cloneNode(!0)).dataset.animationName;_i56&&(e.classList.remove(_i56),delete e.dataset.animationName);var _n20=e.getAttribute("id");_n20=_n20?"".concat(_n20,"--clone"):"clone-".concat(this.instance.id,"-").concat(t.index),e.setAttribute("id",_n20)}else if(e.parentNode){var _i57=document.createElement("div");_i57.classList.add("fancybox-placeholder"),e.parentNode.insertBefore(_i57,e),t.placeholderEl=_i57}this.instance.setContent(t,e)}else this.instance.setError(t,"{{ELEMENT_NOT_FOUND}}")}},{key:"setIframeContent",value:function(t){var _this26=this,e=t.src,i=t.el;if(e&&"string"==typeof e&&i){i.classList.add("is-loading");var n=this.instance,s=document.createElement("iframe");s.className="fancybox__iframe",s.setAttribute("id","fancybox__iframe_".concat(n.id,"_").concat(t.index));for(var _i58=0,_Object$entries5=Object.entries(this.optionFor(t,"iframeAttr")||{});_i58<_Object$entries5.length;_i58++){var _Object$entries5$_i=_slicedToArray(_Object$entries5[_i58],2),_e39=_Object$entries5$_i[0],_i59=_Object$entries5$_i[1];s.setAttribute(_e39,_i59)}s.onerror=function(){n.setError(t,"{{IFRAME_ERROR}}")},t.iframeEl=s;var o=this.optionFor(t,"preload");if("iframe"!==t.type||!1===o)return s.setAttribute("src",t.src+""),n.setContent(t,s,!1),this.resizeIframe(t),void n.revealContent(t);n.showLoading(t),s.onload=function(){if(s.src.length){var e="true"!==s.dataset.ready;s.dataset.ready="true",_this26.resizeIframe(t),e?n.revealContent(t):n.hideLoading(t)}
1},s.setAttribute("src",e),n.setContent(t,s,!1)}}},{key:"resizeIframe",value:function(t){var e=t.type,i=t.iframeEl;if(e!==Ct&&e!==Tt){var n=null==i?void 0:i.parentElement;if(i&&n){var s=t.autoSize;void 0===s&&(s=this.optionFor(t,"autoSize"));var o=t.width||0,a=t.height||0;o&&a&&(s=!1);var r=n&&n.style;if(!1!==t.preload&&!1!==s&&r)try{var _t48=window.getComputedStyle(n),_e40=parseFloat(_t48.paddingLeft)+parseFloat(_t48.paddingRight),_s10=parseFloat(_t48.paddingTop)+parseFloat(_t48.paddingBottom),_l3=i.contentWindow;if(_l3){var _t49=_l3.document,_i60=_t49.getElementsByTagName(Et)[0],_n21=_t49.body;r.width="",_n21.style.overflow="hidden",o=o||_i60.scrollWidth+_e40,r.width="".concat(o,"px"),_n21.style.overflow="",r.flex="0 0 auto",r.height="".concat(_n21.scrollHeight,"px"),a=_i60.scrollHeight+_s10}}catch(t){}if(o||a){var _t50={flex:"0 1 auto",width:"",height:""};o&&"auto"!==o&&(_t50.width="".concat(o,"px")),a&&"auto"!==a&&(_t50.height="".concat(a,"px")),Object.assign(r,_t50)}}}}},{key:"playVideo",value:function(){var t=this.instance.getSlide();if(t){var e=t.el;if(e&&e.offsetParent&&this.optionFor(t,"videoAutoplay")){if(t.type===Mt)try{var _t51=e.querySelector("video");if(_t51){var _e41=_t51.play();void 0!==_e41&&_e41.then((function(){})).catch((function(e){_t51.muted=!0,_t51.play()}))}}catch(t){}t.type!==Ct&&t.type!==Tt||function i(){if(t.iframeEl&&t.iframeEl.contentWindow){var _e42;if("true"===t.iframeEl.dataset.ready)return(_e42=t.type===Ct?{event:"command",func:"playVideo"}:{method:"play",value:"true"})&&t.iframeEl.contentWindow.postMessage(JSON.stringify(_e42),"*"),void(t.poller=void 0);t.type===Ct&&(_e42={event:"listening",id:t.iframeEl.getAttribute("id")},t.iframeEl.contentWindow.postMessage(JSON.stringify(_e42),"*"))}t.poller=setTimeout(i,250)}()}}}},{key:"processType",value:function(t){if(t.html)return t.type=Et,t.src=t.html,void(t.html="");var e=this.instance.optionFor(t,"src","");if(e&&"string"==typeof e){var i=t.type,n=null;if(n=e.match(/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|shorts\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i)){var _s11=this.optionFor(t,Ct),_o7=_s11.nocookie,_a6=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(i[n[s]]=t[n[s]])}return i}(_s11,["nocookie"]),_r3="www.youtube".concat(_o7?"-nocookie":"",".com"),_l4=Ot(e,_a6),_c5=encodeURIComponent(n[2]);t.videoId=_c5,t.src="https://".concat(_r3,"/embed/").concat(_c5,"?").concat(_l4),t.thumbSrc=t.thumbSrc||"https://i.ytimg.com/vi/".concat(_c5,"/mqdefault.jpg"),i=Ct}else if(n=e.match(/^.+vimeo.com\/(?:\/)?([\d]+)((\/|\?h=)([a-z0-9]+))?(.*)?/)){var _s12=Ot(e,this.optionFor(t,Tt)),_o8=encodeURIComponent(n[1]),_a7=n[4]||"";t.videoId=_o8,t.src="https://player.vimeo.com/video/".concat(_o8,"?").concat(_a7?"h=".concat(_a7).concat(_s12?"&":""):"").concat(_s12),i=Tt}if(!i&&t.triggerEl){var _e43=t.triggerEl.dataset.type;Lt.includes(_e43)&&(i=_e43)}i||"string"==typeof e&&("#"===e.charAt(0)?i="inline":(n=e.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(i=Mt,t.videoFormat=t.videoFormat||"video/"+("ogv"===n[1]?"ogg":n[1])):e.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?i="image":e.match(/\.(pdf)((\?|#).*)?$/i)&&(i="pdf")),(n=e.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+.?\d+?)z))|(?:\?ll=))(.*)?/i))?(t.src="https://maps.google.".concat(n[1],"/?ll=").concat((n[2]?n[2]+"&z="+Math.floor(parseFloat(n[3]))+(n[4]?n[4].replace(/^\//,"&"):""):n[4]+"").replace(/\?/,"&"),"&output=").concat(n[4]&&n[4].indexOf("layer=c")>0?"svembed":"embed"),i="map"):(n=e.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i))&&(t.src="https://maps.google.".concat(n[1],"/maps?q=").concat(n[2].replace("query=","q=").replace("api=1",""),"&output=embed"),i="map"),i=i||this.instance.option("defaultType"),t.type=i,"image"===i&&(t.thumbSrc=t.thumbSrc||t.src)}}},{key:"setContent",value:function(t){var e=this.instance.optionFor(t,"src")||"";if(t&&t.type&&e){switch(t.type){case Et:this.instance.setContent(t,e);break;case Mt:var _i61=this.option("videoTpl");_i61&&this.instance.setContent(t,_i61.replace(/\{\{src\}\}/gi,e+"").replace(/\{\{format\}\}/gi,this.optionFor(t,"videoFormat")||"").replace(/\{\{poster\}\}/gi,t.poster||t.thumbSrc||""));break;case"inline":case"clone":this.setInlineContent(t);break;case"ajax":this.loadAjaxContent(t);break;case"pdf":case"map":case Ct:case Tt:t.preload=!1;case"iframe":this.setIframeContent(t)}this.setAspectRatio(t)}}},{key:"setAspectRatio",value:function(t){var e=t.contentEl;if(t.el&&e&&t.type&&[Ct,Tt,Mt].includes(t.type)){var i,n=t.width||"auto",s=t.height||"auto";if("auto"===n||"auto"===s){var _e44=((i=this.optionFor(t,"videoRatio"))+"").match(/(\d+)\s*\/\s?(\d+)/);i=_e44&&_e44.length>2?parseFloat(_e44[1])/parseFloat(_e44[2]):parseFloat(i+"")}else n&&s&&(i=n/s);if(i){e.style.aspectRatio="",e.style.width="",e.style.height="",e.offsetHeight;var o=e.getBoundingClientRect(),a=o.width||1,r=o.height||1;e.style.aspectRatio=i+"",i<a/r?(s="auto"===s?r:Math.min(r,s),e.style.width="auto",e.style.height="".concat(s,"px")):(n="auto"===n?a:Math.min(a,n),e.style.width="".concat(n,"px"),e.style.height="auto")}}}},{key:"attach",value:function(){var t=this,e=t.instance;e.on("Carousel.beforeInitSlide",t.onBeforeInitSlide),e.on("Carousel.createSlide",t.onCreateSlide),e.on("Carousel.selectSlide",t.onSelectSlide),e.on("Carousel.unselectSlide",t.onUnselectSlide),e.on("Carousel.Panzoom.refresh",t.onRefresh),e.on("done",t.onDone),e.on("clearContent",t.onClearContent),window.addEventListener("message",t.onMessage)}},{key:"detach",value:function(){var t=this,e=t.instance;e.off("Carousel.beforeInitSlide",t.onBeforeInitSlide),e.off("Carousel.createSlide",t.onCreateSlide),e.off("Carousel.selectSlide",t.onSelectSlide),e.off("Carousel.unselectSlide",t.onUnselectSlide),e.off("Carousel.Panzoom.refresh",t.onRefresh),e.off("done",t.onDone),e.off("clearContent",t.onClearContent),window.removeEventListener("message",t.onMessage)}}]),zt}($);Object.defineProperty(zt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{ajax:null,autoSize:!0,iframeAttr:{allow:"autoplay; fullscreen",scrolling:"auto"},preload:!0,videoAutoplay:!0,videoRatio:16/9,videoTpl:'<video class="fancybox__html5video" playsinline controls controlsList="nodownload" poster="{{poster}}">\n <source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos.</video>',videoFormat:"",vimeo:{byline:1,color:"00adef",controls:1,dnt:1,muted:0},youtube:{controls:1,enablejsapi:1,nocookie:1,rel:0,fs:1}}});var Rt="play",kt="pause",It="ready",Dt=function(_$6){function Dt(){var _this27;return _classCallCheck(this,Dt),_this27=_callSuper(this,Dt,arguments),Object.defineProperty(_assertThisInitialized(_this27),"state",{enumerable:!0,configurable:!0,writable:!0,value:
1It}),Object.defineProperty(_assertThisInitialized(_this27),"inHover",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(_assertThisInitialized(_this27),"timer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this27),"progressBar",{enumerable:!0,configurable:!0,writable:!0,value:null}),_this27}return _inherits(Dt,_$6),_createClass(Dt,[{key:"isActive",get:function(){return this.state!==It}},{key:"onReady",value:function(t){this.option("autoStart")&&(t.isInfinite||t.page<t.pages.length-1)&&this.start()}},{key:"onChange",value:function(){this.removeProgressBar(),this.pause()}},{key:"onSettle",value:function(){this.resume()}},{key:"onVisibilityChange",value:function(){"visible"===document.visibilityState?this.resume():this.pause()}},{key:"onMouseEnter",value:function(){this.inHover=!0,this.pause()}},{key:"onMouseLeave",value:function(){var t;this.inHover=!1,(null===(t=this.instance.panzoom)||void 0===t?void 0:t.isResting)&&this.resume()}},{key:"onTimerEnd",value:function(){var t=this.instance;"play"===this.state&&(t.isInfinite||t.page!==t.pages.length-1?t.slideNext():t.slideTo(0))}},{key:"removeProgressBar",value:function(){this.progressBar&&(this.progressBar.remove(),this.progressBar=null)}},{key:"createProgressBar",value:function(){var t;if(!this.option("showProgress"))return null;this.removeProgressBar();var e=this.instance,i=(null===(t=e.pages[e.page])||void 0===t?void 0:t.slides)||[],n=this.option("progressParentEl");if(n||(n=(1===i.length?i[0].el:null)||e.viewport),!n)return null;var s=document.createElement("div");return C(s,"f-progress"),n.prepend(s),this.progressBar=s,s.offsetHeight,s}},{key:"set",value:function(){var t=this,e=t.instance;if(!(e.pages.length<2||t.timer)){var i=t.option("timeout");t.state=Rt,C(e.container,"has-autoplay");var n=t.createProgressBar();n&&(n.style.transitionDuration="".concat(i,"ms"),n.style.transform="scaleX(1)"),t.timer=setTimeout((function(){t.timer=null,t.inHover||t.onTimerEnd()}),i),t.emit("set")}}},{key:"clear",value:function(){var t=this;t.timer&&(clearTimeout(t.timer),t.timer=null),t.removeProgressBar()}},{key:"start",value:function(){var t=this;if(t.set(),t.state!==It){if(t.option("pauseOnHover")){var _e45=t.instance.container;_e45.addEventListener("mouseenter",t.onMouseEnter,!1),_e45.addEventListener("mouseleave",t.onMouseLeave,!1)}document.addEventListener("visibilitychange",t.onVisibilityChange,!1),t.emit("start")}}},{key:"stop",value:function(){var t=this,e=t.state,i=t.instance.container;t.clear(),t.state=It,i.removeEventListener("mouseenter",t.onMouseEnter,!1),i.removeEventListener("mouseleave",t.onMouseLeave,!1),document.removeEventListener("visibilitychange",t.onVisibilityChange,!1),P(i,"has-autoplay"),e!==It&&t.emit("stop")}},{key:"pause",value:function(){var t=this;t.state===Rt&&(t.state=kt,t.clear(),t.emit(kt))}},{key:"resume",value:function(){var t=this,e=t.instance;if(e.isInfinite||e.page!==e.pages.length-1)if(t.state!==Rt){if(t.state===kt&&!t.inHover){var _e46=new Event("resume",{bubbles:!0,cancelable:!0});t.emit("resume",_e46),_e46.defaultPrevented||t.set()}}else t.set();else t.stop()}},{key:"toggle",value:function(){this.state===Rt||this.state===kt?this.stop():this.start()}},{key:"attach",value:function(){var t=this,e=t.instance;e.on("ready",t.onReady),e.on("Panzoom.startAnimation",t.onChange),e.on("Panzoom.endAnimation",t.onSettle),e.on("Panzoom.touchMove",t.onChange)}},{key:"detach",value:function(){var t=this,e=t.instance;e.off("ready",t.onReady),e.off("Panzoom.startAnimation",t.onChange),e.off("Panzoom.endAnimation",t.onSettle),e.off("Panzoom.touchMove",t.onChange),t.stop()}}]),Dt}($);Object.defineProperty(Dt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{autoStart:!0,pauseOnHover:!0,progressParentEl:null,showProgress:!0,timeout:3e3}});var Ft=function(_$7){function Ft(){var _this28;return _classCallCheck(this,Ft),_this28=_callSuper(this,Ft,arguments),Object.defineProperty(_assertThisInitialized(_this28),"ref",{enumerable:!0,configurable:!0,writable:!0,value:null}),_this28}return _inherits(Ft,_$7),_createClass(Ft,[{key:"onPrepare",value:function(t){var _this29=this,e=t.carousel;if(e){var i=t.container;i&&(e.options.Autoplay=p({autoStart:!1},this.option("Autoplay")||{},{pauseOnHover:!1,timeout:this.option("timeout"),progressParentEl:function(){return _this29.option("progressParentEl")||null},on:{start:function(){t.emit("startSlideshow")},set:function(e){var n;i.classList.add("has-slideshow"),(null===(n=t.getSlide())||void 0===n?void 0:n.state)!==ct.Ready&&e.pause()},stop:function(){i.classList.remove("has-slideshow"),t.isCompact||t.endIdle(),t.emit("endSlideshow")},resume:function(e,i){var n,s,o;!i||!i.cancelable||(null===(n=t.getSlide())||void 0===n?void 0:n.state)===ct.Ready&&(null===(o=null===(s=t.carousel)||void 0===s?void 0:s.panzoom)||void 0===o?void 0:o.isResting)||i.preventDefault()}}}),e.attachPlugins({Autoplay:Dt}),this.ref=e.plugins.Autoplay)}}},{key:"onReady",value:function(t){var e=t.carousel,i=this.ref;i&&e&&this.option("playOnStart")&&(e.isInfinite||e.page<e.pages.length-1)&&i.start()}},{key:"onDone",value:function(t,e){var i=this.ref,n=t.carousel;if(i&&n){var s=e.panzoom;s&&s.on("startAnimation",(function(){t.isCurrentSlide(e)&&i.stop()})),t.isCurrentSlide(e)&&i.resume()}}},{key:"onKeydown",value:function(t,e){var i,n=this.ref;n&&e===this.option("key")&&"BUTTON"!==(null===(i=document.activeElement)||void 0===i?void 0:i.nodeName)&&n.toggle()}},{key:"attach",value:function(){var t=this,e=t.instance;e.on("Carousel.init",t.onPrepare),e.on("Carousel.ready",t.onReady),e.on("done",t.onDone),e.on("key
1down",t.onKeydown)}},{key:"detach",value:function(){var t=this,e=t.instance;e.off("Carousel.init",t.onPrepare),e.off("Carousel.ready",t.onReady),e.off("done",t.onDone),e.off("keydown",t.onKeydown)}}]),Ft}($);Object.defineProperty(Ft,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{key:" ",playOnStart:!1,progressParentEl:function(t){var e;return(null===(e=t.instance.container)||void 0===e?void 0:e.querySelector(".fancybox__toolbar [data-fancybox-toggle-slideshow]"))||t.instance.container},timeout:3e3}});var Bt,jt={classes:{container:"f-thumbs f-carousel__thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide",isResting:"is-resting",isSelected:"is-selected",isLoading:"is-loading",hasThumbs:"has-thumbs"},minCount:2,parentEl:null,thumbTpl:'<button class="f-thumbs__slide__button" tabindex="0" type="button" aria-label="{{GOTO}}" data-carousel-index="%i"><img class="f-thumbs__slide__img" data-lazy-src="{{%s}}" alt="" /></button>',type:"modern"};!function(t){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Hidden=2]="Hidden"}(Bt||(Bt={}));var Ht="isResting",Nt="thumbWidth",_t="thumbHeight",$t="thumbClipWidth",Wt=function(_$8){function Wt(){var _this30;return _classCallCheck(this,Wt),_this30=_callSuper(this,Wt,arguments),Object.defineProperty(_assertThisInitialized(_this30),"type",{enumerable:!0,configurable:!0,writable:!0,value:"modern"}),Object.defineProperty(_assertThisInitialized(_this30),"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this30),"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this30),"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this30),"thumbWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(_assertThisInitialized(_this30),"thumbClipWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(_assertThisInitialized(_this30),"thumbHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(_assertThisInitialized(_this30),"thumbGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(_assertThisInitialized(_this30),"thumbExtraGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(_assertThisInitialized(_this30),"state",{enumerable:!0,configurable:!0,writable:!0,value:Bt.Init}),_this30}return _inherits(Wt,_$8),_createClass(Wt,[{key:"isModern",get:function(){return"modern"===this.type}},{key:"onInitSlide",value:function(t,e){var i=e.el?e.el.dataset:void 0;i&&(e.thumbSrc=i.thumbSrc||e.thumbSrc||"",e[$t]=parseFloat(i[$t]||"")||e[$t]||0,e[_t]=parseFloat(i.thumbHeight||"")||e[_t]||0),this.addSlide(e)}},{key:"onInitSlides",value:function(){this.build()}},{key:"onChange",value:function(){var t;if(this.isModern){var e=this.container,i=this.instance,n=i.panzoom,s=this.carousel,o=s?s.panzoom:null,r=i.page;if(n&&s&&o){if(n.isDragging){P(e,this.cn(Ht));var _n22=(null===(t=s.pages[r])||void 0===t?void 0:t.pos)||0;_n22+=i.getProgress(r)*(this[$t]+this.thumbGap);var _a8=o.getBounds();-1*_n22>_a8.x.min&&-1*_n22<_a8.x.max&&o.panTo({x:-1*_n22,friction:.12})}else a(e,this.cn(Ht),n.isResting);this.shiftModern()}}}},{key:"onRefresh",value:function(){this.updateProps();var _step25,_iterator25=_createForOfIteratorHelper(this.instance.slides||[]);try{for(_iterator25.s();!(_step25=_iterator25.n()).done;){var _t52=_step25.value;this.resizeModernSlide(_t52)}}catch(err){_iterator25.e(err)}finally{_iterator25.f()}this.shiftModern()}},{key:"isDisabled",value:function(){var t=this.option("minCount")||0;if(t){var _step26,_i62=0,_iterator26=_createForOfIteratorHelper(this.instance.slides||[]);try{for(_iterator26.s();!(_step26=_iterator26.n()).done;)_step26.value.thumbSrc&&_i62++}catch(err){_iterator26.e(err)}finally{_iterator26.f()}if(_i62<t)return!0}var e=this.option("type");return["modern","classic"].indexOf(e)<0}},{key:"getThumb",value:function(t){var e=this.option("thumbTpl")||"";return{html:this.instance.localize(e,[["%i",t.index],["%d",t.index+1],["%s",t.thumbSrc||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"]])}}},{key:"addSlide",value:function(t){var e=this.carousel;e&&e.addSlide(t.index,this.getThumb(t))}},{key:"getSlides",value:function(){var _step27,t=[],_iterator27=_createForOfIteratorHelper(this.instance.slides||[]);try{for(_iterator27.s();!(_step27=_iterator27.n()).done;){var _e48=_step27.value;t.push(this.getThumb(_e48))}}catch(err){_iterator27.e(err)}finally{_iterator27.f()}return t}},{key:"resizeModernSlide",value:function(t){this.isModern&&(t[Nt]=t[$t]&&t[_t]?Math.round(this[_t]*(t[$t]/t[_t])):this[Nt])}},{key:"updateProps",value:function(){var t=this.container;if(t){var e=function(_e49){return parseFloat(getComputedStyle(t).getPropertyValue("--f-thumb-"+_e49))||0};this.thumbGap=e("gap"),this.thumbExtraGap=e("extra-gap"),this[Nt]=e("width")||40,this[$t]=e("clip-width")||40,this[_t]=e("height")||40}}},{key:"build",value:function(){var t=this;if(t.state===Bt.Init)if(t.isDisabled())t.emit("disabled");
1else{var e=t.instance,i=e.container,n=t.getSlides(),s=t.option("type");t.type=s;var o=t.option("parentEl"),a=t.cn("container"),r=t.cn("track"),l=null==o?void 0:o.querySelector("."+a);l||(l=document.createElement("div"),C(l,a),o?o.appendChild(l):i.after(l)),C(l,"is-".concat(s)),C(i,t.cn("hasThumbs")),t.container=l,t.updateProps();var c=l.querySelector("."+r);c||(c=document.createElement("div"),C(c,t.cn("track")),l.appendChild(c)),t.track=c;var h=p({},{track:c,infinite:!1,center:!0,fill:"classic"===s,dragFree:!0,slidesPerPage:1,transition:!1,preload:.25,friction:.12,Panzoom:{maxVelocity:0},Dots:!1,Navigation:!1,classes:{container:"f-thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide"}},t.option("Carousel")||{},{Sync:{target:e},slides:n}),d=new e.constructor(l,h);d.on("createSlide",(function(e,i){t.setProps(i.index),t.emit("createSlide",i,i.el)})),d.on("ready",(function(){t.shiftModern(),t.emit("ready")})),d.on("refresh",(function(){t.shiftModern()})),d.on("Panzoom.click",(function(e,i,n){t.onClick(n)})),t.carousel=d,t.state=Bt.Ready}}},{key:"onClick",value:function(t){t.preventDefault(),t.stopPropagation();var e=this.instance,i=e.pages,n=e.page,s=function(t){if(t){var _e50=t.closest("[data-carousel-index]");if(_e50)return[parseInt(_e50.dataset.carouselIndex||"",10)||0,_e50]}return[-1,void 0]},o=function(t,e){var i=document.elementFromPoint(t,e);return i?s(i):[-1,void 0]},_s14=_slicedToArray(s(t.target),2),a=_s14[0];if(_s14[1],!(a>-1)){var l=this[$t],c=t.clientX,h=t.clientY,_o10=_slicedToArray(o(c-l,h),2),d=_o10[0],u=_o10[1],_o12=_slicedToArray(o(c+l,h),2),p=_o12[0],f=_o12[1];u&&f?(a=Math.abs(c-u.getBoundingClientRect().right)<Math.abs(c-f.getBoundingClientRect().left)?d:p)===n&&(a=a===d?p:d):u?a=d:f&&(a=p),a>-1&&i[a]&&e.slideTo(a)}}},{key:"getShift",value:function(t){var e,i=this,n=i.instance,s=i.carousel;if(!n||!s)return 0;var o=i[Nt],a=i[$t],r=i.thumbGap,l=i.thumbExtraGap;if(!(null===(e=s.slides[t])||void 0===e?void 0:e.el))return 0;var c=.5*(o-a),h=n.pages.length-1,d=n.getProgress(0),u=n.getProgress(h),p=n.getProgress(t,!1,!0),f=0,g=c+l+r,m=d<0&&d>-1,v=u>0&&u<1;return 0===t?(f=g*Math.abs(d),v&&1===d&&(f-=g*Math.abs(u))):t===h?(f=g*Math.abs(u)*-1,m&&-1===u&&(f+=g*Math.abs(d))):m||v?(f=-1*g,f+=g*Math.abs(d),f+=g*(1-Math.abs(u))):f=g*p,f}},{key:"setProps",value:function(t){var i,n=this;if(n.isModern){var s=n.instance,o=n.carousel;if(s&&o){var _a9=null===(i=o.slides[t])||void 0===i?void 0:i.el;if(_a9&&_a9.childNodes.length){var _i63=e(1-Math.abs(s.getProgress(t))),_o13=e(n.getShift(t));_a9.style.setProperty("--progress",_i63?_i63+"":""),_a9.style.setProperty("--shift",_o13+"")}}}}},{key:"shiftModern",value:function(){var t=this;if(t.isModern){var e=t.instance,i=t.track,n=e.panzoom,s=t.carousel;if(e&&i&&n&&s&&n.state!==v.Init&&n.state!==v.Destroy){var _step28,_iterator28=_createForOfIteratorHelper(e.slides);try{for(_iterator28.s();!(_step28=_iterator28.n()).done;){var _i64=_step28.value;t.setProps(_i64.index)}}catch(err){_iterator28.e(err)}finally{_iterator28.f()}var o=(t[$t]+t.thumbGap)*(s.slides.length||0);i.style.setProperty("--width",o+"")}}}},{key:"cleanup",value:function(){var t=this;t.carousel&&t.carousel.destroy(),t.carousel=null,t.container&&t.container.remove(),t.container=null,t.track&&t.track.remove(),t.track=null,t.state=Bt.Init,P(t.instance.container,t.cn("hasThumbs"))}},{key:"attach",value:function(){var t=this,e=t.instance;e.on("initSlide",t.onInitSlide),e.state===H.Init?e.on("initSlides",t.onInitSlides):t.onInitSlides(),e.on(["change","Panzoom.afterTransform"],t.onChange),e.on("Panzoom.refresh",t.onRefresh)}},{key:"detach",value:function(){var t=this,e=t.instance;e.off("initSlide",t.onInitSlide),e.off("initSlides",t.onInitSlides),e.off(["change","Panzoom.afterTransform"],t.onChange),e.off("Panzoom.refresh",t.onRefresh),t.cleanup()}}]),Wt}($);Object.defineProperty(Wt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:jt});var Xt=Object.assign(Object.assign({},jt),{key:"t",showOnStart:!0,parentEl:null}),qt="is-masked",Yt="aria-hidden",Vt=function(_$9){function Vt(){var _this31;return _classCallCheck(this,Vt),_this31=_callSuper(this,Vt,arguments),Object.defineProperty(_assertThisInitialized(_this31),"ref",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this31),"hidden",{enumerable:!0,configurable:!0,writable:!0,value:!1}),_this31}return _inherits(Vt,_$9),_createClass(Vt,[{key:"isEnabled",get:function(){var t=this.ref;return t&&!t.isDisabled()}},{key:"isHidden",get:function(){return this.hidden}},{key:"onClick",value:function(t,e){e.stopPropagation()}},{key:"onCreateSlide",value:function(t,e){var i,n,s,o=(null===(s=null===(n=null===(i=this.instance)||void 0===i?void 0:i.carousel)||void 0===n?void 0:n.slides[e.index])||void 0===s?void 0:s.type)||"",a=e.el;if(a&&o){var _t54="for-".concat(o);["video","youtube","vimeo","html5video"].includes(o)&&(_t54+=" for-video"),C(a,_t54)}}},{key:"onInit",value:function(){var t,_this32=this,e=this,i=e.instance,n=i.carousel;if(!e.ref&&n){var s=e.option("parentEl")||i.footer||i.container;if(s){var o=p({},e.options,{parentEl:s,classes:{container:"f-thumbs fancybox__thumbs"},Carousel:{Sync:{friction:i.option("Carousel.friction")||0}},on:{ready:function(t){var i=t.container;i&&_this32.hidden&&(e.refresh(),i.style.transition="none",e.hide(),i.offsetHeight,queueMicrotask((function(){i.style.transition="",e.show()})))}}});o.Carousel=o.Carousel||{},o.Carousel.on=p((null===(t=e.options.Carousel)||void 0===t?void 0:t.on)||{},{click:this.onClick,createSlide:this.onCreateSlide}),n.options.Thumbs=o,n.attachPlugins({Thumbs:Wt}),e.ref=n.plugins.Thumbs,e.option("showOnStart")||(e.ref.state=Bt.Hidden,e.hidden=!0)}}}},{key:"onResize",value:function(){var t,e=null===(t=this.ref)||void 0===t?void 0:t.container;e&&(e.style.maxHeight="")}},{key:"onKeydown",value:function(t,e){var i=this.option("key");i&&i===e&&this.toggle()}},{key:"toggle",value:function(){var t=this.ref;if(t&&!t.isDisabled())return t.state===Bt.Hidden?(t.state=Bt.Init,void t.build()):void(this.hidden?this.show():this.hide())}},{key:"show",value:function(){var t=this.ref;if(t&&!t.isDisabled()){var e=t.container;e&&(this.refresh(),e.offsetHeight,e.removeAttribute(Yt),e.classList.remove(qt),this.hidden=!1)}}},{key:"hide",value:function(){var t=this.ref,e=t&&t.container;e&&(this.refresh(),e.offsetHeight,e.classList.add(qt),e.setAttribute(Yt,"true")),this.hidden=!0}},{key:"refresh",value:function(){var t=this.ref;if(t&&t.state){var e=t.container,i=(null==e?void 0:e.firstChild)||null;e&&i&&i.childNodes.length&&(e.style.maxHeight="".concat(i.getBoundingClientRect().height,"px"))}}},{key:"attach",value:function(){var t=this,e=t.instance;e.state===lt.Init?e.on("Carousel.init",t.onInit):t.onInit(),e.on("resize",t.onResize),e.on("key
1down",t.onKeydown)}},{key:"detach",value:function(){var t,e=this,i=e.instance;i.off("Carousel.init",e.onInit),i.off("resize",e.onResize),i.off("keydown",e.onKeydown),null===(t=i.carousel)||void 0===t||t.detachPlugins(["Thumbs"]),e.ref=null}}]),Vt}($);Object.defineProperty(Vt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:Xt});var Ut,Zt={panLeft:{icon:'<svg><path d="M5 12h14M5 12l6 6M5 12l6-6"/></svg>',change:{panX:-100}},panRight:{icon:'<svg><path d="M5 12h14M13 18l6-6M13 6l6 6"/></svg>',change:{panX:100}},panUp:{icon:'<svg><path d="M12 5v14M18 11l-6-6M6 11l6-6"/></svg>',change:{panY:-100}},panDown:{icon:'<svg><path d="M12 5v14M18 13l-6 6M6 13l6 6"/></svg>',change:{panY:100}},zoomIn:{icon:'<svg><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M11 8v6M8 11h6"/></svg>',action:"zoomIn"},zoomOut:{icon:'<svg><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"zoomOut"},toggle1to1:{icon:'<svg><path d="M3.51 3.07c5.74.02 11.48-.02 17.22.02 1.37.1 2.34 1.64 2.18 3.13 0 4.08.02 8.16 0 12.23-.1 1.54-1.47 2.64-2.79 2.46-5.61-.01-11.24.02-16.86-.01-1.36-.12-2.33-1.65-2.17-3.14 0-4.07-.02-8.16 0-12.23.1-1.36 1.22-2.48 2.42-2.46Z"/><path d="M5.65 8.54h1.49v6.92m8.94-6.92h1.49v6.92M11.5 9.4v.02m0 5.18v0"/></svg>',action:"toggleZoom"},toggleZoom:{icon:'<svg><g><line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"toggleZoom"},iterateZoom:{icon:'<svg><g><line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"iterateZoom"},rotateCCW:{icon:'<svg><path d="M15 4.55a8 8 0 0 0-6 14.9M9 15v5H4M18.37 7.16v.01M13 19.94v.01M16.84 18.37v.01M19.37 15.1v.01M19.94 11v.01"/></svg>',action:"rotateCCW"},rotateCW:{icon:'<svg><path d="M9 4.55a8 8 0 0 1 6 14.9M15 15v5h5M5.63 7.16v.01M4.06 11v.01M4.63 15.1v.01M7.16 18.37v.01M11 19.94v.01"/></svg>',action:"rotateCW"},flipX:{icon:'<svg style="stroke-width: 1.3"><path d="M12 3v18M16 7v10h5L16 7M8 7v10H3L8 7"/></svg>',action:"flipX"},flipY:{icon:'<svg style="stroke-width: 1.3"><path d="M3 12h18M7 16h10L7 21v-5M7 8h10L7 3v5"/></svg>',action:"flipY"},fitX:{icon:'<svg><path d="M4 12V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v6M10 18H3M21 18h-7M6 15l-3 3 3 3M18 15l3 3-3 3"/></svg>',action:"fitX"},fitY:{icon:'<svg><path d="M12 20H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h6M18 14v7M18 3v7M15 18l3 3 3-3M15 6l3-3 3 3"/></svg>',action:"fitY"},reset:{icon:'<svg><path d="M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/></svg>',action:"reset"},toggleFS:{icon:'<svg><g><path d="M14.5 9.5 21 3m0 0h-6m6 0v6M3 21l6.5-6.5M3 21v-6m0 6h6"/></g><g><path d="m14 10 7-7m-7 7h6m-6 0V4M3 21l7-7m0 0v6m0-6H4"/></g></svg>',action:"toggleFS"}};!function(t){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Disabled=2]="Disabled"}(Ut||(Ut={}));var Kt={tabindex:"-1",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Jt="has-toolbar",Qt="fancybox__toolbar",te=function(_$10){function te(){var _this33;return _classCallCheck(this,te),_this33=_callSuper(this,te,arguments),Object.defineProperty(_assertThisInitialized(_this33),"state",{enumerable:!0,configurable:!0,writable:!0,value:Ut.Init}),Object.defineProperty(_assertThisInitialized(_this33),"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),_this33}return _inherits(te,_$10),_createClass(te,[{key:"onReady",value:function(t){var e;if(t.carousel){var i=this.option("display"),n=this.option("absolute"),s=this.option("enabled");if("auto"===s){var _t55=this.instance.carousel,_e51=0;if(_t55){var _step29,_iterator29=_createForOfIteratorHelper(_t55.slides);try{for(_iterator29.s();!(_step29=_iterator29.n()).done;){var _i65=_step29.value;(_i65.panzoom||"image"===_i65.type)&&_e51++}}catch(err){_iterator29.e(err)}finally{_iterator29.f()}}_e51||(s=!1)}s||(i=void 0);var o=0,a={left:[],middle:[],right:[]};if(i)for(var _i66=0,_arr6=["left","middle","right"];_i66<_arr6.length;_i66++){var _step30,_t56=_arr6[_i66],_iterator30=_createForOfIteratorHelper(i[_t56]);try{for(_iterator30.s();!(_step30=_iterator30.n()).done;){var _n23=_step30.value,_i67=this.createEl(_n23);_i67&&(null===(e=a[_t56])||void 0===e||e.push(_i67),o++)}}catch(err){_iterator30.e(err)}finally{_iterator30.f()}}
1var r=null;if(o&&(r=this.createContainer()),r){for(var _i68=0,_Object$entries6=Object.entries(a);_i68<_Object$entries6.length;_i68++){var _Object$entries6$_i=_slicedToArray(_Object$entries6[_i68],2),_t57=_Object$entries6$_i[0],_e52=_Object$entries6$_i[1],_i69=document.createElement("div");C(_i69,Qt+"__column is-"+_t57);var _step31,_iterator31=_createForOfIteratorHelper(_e52);try{for(_iterator31.s();!(_step31=_iterator31.n()).done;){var _t58=_step31.value;_i69.appendChild(_t58)}}catch(err){_iterator31.e(err)}finally{_iterator31.f()}"auto"!==n||"middle"!==_t57||_e52.length||(n=!0),r.appendChild(_i69)}!0===n&&C(r,"is-absolute"),this.state=Ut.Ready,this.onRefresh()}else this.state=Ut.Disabled}}},{key:"onClick",value:function(t){var e,i,n=this.instance,s=n.getSlide(),o=null==s?void 0:s.panzoom,a=t.target,r=a&&S(a)?a.dataset:null;if(r){if(void 0!==r.fancyboxToggleThumbs)return t.preventDefault(),t.stopPropagation(),void(null===(e=n.plugins.Thumbs)||void 0===e||e.toggle());if(void 0!==r.fancyboxToggleFullscreen)return t.preventDefault(),t.stopPropagation(),void this.instance.toggleFullscreen();if(void 0!==r.fancyboxToggleSlideshow){t.preventDefault(),t.stopPropagation();var _e53=null===(i=n.carousel)||void 0===i?void 0:i.plugins.Autoplay,_s15=_e53.isActive;return o&&"mousemove"===o.panMode&&!_s15&&o.reset(),void(_s15?_e53.stop():_e53.start())}var l=r.panzoomAction,c=r.panzoomChange;if((c||l)&&(t.preventDefault(),t.stopPropagation()),c){var _t59={};try{_t59=JSON.parse(c)}catch(t){}o&&o.applyChange(_t59)}else l&&o&&o[l]&&o[l]()}}},{key:"onChange",value:function(){this.onRefresh()}},{key:"onRefresh",value:function(){if(!this.instance.isClosing()){var t=this.container;if(t){var e=this.instance.getSlide();if(e&&e.state===ct.Ready){var _step32,i=e&&!e.error&&e.panzoom,_iterator32=_createForOfIteratorHelper(t.querySelectorAll("[data-panzoom-action]"));try{for(_iterator32.s();!(_step32=_iterator32.n()).done;){var _e54=_step32.value;i?(_e54.removeAttribute("disabled"),_e54.removeAttribute("tabindex")):(_e54.setAttribute("disabled",""),_e54.setAttribute("tabindex","-1"))}}catch(err){_iterator32.e(err)}finally{_iterator32.f()}var _step33,n=i&&i.canZoomIn(),s=i&&i.canZoomOut(),_iterator33=_createForOfIteratorHelper(t.querySelectorAll('[data-panzoom-action="zoomIn"]'));try{for(_iterator33.s();!(_step33=_iterator33.n()).done;){var _e55=_step33.value;n?(_e55.removeAttribute("disabled"),_e55.removeAttribute("tabindex")):(_e55.setAttribute("disabled",""),_e55.setAttribute("tabindex","-1"))}}catch(err){_iterator33.e(err)}finally{_iterator33.f()}var _step34,_iterator34=_createForOfIteratorHelper(t.querySelectorAll('[data-panzoom-action="zoomOut"]'));try{for(_iterator34.s();!(_step34=_iterator34.n()).done;){var _e56=_step34.value;s?(_e56.removeAttribute("disabled"),_e56.removeAttribute("tabindex")):(_e56.setAttribute("disabled",""),_e56.setAttribute("tabindex","-1"))}}catch(err){_iterator34.e(err)}finally{_iterator34.f()}var _step35,_iterator35=_createForOfIteratorHelper(t.querySelectorAll('[data-panzoom-action="toggleZoom"],[data-panzoom-action="iterateZoom"]'));try{for(_iterator35.s();!(_step35=_iterator35.n()).done;){var _e57=_step35.value;s||n?(_e57.removeAttribute("disabled"),_e57.removeAttribute("tabindex")):(_e57.setAttribute("disabled",""),_e57.setAttribute("tabindex","-1"));var _t60=_e57.querySelector("g");_t60&&(_t60.style.display=n?"":"none")}}catch(err){_iterator35.e(err)}finally{_iterator35.f()}}}}}},{key:"onDone",value:function(t,e){var i,_this34=this;null===(i=e.panzoom)||void 0===i||i.on("afterTransform",(function(){_this34.instance.isCurrentSlide(e)&&_this34.onRefresh()})),this.instance.isCurrentSlide(e)&&this.onRefresh()}},{key:"createContainer",value:function(){var t=this.instance.container;if(!t)return null;var e=this.option("parentEl")||t,i=e.querySelector("."+Qt);return i||(i=document.createElement("div"),C(i,Qt),e.prepend(i)),i.addEventListener("click",this.onClick,{passive:!1,capture:!0}),t&&C(t,Jt),this.container=i,i}},{key:"createEl",value:function(t){var _this35=this,e=this.instance,i=e.carousel;if(!i)return null;if("toggleFS"===t)return null;if("fullscreen"===t&&!at())return null;var _step36,n=null,o=i.slides.length||0,a=0,r=0,_iterator36=_createForOfIteratorHelper(i.slides);try{for(_iterator36.s();!(_step36=_iterator36.n()).done;){var _t63=_step36.value;(_t63.panzoom||"image"===_t63.type)&&a++,("image"===_t63.type||_t63.downloadSrc)&&r++}}catch(err){_iterator36.e(err)}finally{_iterator36.f()}if(o<2&&["infobar","prev","next"].includes(t))return n;if(void 0!==Zt[t]&&!a)return null;if("download"===t&&!r)return null;if("thumbs"===t){var _t61=e.plugins.Thumbs;if(!_t61||!_t61.isEnabled)return null}if("slideshow"===t&&(!i.plugins.Autoplay||o<2))return null;if(void 0!==Zt[t]){var _e58=Zt[t];(n=document.createElement("button")).setAttribute("title",this.instance.localize("{{".concat(t.toUpperCase(),"}}"))),C(n,"f-button"),_e58.action&&(n.dataset.panzoomAction=_e58.action),_e58.change&&(n.dataset.panzoomChange=JSON.stringify(_e58.change)),n.appendChild(s(this.instance.localize(_e58.icon)))}else{var _e59=(this.option("items")||[])[t];_e59&&(n=s(this.instance.localize(_e59.tpl)),"function"==typeof _e59.click&&n.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),"function"==typeof _e59.click&&_e59.click.call(_this35,_this35,t)})))}var l=null==n?void 0:n.querySelector("svg");if(l)for(var _i70=0,_Object$entries7=Object.entries(Kt);_i70<_Object$entries7.length;_i70++){var _Object$entries7$_i=_slicedToArray(_Object$entries7[_i70],2),_t62=_Object$entries7$_i[0],_e60=_Object$entries7$_i[1];l.getAttribute(_t62)||l.setAttribute(_t62,String(_e60))}return n}},{key:"removeContainer",value:function(){var t=this.container;t&&t.remove(),this.container=null,this.state=Ut.Disabled;var e=this.instance.container;e&&P(e,Jt)}},{key:"attach",value:function(){var t=this,e=t.instance;e.on("Carousel.initSlides",t.onReady),e.on("done",t.onDone),e.on(["reveal","Carousel.change"],t.onChange),t.onReady(t.
1instance)}},{key:"detach",value:function(){var t=this,e=t.instance;e.off("Carousel.initSlides",t.onReady),e.off("done",t.onDone),e.off(["reveal","Carousel.change"],t.onChange),t.removeContainer()}}]),te}($);Object.defineProperty(te,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{absolute:"auto",display:{left:["infobar"],middle:[],right:["iterateZoom","slideshow","fullscreen","thumbs","close"]},enabled:"auto",items:{infobar:{tpl:'<div class="fancybox__infobar" tabindex="-1"><span data-fancybox-current-index></span>/<span data-fancybox-count></span></div>'},download:{tpl:'<a class="f-button" title="{{DOWNLOAD}}" data-fancybox-download href="javasript:;"><svg><path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5 5-5M12 4v12"/></svg></a>'},prev:{tpl:'<button class="f-button" title="{{PREV}}" data-fancybox-prev><svg><path d="m15 6-6 6 6 6"/></svg></button>'},next:{tpl:'<button class="f-button" title="{{NEXT}}" data-fancybox-next><svg><path d="m9 6 6 6-6 6"/></svg></button>'},slideshow:{tpl:'<button class="f-button" title="{{TOGGLE_SLIDESHOW}}" data-fancybox-toggle-slideshow><svg><g><path d="M8 4v16l13 -8z"></path></g><g><path d="M8 4v15M17 4v15"/></g></svg></button>'},fullscreen:{tpl:'<button class="f-button" title="{{TOGGLE_FULLSCREEN}}" data-fancybox-toggle-fullscreen><svg><g><path d="M4 8V6a2 2 0 0 1 2-2h2M4 16v2a2 2 0 0 0 2 2h2M16 4h2a2 2 0 0 1 2 2v2M16 20h2a2 2 0 0 0 2-2v-2"/></g><g><path d="M15 19v-2a2 2 0 0 1 2-2h2M15 5v2a2 2 0 0 0 2 2h2M5 15h2a2 2 0 0 1 2 2v2M5 9h2a2 2 0 0 0 2-2V5"/></g></svg></button>'},thumbs:{tpl:'<button class="f-button" title="{{TOGGLE_THUMBS}}" data-fancybox-toggle-thumbs><svg><circle cx="5.5" cy="5.5" r="1"/><circle cx="12" cy="5.5" r="1"/><circle cx="18.5" cy="5.5" r="1"/><circle cx="5.5" cy="12" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="18.5" cy="12" r="1"/><circle cx="5.5" cy="18.5" r="1"/><circle cx="12" cy="18.5" r="1"/><circle cx="18.5" cy="18.5" r="1"/></svg></button>'},close:{tpl:'<button class="f-button" title="{{CLOSE}}" data-fancybox-close><svg><path d="m19.5 4.5-15 15M4.5 4.5l15 15"/></svg></button>'}},parentEl:null}});var we,ee={Hash:function(_$11){function Hash(){return _classCallCheck(this,Hash),_callSuper(this,Hash,arguments)}return _inherits(Hash,_$11),_createClass(Hash,[{key:"onReady",value:function(){dt=!1}},{key:"onChange",value:function(t){pt&&clearTimeout(pt);var e=ft().hash,i=gt().hash,n=t.isOpeningSlide(t.getSlide());n&&(ht=i===e?"":i),e&&e!==i&&(pt=setTimeout((function(){try{if(t.state===lt.Ready){var _t64="replaceState";n&&!ut&&(_t64="pushState",ut=!0),window.history[_t64]({},document.title,window.location.pathname+window.location.search+e)}}catch(t){}}),300))}},{key:"onClose",value:function(t){if(pt&&clearTimeout(pt),!dt&&ut)return ut=!1,dt=!1,void window.history.back();if(!dt)try{window.history.replaceState({},document.title,window.location.pathname+window.location.search+(ht||""))}catch(t){}}},{key:"attach",value:function(){var t=this.instance;t.on("ready",this.onReady),t.on(["Carousel.ready","Carousel.change"],this.onChange),t.on("close",this.onClose)}},{key:"detach",value:function(){var t=this.instance;t.off("ready",this.onReady),t.off(["Carousel.ready","Carousel.change"],this.onChange),t.off("close",this.onClose)}}],[{key:"parseURL",value:function(){return gt()}},{key:"startFromUrl",value:function(){mt()}},{key:"destroy",value:function(){window.removeEventListener("hashchange",bt,!1)}}]),Hash}($),Html:zt,Images:xt,Slideshow:Ft,Thumbs:Vt,Toolbar:te},ie="with-fancybox",ne="hide-scrollbar",se="--fancybox-scrollbar-compensate",oe="--fancybox-body-margin",ae="aria-hidden",re="is-using-tab",le="is-animated",ce="is-compact",he="is-loading",de="is-opening",ue="has-caption",pe="disabled",fe="tabindex",ge="download",me="href",ve="src",be=function(t){return"string"==typeof t},ye=function(){var t=window.getSelection();return!!t&&"Range"===t.type},xe=null,Ee=null,Se=0,Pe=0,Ce=0,Te=0,Me=new Map,Oe=0,Ae=function(_m4){function Ae(){var _this36,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return _classCallCheck(this,Ae),_this36=_callSuper(this,Ae,[e]),Object.defineProperty(_assertThisInitialized(_this36),"userSlides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(_assertThisInitialized(_this36),"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(_assertThisInitialized(_this36),"idle",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(_assertThisInitialized(_this36),"idleTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this36),"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this36),"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(_assertThisInitialized(_this36),"ignoreFocusChange",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(_assertThisInitialized(_this36),"startedFs",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(_assertThisInitialized(_this36),"state",{enumerable:!0,configurable:!0,writable:!0,value:lt.Init}),Object.defineProperty(_assertThisInitialized(_this36),"id",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(_assertThisInitialized(_this36),"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this36),"caption",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this36),"footer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this36),"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this36),"lastFocus",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(_assertThisInitialized(_this36),"prevMouseMoveEvent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),we||(we=at()),_this36.id=e.id||++Oe,Me.set(_this36.id,_assertThisInitialized(_this36)),_this36.userSlides=t,_this36.userPlugins=i,queueMicrotask((function(){_this36.init()})),_this36}return _inherits(Ae,_m4),_createClass(Ae,[{key:"isIdle",get:function(){return this.idle}},{key:"isCompact",get:function(){return this.option("compact")}},{key:"init",value:function(){var _this37=this;if(this.state!==lt.Destroy){this.state=lt.Init,this.attachPlugins(Object.assign(Object.assign({}
1,Ae.Plugins),this.userPlugins)),this.emit("init"),this.emit("attachPlugins"),!0===this.option("hideScrollbar")&&function(){if(it){var t=document,e=t.body,i=t.documentElement;if(!e.classList.contains(ne)){var n=window.innerWidth-i.getBoundingClientRect().width,s=parseFloat(window.getComputedStyle(e).marginRight);n<0&&(n=0),i.style.setProperty(se,"".concat(n,"px")),s&&e.style.setProperty(oe,"".concat(s,"px")),e.classList.add(ne)}}}(),this.initLayout(),this.scale();var t=function(){_this37.initCarousel(_this37.userSlides),_this37.state=lt.Ready,_this37.attachEvents(),_this37.emit("ready"),setTimeout((function(){_this37.container&&_this37.container.setAttribute(ae,"false")}),16)};this.option("Fullscreen.autoStart")&&we&&!we.isFullscreen()?we.request().then((function(){_this37.startedFs=!0,t()})).catch((function(){return t()})):t()}}},{key:"initLayout",value:function(){var t,e,_this38=this,i=this.option("parentEl")||document.body,n=s(this.localize(this.option("tpl.main")||""));if(n){if(n.setAttribute("id","fancybox-".concat(this.id)),n.setAttribute("aria-label",this.localize("{{MODAL}}")),n.classList.toggle(ce,this.isCompact),C(n,this.option("mainClass")||""),C(n,de),this.container=n,this.footer=n.querySelector(".fancybox__footer"),i.appendChild(n),C(document.documentElement,ie),xe&&Ee||(xe=document.createElement("span"),C(xe,"fancybox-focus-guard"),xe.setAttribute(fe,"0"),xe.setAttribute(ae,"true"),xe.setAttribute("aria-label","Focus guard"),Ee=xe.cloneNode(),null===(t=n.parentElement)||void 0===t||t.insertBefore(xe,n),null===(e=n.parentElement)||void 0===e||e.append(Ee)),n.addEventListener("mousedown",(function(t){Se=t.pageX,Pe=t.pageY,P(n,re)})),this.option("closeExisting")){var _step37,_iterator37=_createForOfIteratorHelper(Me.values());try{for(_iterator37.s();!(_step37=_iterator37.n()).done;){var _t65=_step37.value;_t65.id!==this.id&&_t65.close()}}catch(err){_iterator37.e(err)}finally{_iterator37.f()}}else this.option("animated")&&(C(n,le),setTimeout((function(){_this38.isClosing()||P(n,le)}),350));this.emit("initLayout")}}},{key:"initCarousel",value:function(t){var _this39=this,e=this.container;if(e){var n=e.querySelector(".fancybox__carousel");if(n){var s=this.carousel=new tt(n,p({},{slides:t,transition:"fade",Panzoom:{lockAxis:this.option("dragToClose")?"xy":"x",infinite:!!this.option("dragToClose")&&"y"},Dots:!1,Navigation:{classes:{container:"fancybox__nav",button:"f-button",isNext:"is-next",isPrev:"is-prev"}},initialPage:this.option("startIndex"),l10n:this.option("l10n")},this.option("Carousel")||{}));s.on("*",(function(t,e){for(var _len5=arguments.length,i=new Array(_len5>2?_len5-2:0),_key5=2;_key5<_len5;_key5++)i[_key5-2]=arguments[_key5];_this39.emit.apply(_this39,["Carousel.".concat(e),t].concat(i))})),s.on(["ready","change"],(function(){_this39.manageCaption()})),this.on("Carousel.removeSlide",(function(t,e,i){_this39.clearContent(i),i.state=void 0})),s.on("Panzoom.touchStart",(function(){var t,e;_this39.isCompact||_this39.endIdle(),(null===(t=document.activeElement)||void 0===t?void 0:t.closest(".f-thumbs"))&&(null===(e=_this39.container)||void 0===e||e.focus())})),s.on("settle",(function(){_this39.idleTimer||_this39.isCompact||!_this39.option("idle")||_this39.setIdle(),_this39.option("autoFocus")&&!_this39.isClosing&&_this39.checkFocus()})),this.option("dragToClose")&&(s.on("Panzoom.afterTransform",(function(t,e){var n=_this39.getSlide();if(!n||!i(n.el)){var s=_this39.container;if(s){var _t66=Math.abs(e.current.f),_i71=_t66<1?"":Math.max(.5,Math.min(1,1-_t66/e.contentRect.fitHeight*1.5));s.style.setProperty("--fancybox-ts",_i71?"0s":""),s.style.setProperty("--fancybox-opacity",_i71+"")}}})),s.on("Panzoom.touchEnd",(function(t,e,n){var s,o=_this39.getSlide();if(!(o&&i(o.el)||e.isMobile&&document.activeElement&&-1!==["TEXTAREA","INPUT"].indexOf(null===(s=document.activeElement)||void 0===s?void 0:s.nodeName))){var a=Math.abs(e.dragOffset.y);"y"===e.lockedAxis&&(a>=200||a>=50&&e.dragOffset.time<300)&&(n&&n.cancelable&&n.preventDefault(),_this39.close(n,"f-throwOut"+(e.current.f<0?"Up":"Down")))}}))),s.on("change",(function(t){var e,i=null===(e=_this39.getSlide())||void 0===e?void 0:e.triggerEl;if(i){var _e61=new CustomEvent("slideTo",{bubbles:!0,cancelable:!0,detail:t.page});i.dispatchEvent(_e61)}})),s.on(["refresh","change"],(function(t){var e=_this39.container;if(e){var _step38,_iterator38=_createForOfIteratorHelper(e.querySelectorAll("[data-fancybox-current-index]"));try{for(_iterator38.s();!(_step38=_iterator38.n()).done;)_step38.value.innerHTML=t.page+1}catch(err){_iterator38.e(err)}finally{_iterator38.f()}var _step39,_iterator39=_createForOfIteratorHelper(e.querySelectorAll("[data-fancybox-count]"));try{for(_iterator39.s();!(_step39=_iterator39.n()).done;)_step39.value.innerHTML=t.pages.length}catch(err){_iterator39.e(err)}finally{_iterator39.f()}if(!t.isInfinite){var _step40,_iterator40=_createForOfIteratorHelper(e.querySelectorAll("[data-fancybox-next]"));try{for(_iterator40.s();!(_step40=_iterator40.n()).done;){var _i72=_step40.value;t.page<t.pages.length-1?(_i72.removeAttribute(pe),_i72.removeAttribute(fe)):(_i72.setAttribute(pe,""),_i72.setAttribute(fe,"-1"))}}catch(err){_iterator40.e(err)}finally{_iterator40.f()}var _step41,_iterator41=_createForOfIteratorHelper(e.querySelectorAll("[data-fancybox-prev]"));try{for(_iterator41.s();!(_step41=_iterator41.n()).done;){var _i73=_step41.value;t.page>0?(_i73.removeAttribute(pe),_i73.removeAttribute(fe)):(_i73.setAttribute(pe,""),_i73.setAttribute(fe,"-1"))}}catch(err){_iterator41.e(err)}finally{_iterator41.f()}}var i=_this39.getSlide();if(i){var n=i.downloadSrc||"";n||"image"!==i.type||i.error||!be(i.src)||(n=i.src);var _step42,_iterator42=_createForOfIteratorHelper(e.querySelectorAll("[data-fancybox-download]"));try{for(_iterator42.s();!(_step42=_iterator42.n()).done;){var _t67=_step42.value,_e62=i.downloadFilename;n?(_t67.removeAttribute(pe),_t67.removeAttribute(fe),_t67.setAttribute(me,n),_t67.setAttribute(ge,_e62||n),_t67.setAttribute("target","_blank")):(_t67.setAttribute(pe,""),_t67.setAttribute(fe,"-1"),_t67.removeAttribute(me),_t67.removeAttribute(ge))}}catch(err){_iterator42.e(err)}finally{_iterator42.f()}}}}
1)),this.emit("initCarousel")}}}},{key:"attachEvents",value:function(){var t=this,e=t.container;if(e){e.addEventListener("click",t.onClick,{passive:!1,capture:!1}),e.addEventListener("wheel",t.onWheel,{passive:!1,capture:!1}),document.addEventListener("keydown",t.onKeydown,{passive:!1,capture:!0}),document.addEventListener("visibilitychange",t.onVisibilityChange,!1),document.addEventListener("mousemove",t.onMousemove),t.option("trapFocus")&&document.addEventListener("focus",t.onFocus,!0),window.addEventListener("resize",t.onResize);var i=window.visualViewport;i&&(i.addEventListener("scroll",t.onResize),i.addEventListener("resize",t.onResize))}}},{key:"detachEvents",value:function(){var t=this,e=t.container;if(e){document.removeEventListener("keydown",t.onKeydown,{passive:!1,capture:!0}),e.removeEventListener("wheel",t.onWheel,{passive:!1,capture:!1}),e.removeEventListener("click",t.onClick,{passive:!1,capture:!1}),document.removeEventListener("mousemove",t.onMousemove),window.removeEventListener("resize",t.onResize);var i=window.visualViewport;i&&(i.removeEventListener("resize",t.onResize),i.removeEventListener("scroll",t.onResize)),document.removeEventListener("visibilitychange",t.onVisibilityChange,!1),document.removeEventListener("focus",t.onFocus,!0)}}},{key:"scale",value:function(){var t=this.container;if(t){var e=window.visualViewport,i=Math.max(1,(null==e?void 0:e.scale)||1),n="",s="",o="";if(e&&i>1){var _t68="".concat(e.offsetLeft,"px"),_a10="".concat(e.offsetTop,"px");n=e.width*i+"px",s=e.height*i+"px",o="translate3d(".concat(_t68,", ").concat(_a10,", 0) scale(").concat(1/i,")")}t.style.transform=o,t.style.width=n,t.style.height=s}}},{key:"onClick",value:function(t){var e,_this40=this,i=this.container,n=this.isCompact;if(i&&!this.isClosing()){!n&&this.option("idle")&&this.resetIdle();var s=t.composedPath()[0];if(s.closest(".fancybox-spinner")||s.closest("[data-fancybox-close]"))return t.preventDefault(),void this.close(t);if(s.closest("[data-fancybox-prev]"))return t.preventDefault(),void this.prev();if(s.closest("[data-fancybox-next]"))return t.preventDefault(),void this.next();if(("click"!==t.type||0!==t.detail)&&!(Math.abs(t.pageX-Se)>30||Math.abs(t.pageY-Pe)>30)){var o=document.activeElement;if(!(ye()&&o&&i.contains(o)))if(n&&"image"===(null===(e=this.getSlide())||void 0===e?void 0:e.type))this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null):this.clickTimer=setTimeout((function(){_this40.toggleIdle(),_this40.clickTimer=null}),350);else if(this.emit("click",t),!t.defaultPrevented){var a=!1;if(s.closest(".fancybox__content")){if(o){if(o.closest("[contenteditable]"))return;s.matches(st)||o.blur()}if(ye())return;a=this.option("contentClick")}else s.closest(".fancybox__carousel")&&!s.matches(st)&&(a=this.option("backdropClick"));"close"===a?(t.preventDefault(),this.close(t)):"next"===a?(t.preventDefault(),this.next()):"prev"===a&&(t.preventDefault(),this.prev())}}}}},{key:"onWheel",value:function(t){var e=t.target,i=this.option("wheel",t);e.closest(".fancybox__thumbs")&&(i="slide");var s="slide"===i,o=[-t.deltaX||0,-t.deltaY||0,-t.detail||0].reduce((function(t,e){return Math.abs(e)>Math.abs(t)?e:t})),a=Math.max(-1,Math.min(1,o)),r=Date.now();this.pwt&&r-this.pwt<300?s&&t.preventDefault():(this.pwt=r,this.emit("wheel",t,a),t.defaultPrevented||("close"===i?(t.preventDefault(),this.close(t)):"slide"===i&&(n(e)||(t.preventDefault(),this[a>0?"prev":"next"]()))))}},{key:"onScroll",value:function(){window.scrollTo(Ce,Te)}},{key:"onKeydown",value:function(t){if(this.isTopmost()){this.isCompact||!this.option("idle")||this.isClosing()||this.resetIdle();var e=t.key,i=this.option("keyboard");if(i){var n=t.composedPath()[0],s=document.activeElement&&document.activeElement.classList,o=s&&s.contains("f-button")||n.dataset.carouselPage||n.dataset.carouselIndex;if(("Escape"===e||o||!S(n)||!n.isContentEditable&&-1===["TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(n.nodeName))&&("Tab"===t.key?C(this.container,re):P(this.container,re),!(t.ctrlKey||t.altKey||t.shiftKey))){this.emit("keydown",e,t);var a=i[e];a&&"function"==typeof this[a]&&(t.preventDefault(),this[a]())}}}}},{key:"onResize",value:function(){var t=this.container;if(t){var e=this.isCompact;t.classList.toggle(ce,e),this.manageCaption(this.getSlide()),this.isCompact?this.clearIdle():this.endIdle(),this.scale(),this.emit
1("resize")}}},{key:"onFocus",value:function(t){this.isTopmost()&&this.checkFocus(t)}},{key:"onMousemove",value:function(t){this.prevMouseMoveEvent=t,!this.isCompact&&this.option("idle")&&this.resetIdle()}},{key:"onVisibilityChange",value:function(){"visible"===document.visibilityState?this.checkFocus():this.endIdle()}},{key:"manageCloseBtn",value:function(t){var e=this.optionFor(t,"closeButton")||!1;if("auto"===e){var _t69=this.plugins.Toolbar;if(_t69&&_t69.state===Ut.Ready)return}if(e&&t.contentEl&&!t.closeBtnEl){var i=this.option("tpl.closeButton");if(i){var _e63=s(this.localize(i));t.closeBtnEl=t.contentEl.appendChild(_e63),t.el&&C(t.el,"has-close-btn")}}}},{key:"manageCaption",value:function(){var e,i,_this41=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n="fancybox__caption",s=this.container;if(s){P(s,ue);var o=this.isCompact||this.option("commonCaption"),a=!o;if(this.caption&&this.stop(this.caption),a&&this.caption&&(this.caption.remove(),this.caption=null),o&&!this.caption){var _step43,_iterator43=_createForOfIteratorHelper((null===(e=this.carousel)||void 0===e?void 0:e.slides)||[]);try{for(_iterator43.s();!(_step43=_iterator43.n()).done;){var _t70=_step43.value;_t70.captionEl&&(_t70.captionEl.remove(),_t70.captionEl=void 0,P(_t70.el,ue),null===(i=_t70.el)||void 0===i||i.removeAttribute("aria-labelledby"))}}catch(err){_iterator43.e(err)}finally{_iterator43.f()}}if(t||(t=this.getSlide()),t&&(!o||this.isCurrentSlide(t))){var r=t.el,l=this.optionFor(t,"caption","");if(l){var c=null;if(a){if(c=t.captionEl||null,r&&!c){var _e64=n+"_".concat(this.id,"_").concat(t.index);c=document.createElement("div"),C(c,n),c.setAttribute("id",_e64),t.captionEl=r.appendChild(c),C(r,ue),r.setAttribute("aria-labelledby",_e64)}}else(c=this.caption)||(c=s.querySelector("."+n)),c||((c=document.createElement("div")).dataset.fancyboxCaption="",C(c,n),(this.footer||s).prepend(c)),C(s,ue),this.caption=c;c&&(c.innerHTML="",be(l)||"number"==typeof l?c.innerHTML=l+"":l instanceof HTMLElement&&c.appendChild(l))}else o&&this.caption&&this.animate(this.caption,"f-fadeOut",(function(){_this41.caption&&(_this41.caption.innerHTML="")}))}}}},{key:"checkFocus",value:function(t){this.focus(t)}},{key:"focus",value:function(t){var e;if(!this.ignoreFocusChange){var i=document.activeElement||null,n=(null==t?void 0:t.target)||null,s=this.container,o=null===(e=this.carousel)||void 0===e?void 0:e.viewport;if(s&&o&&(t||!i||!s.contains(i))){var a=this.getSlide(),r=a&&a.state===ct.Ready?a.el:null;if(r&&!r.contains(i)&&s!==i){t&&t.cancelable&&t.preventDefault(),this.ignoreFocusChange=!0;for(var c=[],h=null,_i76=0,_l5=Array.from(s.querySelectorAll(st));_i76<_l5.length;_i76++){var _t71=_l5[_i76],_e65=!_t71.offsetParent||!!_t71.closest('[aria-hidden="true"]'),_i77=r&&r.contains(_t71),_n24=!o.contains(_t71);if(_t71===s||(_i77||_n24)&&!_e65){c.push(_t71);var _e66=_t71.dataset.origTabindex;void 0!==_e66&&_e66&&(_t71.tabIndex=parseFloat(_e66)),_t71.removeAttribute("data-orig-tabindex"),!_t71.hasAttribute("autoFocus")&&h||(h=_t71)}else{var _e67=void 0===_t71.dataset.origTabindex?_t71.getAttribute("tabindex")||"":_t71.dataset.origTabindex;_e67&&(_t71.dataset.origTabindex=_e67),_t71.tabIndex=-1}}var d=null;t?(!n||c.indexOf(n)<0)&&(d=h||s,c.length&&(i===Ee?d=c[0]:this.lastFocus!==s&&i!==xe||(d=c[c.length-1]))):d=a&&"image"===a.type?s:h||s,d&&ot(d),this.lastFocus=document.activeElement,this.ignoreFocusChange=!1}}}}},{key:"next",value:function(){var t=this.carousel;t&&t.pages.length>1&&t.slideNext()}},{key:"prev",value:function(){var t=this.carousel;t&&t.pages.length>1&&t.slidePrev()}},{key:"jumpTo",value:function(){var _this$carousel;this.carousel&&(_this$carousel=this.carousel).slideTo.apply(_this$carousel,arguments)}},{key:"isTopmost",value:function(){var t;return(null===(t=Ae.getInstance())||void 0===t?void 0:t.id)==this.id}},{key:"animate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0;if(t&&e){this.stop(t);var n=function n(s){s.target===t&&t.dataset.animationName&&(t.removeEventListener("animationend",n),delete t.dataset.animationName,i&&i(),P(t,e))};t.dataset.animationName=e,t.addEventListener("animationend",n),C(t,e)}else i&&i()}},{key:"stop",value:function(t){t&&t.dispatchEvent(new CustomEvent("animationend",{bubbles:!1,cancelable:!0,currentTarget:t}))}},{key:"setContent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!this.isClosing()){var n=t.el;if(n){var o=null;
1if(S(e)?o=e:(o=s(e+""),S(o)||((o=document.createElement("div")).innerHTML=e+"")),["img","picture","iframe","video","audio"].includes(o.nodeName.toLowerCase())){var _t72=document.createElement("div");_t72.appendChild(o),o=_t72}S(o)&&t.filter&&!t.error&&(o=o.querySelector(t.filter)),o&&S(o)?(C(o,"fancybox__content"),t.id&&o.setAttribute("id",t.id),n.classList.add("has-".concat(t.error?"error":t.type||"unknown")),n.prepend(o),"none"===o.style.display&&(o.style.display=""),"none"===getComputedStyle(o).getPropertyValue("display")&&(o.style.display=t.display||this.option("defaultDisplay")||"flex"),t.contentEl=o,i&&this.revealContent(t),this.manageCloseBtn(t),this.manageCaption(t)):this.setError(t,"{{ELEMENT_NOT_FOUND}}")}}}},{key:"revealContent",value:function(t,e){var _this42=this,i=t.el,n=t.contentEl;i&&n&&(this.emit("reveal",t),this.hideLoading(t),t.state=ct.Opening,(e=this.isOpeningSlide(t)?void 0===e?this.optionFor(t,"showClass"):e:"f-fadeIn")?this.animate(n,e,(function(){_this42.done(t)})):this.done(t))}},{key:"done",value:function(t){var _this43=this;this.isClosing()||(t.state=ct.Ready,this.emit("done",t),C(t.el,"is-done"),this.isCurrentSlide(t)&&this.option("autoFocus")&&queueMicrotask((function(){var e;null===(e=t.panzoom)||void 0===e||e.updateControls(),_this43.option("autoFocus")&&_this43.focus()})),this.isOpeningSlide(t)&&(P(this.container,de),!this.isCompact&&this.option("idle")&&this.setIdle()))}},{key:"isCurrentSlide",value:function(t){var e=this.getSlide();return!(!t||!e)&&e.index===t.index}},{key:"isOpeningSlide",value:function(t){var e,i;return null===(null===(e=this.carousel)||void 0===e?void 0:e.prevPage)&&t&&t.index===(null===(i=this.getSlide())||void 0===i?void 0:i.index)}},{key:"showLoading",value:function(t){var _this44=this;t.state=ct.Loading;var e=t.el;e&&(C(e,he),this.emit("loading",t),t.spinnerEl||setTimeout((function(){if(!_this44.isClosing()&&!t.spinnerEl&&t.state===ct.Loading){var _i78=s(E);C(_i78,"fancybox-spinner"),t.spinnerEl=_i78,e.prepend(_i78),_this44.animate(_i78,"f-fadeIn")}}),250))}},{key:"hideLoading",value:function(t){var e=t.el;if(e){var i=t.spinnerEl;this.isClosing()?null==i||i.remove():(P(e,he),i&&this.animate(i,"f-fadeOut",(function(){i.remove()}
1)),t.state===ct.Loading&&(this.emit("loaded",t),t.state=ct.Ready))}}},{key:"setError",value:function(t,e){if(!this.isClosing()){var i=new Event("error",{bubbles:!0,cancelable:!0});if(this.emit("error",i,t),!i.defaultPrevented){t.error=e,this.hideLoading(t),this.clearContent(t);var n=document.createElement("div");n.classList.add("fancybox-error"),n.innerHTML=this.localize(e||"<p>{{ERROR}}</p>"),this.setContent(t,n)}}}},{key:"clearContent",value:function(t){if(void 0!==t.state){this.emit("clearContent",t),t.contentEl&&(t.contentEl.remove(),t.contentEl=void 0);var e=t.el;e&&(P(e,"has-error"),P(e,"has-unknown"),P(e,"has-".concat(t.type||"unknown"))),t.closeBtnEl&&t.closeBtnEl.remove(),t.closeBtnEl=void 0,t.captionEl&&t.captionEl.remove(),t.captionEl=void 0,t.spinnerEl&&t.spinnerEl.remove(),t.spinnerEl=void 0}}},{key:"getSlide",value:function(){var t,e=this.carousel;return(null===(t=null==e?void 0:e.pages[null==e?void 0:e.page])||void 0===t?void 0:t.slides[0])||void 0}},{key:"close",value:function(t,e){var _this45=this;if(!this.isClosing()){var i=new Event("shouldClose",{bubbles:!0,cancelable:!0});if(this.emit("shouldClose",i,t),!i.defaultPrevented){t&&t.cancelable&&(t.preventDefault(),t.stopPropagation());var n=function(){_this45.proceedClose(t,e)};this.startedFs&&we&&we.isFullscreen()?Promise.resolve(we.exit()).then((function(){return n()})):n()}}}},{key:"clearIdle",value:function(){this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=null}},{key:"setIdle",value:function(){var _this46=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=function(){_this46.clearIdle(),_this46.idle=!0,C(_this46.container,"is-idle"),_this46.emit("setIdle")};if(this.clearIdle(),!this.isClosing())if(t)e();else{var _t73=this.option("idle");_t73&&(this.idleTimer=setTimeout(e,_t73))}}},{key:"endIdle",value:function(){this.clearIdle(),this.idle&&!this.isClosing()&&(this.idle=!1,P(this.container,"is-idle"),this.emit("endIdle"))}},{key:"resetIdle",value:function(){this.endIdle(),this.setIdle()}},{key:"toggleIdle",value:function(){this.idle?this.endIdle():this.setIdle(!0)}},{key:"toggleFullscreen",value:function(){var _this47=this;we&&(we.isFullscreen()?we.exit():we.request().then((function(){_this47.startedFs=!0})))}},{key:"isClosing",value:function(){return[lt.Closing,lt.CustomClosing,lt.Destroy].includes(this.state)}},{key:"proceedClose",value:function(t,e){var i,n,_this48=this;this.state=lt.Closing,this.clearIdle(),this.detachEvents();var s=this.container,o=this.carousel,a=this.getSlide(),r=a&&this.option("placeFocusBack")?a.triggerEl||this.option("triggerEl"):null;if(r&&(et(r)?ot(r):r.focus()),s&&(P(s,de),C(s,"is-closing"),s.setAttribute(ae,"true"),this.option("animated")&&C(s,le),s.style.pointerEvents="none"),o){o.clearTransitions(),null===(i=o.panzoom)||void 0===i||i.destroy(),null===(n=o.plugins.Navigation)||void 0===n||n.detach();var _step44,_iterator44=_createForOfIteratorHelper(o.slides);try{for(_iterator44.s();!(_step44=_iterator44.n()).done;){var _t74=_step44.value;_t74.state=ct.Closing,this.hideLoading(_t74);var _e68=_t74.contentEl;_e68&&this.stop(_e68);var _i79=null==_t74?void 0:_t74.panzoom;_i79&&(_i79.stop(),_i79.detachEvents(),_i79.detachObserver()),this.isCurrentSlide(_t74)||o.emit("removeSlide",_t74)}}catch(err){_iterator44.e(err)}finally{_iterator44.f()}}Ce=window.scrollX,Te=window.scrollY,window.addEventListener("scroll",this.onScroll),this.emit("close",t),this.state!==lt.CustomClosing?(void 0===e&&a&&(e=this.optionFor(a,"hideClass")),e&&a?(this.animate(a.contentEl,e,(function(){o&&o.emit("removeSlide",a)})),setTimeout((function(){_this48.destroy()}),500)):this.destroy()):setTimeout((function(){_this48.destroy()}),500)}},{key:"destroy",value:function(){var t;if(this.state!==lt.Destroy){window.removeEventListener("scroll",this.onScroll),this.state=lt.Destroy,null===(t=this.carousel)||void 0===t||t.destroy();var e=this.container;e&&e.remove(),Me.delete(this.id);var i=Ae.getInstance();i?i.focus():(xe&&(xe.remove(),xe=null),Ee&&(Ee.remove(),Ee=null),P(document.documentElement,ie),function(){if(it){var t=document,e=t.body;e.classList.remove(ne),e.style.setProperty(oe,""),t.documentElement.style.setProperty(se,"")}}
1(),this.emit("destroy"))}}}],[{key:"bind",value:function(t,e,i){if(it){var n,s="",o={};if(void 0===t?n=document.body:be(t)?(n=document.body,s=t,"object"==_typeof(e)&&(o=e||{})):(n=t,be(e)&&(s=e),"object"==_typeof(i)&&(o=i||{})),n&&S(n)){s=s||"[data-fancybox]";var a=Ae.openers.get(n)||new Map;a.set(s,o),Ae.openers.set(n,a),1===a.size&&n.addEventListener("click",Ae.fromEvent)}}}},{key:"unbind",value:function(t,e){var i,n="";if(be(t)?(i=document.body,n=t):(i=t,be(e)&&(n=e)),i){var s=Ae.openers.get(i);s&&n&&s.delete(n),n&&s||(Ae.openers.delete(i),i.removeEventListener("click",Ae.fromEvent))}}},{key:"destroy",value:function(){for(var t;t=Ae.getInstance();)t.destroy();var _step45,_iterator45=_createForOfIteratorHelper(Ae.openers.keys());try{for(_iterator45.s();!(_step45=_iterator45.n()).done;)_step45.value.removeEventListener("click",Ae.fromEvent)}catch(err){_iterator45.e(err)}finally{_iterator45.f()}Ae.openers=new Map}},{key:"fromEvent",value:function(t){if(!t.defaultPrevented&&!(t.button&&0!==t.button||t.ctrlKey||t.metaKey||t.shiftKey)){var n,s,o,a,e=t.composedPath()[0],i=e.closest("[data-fancybox-trigger]");if(i){var _t76=i.dataset.fancyboxTrigger||"",_n25=document.querySelectorAll('[data-fancybox="'.concat(_t76,'"]')),_s16=parseInt(i.dataset.fancyboxIndex||"",10)||0;e=_n25[_s16]||e}if(e&&e instanceof Element&&(_toConsumableArray(Ae.openers).reverse().find((function(_ref9){var _ref10=_slicedToArray(_ref9,2),t=_ref10[0],i=_ref10[1];return!(!t.contains(e)||!_toConsumableArray(i).reverse().find((function(_ref11){var _ref12=_slicedToArray(_ref11,2),i=_ref12[0],r=_ref12[1],l=e.closest(i);return!!l&&(n=t,s=i,o=l,a=r,!0)})))})),n&&s&&o)){a=a||{},t.preventDefault(),e=o;var r=[],l=p({},rt,a);l.event=t,l.triggerEl=e,l.delegate=i;var c=l.groupAll,h=l.groupAttr,d=h&&e?e.getAttribute("".concat(h)):"";if((!e||d||c)&&(r=[].slice.call(n.querySelectorAll(s))),e&&!c&&(r=d?r.filter((function(t){return t.getAttribute("".concat(h))===d})):[e]),r.length){var u=Ae.getInstance();return u&&u.options.triggerEl&&r.indexOf(u.options.triggerEl)>-1?void 0:(e&&(l.startIndex=r.indexOf(e)),Ae.fromNodes(r,l))}}}}},{key:"fromSelector",value:function(t,e,i){var n=null,s="",o={};if(be(t)?(n=document.body,s=t,"object"==_typeof(e)&&(o=e||{})):t instanceof HTMLElement&&be(e)&&(n=t,s=e,"object"==_typeof(i)&&(o=i||{})),!n||!s)return!1;var a=Ae.openers.get(n);return!!a&&!!(o=p({},a.get(s)||{},o))&&Ae.fromNodes(Array.from(n.querySelectorAll(s)),o)}},{key:"fromNodes",value:function(t,e){e=p({},rt,e||{});var _step46,i=[],_iterator46=_createForOfIteratorHelper(t);try{for(_iterator46.s();!(_step46=_iterator46.n()).done;){var _n26=_step46.value,_t77=_n26.dataset||{},_s17=_t77.src||_n26.getAttribute(me)||_n26.getAttribute("currentSrc")||_n26.getAttribute(ve)||void 0,_o14=void 0,_a11=e.delegate,_r4=void 0;_a11&&i.length===e.startIndex&&(_o14=_a11 instanceof HTMLImageElement?_a11:_a11.querySelector("img:not([aria-hidden])")),_o14||(_o14=_n26 instanceof HTMLImageElement?_n26:_n26.querySelector("img:not([aria-hidden])")),_o14&&!(_r4=_o14.currentSrc||_o14.src||void 0)&&_o14.dataset&&(_r4=_o14.dataset.lazySrc||_o14.dataset.src||void 0);var _l6={src:_s17,triggerEl:_n26,thumbEl:_o14,thumbElSrc:_r4,thumbSrc:_r4};for(var _e69 in _t77){var _i80=_t77[_e69]+"";_i80="false"!==_i80&&("true"===_i80||_i80),_l6[_e69]=_i80}i.push(_l6)}}catch(err){_iterator46.e(err)}finally{_iterator46.f()}return new Ae(i,e)}},{key:"getInstance",value:function(t){return t?Me.get(t):Array.from(Me.values()).reverse().find((function(t){return!t.isClosing()&&t}))||null}},{key:"getSlide",value:function(){var t;return(null===(t=Ae.getInstance())||void 0===t?void 0:t.getSlide())||null}},{key:"show",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Ae(t,e)}},{key:"next",value:function(){var t=Ae.getInstance();t&&t.next()}},{key:"prev",value:function(){var t=Ae.getInstance();t&&t.prev()}},{key:"close",value:function(){for(var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],_len6=arguments.length,e=new Array(_len6>1?_len6-1:0),_key6=1;_key6<_len6;_key6++)e[_key6-1]=arguments[_key6];if(t){var _step47,_iterator47=_createForOfIteratorHelper(Me.values());try{for(_iterator47.s();!(_step47=_iterator47.n()).done;){var _t78=_step47.value;_t78.close.apply(_t78,e)}}catch(err){_iterator47.e(err)}finally{_iterator47.f()}}else{var _t79=Ae.getInstance();_t79&&_t79.close.apply(_t79,e)}}}]),Ae}(m);Object.defineProperty(Ae,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.36"}
1),Object.defineProperty(Ae,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:rt}),Object.defineProperty(Ae,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:ee}),Object.defineProperty(Ae,"openers",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),t.Carousel=tt,t.Fancybox=Ae,t.Panzoom=D},"object"==(void 0===exports?"undefined":_typeof(exports))&&void 0!==module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).window=t.window||{})},{}],13:[function(require,module,exports){"use strict";function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var n;n=function(){function n(t,n){for(var e=t.length,r=e,o=[];e--;)o.push(n(t[r-e-1]));return o}function e(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(window.Promise)return A(t,n,e);t.recalculate(!0,!0)}function i(t){var n=t.useContainerForBreakpoints?t.container.clientWidth:window.innerWidth,e={columns:t.columns};b(t.margin)?e.margin={x:t.margin.x,y:t.margin.y}:e.margin={x:t.margin,y:t.margin};var i=Object.keys(t.breakAt);return t.mobileFirst?function(t){for(var n=t.options,e=t.responsiveOptions,r=t.keys,o=t.docWidth,i=void 0,s=0;s<r.length;s++){var a=parseInt(r[s],10);o>=a&&(i=n.breakAt[a],O(i,e))}return e}({options:t,responsiveOptions:e,keys:i,docWidth:n}):function(t){for(var n=t.options,e=t.responsiveOptions,r=t.keys,o=t.docWidth,i=void 0,s=r.length-1;s>=0;s--){var a=parseInt(r[s],10);o<=a&&(i=n.breakAt[a],O(i,e))}return e}({options:t,responsiveOptions:e,keys:i,docWidth:n})}function s(t){return i(t).columns}function a(t){return i(t).margin}function c(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],e=s(t),r=a(t).x,o=100/e;if(!n)return o;if(1===e)return"100%";var i="px";if("string"==typeof r){var c=parseFloat(r);i=r.replace(c,""),r=c}return r=(e-1)*r/e,"%"===i?o-r+"%":"calc("+o+"% - "+r+i+")"}function u(t,n){var o,e=s(t.options),r=0,i=void 0;if(1==++n)return 0;var u="px";if("string"==typeof(i=a(t.options).x)){var l=parseFloat(i,10);u=i.replace(l,""),i=l}return o=(i-(e-1)*i/e)*(n-1),r+=c(t.options,!1)*(n-1),"%"===u?r+o+"%":"calc("+r+"% + "+o+u+")"}function l(t){var n=0,e=t.container,r=t.rows;v(r,(function(t){n=t>n?t:n})),e.style.height=n+"px"}function p(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=s(t.options),i=a(t.options).y;M(t,o,e),v(n,(function(n){var e=0,o=parseInt(n.offsetHeight,10);isNaN(o)||(t.rows.forEach((function(n,r){n<t.rows[e]&&(e=r)})),n.style.position="absolute",n.style.top=t.rows[e]+"px",n.style.left=""+t.cols[e],t.rows[e]+=isNaN(o)?0:o+i,r&&(n.dataset.macyComplete=1))})),r&&(t.tmpRows=null),l(t)}function f(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=s(t.options),i=a(t.options).y;M(t,o,e),v(n,(function(n){t.lastcol===o&&(t.lastcol=0);var e=C(n,"height");e=parseInt(n.offsetHeight,10),isNaN(e)||(n.style.position="absolute",n.style.top=t.rows[t.lastcol]+"px",n.style.left=""+t.cols[t.lastcol],t.rows[t.lastcol]+=isNaN(e)?0:e+i,t.lastcol+=1,r&&(n.dataset.macyComplete=1))})),r&&(t.tmpRows=null),l(t)}var h=function t(n,e){if(!(this instanceof t))return new t(n,e);if(n&&n.nodeName)return n;if(n=n.replace(/^\s*/,"").replace(/\s*$/,""),e)return this.byCss(n,e);for(var r in this.selectors)if(e=r.split("/"),new RegExp(e[1],e[2]).test(n))return this.selectors[r](n);return this.byCss(n)};h.prototype.byCss=function(t,n){return(n||document).querySelectorAll(t)},h.prototype.selectors={},h.prototype.selectors[/^\.[\w\-]+$/]=function(t){return document.getElementsByClassName(t.substring(1))},h.prototype.selectors[/^\w+$/]=function(t){return document.getElementsByTagName(t)},h.prototype.selectors[/^\#[\w\-]+$/]=function(t){return document.getElementById(t.substring(1))};var v=function(t,n){for(var e=t.length,r=e;e--;)n(t[r-e-1])},m=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.running=!1,this.events=[],this.add(t)};m.prototype.run=function(){if(!this.running&&this.events.length>0){var t=this.events.shift();this.running=!0,t(),this.running=!1,this.run()}},m.prototype.add=function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return!!n&&(Array.isArray(n)?v(n,(function(n){return t.add(n)})):(this.events.push(n),void this.run()))},m.prototype.clear=function(){this.events=[]};var d=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.instance=t,this.data=n,this},y=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.events={},this.instance=t};y.prototype.on=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!(!t||!n)&&(Array.isArray(this.events[t])||(this.events[t]=[]),this.events[t].push(n))},y.prototype.emit=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t||!Array.isArray(this.events[t]))return!1;var e=new d(this.instance,n);v(this.events[t],(function(t){return t(e)}))};var g=function(t){return!("naturalHeight"in t&&t.naturalHeight+t.naturalWi
1dth===0)||t.width+t.height!==0},E=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(t,e){if(n.complete)return g(n)?t(n):e(n);n.addEventListener("load",(function(){return g(n)?t(n):e(n)})),n.addEventListener("error",(function(){return e(n)}))})).then((function(n){e&&t.emit(t.constants.EVENT_IMAGE_LOAD,{img:n})})).catch((function(n){return t.emit(t.constants.EVENT_IMAGE_ERROR,{img:n})}))},w=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return n(e,(function(n){return E(t,n,r)}))},A=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Promise.all(w(t,n,e)).then((function(){t.emit(t.constants.EVENT_IMAGE_COMPLETE)}))},I=function(n){return function(t,n){var e=void 0;return function(){e&&clearTimeout(e),e=setTimeout(t,n)}}((function(){n.emit(n.constants.EVENT_RESIZE),n.queue.add((function(){return n.recalculate(!0,!0)}))}),100)},_=function(t){(function(t){if(t.container=h(t.options.container),t.container instanceof h||!t.container)return!!t.options.debug&&console.error("Error: Container not found");t.container.length&&(t.container=t.container[0]),t.options.container=t.container,t.container.style.position="relative"})(t),function(t){t.queue=new m,t.events=new y(t),t.rows=[],t.resizer=I(t)}(t),function(t){var n=h("img",t.container);window.addEventListener("resize",t.resizer),t.on(t.constants.EVENT_IMAGE_LOAD,(function(){return t.recalculate(!1,!1)})),t.on(t.constants.EVENT_IMAGE_COMPLETE,(function(){return t.recalculate(!0,!0)})),t.options.useOwnImageLoader||e(t,n,!t.options.waitForImages),t.emit(t.constants.EVENT_INITIALIZED)}(t)},b=function(t){return t===Object(t)&&"[object Array]"!==Object.prototype.toString.call(t)},O=function(t,n){b(t)||(n.columns=t),b(t)&&t.columns&&(n.columns=t.columns),b(t)&&t.margin&&!b(t.margin)&&(n.margin={x:t.margin,y:t.margin}),b(t)&&t.margin&&b(t.margin)&&t.margin.x&&(n.margin.x=t.margin.x),b(t)&&t.margin&&b(t.margin)&&t.margin.y&&(n.margin.y=t.margin.y)},C=function(t,n){return window.getComputedStyle(t,null).getPropertyValue(n)},M=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t.lastcol||(t.lastcol=0),t.rows.length<1&&(e=!0),e){t.rows=[],t.cols=[],t.lastcol=0;for(var r=n-1;r>=0;r--)t.rows[r]=0,t.cols[r]=u(t,r)}else if(t.tmpRows)for(t.rows=[],r=n-1;r>=0;r--)t.rows[r]=t.tmpRows[r];else for(t.tmpRows=[],r=n-1;r>=0;r--)t.tmpRows[r]=t.rows[r]},V=function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=n?t.container.children:h(':scope > *:not([data-macy-complete="1"])',t.container);r=Array.from(r).filter((function(t){return null!==t.offsetParent}));var o=c(t.options);return v(r,(function(t){n&&(t.dataset.macyComplete=0),t.style.width=o})),t.options.trueOrder?(f(t,r,n,e),t.emit(t.constants.EVENT_RECALCULATED)):(p(t,r,n,e),t.emit(t.constants.EVENT_RECALCULATED))},R=function(){return!!window.Promise},x=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};Array.from||(Array.from=function(t){for(var n=0,e=[];n<t.length;)e.push(t[n++]);return e});var k={columns:4,margin:2,trueOrder:!1,waitForImages:!1,useImageLoader:!0,breakAt:{},useOwnImageLoader:!1,onInit:!1,cancelLegacy:!1,useContainerForBreakpoints:!1};!function(){try{document.createElement("a").querySelector(":scope *")}catch(t){!function(){function t(t){return function(e){if(e&&n.test(e)){var r=this.getAttribute("id");r||(this.id="q"+Math.floor(9e6*Math.random())+1e6),arguments[0]=e.replace(n,"#"+this.id);var o=t.apply(this,arguments);return null===r?this.removeAttribute("id"):r||(this.id=r),o}return t.apply(this,arguments)}}var n=/:scope\b/gi,e=t(Element.prototype.querySelector);Element.prototype.querySelector=function(t){return e.apply(this,arguments)};var r=t(Element.prototype.querySelectorAll);Element.prototype.querySelectorAll=function(t){return r.apply(this,arguments)}}()}}();var q=function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:k;if(!(this instanceof t))return new t(n);this.options={},x(this.options,k,n),this.options.cancelLegacy&&!R()||_(this)};return q.init=function(t){return console.warn("Depreciated: Macy.init will be removed in v3.0.0 opt to use Macy directly like so Macy({ /*options here*/ }) "),new q(t)},q.prototype.recalculateOnImageLoad=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e(this,h("img",this.container),!t)},q.prototype.runOnImageLoad=function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=h("img",this.container);return this.on(this.constants.EVENT_IMAGE_COMPLETE,t),n&&this.on(this.constants.EVENT_IMAGE_LOAD,t),e(this,r,n)},q.prototype.recalculate=function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e&&this.queue.clear(),this.queue.add((function(){return V(t,n,e)}))},q.prototype.remove=function(){window.removeEventListener("resize",this.resizer),v(this.container.children,(function(t){t.removeAttribute("data-macy-complete"),t.removeAttribute("style")})),this.container.removeAttribute("style")},q.prototype.reInit=function(){this.recalculate(!0,!0),this.emit
1(this.constants.EVENT_INITIALIZED),window.addEventListener("resize",this.resizer),this.container.style.position="relative"},q.prototype.on=function(t,n){this.events.on(t,n)},q.prototype.emit=function(t,n){this.events.emit(t,n)},q.constants={EVENT_INITIALIZED:"macy.initialized",EVENT_RECALCULATED:"macy.recalculated",EVENT_IMAGE_LOAD:"macy.image.load",EVENT_IMAGE_ERROR:"macy.image.error",EVENT_IMAGE_COMPLETE:"macy.images.complete",EVENT_RESIZE:"macy.resize"},q.prototype.constants=q.constants,q},"object"==(void 0===exports?"undefined":_typeof(exports))&&void 0!==module?module.exports=n():"function"==typeof define&&define.amd?define(n):(void 0).Macy=n()},{}]},{},[11]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.