"use strict";(self.webpackChunk_roots_bud_sage_sage=self.webpackChunk_roots_bud_sage_sage||[]).push([[143],{"./styles/app.scss":()=>{},"../node_modules/@roots/bud-client/lib/dom-ready.js":(e,t,i)=>{i.d(t,{Z:()=>s});const s=e=>{window.requestAnimationFrame((async function t(){document.body?await e():window.requestAnimationFrame(t)}))}},"./scripts/app.js":(e,t,i)=>{var s=i("../node_modules/@roots/bud-client/lib/dom-ready.js");function n(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function o(e,t){void 0===e&&(e={}),void 0===t&&(t={}),Object.keys(t).forEach((i=>{void 0===e[i]?e[i]=t[i]:n(t[i])&&n(e[i])&&Object.keys(t[i]).length>0&&o(e[i],t[i])}))}const a={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function r(){const e="undefined"!=typeof document?document:{};return o(e,a),e}const l={document:a,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function c(){const e="undefined"!=typeof window?window:{};return o(e,l),e}function d(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function u(){return Date.now()}function h(e,t){void 0===t&&(t="x");const i=c();let s,n,o;const a=function(e){const t=c();let i;return t.getComputedStyle&&(i=t.getComputedStyle(e,null)),!i&&e.currentStyle&&(i=e.currentStyle),i||(i=e.style),i}(e);return i.WebKitCSSMatrix?(n=a.transform||a.webkitTransform,n.split(",").length>6&&(n=n.split(", ").map((e=>e.replace(",","."))).join(", ")),o=new i.WebKitCSSMatrix("none"===n?"":n)):(o=a.MozTransform||a.OTransform||a.MsTransform||a.msTransform||a.transform||a.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),s=o.toString().split(",")),"x"===t&&(n=i.WebKitCSSMatrix?o.m41:16===s.length?parseFloat(s[12]):parseFloat(s[4])),"y"===t&&(n=i.WebKitCSSMatrix?o.m42:16===s.length?parseFloat(s[13]):parseFloat(s[5])),n||0}function p(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function m(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let s=1;s<arguments.length;s+=1){const n=s<0||arguments.length<=s?void 0:arguments[s];if(null!=n&&(i=n,!("undefined"!=typeof window&&void 0!==window.HTMLElement?i instanceof HTMLElement:i&&(1===i.nodeType||11===i.nodeType)))){const i=Object.keys(Object(n)).filter((e=>t.indexOf(e)<0));for(let t=0,s=i.length;t<s;t+=1){const s=i[t],o=Object.getOwnPropertyDescriptor(n,s);void 0!==o&&o.enumerable&&(p(e[s])&&p(n[s])?n[s].__swiper__?e[s]=n[s]:m(e[s],n[s]):!p(e[s])&&p(n[s])?(e[s]={},n[s].__swiper__?e[s]=n[s]:m(e[s],n[s])):e[s]=n[s])}}}var i;return e}function f(e,t,i){e.style.setProperty(t,i)}function g(e){let{swiper:t,targetPosition:i,side:s}=e;const n=c(),o=-t.translate;let a,r=null;const l=t.params.speed;t.wrapperEl.style.scrollSnapType="none",n.cancelAnimationFrame(t.cssModeFrameID);const d=i>o?"next":"prev",u=(e,t)=>"next"===d&&e>=t||"prev"===d&&e<=t,h=()=>{a=(new Date).getTime(),null===r&&(r=a);const e=Math.max(Math.min((a-r)/l,1),0),c=.5-Math.cos(e*Math.PI)/2;let d=o+c*(i-o);if(u(d,i)&&(d=i),t.wrapperEl.scrollTo({[s]:d}),u(d,i))return t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout((()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[s]:d})})),void n.cancelAnimationFrame(t.cssModeFrameID);t.cssModeFrameID=n.requestAnimationFrame(h)};h()}function v(e){return e.querySelector(".swiper-slide-transform")||e.shadowRoot&&e.shadowRoot.querySelector(".swiper-slide-transform")||e}function b(e,t){return void 0===t&&(t=""),[...e.children].filter((e=>e.matches(t)))}function y(e){try{return void console.warn(e)}catch(e){}}function w(e,t){void 0===t&&(t=[]);const i=document.createElement(e);return i.classList.add(...Array.isArray(t)?t:function(e){return void 0===e&&(e=""),e.trim().split(" ").filter((e=>!!e.trim()))}(t)),i}function x(e,t){return c().getComputedStyle(e,null).getPropertyValue(t)}function S(e){let t,i=e;if(i){for(t=0;null!==(i=i.previousSibling);)1===i.nodeType&&(t+=1);return t}}function E(e,t){const i=[];let s=e.parentElement;for(;s;)t?s.matches(t)&&i.push(s):i.push(s),s=s.parentElement;return i}function T(e,t,i){const s=c();return i?e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(s.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(s.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-left":"margin-bottom")):e.offsetWidth}function C(e){return(Array.isArray(e)?e:[e]).filter((e=>!!e))}let P,M,O;function L(){return P||(P=function(){const e=c(),t=r();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),P}function A(e){return void 0===e&&(e={}),M||(M=function(e){let{userAgent:t}=void 0===e?{}:e;const i=L(),s=c(),n=s.navigator.platform,o=t||s.navigator.userAgent,a={ios:!1,android:!1},r=s.screen.width,l=s.screen.height,d=o.match(/(Android);?[\s\/]+([\d.]+)?/);let u=o.match(/(iPad).*OS\s([\d_]+)/);const h=o.match(/(iPod)(.*OS\s([\d_]+))?/),p=!u&&o.match(/(iPhone\sOS|iOS)\s([\d_]+)/),m="Win32"===n;let f="MacIntel"===n;return!u&&f&&i.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${r}x${l}`)>=0&&(u=o.match(/(Version)\/([\d.]+)/),u||(u=[0,1,"13_0_0"]),f=!1),d&&!m&&(a.os="android",a.android=!0),(u||p||h)&&(a.os="ios",a.ios=!0),a}(e)),M}function k(){return O||(O=function(){const e=c(),t=A();let i=!1;function s(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}if(s()){const t=String(e.navigator.userAgent);if(t.includes("Version/")){const[e,s]=t.split("Version/")[1].split(" ")[0].split(".").map((e=>Number(e)));i=e<16||16===e&&s<2}}const n=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),o=s();return{isSafari:i||o,needPerspectiveFix:i,need3dFix:o||n&&t.ios,isWebView:n}}()),O}var z={on(e,t,i){const s=this;if(!s.eventsListeners||s.destroyed)return s;if("function"!=typeof t)return s;const n=i?"unshift":"push";return e.split(" ").forEach((e=>{s.eventsListeners[e]||(s.eventsListeners[e]=[]),s.eventsListeners[e][n](t)})),s},once(e,t,i){const s=this;if(!s.eventsListeners||s.destroyed)return s;if("function"!=typeof t)return s;function n(){s.off(e,n),n.__emitterProxy&&delete n.__emitterProxy;for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];t.apply(s,o)}return n.__emitterProxy=t,s.on(e,n,i)},onAny(e,t){const i=this;if(!i.eventsListeners||i.destroyed)return i;if("function"!=typeof e)return i;const s=t?"unshift":"push";return i.eventsAnyListeners.indexOf(e)<0&&i.eventsAnyListeners[s](e),i},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;const i=t.eventsAnyListeners.indexOf(e);return i>=0&&t.eventsAnyListeners.splice(i,1),t},off(e,t){const i=this;return!i.eventsListeners||i.destroyed?i:i.eventsListeners?(e.split(" ").forEach((e=>{void 0===t?i.eventsListeners[e]=[]:i.eventsListeners[e]&&i.eventsListeners[e].forEach(((s,n)=>{(s===t||s.__emitterProxy&&s.__emitterProxy===t)&&i.eventsListeners[e].splice(n,1)}))})),i):i},emit(){const e=this;if(!e.eventsListeners||e.destroyed)return e;if(!e.eventsListeners)return e;let t,i,s;for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];"string"==typeof o[0]||Array.isArray(o[0])?(t=o[0],i=o.slice(1,o.length),s=e):(t=o[0].events,i=o[0].data,s=o[0].context||e),i.unshift(s);return(Array.isArray(t)?t:t.split(" ")).forEach((t=>{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach((e=>{e.apply(s,[t,...i])})),e.eventsListeners&&e.eventsListeners[t]&&e.eventsListeners[t].forEach((e=>{e.apply(s,i)}))})),e}};const I=(e,t)=>{if(!e||e.destroyed||!e.params)return;const i=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(i){let t=i.querySelector(`.${e.params.lazyPreloaderClass}`);!t&&e.isElement&&(i.shadowRoot?t=i.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame((()=>{i.shadowRoot&&(t=i.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),t&&t.remove())}))),t&&t.remove()}},R=(e,t)=>{if(!e.slides[t])return;const i=e.slides[t].querySelector('[loading="lazy"]');i&&i.removeAttribute("loading")},D=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const i=e.slides.length;if(!i||!t||t<0)return;t=Math.min(t,i);const s="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),n=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const i=n,o=[i-t];return o.push(...Array.from({length:t}).map(((e,t)=>i+s+t))),void e.slides.forEach(((t,i)=>{o.includes(t.column)&&R(e,i)}))}const o=n+s-1;if(e.params.rewind||e.params.loop)for(let s=n-t;s<=o+t;s+=1){const t=(s%i+i)%i;(t<n||t>o)&&R(e,t)}else for(let s=Math.max(n-t,0);s<=Math.min(o+t,i-1);s+=1)s!==n&&(s>o||s<n)&&R(e,s)};var F={updateSize:function(){const e=this;let t,i;const s=e.el;t=void 0!==e.params.width&&null!==e.params.width?e.params.width:s.clientWidth,i=void 0!==e.params.height&&null!==e.params.height?e.params.height:s.clientHeight,0===t&&e.isHorizontal()||0===i&&e.isVertical()||(t=t-parseInt(x(s,"padding-left")||0,10)-parseInt(x(s,"padding-right")||0,10),i=i-parseInt(x(s,"padding-top")||0,10)-parseInt(x(s,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(i)&&(i=0),Object.assign(e,{width:t,height:i,size:e.isHorizontal()?t:i}))},updateSlides:function(){const e=this;function t(t,i){return parseFloat(t.getPropertyValue(e.getDirectionLabel(i))||0)}const i=e.params,{wrapperEl:s,slidesEl:n,size:o,rtlTranslate:a,wrongRTL:r}=e,l=e.virtual&&i.virtual.enabled,c=l?e.virtual.slides.length:e.slides.length,d=b(n,`.${e.params.slideClass}, swiper-slide`),u=l?e.virtual.slides.length:d.length;let h=[];const p=[],m=[];let g=i.slidesOffsetBefore;"function"==typeof g&&(g=i.slidesOffsetBefore.call(e));let v=i.slidesOffsetAfter;"function"==typeof v&&(v=i.slidesOffsetAfter.call(e));const y=e.snapGrid.length,w=e.slidesGrid.length;let S=i.spaceBetween,E=-g,C=0,P=0;if(void 0===o)return;"string"==typeof S&&S.indexOf("%")>=0?S=parseFloat(S.replace("%",""))/100*o:"string"==typeof S&&(S=parseFloat(S)),e.virtualSize=-S,d.forEach((e=>{a?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""})),i.centeredSlides&&i.cssMode&&(f(s,"--swiper-centered-offset-before",""),f(s,"--swiper-centered-offset-after",""));const M=i.grid&&i.grid.rows>1&&e.grid;let O;M?e.grid.initSlides(d):e.grid&&e.grid.unsetSlides();const L="auto"===i.slidesPerView&&i.breakpoints&&Object.keys(i.breakpoints).filter((e=>void 0!==i.breakpoints[e].slidesPerView)).length>0;for(let s=0;s<u;s+=1){let n;if(O=0,d[s]&&(n=d[s]),M&&e.grid.updateSlide(s,n,d),!d[s]||"none"!==x(n,"display")){if("auto"===i.slidesPerView){L&&(d[s].style[e.getDirectionLabel("width")]="");const o=getComputedStyle(n),a=n.style.transform,r=n.style.webkitTransform;if(a&&(n.style.transform="none"),r&&(n.style.webkitTransform="none"),i.roundLengths)O=e.isHorizontal()?T(n,"width",!0):T(n,"height",!0);else{const e=t(o,"width"),i=t(o,"padding-left"),s=t(o,"padding-right"),a=t(o,"margin-left"),r=t(o,"margin-right"),l=o.getPropertyValue("box-sizing");if(l&&"border-box"===l)O=e+a+r;else{const{clientWidth:t,offsetWidth:o}=n;O=e+i+s+a+r+(o-t)}}a&&(n.style.transform=a),r&&(n.style.webkitTransform=r),i.roundLengths&&(O=Math.floor(O))}else O=(o-(i.slidesPerView-1)*S)/i.slidesPerView,i.roundLengths&&(O=Math.floor(O)),d[s]&&(d[s].style[e.getDirectionLabel("width")]=`${O}px`);d[s]&&(d[s].swiperSlideSize=O),m.push(O),i.centeredSlides?(E=E+O/2+C/2+S,0===C&&0!==s&&(E=E-o/2-S),0===s&&(E=E-o/2-S),Math.abs(E)<.001&&(E=0),i.roundLengths&&(E=Math.floor(E)),P%i.slidesPerGroup==0&&h.push(E),p.push(E)):(i.roundLengths&&(E=Math.floor(E)),(P-Math.min(e.params.slidesPerGroupSkip,P))%e.params.slidesPerGroup==0&&h.push(E),p.push(E),E=E+O+S),e.virtualSize+=O+S,C=O,P+=1}}if(e.virtualSize=Math.max(e.virtualSize,o)+v,a&&r&&("slide"===i.effect||"coverflow"===i.effect)&&(s.style.width=`${e.virtualSize+S}px`),i.setWrapperSize&&(s.style[e.getDirectionLabel("width")]=`${e.virtualSize+S}px`),M&&e.grid.updateWrapperSize(O,h),!i.centeredSlides){const t=[];for(let s=0;s<h.length;s+=1){let n=h[s];i.roundLengths&&(n=Math.floor(n)),h[s]<=e.virtualSize-o&&t.push(n)}h=t,Math.floor(e.virtualSize-o)-Math.floor(h[h.length-1])>1&&h.push(e.virtualSize-o)}if(l&&i.loop){const t=m[0]+S;if(i.slidesPerGroup>1){const s=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/i.slidesPerGroup),n=t*i.slidesPerGroup;for(let e=0;e<s;e+=1)h.push(h[h.length-1]+n)}for(let s=0;s<e.virtual.slidesBefore+e.virtual.slidesAfter;s+=1)1===i.slidesPerGroup&&h.push(h[h.length-1]+t),p.push(p[p.length-1]+t),e.virtualSize+=t}if(0===h.length&&(h=[0]),0!==S){const t=e.isHorizontal()&&a?"marginLeft":e.getDirectionLabel("marginRight");d.filter(((e,t)=>!(i.cssMode&&!i.loop)||t!==d.length-1)).forEach((e=>{e.style[t]=`${S}px`}))}if(i.centeredSlides&&i.centeredSlidesBounds){let e=0;m.forEach((t=>{e+=t+(S||0)})),e-=S;const t=e-o;h=h.map((e=>e<=0?-g:e>t?t+v:e))}if(i.centerInsufficientSlides){let e=0;if(m.forEach((t=>{e+=t+(S||0)})),e-=S,e<o){const t=(o-e)/2;h.forEach(((e,i)=>{h[i]=e-t})),p.forEach(((e,i)=>{p[i]=e+t}))}}if(Object.assign(e,{slides:d,snapGrid:h,slidesGrid:p,slidesSizesGrid:m}),i.centeredSlides&&i.cssMode&&!i.centeredSlidesBounds){f(s,"--swiper-centered-offset-before",-h[0]+"px"),f(s,"--swiper-centered-offset-after",e.size/2-m[m.length-1]/2+"px");const t=-e.snapGrid[0],i=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map((e=>e+t)),e.slidesGrid=e.slidesGrid.map((e=>e+i))}if(u!==c&&e.emit("slidesLengthChange"),h.length!==y&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),p.length!==w&&e.emit("slidesGridLengthChange"),i.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!(l||i.cssMode||"slide"!==i.effect&&"fade"!==i.effect)){const t=`${i.containerModifierClass}backface-hidden`,s=e.el.classList.contains(t);u<=i.maxBackfaceHiddenSlides?s||e.el.classList.add(t):s&&e.el.classList.remove(t)}},updateAutoHeight:function(e){const t=this,i=[],s=t.virtual&&t.params.virtual.enabled;let n,o=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const a=e=>s?t.slides[t.getSlideIndexByData(e)]:t.slides[e];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach((e=>{i.push(e)}));else for(n=0;n<Math.ceil(t.params.slidesPerView);n+=1){const e=t.activeIndex+n;if(e>t.slides.length&&!s)break;i.push(a(e))}else i.push(a(t.activeIndex));for(n=0;n<i.length;n+=1)if(void 0!==i[n]){const e=i[n].offsetHeight;o=e>o?e:o}(o||0===o)&&(t.wrapperEl.style.height=`${o}px`)},updateSlidesOffset:function(){const e=this,t=e.slides,i=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let s=0;s<t.length;s+=1)t[s].swiperSlideOffset=(e.isHorizontal()?t[s].offsetLeft:t[s].offsetTop)-i-e.cssOverflowAdjustment()},updateSlidesProgress:function(e){void 0===e&&(e=this&&this.translate||0);const t=this,i=t.params,{slides:s,rtlTranslate:n,snapGrid:o}=t;if(0===s.length)return;void 0===s[0].swiperSlideOffset&&t.updateSlidesOffset();let a=-e;n&&(a=e),s.forEach((e=>{e.classList.remove(i.slideVisibleClass,i.slideFullyVisibleClass)})),t.visibleSlidesIndexes=[],t.visibleSlides=[];let r=i.spaceBetween;"string"==typeof r&&r.indexOf("%")>=0?r=parseFloat(r.replace("%",""))/100*t.size:"string"==typeof r&&(r=parseFloat(r));for(let e=0;e<s.length;e+=1){const l=s[e];let c=l.swiperSlideOffset;i.cssMode&&i.centeredSlides&&(c-=s[0].swiperSlideOffset);const d=(a+(i.centeredSlides?t.minTranslate():0)-c)/(l.swiperSlideSize+r),u=(a-o[0]+(i.centeredSlides?t.minTranslate():0)-c)/(l.swiperSlideSize+r),h=-(a-c),p=h+t.slidesSizesGrid[e],m=h>=0&&h<=t.size-t.slidesSizesGrid[e];(h>=0&&h<t.size-1||p>1&&p<=t.size||h<=0&&p>=t.size)&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(e),s[e].classList.add(i.slideVisibleClass)),m&&s[e].classList.add(i.slideFullyVisibleClass),l.progress=n?-d:d,l.originalProgress=n?-u:u}},updateProgress:function(e){const t=this;if(void 0===e){const i=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*i||0}const i=t.params,s=t.maxTranslate()-t.minTranslate();let{progress:n,isBeginning:o,isEnd:a,progressLoop:r}=t;const l=o,c=a;if(0===s)n=0,o=!0,a=!0;else{n=(e-t.minTranslate())/s;const i=Math.abs(e-t.minTranslate())<1,r=Math.abs(e-t.maxTranslate())<1;o=i||n<=0,a=r||n>=1,i&&(n=0),r&&(n=1)}if(i.loop){const i=t.getSlideIndexByData(0),s=t.getSlideIndexByData(t.slides.length-1),n=t.slidesGrid[i],o=t.slidesGrid[s],a=t.slidesGrid[t.slidesGrid.length-1],l=Math.abs(e);r=l>=n?(l-n)/a:(l+a-o)/a,r>1&&(r-=1)}Object.assign(t,{progress:n,progressLoop:r,isBeginning:o,isEnd:a}),(i.watchSlidesProgress||i.centeredSlides&&i.autoHeight)&&t.updateSlidesProgress(e),o&&!l&&t.emit("reachBeginning toEdge"),a&&!c&&t.emit("reachEnd toEdge"),(l&&!o||c&&!a)&&t.emit("fromEdge"),t.emit("progress",n)},updateSlidesClasses:function(){const e=this,{slides:t,params:i,slidesEl:s,activeIndex:n}=e,o=e.virtual&&i.virtual.enabled,a=e.grid&&i.grid&&i.grid.rows>1,r=e=>b(s,`.${i.slideClass}${e}, swiper-slide${e}`)[0];let l,c,d;if(t.forEach((e=>{e.classList.remove(i.slideActiveClass,i.slideNextClass,i.slidePrevClass)})),o)if(i.loop){let t=n-e.virtual.slidesBefore;t<0&&(t=e.virtual.slides.length+t),t>=e.virtual.slides.length&&(t-=e.virtual.slides.length),l=r(`[data-swiper-slide-index="${t}"]`)}else l=r(`[data-swiper-slide-index="${n}"]`);else a?(l=t.filter((e=>e.column===n))[0],d=t.filter((e=>e.column===n+1))[0],c=t.filter((e=>e.column===n-1))[0]):l=t[n];l&&(l.classList.add(i.slideActiveClass),a?(d&&d.classList.add(i.slideNextClass),c&&c.classList.add(i.slidePrevClass)):(d=function(e,t){const i=[];for(;e.nextElementSibling;){const s=e.nextElementSibling;t?s.matches(t)&&i.push(s):i.push(s),e=s}return i}(l,`.${i.slideClass}, swiper-slide`)[0],i.loop&&!d&&(d=t[0]),d&&d.classList.add(i.slideNextClass),c=function(e,t){const i=[];for(;e.previousElementSibling;){const s=e.previousElementSibling;t?s.matches(t)&&i.push(s):i.push(s),e=s}return i}(l,`.${i.slideClass}, swiper-slide`)[0],i.loop&&0===!c&&(c=t[t.length-1]),c&&c.classList.add(i.slidePrevClass))),e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,i=t.rtlTranslate?t.translate:-t.translate,{snapGrid:s,params:n,activeIndex:o,realIndex:a,snapIndex:r}=t;let l,c=e;const d=e=>{let i=e-t.virtual.slidesBefore;return i<0&&(i=t.virtual.slides.length+i),i>=t.virtual.slides.length&&(i-=t.virtual.slides.length),i};if(void 0===c&&(c=function(e){const{slidesGrid:t,params:i}=e,s=e.rtlTranslate?e.translate:-e.translate;let n;for(let e=0;e<t.length;e+=1)void 0!==t[e+1]?s>=t[e]&&s<t[e+1]-(t[e+1]-t[e])/2?n=e:s>=t[e]&&s<t[e+1]&&(n=e+1):s>=t[e]&&(n=e);return i.normalizeSlideIndex&&(n<0||void 0===n)&&(n=0),n}(t)),s.indexOf(i)>=0)l=s.indexOf(i);else{const e=Math.min(n.slidesPerGroupSkip,c);l=e+Math.floor((c-e)/n.slidesPerGroup)}if(l>=s.length&&(l=s.length-1),c===o&&!t.params.loop)return void(l!==r&&(t.snapIndex=l,t.emit("snapIndexChange")));if(c===o&&t.params.loop&&t.virtual&&t.params.virtual.enabled)return void(t.realIndex=d(c));const u=t.grid&&n.grid&&n.grid.rows>1;let h;if(t.virtual&&n.virtual.enabled&&n.loop)h=d(c);else if(u){const e=t.slides.filter((e=>e.column===c))[0];let i=parseInt(e.getAttribute("data-swiper-slide-index"),10);Number.isNaN(i)&&(i=Math.max(t.slides.indexOf(e),0)),h=Math.floor(i/n.grid.rows)}else if(t.slides[c]){const e=t.slides[c].getAttribute("data-swiper-slide-index");h=e?parseInt(e,10):c}else h=c;Object.assign(t,{previousSnapIndex:r,snapIndex:l,previousRealIndex:a,realIndex:h,previousIndex:o,activeIndex:c}),t.initialized&&D(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(a!==h&&t.emit("realIndexChange"),t.emit("slideChange"))},updateClickedSlide:function(e,t){const i=this,s=i.params;let n=e.closest(`.${s.slideClass}, swiper-slide`);!n&&i.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach((e=>{!n&&e.matches&&e.matches(`.${s.slideClass}, swiper-slide`)&&(n=e)}));let o,a=!1;if(n)for(let e=0;e<i.slides.length;e+=1)if(i.slides[e]===n){a=!0,o=e;break}if(!n||!a)return i.clickedSlide=void 0,void(i.clickedIndex=void 0);i.clickedSlide=n,i.virtual&&i.params.virtual.enabled?i.clickedIndex=parseInt(n.getAttribute("data-swiper-slide-index"),10):i.clickedIndex=o,s.slideToClickedSlide&&void 0!==i.clickedIndex&&i.clickedIndex!==i.activeIndex&&i.slideToClickedSlide()}};var _={getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y");const{params:t,rtlTranslate:i,translate:s,wrapperEl:n}=this;if(t.virtualTranslate)return i?-s:s;if(t.cssMode)return s;let o=h(n,e);return o+=this.cssOverflowAdjustment(),i&&(o=-o),o||0},setTranslate:function(e,t){const i=this,{rtlTranslate:s,params:n,wrapperEl:o,progress:a}=i;let r,l=0,c=0;i.isHorizontal()?l=s?-e:e:c=e,n.roundLengths&&(l=Math.floor(l),c=Math.floor(c)),i.previousTranslate=i.translate,i.translate=i.isHorizontal()?l:c,n.cssMode?o[i.isHorizontal()?"scrollLeft":"scrollTop"]=i.isHorizontal()?-l:-c:n.virtualTranslate||(i.isHorizontal()?l-=i.cssOverflowAdjustment():c-=i.cssOverflowAdjustment(),o.style.transform=`translate3d(${l}px, ${c}px, 0px)`);const d=i.maxTranslate()-i.minTranslate();r=0===d?0:(e-i.minTranslate())/d,r!==a&&i.updateProgress(e),i.emit("setTranslate",i.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e,t,i,s,n){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===i&&(i=!0),void 0===s&&(s=!0);const o=this,{params:a,wrapperEl:r}=o;if(o.animating&&a.preventInteractionOnTransition)return!1;const l=o.minTranslate(),c=o.maxTranslate();let d;if(d=s&&e>l?l:s&&e<c?c:e,o.updateProgress(d),a.cssMode){const e=o.isHorizontal();if(0===t)r[e?"scrollLeft":"scrollTop"]=-d;else{if(!o.support.smoothScroll)return g({swiper:o,targetPosition:-d,side:e?"left":"top"}),!0;r.scrollTo({[e?"left":"top"]:-d,behavior:"smooth"})}return!0}return 0===t?(o.setTransition(0),o.setTranslate(d),i&&(o.emit("beforeTransitionStart",t,n),o.emit("transitionEnd"))):(o.setTransition(t),o.setTranslate(d),i&&(o.emit("beforeTransitionStart",t,n),o.emit("transitionStart")),o.animating||(o.animating=!0,o.onTranslateToWrapperTransitionEnd||(o.onTranslateToWrapperTransitionEnd=function(e){o&&!o.destroyed&&e.target===this&&(o.wrapperEl.removeEventListener("transitionend",o.onTranslateToWrapperTransitionEnd),o.onTranslateToWrapperTransitionEnd=null,delete o.onTranslateToWrapperTransitionEnd,i&&o.emit("transitionEnd"))}),o.wrapperEl.addEventListener("transitionend",o.onTranslateToWrapperTransitionEnd))),!0}};function j(e){let{swiper:t,runCallbacks:i,direction:s,step:n}=e;const{activeIndex:o,previousIndex:a}=t;let r=s;if(r||(r=o>a?"next":o<a?"prev":"reset"),t.emit(`transition${n}`),i&&o!==a){if("reset"===r)return void t.emit(`slideResetTransition${n}`);t.emit(`slideChangeTransition${n}`),"next"===r?t.emit(`slideNextTransition${n}`):t.emit(`slidePrevTransition${n}`)}}var B={slideTo:function(e,t,i,s,n){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===i&&(i=!0),"string"==typeof e&&(e=parseInt(e,10));const o=this;let a=e;a<0&&(a=0);const{params:r,snapGrid:l,slidesGrid:c,previousIndex:d,activeIndex:u,rtlTranslate:h,wrapperEl:p,enabled:m}=o;if(o.animating&&r.preventInteractionOnTransition||!m&&!s&&!n||o.destroyed)return!1;const f=Math.min(o.params.slidesPerGroupSkip,a);let v=f+Math.floor((a-f)/o.params.slidesPerGroup);v>=l.length&&(v=l.length-1);const b=-l[v];if(r.normalizeSlideIndex)for(let e=0;e<c.length;e+=1){const t=-Math.floor(100*b),i=Math.floor(100*c[e]),s=Math.floor(100*c[e+1]);void 0!==c[e+1]?t>=i&&t<s-(s-i)/2?a=e:t>=i&&t<s&&(a=e+1):t>=i&&(a=e)}if(o.initialized&&a!==u){if(!o.allowSlideNext&&(h?b>o.translate&&b>o.minTranslate():b<o.translate&&b<o.minTranslate()))return!1;if(!o.allowSlidePrev&&b>o.translate&&b>o.maxTranslate()&&(u||0)!==a)return!1}let y;if(a!==(d||0)&&i&&o.emit("beforeSlideChangeStart"),o.updateProgress(b),y=a>u?"next":a<u?"prev":"reset",h&&-b===o.translate||!h&&b===o.translate)return o.updateActiveIndex(a),r.autoHeight&&o.updateAutoHeight(),o.updateSlidesClasses(),"slide"!==r.effect&&o.setTranslate(b),"reset"!==y&&(o.transitionStart(i,y),o.transitionEnd(i,y)),!1;if(r.cssMode){const e=o.isHorizontal(),i=h?b:-b;if(0===t){const t=o.virtual&&o.params.virtual.enabled;t&&(o.wrapperEl.style.scrollSnapType="none",o._immediateVirtual=!0),t&&!o._cssModeVirtualInitialSet&&o.params.initialSlide>0?(o._cssModeVirtualInitialSet=!0,requestAnimationFrame((()=>{p[e?"scrollLeft":"scrollTop"]=i}))):p[e?"scrollLeft":"scrollTop"]=i,t&&requestAnimationFrame((()=>{o.wrapperEl.style.scrollSnapType="",o._immediateVirtual=!1}))}else{if(!o.support.smoothScroll)return g({swiper:o,targetPosition:i,side:e?"left":"top"}),!0;p.scrollTo({[e?"left":"top"]:i,behavior:"smooth"})}return!0}return o.setTransition(t),o.setTranslate(b),o.updateActiveIndex(a),o.updateSlidesClasses(),o.emit("beforeTransitionStart",t,s),o.transitionStart(i,y),0===t?o.transitionEnd(i,y):o.animating||(o.animating=!0,o.onSlideToWrapperTransitionEnd||(o.onSlideToWrapperTransitionEnd=function(e){o&&!o.destroyed&&e.target===this&&(o.wrapperEl.removeEventListener("transitionend",o.onSlideToWrapperTransitionEnd),o.onSlideToWrapperTransitionEnd=null,delete o.onSlideToWrapperTransitionEnd,o.transitionEnd(i,y))}),o.wrapperEl.addEventListener("transitionend",o.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e,t,i,s){if(void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===i&&(i=!0),"string"==typeof e){e=parseInt(e,10)}const n=this;if(n.destroyed)return;const o=n.grid&&n.params.grid&&n.params.grid.rows>1;let a=e;if(n.params.loop)if(n.virtual&&n.params.virtual.enabled)a+=n.virtual.slidesBefore;else{let e;if(o){const t=a*n.params.grid.rows;e=n.slides.filter((e=>1*e.getAttribute("data-swiper-slide-index")===t))[0].column}else e=n.getSlideIndexByData(a);const t=o?Math.ceil(n.slides.length/n.params.grid.rows):n.slides.length,{centeredSlides:i}=n.params;let s=n.params.slidesPerView;"auto"===s?s=n.slidesPerViewDynamic():(s=Math.ceil(parseFloat(n.params.slidesPerView,10)),i&&s%2==0&&(s+=1));let r=t-e<s;if(i&&(r=r||e<Math.ceil(s/2)),r){const s=i?e<n.activeIndex?"prev":"next":e-n.activeIndex-1<n.params.slidesPerView?"next":"prev";n.loopFix({direction:s,slideTo:!0,activeSlideIndex:"next"===s?e+1:e-t+1,slideRealIndex:"next"===s?n.realIndex:void 0})}if(o){const e=a*n.params.grid.rows;a=n.slides.filter((t=>1*t.getAttribute("data-swiper-slide-index")===e))[0].column}else a=n.getSlideIndexByData(a)}return requestAnimationFrame((()=>{n.slideTo(a,t,i,s)})),n},slideNext:function(e,t,i){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);const s=this,{enabled:n,params:o,animating:a}=s;if(!n||s.destroyed)return s;let r=o.slidesPerGroup;"auto"===o.slidesPerView&&1===o.slidesPerGroup&&o.slidesPerGroupAuto&&(r=Math.max(s.slidesPerViewDynamic("current",!0),1));const l=s.activeIndex<o.slidesPerGroupSkip?1:r,c=s.virtual&&o.virtual.enabled;if(o.loop){if(a&&!c&&o.loopPreventsSliding)return!1;if(s.loopFix({direction:"next"}),s._clientLeft=s.wrapperEl.clientLeft,s.activeIndex===s.slides.length-1&&o.cssMode)return requestAnimationFrame((()=>{s.slideTo(s.activeIndex+l,e,t,i)})),!0}return o.rewind&&s.isEnd?s.slideTo(0,e,t,i):s.slideTo(s.activeIndex+l,e,t,i)},slidePrev:function(e,t,i){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);const s=this,{params:n,snapGrid:o,slidesGrid:a,rtlTranslate:r,enabled:l,animating:c}=s;if(!l||s.destroyed)return s;const d=s.virtual&&n.virtual.enabled;if(n.loop){if(c&&!d&&n.loopPreventsSliding)return!1;s.loopFix({direction:"prev"}),s._clientLeft=s.wrapperEl.clientLeft}function u(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const h=u(r?s.translate:-s.translate),p=o.map((e=>u(e)));let m=o[p.indexOf(h)-1];if(void 0===m&&n.cssMode){let e;o.forEach(((t,i)=>{h>=t&&(e=i)})),void 0!==e&&(m=o[e>0?e-1:e])}let f=0;if(void 0!==m&&(f=a.indexOf(m),f<0&&(f=s.activeIndex-1),"auto"===n.slidesPerView&&1===n.slidesPerGroup&&n.slidesPerGroupAuto&&(f=f-s.slidesPerViewDynamic("previous",!0)+1,f=Math.max(f,0))),n.rewind&&s.isBeginning){const n=s.params.virtual&&s.params.virtual.enabled&&s.virtual?s.virtual.slides.length-1:s.slides.length-1;return s.slideTo(n,e,t,i)}return n.loop&&0===s.activeIndex&&n.cssMode?(requestAnimationFrame((()=>{s.slideTo(f,e,t,i)})),!0):s.slideTo(f,e,t,i)},slideReset:function(e,t,i){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);const s=this;if(!s.destroyed)return s.slideTo(s.activeIndex,e,t,i)},slideToClosest:function(e,t,i,s){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),void 0===s&&(s=.5);const n=this;if(n.destroyed)return;let o=n.activeIndex;const a=Math.min(n.params.slidesPerGroupSkip,o),r=a+Math.floor((o-a)/n.params.slidesPerGroup),l=n.rtlTranslate?n.translate:-n.translate;if(l>=n.snapGrid[r]){const e=n.snapGrid[r];l-e>(n.snapGrid[r+1]-e)*s&&(o+=n.params.slidesPerGroup)}else{const e=n.snapGrid[r-1];l-e<=(n.snapGrid[r]-e)*s&&(o-=n.params.slidesPerGroup)}return o=Math.max(o,0),o=Math.min(o,n.slidesGrid.length-1),n.slideTo(o,e,t,i)},slideToClickedSlide:function(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:i}=e,s="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let n,o=e.clickedIndex;const a=e.isElement?"swiper-slide":`.${t.slideClass}`;if(t.loop){if(e.animating)return;n=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?o<e.loopedSlides-s/2||o>e.slides.length-e.loopedSlides+s/2?(e.loopFix(),o=e.getSlideIndex(b(i,`${a}[data-swiper-slide-index="${n}"]`)[0]),d((()=>{e.slideTo(o)}))):e.slideTo(o):o>e.slides.length-s?(e.loopFix(),o=e.getSlideIndex(b(i,`${a}[data-swiper-slide-index="${n}"]`)[0]),d((()=>{e.slideTo(o)}))):e.slideTo(o)}else e.slideTo(o)}};var H={loopCreate:function(e){const t=this,{params:i,slidesEl:s}=t;if(!i.loop||t.virtual&&t.params.virtual.enabled)return;const n=()=>{b(s,`.${i.slideClass}, swiper-slide`).forEach(((e,t)=>{e.setAttribute("data-swiper-slide-index",t)}))},o=t.grid&&i.grid&&i.grid.rows>1,a=i.slidesPerGroup*(o?i.grid.rows:1),r=t.slides.length%a!=0,l=o&&t.slides.length%i.grid.rows!=0,c=e=>{for(let s=0;s<e;s+=1){const e=t.isElement?w("swiper-slide",[i.slideBlankClass]):w("div",[i.slideClass,i.slideBlankClass]);t.slidesEl.append(e)}};if(r){if(i.loopAddBlankSlides){c(a-t.slides.length%a),t.recalcSlides(),t.updateSlides()}else y("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");n()}else if(l){if(i.loopAddBlankSlides){c(i.grid.rows-t.slides.length%i.grid.rows),t.recalcSlides(),t.updateSlides()}else y("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");n()}else n();t.loopFix({slideRealIndex:e,direction:i.centeredSlides?void 0:"next"})},loopFix:function(e){let{slideRealIndex:t,slideTo:i=!0,direction:s,setTranslate:n,activeSlideIndex:o,byController:a,byMousewheel:r}=void 0===e?{}:e;const l=this;if(!l.params.loop)return;l.emit("beforeLoopFix");const{slides:c,allowSlidePrev:d,allowSlideNext:u,slidesEl:h,params:p}=l,{centeredSlides:m}=p;if(l.allowSlidePrev=!0,l.allowSlideNext=!0,l.virtual&&p.virtual.enabled)return i&&(p.centeredSlides||0!==l.snapIndex?p.centeredSlides&&l.snapIndex<p.slidesPerView?l.slideTo(l.virtual.slides.length+l.snapIndex,0,!1,!0):l.snapIndex===l.snapGrid.length-1&&l.slideTo(l.virtual.slidesBefore,0,!1,!0):l.slideTo(l.virtual.slides.length,0,!1,!0)),l.allowSlidePrev=d,l.allowSlideNext=u,void l.emit("loopFix");let f=p.slidesPerView;"auto"===f?f=l.slidesPerViewDynamic():(f=Math.ceil(parseFloat(p.slidesPerView,10)),m&&f%2==0&&(f+=1));const g=p.slidesPerGroupAuto?f:p.slidesPerGroup;let v=g;v%g!=0&&(v+=g-v%g),v+=p.loopAdditionalSlides,l.loopedSlides=v;const b=l.grid&&p.grid&&p.grid.rows>1;c.length<f+v?y("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled and not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):b&&"row"===p.grid.fill&&y("Swiper Loop Warning: Loop mode is not compatible with grid.fill=`row`");const w=[],x=[];let S=l.activeIndex;void 0===o?o=l.getSlideIndex(c.filter((e=>e.classList.contains(p.slideActiveClass)))[0]):S=o;const E="next"===s||!s,T="prev"===s||!s;let C=0,P=0;const M=b?Math.ceil(c.length/p.grid.rows):c.length,O=(b?c[o].column:o)+(m&&void 0===n?-f/2+.5:0);if(O<v){C=Math.max(v-O,g);for(let e=0;e<v-O;e+=1){const t=e-Math.floor(e/M)*M;if(b){const e=M-t-1;for(let t=c.length-1;t>=0;t-=1)c[t].column===e&&w.push(t)}else w.push(M-t-1)}}else if(O+f>M-v){P=Math.max(O-(M-2*v),g);for(let e=0;e<P;e+=1){const t=e-Math.floor(e/M)*M;b?c.forEach(((e,i)=>{e.column===t&&x.push(i)})):x.push(t)}}if(l.__preventObserver__=!0,requestAnimationFrame((()=>{l.__preventObserver__=!1})),T&&w.forEach((e=>{c[e].swiperLoopMoveDOM=!0,h.prepend(c[e]),c[e].swiperLoopMoveDOM=!1})),E&&x.forEach((e=>{c[e].swiperLoopMoveDOM=!0,h.append(c[e]),c[e].swiperLoopMoveDOM=!1})),l.recalcSlides(),"auto"===p.slidesPerView?l.updateSlides():b&&(w.length>0&&T||x.length>0&&E)&&l.slides.forEach(((e,t)=>{l.grid.updateSlide(t,e,l.slides)})),p.watchSlidesProgress&&l.updateSlidesOffset(),i)if(w.length>0&&T){if(void 0===t){const e=l.slidesGrid[S],t=l.slidesGrid[S+C]-e;r?l.setTranslate(l.translate-t):(l.slideTo(S+Math.ceil(C),0,!1,!0),n&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-t,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-t))}else if(n){const e=b?w.length/p.grid.rows:w.length;l.slideTo(l.activeIndex+e,0,!1,!0),l.touchEventsData.currentTranslate=l.translate}}else if(x.length>0&&E)if(void 0===t){const e=l.slidesGrid[S],t=l.slidesGrid[S-P]-e;r?l.setTranslate(l.translate-t):(l.slideTo(S-P,0,!1,!0),n&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-t,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-t))}else{const e=b?x.length/p.grid.rows:x.length;l.slideTo(l.activeIndex-e,0,!1,!0)}if(l.allowSlidePrev=d,l.allowSlideNext=u,l.controller&&l.controller.control&&!a){const e={slideRealIndex:t,direction:s,setTranslate:n,activeSlideIndex:o,byController:!0};Array.isArray(l.controller.control)?l.controller.control.forEach((t=>{!t.destroyed&&t.params.loop&&t.loopFix({...e,slideTo:t.params.slidesPerView===p.slidesPerView&&i})})):l.controller.control instanceof l.constructor&&l.controller.control.params.loop&&l.controller.control.loopFix({...e,slideTo:l.controller.control.params.slidesPerView===p.slidesPerView&&i})}l.emit("loopFix")},loopDestroy:function(){const e=this,{params:t,slidesEl:i}=e;if(!t.loop||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const s=[];e.slides.forEach((e=>{const t=void 0===e.swiperSlideIndex?1*e.getAttribute("data-swiper-slide-index"):e.swiperSlideIndex;s[t]=e})),e.slides.forEach((e=>{e.removeAttribute("data-swiper-slide-index")})),s.forEach((e=>{i.append(e)})),e.recalcSlides(),e.slideTo(e.realIndex,0)}};function N(e,t,i){const s=c(),{params:n}=e,o=n.edgeSwipeDetection,a=n.edgeSwipeThreshold;return!o||!(i<=a||i>=s.innerWidth-a)||"prevent"===o&&(t.preventDefault(),!0)}function $(e){const t=this,i=r();let s=e;s.originalEvent&&(s=s.originalEvent);const n=t.touchEventsData;if("pointerdown"===s.type){if(null!==n.pointerId&&n.pointerId!==s.pointerId)return;n.pointerId=s.pointerId}else"touchstart"===s.type&&1===s.targetTouches.length&&(n.touchId=s.targetTouches[0].identifier);if("touchstart"===s.type)return void N(t,s,s.targetTouches[0].pageX);const{params:o,touches:a,enabled:l}=t;if(!l)return;if(!o.simulateTouch&&"mouse"===s.pointerType)return;if(t.animating&&o.preventInteractionOnTransition)return;!t.animating&&o.cssMode&&o.loop&&t.loopFix();let d=s.target;if("wrapper"===o.touchEventsTarget&&!t.wrapperEl.contains(d))return;if("which"in s&&3===s.which)return;if("button"in s&&s.button>0)return;if(n.isTouched&&n.isMoved)return;const h=!!o.noSwipingClass&&""!==o.noSwipingClass,p=s.composedPath?s.composedPath():s.path;h&&s.target&&s.target.shadowRoot&&p&&(d=p[0]);const m=o.noSwipingSelector?o.noSwipingSelector:`.${o.noSwipingClass}`,f=!(!s.target||!s.target.shadowRoot);if(o.noSwiping&&(f?function(e,t){return void 0===t&&(t=this),function t(i){if(!i||i===r()||i===c())return null;i.assignedSlot&&(i=i.assignedSlot);const s=i.closest(e);return s||i.getRootNode?s||t(i.getRootNode().host):null}(t)}(m,d):d.closest(m)))return void(t.allowClick=!0);if(o.swipeHandler&&!d.closest(o.swipeHandler))return;a.currentX=s.pageX,a.currentY=s.pageY;const g=a.currentX,v=a.currentY;if(!N(t,s,g))return;Object.assign(n,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),a.startX=g,a.startY=v,n.touchStartTime=u(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,o.threshold>0&&(n.allowThresholdMove=!1);let b=!0;d.matches(n.focusableElements)&&(b=!1,"SELECT"===d.nodeName&&(n.isTouched=!1)),i.activeElement&&i.activeElement.matches(n.focusableElements)&&i.activeElement!==d&&i.activeElement.blur();const y=b&&t.allowTouchMove&&o.touchStartPreventDefault;!o.touchStartForcePreventDefault&&!y||d.isContentEditable||s.preventDefault(),o.freeMode&&o.freeMode.enabled&&t.freeMode&&t.animating&&!o.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",s)}function V(e){const t=r(),i=this,s=i.touchEventsData,{params:n,touches:o,rtlTranslate:a,enabled:l}=i;if(!l)return;if(!n.simulateTouch&&"mouse"===e.pointerType)return;let c,d=e;if(d.originalEvent&&(d=d.originalEvent),"pointermove"===d.type){if(null!==s.touchId)return;if(d.pointerId!==s.pointerId)return}if("touchmove"===d.type){if(c=[...d.changedTouches].filter((e=>e.identifier===s.touchId))[0],!c||c.identifier!==s.touchId)return}else c=d;if(!s.isTouched)return void(s.startMoving&&s.isScrolling&&i.emit("touchMoveOpposite",d));const h=c.pageX,p=c.pageY;if(d.preventedByNestedSwiper)return o.startX=h,void(o.startY=p);if(!i.allowTouchMove)return d.target.matches(s.focusableElements)||(i.allowClick=!1),void(s.isTouched&&(Object.assign(o,{startX:h,startY:p,currentX:h,currentY:p}),s.touchStartTime=u()));if(n.touchReleaseOnEdges&&!n.loop)if(i.isVertical()){if(p<o.startY&&i.translate<=i.maxTranslate()||p>o.startY&&i.translate>=i.minTranslate())return s.isTouched=!1,void(s.isMoved=!1)}else if(h<o.startX&&i.translate<=i.maxTranslate()||h>o.startX&&i.translate>=i.minTranslate())return;if(t.activeElement&&d.target===t.activeElement&&d.target.matches(s.focusableElements))return s.isMoved=!0,void(i.allowClick=!1);s.allowTouchCallbacks&&i.emit("touchMove",d),o.previousX=o.currentX,o.previousY=o.currentY,o.currentX=h,o.currentY=p;const m=o.currentX-o.startX,f=o.currentY-o.startY;if(i.params.threshold&&Math.sqrt(m**2+f**2)<i.params.threshold)return;if(void 0===s.isScrolling){let e;i.isHorizontal()&&o.currentY===o.startY||i.isVertical()&&o.currentX===o.startX?s.isScrolling=!1:m*m+f*f>=25&&(e=180*Math.atan2(Math.abs(f),Math.abs(m))/Math.PI,s.isScrolling=i.isHorizontal()?e>n.touchAngle:90-e>n.touchAngle)}if(s.isScrolling&&i.emit("touchMoveOpposite",d),void 0===s.startMoving&&(o.currentX===o.startX&&o.currentY===o.startY||(s.startMoving=!0)),s.isScrolling)return void(s.isTouched=!1);if(!s.startMoving)return;i.allowClick=!1,!n.cssMode&&d.cancelable&&d.preventDefault(),n.touchMoveStopPropagation&&!n.nested&&d.stopPropagation();let g=i.isHorizontal()?m:f,v=i.isHorizontal()?o.currentX-o.previousX:o.currentY-o.previousY;n.oneWayMovement&&(g=Math.abs(g)*(a?1:-1),v=Math.abs(v)*(a?1:-1)),o.diff=g,g*=n.touchRatio,a&&(g=-g,v=-v);const b=i.touchesDirection;i.swipeDirection=g>0?"prev":"next",i.touchesDirection=v>0?"prev":"next";const y=i.params.loop&&!n.cssMode,w="next"===i.touchesDirection&&i.allowSlideNext||"prev"===i.touchesDirection&&i.allowSlidePrev;if(!s.isMoved){if(y&&w&&i.loopFix({direction:i.swipeDirection}),s.startTranslate=i.getTranslate(),i.setTransition(0),i.animating){const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});i.wrapperEl.dispatchEvent(e)}s.allowMomentumBounce=!1,!n.grabCursor||!0!==i.allowSlideNext&&!0!==i.allowSlidePrev||i.setGrabCursor(!0),i.emit("sliderFirstMove",d)}if((new Date).getTime(),s.isMoved&&s.allowThresholdMove&&b!==i.touchesDirection&&y&&w&&Math.abs(g)>=1)return Object.assign(o,{startX:h,startY:p,currentX:h,currentY:p,startTranslate:s.currentTranslate}),s.loopSwapReset=!0,void(s.startTranslate=s.currentTranslate);i.emit("sliderMove",d),s.isMoved=!0,s.currentTranslate=g+s.startTranslate;let x=!0,S=n.resistanceRatio;if(n.touchReleaseOnEdges&&(S=0),g>0?(y&&w&&s.allowThresholdMove&&s.currentTranslate>(n.centeredSlides?i.minTranslate()-i.slidesSizesGrid[i.activeIndex+1]:i.minTranslate())&&i.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),s.currentTranslate>i.minTranslate()&&(x=!1,n.resistance&&(s.currentTranslate=i.minTranslate()-1+(-i.minTranslate()+s.startTranslate+g)**S))):g<0&&(y&&w&&s.allowThresholdMove&&s.currentTranslate<(n.centeredSlides?i.maxTranslate()+i.slidesSizesGrid[i.slidesSizesGrid.length-1]:i.maxTranslate())&&i.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:i.slides.length-("auto"===n.slidesPerView?i.slidesPerViewDynamic():Math.ceil(parseFloat(n.slidesPerView,10)))}),s.currentTranslate<i.maxTranslate()&&(x=!1,n.resistance&&(s.currentTranslate=i.maxTranslate()+1-(i.maxTranslate()-s.startTranslate-g)**S))),x&&(d.preventedByNestedSwiper=!0),!i.allowSlideNext&&"next"===i.swipeDirection&&s.currentTranslate<s.startTranslate&&(s.currentTranslate=s.startTranslate),!i.allowSlidePrev&&"prev"===i.swipeDirection&&s.currentTranslate>s.startTranslate&&(s.currentTranslate=s.startTranslate),i.allowSlidePrev||i.allowSlideNext||(s.currentTranslate=s.startTranslate),n.threshold>0){if(!(Math.abs(g)>n.threshold||s.allowThresholdMove))return void(s.currentTranslate=s.startTranslate);if(!s.allowThresholdMove)return s.allowThresholdMove=!0,o.startX=o.currentX,o.startY=o.currentY,s.currentTranslate=s.startTranslate,void(o.diff=i.isHorizontal()?o.currentX-o.startX:o.currentY-o.startY)}n.followFinger&&!n.cssMode&&((n.freeMode&&n.freeMode.enabled&&i.freeMode||n.watchSlidesProgress)&&(i.updateActiveIndex(),i.updateSlidesClasses()),n.freeMode&&n.freeMode.enabled&&i.freeMode&&i.freeMode.onTouchMove(),i.updateProgress(s.currentTranslate),i.setTranslate(s.currentTranslate))}function G(e){const t=this,i=t.touchEventsData;let s,n=e;n.originalEvent&&(n=n.originalEvent);if("touchend"===n.type||"touchcancel"===n.type){if(s=[...n.changedTouches].filter((e=>e.identifier===i.touchId))[0],!s||s.identifier!==i.touchId)return}else{if(null!==i.touchId)return;if(n.pointerId!==i.pointerId)return;s=n}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(n.type)){if(!(["pointercancel","contextmenu"].includes(n.type)&&(t.browser.isSafari||t.browser.isWebView)))return}i.pointerId=null,i.touchId=null;const{params:o,touches:a,rtlTranslate:r,slidesGrid:l,enabled:c}=t;if(!c)return;if(!o.simulateTouch&&"mouse"===n.pointerType)return;if(i.allowTouchCallbacks&&t.emit("touchEnd",n),i.allowTouchCallbacks=!1,!i.isTouched)return i.isMoved&&o.grabCursor&&t.setGrabCursor(!1),i.isMoved=!1,void(i.startMoving=!1);o.grabCursor&&i.isMoved&&i.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const h=u(),p=h-i.touchStartTime;if(t.allowClick){const e=n.path||n.composedPath&&n.composedPath();t.updateClickedSlide(e&&e[0]||n.target,e),t.emit("tap click",n),p<300&&h-i.lastClickTime<300&&t.emit("doubleTap doubleClick",n)}if(i.lastClickTime=u(),d((()=>{t.destroyed||(t.allowClick=!0)})),!i.isTouched||!i.isMoved||!t.swipeDirection||0===a.diff&&!i.loopSwapReset||i.currentTranslate===i.startTranslate&&!i.loopSwapReset)return i.isTouched=!1,i.isMoved=!1,void(i.startMoving=!1);let m;if(i.isTouched=!1,i.isMoved=!1,i.startMoving=!1,m=o.followFinger?r?t.translate:-t.translate:-i.currentTranslate,o.cssMode)return;if(o.freeMode&&o.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:m});const f=m>=-t.maxTranslate()&&!t.params.loop;let g=0,v=t.slidesSizesGrid[0];for(let e=0;e<l.length;e+=e<o.slidesPerGroupSkip?1:o.slidesPerGroup){const t=e<o.slidesPerGroupSkip-1?1:o.slidesPerGroup;void 0!==l[e+t]?(f||m>=l[e]&&m<l[e+t])&&(g=e,v=l[e+t]-l[e]):(f||m>=l[e])&&(g=e,v=l[l.length-1]-l[l.length-2])}let b=null,y=null;o.rewind&&(t.isBeginning?y=o.virtual&&o.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(b=0));const w=(m-l[g])/v,x=g<o.slidesPerGroupSkip-1?1:o.slidesPerGroup;if(p>o.longSwipesMs){if(!o.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(w>=o.longSwipesRatio?t.slideTo(o.rewind&&t.isEnd?b:g+x):t.slideTo(g)),"prev"===t.swipeDirection&&(w>1-o.longSwipesRatio?t.slideTo(g+x):null!==y&&w<0&&Math.abs(w)>o.longSwipesRatio?t.slideTo(y):t.slideTo(g))}else{if(!o.shortSwipes)return void t.slideTo(t.activeIndex);t.navigation&&(n.target===t.navigation.nextEl||n.target===t.navigation.prevEl)?n.target===t.navigation.nextEl?t.slideTo(g+x):t.slideTo(g):("next"===t.swipeDirection&&t.slideTo(null!==b?b:g+x),"prev"===t.swipeDirection&&t.slideTo(null!==y?y:g))}}function q(){const e=this,{params:t,el:i}=e;if(i&&0===i.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:s,allowSlidePrev:n,snapGrid:o}=e,a=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const r=a&&t.loop;!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||r?e.params.loop&&!a?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0):e.slideTo(e.slides.length-1,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout((()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()}),500)),e.allowSlidePrev=n,e.allowSlideNext=s,e.params.watchOverflow&&o!==e.snapGrid&&e.checkOverflow()}function W(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function X(){const e=this,{wrapperEl:t,rtlTranslate:i,enabled:s}=e;if(!s)return;let n;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const o=e.maxTranslate()-e.minTranslate();n=0===o?0:(e.translate-e.minTranslate())/o,n!==e.progress&&e.updateProgress(i?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function Y(e){const t=this;I(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update()}function U(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const Z=(e,t)=>{const i=r(),{params:s,el:n,wrapperEl:o,device:a}=e,l=!!s.nested,c="on"===t?"addEventListener":"removeEventListener",d=t;i[c]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:l}),n[c]("touchstart",e.onTouchStart,{passive:!1}),n[c]("pointerdown",e.onTouchStart,{passive:!1}),i[c]("touchmove",e.onTouchMove,{passive:!1,capture:l}),i[c]("pointermove",e.onTouchMove,{passive:!1,capture:l}),i[c]("touchend",e.onTouchEnd,{passive:!0}),i[c]("pointerup",e.onTouchEnd,{passive:!0}),i[c]("pointercancel",e.onTouchEnd,{passive:!0}),i[c]("touchcancel",e.onTouchEnd,{passive:!0}),i[c]("pointerout",e.onTouchEnd,{passive:!0}),i[c]("pointerleave",e.onTouchEnd,{passive:!0}),i[c]("contextmenu",e.onTouchEnd,{passive:!0}),(s.preventClicks||s.preventClicksPropagation)&&n[c]("click",e.onClick,!0),s.cssMode&&o[c]("scroll",e.onScroll),s.updateOnWindowResize?e[d](a.ios||a.android?"resize orientationchange observerUpdate":"resize observerUpdate",q,!0):e[d]("observerUpdate",q,!0),n[c]("load",e.onLoad,{capture:!0})};const K=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var J={setBreakpoint:function(){const e=this,{realIndex:t,initialized:i,params:s,el:n}=e,o=s.breakpoints;if(!o||o&&0===Object.keys(o).length)return;const a=e.getBreakpoint(o,e.params.breakpointsBase,e.el);if(!a||e.currentBreakpoint===a)return;const r=(a in o?o[a]:void 0)||e.originalParams,l=K(e,s),c=K(e,r),d=s.enabled;l&&!c?(n.classList.remove(`${s.containerModifierClass}grid`,`${s.containerModifierClass}grid-column`),e.emitContainerClasses()):!l&&c&&(n.classList.add(`${s.containerModifierClass}grid`),(r.grid.fill&&"column"===r.grid.fill||!r.grid.fill&&"column"===s.grid.fill)&&n.classList.add(`${s.containerModifierClass}grid-column`),e.emitContainerClasses()),["navigation","pagination","scrollbar"].forEach((t=>{if(void 0===r[t])return;const i=s[t]&&s[t].enabled,n=r[t]&&r[t].enabled;i&&!n&&e[t].disable(),!i&&n&&e[t].enable()}));const u=r.direction&&r.direction!==s.direction,h=s.loop&&(r.slidesPerView!==s.slidesPerView||u),p=s.loop;u&&i&&e.changeDirection(),m(e.params,r);const f=e.params.enabled,g=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),d&&!f?e.disable():!d&&f&&e.enable(),e.currentBreakpoint=a,e.emit("_beforeBreakpoint",r),i&&(h?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!p&&g?(e.loopCreate(t),e.updateSlides()):p&&!g&&e.loopDestroy()),e.emit("breakpoint",r)},getBreakpoint:function(e,t,i){if(void 0===t&&(t="window"),!e||"container"===t&&!i)return;let s=!1;const n=c(),o="window"===t?n.innerHeight:i.clientHeight,a=Object.keys(e).map((e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:o*t,point:e}}return{value:e,point:e}}));a.sort(((e,t)=>parseInt(e.value,10)-parseInt(t.value,10)));for(let e=0;e<a.length;e+=1){const{point:o,value:r}=a[e];"window"===t?n.matchMedia(`(min-width: ${r}px)`).matches&&(s=o):r<=i.clientWidth&&(s=o)}return s||"max"}};var Q={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function ee(e,t){return function(i){void 0===i&&(i={});const s=Object.keys(i)[0],n=i[s];"object"==typeof n&&null!==n?(!0===e[s]&&(e[s]={enabled:!0}),"navigation"===s&&e[s]&&e[s].enabled&&!e[s].prevEl&&!e[s].nextEl&&(e[s].auto=!0),["pagination","scrollbar"].indexOf(s)>=0&&e[s]&&e[s].enabled&&!e[s].el&&(e[s].auto=!0),s in e&&"enabled"in n?("object"!=typeof e[s]||"enabled"in e[s]||(e[s].enabled=!0),e[s]||(e[s]={enabled:!1}),m(t,i)):m(t,i)):m(t,i)}}const te={eventsEmitter:z,update:F,translate:_,transition:{setTransition:function(e,t){const i=this;i.params.cssMode||(i.wrapperEl.style.transitionDuration=`${e}ms`,i.wrapperEl.style.transitionDelay=0===e?"0ms":""),i.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);const i=this,{params:s}=i;s.cssMode||(s.autoHeight&&i.updateAutoHeight(),j({swiper:i,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e,t){void 0===e&&(e=!0);const i=this,{params:s}=i;i.animating=!1,s.cssMode||(i.setTransition(0),j({swiper:i,runCallbacks:e,direction:t,step:"End"}))}},slide:B,loop:H,grabCursor:{setGrabCursor:function(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const i="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),i.style.cursor="move",i.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame((()=>{t.__preventObserver__=!1}))},unsetGrabCursor:function(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame((()=>{e.__preventObserver__=!1})))}},events:{attachEvents:function(){const e=this,{params:t}=e;e.onTouchStart=$.bind(e),e.onTouchMove=V.bind(e),e.onTouchEnd=G.bind(e),e.onDocumentTouchStart=U.bind(e),t.cssMode&&(e.onScroll=X.bind(e)),e.onClick=W.bind(e),e.onLoad=Y.bind(e),Z(e,"on")},detachEvents:function(){Z(this,"off")}},breakpoints:J,checkOverflow:{checkOverflow:function(){const e=this,{isLocked:t,params:i}=e,{slidesOffsetBefore:s}=i;if(s){const t=e.slides.length-1,i=e.slidesGrid[t]+e.slidesSizesGrid[t]+2*s;e.isLocked=e.size>i}else e.isLocked=1===e.snapGrid.length;!0===i.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===i.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:{addClasses:function(){const e=this,{classNames:t,params:i,rtl:s,el:n,device:o}=e,a=function(e,t){const i=[];return e.forEach((e=>{"object"==typeof e?Object.keys(e).forEach((s=>{e[s]&&i.push(t+s)})):"string"==typeof e&&i.push(t+e)})),i}(["initialized",i.direction,{"free-mode":e.params.freeMode&&i.freeMode.enabled},{autoheight:i.autoHeight},{rtl:s},{grid:i.grid&&i.grid.rows>1},{"grid-column":i.grid&&i.grid.rows>1&&"column"===i.grid.fill},{android:o.android},{ios:o.ios},{"css-mode":i.cssMode},{centered:i.cssMode&&i.centeredSlides},{"watch-progress":i.watchSlidesProgress}],i.containerModifierClass);t.push(...a),n.classList.add(...t),e.emitContainerClasses()},removeClasses:function(){const{el:e,classNames:t}=this;e.classList.remove(...t),this.emitContainerClasses()}}},ie={};class se{constructor(){let e,t;for(var i=arguments.length,s=new Array(i),n=0;n<i;n++)s[n]=arguments[n];1===s.length&&s[0].constructor&&"Object"===Object.prototype.toString.call(s[0]).slice(8,-1)?t=s[0]:[e,t]=s,t||(t={}),t=m({},t),e&&!t.el&&(t.el=e);const o=r();if(t.el&&"string"==typeof t.el&&o.querySelectorAll(t.el).length>1){const e=[];return o.querySelectorAll(t.el).forEach((i=>{const s=m({},t,{el:i});e.push(new se(s))})),e}const a=this;a.__swiper__=!0,a.support=L(),a.device=A({userAgent:t.userAgent}),a.browser=k(),a.eventsListeners={},a.eventsAnyListeners=[],a.modules=[...a.__modules__],t.modules&&Array.isArray(t.modules)&&a.modules.push(...t.modules);const l={};a.modules.forEach((e=>{e({params:t,swiper:a,extendParams:ee(t,l),on:a.on.bind(a),once:a.once.bind(a),off:a.off.bind(a),emit:a.emit.bind(a)})}));const c=m({},Q,l);return a.params=m({},c,ie,t),a.originalParams=m({},a.params),a.passedParams=m({},t),a.params&&a.params.on&&Object.keys(a.params.on).forEach((e=>{a.on(e,a.params.on[e])})),a.params&&a.params.onAny&&a.onAny(a.params.onAny),Object.assign(a,{enabled:a.params.enabled,el:e,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===a.params.direction,isVertical:()=>"vertical"===a.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:a.params.allowSlideNext,allowSlidePrev:a.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:a.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:a.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),a.emit("_swiper"),a.params.init&&a.init(),a}getDirectionLabel(e){return this.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}getSlideIndex(e){const{slidesEl:t,params:i}=this,s=S(b(t,`.${i.slideClass}, swiper-slide`)[0]);return S(e)-s}getSlideIndexByData(e){return this.getSlideIndex(this.slides.filter((t=>1*t.getAttribute("data-swiper-slide-index")===e))[0])}recalcSlides(){const{slidesEl:e,params:t}=this;this.slides=b(e,`.${t.slideClass}, swiper-slide`)}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const i=this;e=Math.min(Math.max(e,0),1);const s=i.minTranslate(),n=(i.maxTranslate()-s)*e+s;i.translateTo(n,void 0===t?0:t),i.updateActiveIndex(),i.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter((t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass)));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter((e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass))).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.forEach((i=>{const s=e.getSlideClasses(i);t.push({slideEl:i,classNames:s}),e.emit("_slideClass",i,s)})),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){void 0===e&&(e="current"),void 0===t&&(t=!1);const{params:i,slides:s,slidesGrid:n,slidesSizesGrid:o,size:a,activeIndex:r}=this;let l=1;if("number"==typeof i.slidesPerView)return i.slidesPerView;if(i.centeredSlides){let e,t=s[r]?Math.ceil(s[r].swiperSlideSize):0;for(let i=r+1;i<s.length;i+=1)s[i]&&!e&&(t+=Math.ceil(s[i].swiperSlideSize),l+=1,t>a&&(e=!0));for(let i=r-1;i>=0;i-=1)s[i]&&!e&&(t+=s[i].swiperSlideSize,l+=1,t>a&&(e=!0))}else if("current"===e)for(let e=r+1;e<s.length;e+=1){(t?n[e]+o[e]-n[r]<a:n[e]-n[r]<a)&&(l+=1)}else for(let e=r-1;e>=0;e-=1){n[r]-n[e]<a&&(l+=1)}return l}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:i}=e;function s(){const t=e.rtlTranslate?-1*e.translate:e.translate,i=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(i),e.updateActiveIndex(),e.updateSlidesClasses()}let n;if(i.breakpoints&&e.setBreakpoint(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach((t=>{t.complete&&I(e,t)})),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),i.freeMode&&i.freeMode.enabled&&!i.cssMode)s(),i.autoHeight&&e.updateAutoHeight();else{if(("auto"===i.slidesPerView||i.slidesPerView>1)&&e.isEnd&&!i.centeredSlides){const t=e.virtual&&i.virtual.enabled?e.virtual.slides:e.slides;n=e.slideTo(t.length-1,0,!1,!0)}else n=e.slideTo(e.activeIndex,0,!1,!0);n||s()}i.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t){void 0===t&&(t=!0);const i=this,s=i.params.direction;return e||(e="horizontal"===s?"vertical":"horizontal"),e===s||"horizontal"!==e&&"vertical"!==e||(i.el.classList.remove(`${i.params.containerModifierClass}${s}`),i.el.classList.add(`${i.params.containerModifierClass}${e}`),i.emitContainerClasses(),i.params.direction=e,i.slides.forEach((t=>{"vertical"===e?t.style.width="":t.style.height=""})),i.emit("changeDirection"),t&&i.update()),i}changeLanguageDirection(e){const t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;let i=e||t.params.el;if("string"==typeof i&&(i=document.querySelector(i)),!i)return!1;i.swiper=t,i.parentNode&&i.parentNode.host&&i.parentNode.host.nodeName===t.params.swiperElementNodeName.toUpperCase()&&(t.isElement=!0);const s=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let n=(()=>{if(i&&i.shadowRoot&&i.shadowRoot.querySelector){return i.shadowRoot.querySelector(s())}return b(i,s())[0]})();return!n&&t.params.createElements&&(n=w("div",t.params.wrapperClass),i.append(n),b(i,`.${t.params.slideClass}`).forEach((e=>{n.append(e)}))),Object.assign(t,{el:i,wrapperEl:n,slidesEl:t.isElement&&!i.parentNode.host.slideSlots?i.parentNode.host:n,hostEl:t.isElement?i.parentNode.host:i,mounted:!0,rtl:"rtl"===i.dir.toLowerCase()||"rtl"===x(i,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===i.dir.toLowerCase()||"rtl"===x(i,"direction")),wrongRTL:"-webkit-box"===x(n,"display")}),!0}init(e){const t=this;if(t.initialized)return t;if(!1===t.mount(e))return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(),t.attachEvents();const i=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&i.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),i.forEach((e=>{e.complete?I(t,e):e.addEventListener("load",(e=>{I(t,e.target)}))})),D(t),t.initialized=!0,D(t),t.emit("init"),t.emit("afterInit"),t}destroy(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);const i=this,{params:s,el:n,wrapperEl:o,slides:a}=i;return void 0===i.params||i.destroyed||(i.emit("beforeDestroy"),i.initialized=!1,i.detachEvents(),s.loop&&i.loopDestroy(),t&&(i.removeClasses(),n.removeAttribute("style"),o.removeAttribute("style"),a&&a.length&&a.forEach((e=>{e.classList.remove(s.slideVisibleClass,s.slideFullyVisibleClass,s.slideActiveClass,s.slideNextClass,s.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")}))),i.emit("destroy"),Object.keys(i.eventsListeners).forEach((e=>{i.off(e)})),!1!==e&&(i.el.swiper=null,function(e){const t=e;Object.keys(t).forEach((e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}}))}(i)),i.destroyed=!0),null}static extendDefaults(e){m(ie,e)}static get extendedDefaults(){return ie}static get defaults(){return Q}static installModule(e){se.prototype.__modules__||(se.prototype.__modules__=[]);const t=se.prototype.__modules__;"function"==typeof e&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach((e=>se.installModule(e))),se):(se.installModule(e),se)}}function ne(e,t,i,s){return e.params.createElements&&Object.keys(s).forEach((n=>{if(!i[n]&&!0===i.auto){let o=b(e.el,`.${s[n]}`)[0];o||(o=w("div",s[n]),o.className=s[n],e.el.append(o)),i[n]=o,t[n]=o}})),i}function oe(e){let{swiper:t,extendParams:i,on:s,emit:n}=e;function o(e){let i;return e&&"string"==typeof e&&t.isElement&&(i=t.el.querySelector(e),i)?i:(e&&("string"==typeof e&&(i=[...document.querySelectorAll(e)]),t.params.uniqueNavElements&&"string"==typeof e&&i.length>1&&1===t.el.querySelectorAll(e).length&&(i=t.el.querySelector(e))),e&&!i?e:i)}function a(e,i){const s=t.params.navigation;(e=C(e)).forEach((e=>{e&&(e.classList[i?"add":"remove"](...s.disabledClass.split(" ")),"BUTTON"===e.tagName&&(e.disabled=i),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](s.lockClass))}))}function r(){const{nextEl:e,prevEl:i}=t.navigation;if(t.params.loop)return a(i,!1),void a(e,!1);a(i,t.isBeginning&&!t.params.rewind),a(e,t.isEnd&&!t.params.rewind)}function l(e){e.preventDefault(),(!t.isBeginning||t.params.loop||t.params.rewind)&&(t.slidePrev(),n("navigationPrev"))}function c(e){e.preventDefault(),(!t.isEnd||t.params.loop||t.params.rewind)&&(t.slideNext(),n("navigationNext"))}function d(){const e=t.params.navigation;if(t.params.navigation=ne(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!e.nextEl&&!e.prevEl)return;let i=o(e.nextEl),s=o(e.prevEl);Object.assign(t.navigation,{nextEl:i,prevEl:s}),i=C(i),s=C(s);const n=(i,s)=>{i&&i.addEventListener("click","next"===s?c:l),!t.enabled&&i&&i.classList.add(...e.lockClass.split(" "))};i.forEach((e=>n(e,"next"))),s.forEach((e=>n(e,"prev")))}function u(){let{nextEl:e,prevEl:i}=t.navigation;e=C(e),i=C(i);const s=(e,i)=>{e.removeEventListener("click","next"===i?c:l),e.classList.remove(...t.params.navigation.disabledClass.split(" "))};e.forEach((e=>s(e,"next"))),i.forEach((e=>s(e,"prev")))}i({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),t.navigation={nextEl:null,prevEl:null},s("init",(()=>{!1===t.params.navigation.enabled?h():(d(),r())})),s("toEdge fromEdge lock unlock",(()=>{r()})),s("destroy",(()=>{u()})),s("enable disable",(()=>{let{nextEl:e,prevEl:i}=t.navigation;e=C(e),i=C(i),t.enabled?r():[...e,...i].filter((e=>!!e)).forEach((e=>e.classList.add(t.params.navigation.lockClass)))})),s("click",((e,i)=>{let{nextEl:s,prevEl:o}=t.navigation;s=C(s),o=C(o);const a=i.target;if(t.params.navigation.hideOnClick&&!o.includes(a)&&!s.includes(a)){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===a||t.pagination.el.contains(a)))return;let e;s.length?e=s[0].classList.contains(t.params.navigation.hiddenClass):o.length&&(e=o[0].classList.contains(t.params.navigation.hiddenClass)),n(!0===e?"navigationShow":"navigationHide"),[...s,...o].filter((e=>!!e)).forEach((e=>e.classList.toggle(t.params.navigation.hiddenClass)))}}));const h=()=>{t.el.classList.add(...t.params.navigation.navigationDisabledClass.split(" ")),u()};Object.assign(t.navigation,{enable:()=>{t.el.classList.remove(...t.params.navigation.navigationDisabledClass.split(" ")),d(),r()},disable:h,update:r,init:d,destroy:u})}function ae(e){return void 0===e&&(e=""),`.${e.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function re(e){let{swiper:t,extendParams:i,on:s,emit:n}=e;const o="swiper-pagination";let a;i({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${o}-bullet`,bulletActiveClass:`${o}-bullet-active`,modifierClass:`${o}-`,currentClass:`${o}-current`,totalClass:`${o}-total`,hiddenClass:`${o}-hidden`,progressbarFillClass:`${o}-progressbar-fill`,progressbarOppositeClass:`${o}-progressbar-opposite`,clickableClass:`${o}-clickable`,lockClass:`${o}-lock`,horizontalClass:`${o}-horizontal`,verticalClass:`${o}-vertical`,paginationDisabledClass:`${o}-disabled`}}),t.pagination={el:null,bullets:[]};let r=0;function l(){return!t.params.pagination.el||!t.pagination.el||Array.isArray(t.pagination.el)&&0===t.pagination.el.length}function c(e,i){const{bulletActiveClass:s}=t.params.pagination;e&&(e=e[("prev"===i?"previous":"next")+"ElementSibling"])&&(e.classList.add(`${s}-${i}`),(e=e[("prev"===i?"previous":"next")+"ElementSibling"])&&e.classList.add(`${s}-${i}-${i}`))}function d(e){const i=e.target.closest(ae(t.params.pagination.bulletClass));if(!i)return;e.preventDefault();const s=S(i)*t.params.slidesPerGroup;if(t.params.loop){if(t.realIndex===s)return;t.slideToLoop(s)}else t.slideTo(s)}function u(){const e=t.rtl,i=t.params.pagination;if(l())return;let s,o,d=t.pagination.el;d=C(d);const u=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,h=t.params.loop?Math.ceil(u/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(o=t.previousRealIndex||0,s=t.params.slidesPerGroup>1?Math.floor(t.realIndex/t.params.slidesPerGroup):t.realIndex):void 0!==t.snapIndex?(s=t.snapIndex,o=t.previousSnapIndex):(o=t.previousIndex||0,s=t.activeIndex||0),"bullets"===i.type&&t.pagination.bullets&&t.pagination.bullets.length>0){const n=t.pagination.bullets;let l,u,h;if(i.dynamicBullets&&(a=T(n[0],t.isHorizontal()?"width":"height",!0),d.forEach((e=>{e.style[t.isHorizontal()?"width":"height"]=a*(i.dynamicMainBullets+4)+"px"})),i.dynamicMainBullets>1&&void 0!==o&&(r+=s-(o||0),r>i.dynamicMainBullets-1?r=i.dynamicMainBullets-1:r<0&&(r=0)),l=Math.max(s-r,0),u=l+(Math.min(n.length,i.dynamicMainBullets)-1),h=(u+l)/2),n.forEach((e=>{const t=[...["","-next","-next-next","-prev","-prev-prev","-main"].map((e=>`${i.bulletActiveClass}${e}`))].map((e=>"string"==typeof e&&e.includes(" ")?e.split(" "):e)).flat();e.classList.remove(...t)})),d.length>1)n.forEach((e=>{const n=S(e);n===s?e.classList.add(...i.bulletActiveClass.split(" ")):t.isElement&&e.setAttribute("part","bullet"),i.dynamicBullets&&(n>=l&&n<=u&&e.classList.add(...`${i.bulletActiveClass}-main`.split(" ")),n===l&&c(e,"prev"),n===u&&c(e,"next"))}));else{const e=n[s];if(e&&e.classList.add(...i.bulletActiveClass.split(" ")),t.isElement&&n.forEach(((e,t)=>{e.setAttribute("part",t===s?"bullet-active":"bullet")})),i.dynamicBullets){const e=n[l],t=n[u];for(let e=l;e<=u;e+=1)n[e]&&n[e].classList.add(...`${i.bulletActiveClass}-main`.split(" "));c(e,"prev"),c(t,"next")}}if(i.dynamicBullets){const s=Math.min(n.length,i.dynamicMainBullets+4),o=(a*s-a)/2-h*a,r=e?"right":"left";n.forEach((e=>{e.style[t.isHorizontal()?r:"top"]=`${o}px`}))}}d.forEach(((e,o)=>{if("fraction"===i.type&&(e.querySelectorAll(ae(i.currentClass)).forEach((e=>{e.textContent=i.formatFractionCurrent(s+1)})),e.querySelectorAll(ae(i.totalClass)).forEach((e=>{e.textContent=i.formatFractionTotal(h)}))),"progressbar"===i.type){let n;n=i.progressbarOpposite?t.isHorizontal()?"vertical":"horizontal":t.isHorizontal()?"horizontal":"vertical";const o=(s+1)/h;let a=1,r=1;"horizontal"===n?a=o:r=o,e.querySelectorAll(ae(i.progressbarFillClass)).forEach((e=>{e.style.transform=`translate3d(0,0,0) scaleX(${a}) scaleY(${r})`,e.style.transitionDuration=`${t.params.speed}ms`}))}"custom"===i.type&&i.renderCustom?(e.innerHTML=i.renderCustom(t,s+1,h),0===o&&n("paginationRender",e)):(0===o&&n("paginationRender",e),n("paginationUpdate",e)),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](i.lockClass)}))}function h(){const e=t.params.pagination;if(l())return;const i=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.grid&&t.params.grid.rows>1?t.slides.length/Math.ceil(t.params.grid.rows):t.slides.length;let s=t.pagination.el;s=C(s);let o="";if("bullets"===e.type){let s=t.params.loop?Math.ceil(i/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&&t.params.freeMode.enabled&&s>i&&(s=i);for(let i=0;i<s;i+=1)e.renderBullet?o+=e.renderBullet.call(t,i,e.bulletClass):o+=`<${e.bulletElement} ${t.isElement?'part="bullet"':""} class="${e.bulletClass}"></${e.bulletElement}>`}"fraction"===e.type&&(o=e.renderFraction?e.renderFraction.call(t,e.currentClass,e.totalClass):`<span class="${e.currentClass}"></span> / <span class="${e.totalClass}"></span>`),"progressbar"===e.type&&(o=e.renderProgressbar?e.renderProgressbar.call(t,e.progressbarFillClass):`<span class="${e.progressbarFillClass}"></span>`),t.pagination.bullets=[],s.forEach((i=>{"custom"!==e.type&&(i.innerHTML=o||""),"bullets"===e.type&&t.pagination.bullets.push(...i.querySelectorAll(ae(e.bulletClass)))})),"custom"!==e.type&&n("paginationRender",s[0])}function p(){t.params.pagination=ne(t,t.originalParams.pagination,t.params.pagination,{el:"swiper-pagination"});const e=t.params.pagination;if(!e.el)return;let i;"string"==typeof e.el&&t.isElement&&(i=t.el.querySelector(e.el)),i||"string"!=typeof e.el||(i=[...document.querySelectorAll(e.el)]),i||(i=e.el),i&&0!==i.length&&(t.params.uniqueNavElements&&"string"==typeof e.el&&Array.isArray(i)&&i.length>1&&(i=[...t.el.querySelectorAll(e.el)],i.length>1&&(i=i.filter((e=>E(e,".swiper")[0]===t.el))[0])),Array.isArray(i)&&1===i.length&&(i=i[0]),Object.assign(t.pagination,{el:i}),i=C(i),i.forEach((i=>{"bullets"===e.type&&e.clickable&&i.classList.add(...(e.clickableClass||"").split(" ")),i.classList.add(e.modifierClass+e.type),i.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass),"bullets"===e.type&&e.dynamicBullets&&(i.classList.add(`${e.modifierClass}${e.type}-dynamic`),r=0,e.dynamicMainBullets<1&&(e.dynamicMainBullets=1)),"progressbar"===e.type&&e.progressbarOpposite&&i.classList.add(e.progressbarOppositeClass),e.clickable&&i.addEventListener("click",d),t.enabled||i.classList.add(e.lockClass)})))}function m(){const e=t.params.pagination;if(l())return;let i=t.pagination.el;i&&(i=C(i),i.forEach((i=>{i.classList.remove(e.hiddenClass),i.classList.remove(e.modifierClass+e.type),i.classList.remove(t.isHorizontal()?e.horizontalClass:e.verticalClass),e.clickable&&(i.classList.remove(...(e.clickableClass||"").split(" ")),i.removeEventListener("click",d))}))),t.pagination.bullets&&t.pagination.bullets.forEach((t=>t.classList.remove(...e.bulletActiveClass.split(" "))))}s("changeDirection",(()=>{if(!t.pagination||!t.pagination.el)return;const e=t.params.pagination;let{el:i}=t.pagination;i=C(i),i.forEach((i=>{i.classList.remove(e.horizontalClass,e.verticalClass),i.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass)}))})),s("init",(()=>{!1===t.params.pagination.enabled?f():(p(),h(),u())})),s("activeIndexChange",(()=>{void 0===t.snapIndex&&u()})),s("snapIndexChange",(()=>{u()})),s("snapGridLengthChange",(()=>{h(),u()})),s("destroy",(()=>{m()})),s("enable disable",(()=>{let{el:e}=t.pagination;e&&(e=C(e),e.forEach((e=>e.classList[t.enabled?"remove":"add"](t.params.pagination.lockClass))))})),s("lock unlock",(()=>{u()})),s("click",((e,i)=>{const s=i.target,o=C(t.pagination.el);if(t.params.pagination.el&&t.params.pagination.hideOnClick&&o&&o.length>0&&!s.classList.contains(t.params.pagination.bulletClass)){if(t.navigation&&(t.navigation.nextEl&&s===t.navigation.nextEl||t.navigation.prevEl&&s===t.navigation.prevEl))return;const e=o[0].classList.contains(t.params.pagination.hiddenClass);n(!0===e?"paginationShow":"paginationHide"),o.forEach((e=>e.classList.toggle(t.params.pagination.hiddenClass)))}}));const f=()=>{t.el.classList.add(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=C(e),e.forEach((e=>e.classList.add(t.params.pagination.paginationDisabledClass)))),m()};Object.assign(t.pagination,{enable:()=>{t.el.classList.remove(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=C(e),e.forEach((e=>e.classList.remove(t.params.pagination.paginationDisabledClass)))),p(),h(),u()},disable:f,render:h,update:u,init:p,destroy:m})}function le(e){let t,i,{swiper:s,extendParams:n,on:o,emit:a,params:l}=e;s.autoplay={running:!1,paused:!1,timeLeft:0},n({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let c,d,u,h,p,m,f,g,v=l&&l.autoplay?l.autoplay.delay:3e3,b=l&&l.autoplay?l.autoplay.delay:3e3,y=(new Date).getTime();function w(e){s&&!s.destroyed&&s.wrapperEl&&e.target===s.wrapperEl&&(s.wrapperEl.removeEventListener("transitionend",w),g||P())}const x=()=>{if(s.destroyed||!s.autoplay.running)return;s.autoplay.paused?d=!0:d&&(b=c,d=!1);const e=s.autoplay.paused?c:y+b-(new Date).getTime();s.autoplay.timeLeft=e,a("autoplayTimeLeft",e,e/v),i=requestAnimationFrame((()=>{x()}))},S=e=>{if(s.destroyed||!s.autoplay.running)return;cancelAnimationFrame(i),x();let n=void 0===e?s.params.autoplay.delay:e;v=s.params.autoplay.delay,b=s.params.autoplay.delay;const o=(()=>{let e;if(e=s.virtual&&s.params.virtual.enabled?s.slides.filter((e=>e.classList.contains("swiper-slide-active")))[0]:s.slides[s.activeIndex],!e)return;return parseInt(e.getAttribute("data-swiper-autoplay"),10)})();!Number.isNaN(o)&&o>0&&void 0===e&&(n=o,v=o,b=o),c=n;const r=s.params.speed,l=()=>{s&&!s.destroyed&&(s.params.autoplay.reverseDirection?!s.isBeginning||s.params.loop||s.params.rewind?(s.slidePrev(r,!0,!0),a("autoplay")):s.params.autoplay.stopOnLastSlide||(s.slideTo(s.slides.length-1,r,!0,!0),a("autoplay")):!s.isEnd||s.params.loop||s.params.rewind?(s.slideNext(r,!0,!0),a("autoplay")):s.params.autoplay.stopOnLastSlide||(s.slideTo(0,r,!0,!0),a("autoplay")),s.params.cssMode&&(y=(new Date).getTime(),requestAnimationFrame((()=>{S()}))))};return n>0?(clearTimeout(t),t=setTimeout((()=>{l()}),n)):requestAnimationFrame((()=>{l()})),n},E=()=>{y=(new Date).getTime(),s.autoplay.running=!0,S(),a("autoplayStart")},T=()=>{s.autoplay.running=!1,clearTimeout(t),cancelAnimationFrame(i),a("autoplayStop")},C=(e,i)=>{if(s.destroyed||!s.autoplay.running)return;clearTimeout(t),e||(f=!0);const n=()=>{a("autoplayPause"),s.params.autoplay.waitForTransition?s.wrapperEl.addEventListener("transitionend",w):P()};if(s.autoplay.paused=!0,i)return m&&(c=s.params.autoplay.delay),m=!1,void n();const o=c||s.params.autoplay.delay;c=o-((new Date).getTime()-y),s.isEnd&&c<0&&!s.params.loop||(c<0&&(c=0),n())},P=()=>{s.isEnd&&c<0&&!s.params.loop||s.destroyed||!s.autoplay.running||(y=(new Date).getTime(),f?(f=!1,S(c)):S(),s.autoplay.paused=!1,a("autoplayResume"))},M=()=>{if(s.destroyed||!s.autoplay.running)return;const e=r();"hidden"===e.visibilityState&&(f=!0,C(!0)),"visible"===e.visibilityState&&P()},O=e=>{"mouse"===e.pointerType&&(f=!0,g=!0,s.animating||s.autoplay.paused||C(!0))},L=e=>{"mouse"===e.pointerType&&(g=!1,s.autoplay.paused&&P())};o("init",(()=>{s.params.autoplay.enabled&&(s.params.autoplay.pauseOnMouseEnter&&(s.el.addEventListener("pointerenter",O),s.el.addEventListener("pointerleave",L)),r().addEventListener("visibilitychange",M),E())})),o("destroy",(()=>{s.el.removeEventListener("pointerenter",O),s.el.removeEventListener("pointerleave",L),r().removeEventListener("visibilitychange",M),s.autoplay.running&&T()})),o("_freeModeStaticRelease",(()=>{(h||f)&&P()})),o("_freeModeNoMomentumRelease",(()=>{s.params.autoplay.disableOnInteraction?T():C(!0,!0)})),o("beforeTransitionStart",((e,t,i)=>{!s.destroyed&&s.autoplay.running&&(i||!s.params.autoplay.disableOnInteraction?C(!0,!0):T())})),o("sliderFirstMove",(()=>{!s.destroyed&&s.autoplay.running&&(s.params.autoplay.disableOnInteraction?T():(u=!0,h=!1,f=!1,p=setTimeout((()=>{f=!0,h=!0,C(!0)}),200)))})),o("touchEnd",(()=>{if(!s.destroyed&&s.autoplay.running&&u){if(clearTimeout(p),clearTimeout(t),s.params.autoplay.disableOnInteraction)return h=!1,void(u=!1);h&&s.params.cssMode&&P(),h=!1,u=!1}})),o("slideChange",(()=>{!s.destroyed&&s.autoplay.running&&(m=!0)})),Object.assign(s.autoplay,{start:E,stop:T,pause:C,resume:P})}function ce(e){let{swiper:t,extendParams:i,on:s}=e;i({thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-thumbs"}});let n=!1,o=!1;function a(){const e=t.thumbs.swiper;if(!e||e.destroyed)return;const i=e.clickedIndex,s=e.clickedSlide;if(s&&s.classList.contains(t.params.thumbs.slideThumbActiveClass))return;if(null==i)return;let n;n=e.params.loop?parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10):i,t.params.loop?t.slideToLoop(n):t.slideTo(n)}function l(){const{thumbs:e}=t.params;if(n)return!1;n=!0;const i=t.constructor;if(e.swiper instanceof i)t.thumbs.swiper=e.swiper,Object.assign(t.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),Object.assign(t.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1}),t.thumbs.swiper.update();else if(p(e.swiper)){const s=Object.assign({},e.swiper);Object.assign(s,{watchSlidesProgress:!0,slideToClickedSlide:!1}),t.thumbs.swiper=new i(s),o=!0}return t.thumbs.swiper.el.classList.add(t.params.thumbs.thumbsContainerClass),t.thumbs.swiper.on("tap",a),!0}function c(e){const i=t.thumbs.swiper;if(!i||i.destroyed)return;const s="auto"===i.params.slidesPerView?i.slidesPerViewDynamic():i.params.slidesPerView;let n=1;const o=t.params.thumbs.slideThumbActiveClass;if(t.params.slidesPerView>1&&!t.params.centeredSlides&&(n=t.params.slidesPerView),t.params.thumbs.multipleActiveThumbs||(n=1),n=Math.floor(n),i.slides.forEach((e=>e.classList.remove(o))),i.params.loop||i.params.virtual&&i.params.virtual.enabled)for(let e=0;e<n;e+=1)b(i.slidesEl,`[data-swiper-slide-index="${t.realIndex+e}"]`).forEach((e=>{e.classList.add(o)}));else for(let e=0;e<n;e+=1)i.slides[t.realIndex+e]&&i.slides[t.realIndex+e].classList.add(o);const a=t.params.thumbs.autoScrollOffset,r=a&&!i.params.loop;if(t.realIndex!==i.realIndex||r){const n=i.activeIndex;let o,l;if(i.params.loop){const e=i.slides.filter((e=>e.getAttribute("data-swiper-slide-index")===`${t.realIndex}`))[0];o=i.slides.indexOf(e),l=t.activeIndex>t.previousIndex?"next":"prev"}else o=t.realIndex,l=o>t.previousIndex?"next":"prev";r&&(o+="next"===l?a:-1*a),i.visibleSlidesIndexes&&i.visibleSlidesIndexes.indexOf(o)<0&&(i.params.centeredSlides?o=o>n?o-Math.floor(s/2)+1:o+Math.floor(s/2)-1:o>n&&i.params.slidesPerGroup,i.slideTo(o,e?0:void 0))}}t.thumbs={swiper:null},s("beforeInit",(()=>{const{thumbs:e}=t.params;if(e&&e.swiper)if("string"==typeof e.swiper||e.swiper instanceof HTMLElement){const i=r(),s=()=>{const s="string"==typeof e.swiper?i.querySelector(e.swiper):e.swiper;if(s&&s.swiper)e.swiper=s.swiper,l(),c(!0);else if(s){const i=n=>{e.swiper=n.detail[0],s.removeEventListener("init",i),l(),c(!0),e.swiper.update(),t.update()};s.addEventListener("init",i)}return s},n=()=>{if(t.destroyed)return;s()||requestAnimationFrame(n)};requestAnimationFrame(n)}else l(),c(!0)})),s("slideChange update resize observerUpdate",(()=>{c()})),s("setTransition",((e,i)=>{const s=t.thumbs.swiper;s&&!s.destroyed&&s.setTransition(i)})),s("beforeDestroy",(()=>{const e=t.thumbs.swiper;e&&!e.destroyed&&o&&e.destroy()})),Object.assign(t.thumbs,{init:l,update:c})}function de(e){let t,i,s,n,{swiper:o,extendParams:a,on:r}=e;a({grid:{rows:1,fill:"column"}});const l=()=>{let e=o.params.spaceBetween;return"string"==typeof e&&e.indexOf("%")>=0?e=parseFloat(e.replace("%",""))/100*o.size:"string"==typeof e&&(e=parseFloat(e)),e};r("init",(()=>{n=o.params.grid&&o.params.grid.rows>1})),r("update",(()=>{const{params:e,el:t}=o,i=e.grid&&e.grid.rows>1;n&&!i?(t.classList.remove(`${e.containerModifierClass}grid`,`${e.containerModifierClass}grid-column`),s=1,o.emitContainerClasses()):!n&&i&&(t.classList.add(`${e.containerModifierClass}grid`),"column"===e.grid.fill&&t.classList.add(`${e.containerModifierClass}grid-column`),o.emitContainerClasses()),n=i})),o.grid={initSlides:e=>{const{slidesPerView:n}=o.params,{rows:a,fill:r}=o.params.grid,l=o.virtual&&o.params.virtual.enabled?o.virtual.slides.length:e.length;s=Math.floor(l/a),t=Math.floor(l/a)===l/a?l:Math.ceil(l/a)*a,"auto"!==n&&"row"===r&&(t=Math.max(t,n*a)),i=t/a},unsetSlides:()=>{o.slides&&o.slides.forEach((e=>{e.swiperSlideGridSet&&(e.style.height="",e.style[o.getDirectionLabel("margin-top")]="")}))},updateSlide:(e,n,a)=>{const{slidesPerGroup:r}=o.params,c=l(),{rows:d,fill:u}=o.params.grid,h=o.virtual&&o.params.virtual.enabled?o.virtual.slides.length:a.length;let p,m,f;if("row"===u&&r>1){const i=Math.floor(e/(r*d)),s=e-d*r*i,o=0===i?r:Math.min(Math.ceil((h-i*d*r)/d),r);f=Math.floor(s/o),m=s-f*o+i*r,p=m+f*t/d,n.style.order=p}else"column"===u?(m=Math.floor(e/d),f=e-m*d,(m>s||m===s&&f===d-1)&&(f+=1,f>=d&&(f=0,m+=1))):(f=Math.floor(e/i),m=e-f*i);n.row=f,n.column=m,n.style.height=`calc((100% - ${(d-1)*c}px) / ${d})`,n.style[o.getDirectionLabel("margin-top")]=0!==f?c&&`${c}px`:"",n.swiperSlideGridSet=!0},updateWrapperSize:(e,i)=>{const{centeredSlides:s,roundLengths:n}=o.params,a=l(),{rows:r}=o.params.grid;if(o.virtualSize=(e+a)*t,o.virtualSize=Math.ceil(o.virtualSize/r)-a,o.params.cssMode||(o.wrapperEl.style[o.getDirectionLabel("width")]=`${o.virtualSize+a}px`),s){const e=[];for(let t=0;t<i.length;t+=1){let s=i[t];n&&(s=Math.floor(s)),i[t]<o.virtualSize+i[0]&&e.push(s)}i.splice(0,i.length),i.push(...e)}}}}function ue(e,t){const i=v(t);return i!==t&&(i.style.backfaceVisibility="hidden",i.style["-webkit-backface-visibility"]="hidden"),i}function he(e){let{swiper:t,duration:i,transformElements:s,allSlides:n}=e;const{activeIndex:o}=t;if(t.params.virtualTranslate&&0!==i){let e,i=!1;e=n?s:s.filter((e=>{const i=e.classList.contains("swiper-slide-transform")?(e=>{if(!e.parentElement)return t.slides.filter((t=>t.shadowRoot&&t.shadowRoot===e.parentNode))[0];return e.parentElement})(e):e;return t.getSlideIndex(i)===o})),e.forEach((e=>{!function(e,t){t&&e.addEventListener("transitionend",(function i(s){s.target===e&&(t.call(e,s),e.removeEventListener("transitionend",i))}))}(e,(()=>{if(i)return;if(!t||t.destroyed)return;i=!0,t.animating=!1;const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});t.wrapperEl.dispatchEvent(e)}))}))}}function pe(e){let{swiper:t,extendParams:i,on:s}=e;i({fadeEffect:{crossFade:!1}});!function(e){const{effect:t,swiper:i,on:s,setTranslate:n,setTransition:o,overwriteParams:a,perspective:r,recreateShadows:l,getEffectParams:c}=e;let d;s("beforeInit",(()=>{if(i.params.effect!==t)return;i.classNames.push(`${i.params.containerModifierClass}${t}`),r&&r()&&i.classNames.push(`${i.params.containerModifierClass}3d`);const e=a?a():{};Object.assign(i.params,e),Object.assign(i.originalParams,e)})),s("setTranslate",(()=>{i.params.effect===t&&n()})),s("setTransition",((e,s)=>{i.params.effect===t&&o(s)})),s("transitionEnd",(()=>{if(i.params.effect===t&&l){if(!c||!c().slideShadows)return;i.slides.forEach((e=>{e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((e=>e.remove()))})),l()}})),s("virtualUpdate",(()=>{i.params.effect===t&&(i.slides.length||(d=!0),requestAnimationFrame((()=>{d&&i.slides&&i.slides.length&&(n(),d=!1)})))}))}({effect:"fade",swiper:t,on:s,setTranslate:()=>{const{slides:e}=t;t.params.fadeEffect;for(let i=0;i<e.length;i+=1){const e=t.slides[i];let s=-e.swiperSlideOffset;t.params.virtualTranslate||(s-=t.translate);let n=0;t.isHorizontal()||(n=s,s=0);const o=t.params.fadeEffect.crossFade?Math.max(1-Math.abs(e.progress),0):1+Math.min(Math.max(e.progress,-1),0),a=ue(0,e);a.style.opacity=o,a.style.transform=`translate3d(${s}px, ${n}px, 0px)`}},setTransition:e=>{const i=t.slides.map((e=>v(e)));i.forEach((t=>{t.style.transitionDuration=`${e}ms`})),he({swiper:t,duration:e,transformElements:i,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})}Object.keys(te).forEach((e=>{Object.keys(te[e]).forEach((t=>{se.prototype[t]=te[e][t]}))})),se.use([function(e){let{swiper:t,on:i,emit:s}=e;const n=c();let o=null,a=null;const r=()=>{t&&!t.destroyed&&t.initialized&&(s("beforeResize"),s("resize"))},l=()=>{t&&!t.destroyed&&t.initialized&&s("orientationchange")};i("init",(()=>{t.params.resizeObserver&&void 0!==n.ResizeObserver?t&&!t.destroyed&&t.initialized&&(o=new ResizeObserver((e=>{a=n.requestAnimationFrame((()=>{const{width:i,height:s}=t;let n=i,o=s;e.forEach((e=>{let{contentBoxSize:i,contentRect:s,target:a}=e;a&&a!==t.el||(n=s?s.width:(i[0]||i).inlineSize,o=s?s.height:(i[0]||i).blockSize)})),n===i&&o===s||r()}))})),o.observe(t.el)):(n.addEventListener("resize",r),n.addEventListener("orientationchange",l))})),i("destroy",(()=>{a&&n.cancelAnimationFrame(a),o&&o.unobserve&&t.el&&(o.unobserve(t.el),o=null),n.removeEventListener("resize",r),n.removeEventListener("orientationchange",l)}))},function(e){let{swiper:t,extendParams:i,on:s,emit:n}=e;const o=[],a=c(),r=function(e,i){void 0===i&&(i={});const s=new(a.MutationObserver||a.WebkitMutationObserver)((e=>{if(t.__preventObserver__)return;if(1===e.length)return void n("observerUpdate",e[0]);const i=function(){n("observerUpdate",e[0])};a.requestAnimationFrame?a.requestAnimationFrame(i):a.setTimeout(i,0)}));s.observe(e,{attributes:void 0===i.attributes||i.attributes,childList:void 0===i.childList||i.childList,characterData:void 0===i.characterData||i.characterData}),o.push(s)};i({observer:!1,observeParents:!1,observeSlideChildren:!1}),s("init",(()=>{if(t.params.observer){if(t.params.observeParents){const e=E(t.hostEl);for(let t=0;t<e.length;t+=1)r(e[t])}r(t.hostEl,{childList:t.params.observeSlideChildren}),r(t.wrapperEl,{attributes:!1})}})),s("destroy",(()=>{o.forEach((e=>{e.disconnect()})),o.splice(0,o.length)}))}]);const me=(e,t=1e4)=>(e=parseFloat(e+"")||0,Math.round((e+Number.EPSILON)*t)/t),fe=function(e){if(!(e&&e instanceof Element&&e.offsetParent))return!1;const t=e.scrollHeight>e.clientHeight,i=window.getComputedStyle(e).overflowY,s=-1!==i.indexOf("hidden"),n=-1!==i.indexOf("visible");return t&&!s&&!n},ge=function(e,t=void 0){return!(!e||e===document.body||t&&e===t)&&(fe(e)?e:ge(e.parentElement,t))},ve=function(e){var t=(new DOMParser).parseFromString(e,"text/html").body;if(t.childElementCount>1){for(var i=document.createElement("div");t.firstChild;)i.appendChild(t.firstChild);return i}return t.firstChild},be=e=>`${e||""}`.split(" ").filter((e=>!!e)),ye=(e,t,i)=>{be(t).forEach((t=>{e&&e.classList.toggle(t,i||!1)}))};class we{constructor(e){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=e,this.pageX=e.pageX,this.pageY=e.pageY,this.clientX=e.clientX,this.clientY=e.clientY,this.id=self.Touch&&e instanceof Touch?e.identifier:-1,this.time=Date.now()}}const xe={passive:!1};class Se{constructor(e,{start:t=(()=>!0),move:i=(()=>{}),end:s=(()=>{})}){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=e,this.startCallback=t,this.moveCallback=i,this.endCallback=s;for(const e of["onPointerStart","onTouchStart","onMove","onTouchEnd","onPointerEnd","onWindowBlur"])this[e]=this[e].bind(this);this.element.addEventListener("mousedown",this.onPointerStart,xe),this.element.addEventListener("touchstart",this.onTouchStart,xe),this.element.addEventListener("touchmove",this.onMove,xe),this.element.addEventListener("touchend",this.onTouchEnd),this.element.addEventListener("touchcancel",this.onTouchEnd)}onPointerStart(e){if(!e.buttons||0!==e.button)return;const t=new we(e);this.currentPointers.some((e=>e.id===t.id))||this.triggerPointerStart(t,e)&&(window.addEventListener("mousemove",this.onMove),window.addEventListener("mouseup",this.onPointerEnd),window.addEventListener("blur",this.onWindowBlur))}onTouchStart(e){for(const t of Array.from(e.changedTouches||[]))this.triggerPointerStart(new we(t),e);window.addEventListener("blur",this.onWindowBlur)}onMove(e){const t=this.currentPointers.slice(),i="changedTouches"in e?Array.from(e.changedTouches||[]).map((e=>new we(e))):[new we(e)],s=[];for(const e of i){const t=this.currentPointers.findIndex((t=>t.id===e.id));t<0||(s.push(e),this.currentPointers[t]=e)}s.length&&this.moveCallback(e,this.currentPointers.slice(),t)}onPointerEnd(e){e.buttons>0&&0!==e.button||(this.triggerPointerEnd(e,new we(e)),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseup",this.onPointerEnd),window.removeEventListener("blur",this.onWindowBlur))}onTouchEnd(e){for(const t of Array.from(e.changedTouches||[]))this.triggerPointerEnd(e,new we(t))}triggerPointerStart(e,t){return!!this.startCallback(t,e,this.currentPointers.slice())&&(this.currentPointers.push(e),this.startPointers.push(e),!0)}triggerPointerEnd(e,t){const i=this.currentPointers.findIndex((e=>e.id===t.id));i<0||(this.currentPointers.splice(i,1),this.startPointers.splice(i,1),this.endCallback(e,t,this.currentPointers.slice()))}onWindowBlur(){this.clear()}clear(){for(;this.currentPointers.length;){const e=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:e.clientX,clientY:e.clientY}),e,this.currentPointers.slice())}}stop(){this.element.removeEventListener("mousedown",this.onPointerStart,xe),this.element.removeEventListener("touchstart",this.onTouchStart,xe),this.element.removeEventListener("touchmove",this.onMove,xe),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)}}function Ee(e,t){return t?Math.sqrt(Math.pow(t.clientX-e.clientX,2)+Math.pow(t.clientY-e.clientY,2)):0}function Te(e,t){return t?{clientX:(e.clientX+t.clientX)/2,clientY:(e.clientY+t.clientY)/2}:e}const Ce=e=>"object"==typeof e&&null!==e&&e.constructor===Object&&"[object Object]"===Object.prototype.toString.call(e),Pe=(e,...t)=>{const i=t.length;for(let s=0;s<i;s++){const i=t[s]||{};Object.entries(i).forEach((([t,i])=>{const s=Array.isArray(i)?[]:{};e[t]||Object.assign(e,{[t]:s}),Ce(i)?Object.assign(e[t],Pe(s,i)):Array.isArray(i)?Object.assign(e,{[t]:[...i]}):Object.assign(e,{[t]:i})}))}return e},Me=function(e,t){return e.split(".").reduce(((e,t)=>"object"==typeof e?e[t]:void 0),t)};class Oe{constructor(e={}){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),this.setOptions(e);for(const e of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))e.startsWith("on")&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}setOptions(e){this.options=e?Pe({},this.constructor.defaults,e):{};for(const[e,t]of Object.entries(this.option("on")||{}))this.on(e,t)}option(e,...t){let i=Me(e,this.options);return i&&"function"==typeof i&&(i=i.call(this,this,...t)),i}optionFor(e,t,i,...s){let n=Me(t,e);var o;"string"!=typeof(o=n)||isNaN(o)||isNaN(parseFloat(o))||(n=parseFloat(n)),"true"===n&&(n=!0),"false"===n&&(n=!1),n&&"function"==typeof n&&(n=n.call(this,this,e,...s));let a=Me(t,this.options);return a&&"function"==typeof a?n=a.call(this,this,e,...s,n):void 0===n&&(n=a),void 0===n?i:n}cn(e){const t=this.options.classes;return t&&t[e]||""}localize(e,t=[]){e=String(e).replace(/\{\{(\w+).?(\w+)?\}\}/g,((e,t,i)=>{let s="";return i?s=this.option(`${t[0]+t.toLowerCase().substring(1)}.l10n.${i}`):t&&(s=this.option(`l10n.${t}`)),s||(s=e),s}));for(let i=0;i<t.length;i++)e=e.split(t[i][0]).join(t[i][1]);return e.replace(/\{\{(.*?)\}\}/g,((e,t)=>t))}on(e,t){let i=[];"string"==typeof e?i=e.split(" "):Array.isArray(e)&&(i=e),this.events||(this.events=new Map),i.forEach((e=>{let i=this.events.get(e);i||(this.events.set(e,[]),i=[]),i.includes(t)||i.push(t),this.events.set(e,i)}))}off(e,t){let i=[];"string"==typeof e?i=e.split(" "):Array.isArray(e)&&(i=e),i.forEach((e=>{const i=this.events.get(e);if(Array.isArray(i)){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}))}emit(e,...t){[...this.events.get(e)||[]].forEach((e=>e(this,...t))),"*"!==e&&this.emit("*",e,...t)}}Object.defineProperty(Oe,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.24"}),Object.defineProperty(Oe,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});class Le extends Oe{constructor(e={}){super(e),Object.defineProperty(this,"plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}})}attachPlugins(e={}){const t=new Map;for(const[i,s]of Object.entries(e)){const e=this.option(i),n=this.plugins[i];n||!1===e?n&&!1===e&&(n.detach(),delete this.plugins[i]):t.set(i,new s(this,e||{}))}for(const[e,i]of t)this.plugins[e]=i,i.attach()}detachPlugins(e){e=e||Object.keys(this.plugins);for(const t of e){const e=this.plugins[t];e&&e.detach(),delete this.plugins[t]}return this.emit("detachPlugins"),this}}var Ae;!function(e){e[e.Init=0]="Init",e[e.Error=1]="Error",e[e.Ready=2]="Ready",e[e.Panning=3]="Panning",e[e.Mousemove=4]="Mousemove",e[e.Destroy=5]="Destroy"}(Ae||(Ae={}));const ke=["a","b","c","d","e","f"],ze={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"},Ie={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:ze},Re='<div class="f-spinner"><svg viewBox="0 0 50 50"><circle cx="25" cy="25" r="20"></circle><circle cx="25" cy="25" r="20"></circle></svg></div>',De=e=>e&&null!==e&&e instanceof Element&&"nodeType"in e,Fe=(e,t)=>{e&&be(t).forEach((t=>{e.classList.remove(t)}))},_e=(e,t)=>{e&&be(t).forEach((t=>{e.classList.add(t)}))},je={a:1,b:0,c:0,d:1,e:0,f:0},Be=1e3,He="mousemove",Ne="drag",$e="content";let Ve=null,Ge=null;class qe extends Le{get isTouchDevice(){return null===Ge&&(Ge=window.matchMedia("(hover: none)").matches),Ge}get isMobile(){return null===Ve&&(Ve=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)),Ve}get panMode(){return this.options.panMode!==He||this.isTouchDevice?Ne:He}get panOnlyZoomed(){const e=this.options.panOnlyZoomed;return"auto"===e?this.isTouchDevice:e}get isInfinite(){return this.option("infinite")}get angle(){return 180*Math.atan2(this.current.b,this.current.a)/Math.PI||0}get targetAngle(){return 180*Math.atan2(this.target.b,this.target.a)/Math.PI||0}get scale(){const{a:e,b:t}=this.current;return Math.sqrt(e*e+t*t)||1}get targetScale(){const{a:e,b:t}=this.target;return Math.sqrt(e*e+t*t)||1}get minScale(){return this.option("minScale")||1}get fullScale(){const{contentRect:e}=this;return e.fullWidth/e.fitWidth||1}get maxScale(){return this.fullScale*(this.option("maxScale")||1)||1}get coverScale(){const{containerRect:e,contentRect:t}=this,i=Math.max(e.height/t.fitHeight,e.width/t.fitWidth)||1;return Math.min(this.fullScale,i)}get isScaling(){return Math.abs(this.targetScale-this.scale)>1e-5&&!this.isResting}get isContentLoading(){const e=this.content;return!!(e&&e instanceof HTMLImageElement)&&!e.complete}get isResting(){if(this.isBouncingX||this.isBouncingY)return!1;for(const e of ke){const t="e"==e||"f"===e?.001:1e-5;if(Math.abs(this.target[e]-this.current[e])>t)return!1}return!(!this.ignoreBounds&&!this.checkBounds().inBounds)}constructor(e,t={},i={}){var s;if(super(t),Object.defineProperty(this,"pointerTracker",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"resizeObserver",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"updateTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"rAF",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"isTicking",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"friction",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"ignoreBounds",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"isBouncingX",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"isBouncingY",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"clicks",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"trackingPoints",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"cwd",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"pmme",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:Ae.Init}),Object.defineProperty(this,"isDragging",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"content",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"spinner",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"containerRect",{enumerable:!0,configurable:!0,writable:!0,value:{width:0,height:0,innerWidth:0,innerHeight:0}}),Object.defineProperty(this,"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(this,"dragStart",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0,top:0,left:0,time:0}}),Object.defineProperty(this,"dragOffset",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0,time:0}}),Object.defineProperty(this,"current",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},je)}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},je)}),Object.defineProperty(this,"velocity",{enumerable:!0,configurable:!0,writable:!0,value:{a:0,b:0,c:0,d:0,e:0,f:0}}),Object.defineProperty(this,"lockedAxis",{enumerable:!0,configurable:!0,writable:!0,value:!1}),!e)throw new Error("Container Element Not Found");this.container=e,this.initContent(),this.attachPlugins(Object.assign(Object.assign({},qe.Plugins),i)),this.emit("attachPlugins"),this.emit("init");const n=this.content;if(n.addEventListener("load",this.onLoad),n.addEventListener("error",this.onError),this.isContentLoading){if(this.option("spinner")){e.classList.add(this.cn("isLoading"));const t=ve(Re);!e.contains(n)||n.parentElement instanceof HTMLPictureElement?this.spinner=e.appendChild(t):this.spinner=(null===(s=n.parentElement)||void 0===s?void 0:s.insertBefore(t,n))||null}this.emit("beforeLoad")}else queueMicrotask((()=>{this.enable()}))}initContent(){const{container:e}=this,t=this.cn($e);let i=this.option($e)||e.querySelector(`.${t}`);if(i||(i=e.querySelector("img,picture")||e.firstElementChild,i&&_e(i,t)),i instanceof HTMLPictureElement&&(i=i.querySelector("img")),!i)throw new Error("No content found");this.content=i}onLoad(){const{spinner:e,container:t,state:i}=this;e&&(e.remove(),this.spinner=null),this.option("spinner")&&t.classList.remove(this.cn("isLoading")),this.emit("afterLoad"),i===Ae.Init?this.enable():this.updateMetrics()}onError(){this.state!==Ae.Destroy&&(this.spinner&&(this.spinner.remove(),this.spinner=null),this.stop(),this.detachEvents(),this.state=Ae.Error,this.emit("error"))}attachObserver(){var e;const t=()=>{const{container:e,containerRect:t}=this;return Math.abs(t.width-e.getBoundingClientRect().width)>.1||Math.abs(t.height-e.getBoundingClientRect().height)>.1};this.resizeObserver||void 0===window.ResizeObserver||(this.resizeObserver=new ResizeObserver((()=>{this.updateTimer||(t()?(this.onResize(),this.isMobile&&(this.updateTimer=setTimeout((()=>{t()&&this.onResize(),this.updateTimer=null}),500))):this.updateTimer&&(clearTimeout(this.updateTimer),this.updateTimer=null))}))),null===(e=this.resizeObserver)||void 0===e||e.observe(this.container)}detachObserver(){var e;null===(e=this.resizeObserver)||void 0===e||e.disconnect()}attachEvents(){const{container:e}=this;e.addEventListener("click",this.onClick,{passive:!1,capture:!1}),e.addEventListener("wheel",this.onWheel,{passive:!1}),this.pointerTracker=new Se(e,{start:this.onPointerDown,move:this.onPointerMove,end:this.onPointerUp}),document.addEventListener(He,this.onMouseMove)}detachEvents(){var e;const{container:t}=this;t.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),t.removeEventListener("wheel",this.onWheel,{passive:!1}),null===(e=this.pointerTracker)||void 0===e||e.stop(),this.pointerTracker=null,document.removeEventListener(He,this.onMouseMove),document.removeEventListener("keydown",this.onKeydown,!0),this.clickTimer&&(clearTimeout(this.clickTimer),this.clickTimer=null),this.updateTimer&&(clearTimeout(this.updateTimer),this.updateTimer=null)}animate(){const e=this.friction;this.setTargetForce();const t=this.option("maxVelocity");for(const i of ke)e?(this.velocity[i]*=1-e,t&&!this.isScaling&&(this.velocity[i]=Math.max(Math.min(this.velocity[i],t),-1*t)),this.current[i]+=this.velocity[i]):this.current[i]=this.target[i];this.setTransform(),this.setEdgeForce(),!this.isResting||this.isDragging?this.rAF=requestAnimationFrame((()=>this.animate())):this.stop("current")}setTargetForce(){for(const e of ke)"e"===e&&this.isBouncingX||"f"===e&&this.isBouncingY||(this.velocity[e]=(1/(1-this.friction)-1)*(this.target[e]-this.current[e]))}checkBounds(e=0,t=0){const{current:i}=this,s=i.e+e,n=i.f+t,o=this.getBounds(),{x:a,y:r}=o,l=a.min,c=a.max,d=r.min,u=r.max;let h=0,p=0;return l!==1/0&&s<l?h=l-s:c!==1/0&&s>c&&(h=c-s),d!==1/0&&n<d?p=d-n:u!==1/0&&n>u&&(p=u-n),Math.abs(h)<.001&&(h=0),Math.abs(p)<.001&&(p=0),Object.assign(Object.assign({},o),{xDiff:h,yDiff:p,inBounds:!h&&!p})}clampTargetBounds(){const{target:e}=this,{x:t,y:i}=this.getBounds();t.min!==1/0&&(e.e=Math.max(e.e,t.min)),t.max!==1/0&&(e.e=Math.min(e.e,t.max)),i.min!==1/0&&(e.f=Math.max(e.f,i.min)),i.max!==1/0&&(e.f=Math.min(e.f,i.max))}calculateContentDim(e=this.current){const{content:t,contentRect:i}=this,{fitWidth:s,fitHeight:n,fullWidth:o,fullHeight:a}=i;let r=o,l=a;if(this.option("zoom")||0!==this.angle){const i=!(t instanceof HTMLImageElement||"none"!==window.getComputedStyle(t).maxWidth&&"none"!==window.getComputedStyle(t).maxHeight),c=i?o:s,d=i?a:n,u=this.getMatrix(e),h=new DOMPoint(0,0).matrixTransform(u),p=new DOMPoint(0+c,0).matrixTransform(u),m=new DOMPoint(0+c,0+d).matrixTransform(u),f=new DOMPoint(0,0+d).matrixTransform(u),g=Math.abs(m.x-h.x),v=Math.abs(m.y-h.y),b=Math.abs(f.x-p.x),y=Math.abs(f.y-p.y);r=Math.max(g,b),l=Math.max(v,y)}return{contentWidth:r,contentHeight:l}}setEdgeForce(){if(this.ignoreBounds||this.isDragging||this.panMode===He||this.targetScale<this.scale)return this.isBouncingX=!1,void(this.isBouncingY=!1);const{target:e}=this,{x:t,y:i,xDiff:s,yDiff:n}=this.checkBounds(),o=this.option("maxVelocity");let a=this.velocity.e,r=this.velocity.f;0!==s?(this.isBouncingX=!0,s*a<=0?a+=.14*s:(a=.14*s,t.min!==1/0&&(this.target.e=Math.max(e.e,t.min)),t.max!==1/0&&(this.target.e=Math.min(e.e,t.max))),o&&(a=Math.max(Math.min(a,o),-1*o))):this.isBouncingX=!1,0!==n?(this.isBouncingY=!0,n*r<=0?r+=.14*n:(r=.14*n,i.min!==1/0&&(this.target.f=Math.max(e.f,i.min)),i.max!==1/0&&(this.target.f=Math.min(e.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)}enable(){const{content:e}=this,t=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);for(const e of ke)this.current[e]=this.target[e]=t[e];this.updateMetrics(),this.attachObserver(),this.attachEvents(),this.state=Ae.Ready,this.emit("ready")}onClick(e){var t;this.isDragging&&(null===(t=this.pointerTracker)||void 0===t||t.clear(),this.trackingPoints=[],this.startDecelAnim());const i=e.target;if(!i||e.defaultPrevented)return;if(i.hasAttribute("disabled"))return e.preventDefault(),void e.stopPropagation();if((()=>{const e=window.getSelection();return e&&"Range"===e.type})()&&!i.closest("button"))return;const s=i.closest("[data-panzoom-action]"),n=i.closest("[data-panzoom-change]"),o=s||n,a=o&&De(o)?o.dataset:null;if(a){const t=a.panzoomChange,i=a.panzoomAction;if((t||i)&&e.preventDefault(),t){let i={};try{i=JSON.parse(t)}catch(e){console&&console.warn("The given data was not valid JSON")}return void this.applyChange(i)}if(i)return void(this[i]&&this[i]())}if(Math.abs(this.dragOffset.x)>3||Math.abs(this.dragOffset.y)>3)return e.preventDefault(),void e.stopPropagation();if(i.closest("[data-fancybox]"))return;const 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))return;this.dragStart.time=0;const c=t=>{this.option("zoom",e)&&t&&"string"==typeof t&&/(iterateZoom)|(toggle(Zoom|Full|Cover|Max)|(zoomTo(Fit|Cover|Max)))/.test(t)&&"function"==typeof this[t]&&(e.preventDefault(),this[t]({event:e}))},d=this.option("click",e),u=this.option("dblClick",e);u?(this.clicks++,1==this.clicks&&(this.clickTimer=setTimeout((()=>{1===this.clicks?(this.emit("click",e),!e.defaultPrevented&&d&&c(d)):(this.emit("dblClick",e),e.defaultPrevented||c(u)),this.clicks=0,this.clickTimer=null}),350))):(this.emit("click",e),!e.defaultPrevented&&d&&c(d))}addTrackingPoint(e){const t=this.trackingPoints.filter((e=>e.time>Date.now()-100));t.push(e),this.trackingPoints=t}onPointerDown(e,t,i){var s;if(!1===this.option("touch",e))return!1;this.pwt=0,this.dragOffset={x:0,y:0,time:0},this.trackingPoints=[];const n=this.content.getBoundingClientRect();if(this.dragStart={x:n.x,y:n.y,top:n.top,left:n.left,time:Date.now()},this.clickTimer)return!1;if(this.panMode===He&&this.targetScale>1)return e.preventDefault(),e.stopPropagation(),!1;const o=e.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===(s=window.getSelection())||void 0===s||s.removeAllRanges()}if("mousedown"===e.type)["A","BUTTON"].includes(o.nodeName)||e.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(t),this.emit("touchStart",e)),!0}onPointerMove(e,t,i){if(!1===this.option("touch",e))return;if(!this.isDragging)return;if(t.length<2&&this.panOnlyZoomed&&me(this.targetScale)<=me(this.minScale))return;if(this.emit("touchMove",e),e.defaultPrevented)return;this.addTrackingPoint(t[0]);const{content:s}=this,n=Te(i[0],i[1]),o=Te(t[0],t[1]);let a=0,r=0;if(t.length>1){const e=s.getBoundingClientRect();a=n.clientX-e.left-.5*e.width,r=n.clientY-e.top-.5*e.height}const l=Ee(i[0],i[1]),c=Ee(t[0],t[1]);let d=l?c/l:1,u=o.clientX-n.clientX,h=o.clientY-n.clientY;this.dragOffset.x+=u,this.dragOffset.y+=h,this.dragOffset.time=Date.now()-this.dragStart.time;let p=me(this.targetScale)===me(this.minScale)&&this.option("lockAxis");if(p&&!this.lockedAxis)if("xy"===p||"y"===p||"touchmove"===e.type){if(Math.abs(this.dragOffset.x)<6&&Math.abs(this.dragOffset.y)<6)return void e.preventDefault();const t=Math.abs(180*Math.atan2(this.dragOffset.y,this.dragOffset.x)/Math.PI);this.lockedAxis=t>45&&t<135?"y":"x",this.dragOffset.x=0,this.dragOffset.y=0,u=0,h=0}else this.lockedAxis=p;if(ge(e.target,this.content)&&(p="x",this.dragOffset.y=0),p&&"xy"!==p&&this.lockedAxis!==p&&me(this.targetScale)===me(this.minScale))return;e.cancelable&&e.preventDefault(),this.container.classList.add(this.cn("isDragging"));const m=this.checkBounds(u,h);this.option("rubberband")?("x"!==this.isInfinite&&(m.xDiff>0&&u<0||m.xDiff<0&&u>0)&&(u*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitWidth*m.xDiff))),"y"!==this.isInfinite&&(m.yDiff>0&&h<0||m.yDiff<0&&h>0)&&(h*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitHeight*m.yDiff)))):(m.xDiff&&(u=0),m.yDiff&&(h=0));const f=this.targetScale,g=this.minScale,v=this.maxScale;f<.5*g&&(d=Math.max(d,g)),f>1.5*v&&(d=Math.min(d,v)),"y"===this.lockedAxis&&me(f)===me(g)&&(u=0),"x"===this.lockedAxis&&me(f)===me(g)&&(h=0),this.applyChange({originX:a,originY:r,panX:u,panY:h,scale:d,friction:this.option("dragFriction"),ignoreBounds:!0})}onPointerUp(e,t,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(t),this.panOnlyZoomed&&this.contentRect.width-this.contentRect.fitWidth<1&&this.contentRect.height-this.contentRect.fitHeight<1&&(this.trackingPoints=[]),ge(e.target,this.content)&&"y"===this.lockedAxis&&(this.trackingPoints=[]),this.emit("touchEnd",e),this.isDragging=!1,this.lockedAxis=!1,this.state!==Ae.Destroy&&(e.defaultPrevented||this.startDecelAnim()))}startDecelAnim(){var e;const t=this.isScaling;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1;for(const e of ke)this.velocity[e]=0;this.target.e=this.current.e,this.target.f=this.current.f,Fe(this.container,"is-scaling"),Fe(this.container,"is-animating"),this.isTicking=!1;const{trackingPoints:i}=this,s=i[0],n=i[i.length-1];let o=0,a=0,r=0;n&&s&&(o=n.clientX-s.clientX,a=n.clientY-s.clientY,r=n.time-s.time);const l=(null===(e=window.visualViewport)||void 0===e?void 0:e.scale)||1;1!==l&&(o*=l,a*=l);let c=0,d=0,u=0,h=0,p=this.option("decelFriction");const m=this.targetScale;if(r>0){u=Math.abs(o)>3?o/(r/30):0,h=Math.abs(a)>3?a/(r/30):0;const e=this.option("maxVelocity");e&&(u=Math.max(Math.min(u,e),-1*e),h=Math.max(Math.min(h,e),-1*e))}u&&(c=u/(1/(1-p)-1)),h&&(d=h/(1/(1-p)-1)),("y"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"y"===this.lockedAxis&&me(m)===this.minScale)&&(c=u=0),("x"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"x"===this.lockedAxis&&me(m)===this.minScale)&&(d=h=0);const f=this.dragOffset.x,g=this.dragOffset.y,v=this.option("dragMinThreshold")||0;Math.abs(f)<v&&Math.abs(g)<v&&(c=d=0,u=h=0),(m<this.minScale-1e-5||m>this.maxScale+1e-5||t&&!c&&!d)&&(p=.35),this.applyChange({panX:c,panY:d,friction:p}),this.emit("decel",u,h,f,g)}onWheel(e){var t=[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce((function(e,t){return Math.abs(t)>Math.abs(e)?t:e}));const i=Math.max(-1,Math.min(1,t));if(this.emit("wheel",e,i),this.panMode===He)return;if(e.defaultPrevented)return;const s=this.option("wheel");"pan"===s?(e.preventDefault(),this.panOnlyZoomed&&!this.canZoomOut()||this.applyChange({panX:2*-e.deltaX,panY:2*-e.deltaY,bounce:!1})):"zoom"===s&&!1!==this.option("zoom")&&this.zoomWithWheel(e)}onMouseMove(e){this.panWithMouse(e)}onKeydown(e){"Escape"===e.key&&this.toggleFS()}onResize(){this.updateMetrics(),this.checkBounds().inBounds||this.requestTick()}setTransform(){this.emit("beforeTransform");const{current:e,target:t,content:i,contentRect:s}=this,n=Object.assign({},je);for(const i of ke){const s="e"==i||"f"===i?Be:1e5;n[i]=me(e[i],s),Math.abs(t[i]-e[i])<("e"==i||"f"===i?.51:.001)&&(e[i]=t[i])}let{a:o,b:a,c:r,d:l,e:c,f:d}=n,u=`matrix(${o}, ${a}, ${r}, ${l}, ${c}, ${d})`,h=i.parentElement instanceof HTMLPictureElement?i.parentElement:i;if(this.option("transformParent")&&(h=h.parentElement||h),h.style.transform===u)return;h.style.transform=u;const{contentWidth:p,contentHeight:m}=this.calculateContentDim();s.width=p,s.height=m,this.emit("afterTransform")}updateMetrics(e=!1){var t;if(!this||this.state===Ae.Destroy)return;if(this.isContentLoading)return;const i=Math.max(1,(null===(t=window.visualViewport)||void 0===t?void 0:t.scale)||1),{container:s,content:n}=this,o=n instanceof HTMLImageElement,a=s.getBoundingClientRect(),r=getComputedStyle(this.container);let l=a.width*i,c=a.height*i;const d=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),u=l-(parseFloat(r.paddingLeft)+parseFloat(r.paddingRight)),h=c-d;this.containerRect={width:l,height:c,innerWidth:u,innerHeight:h};let p=this.option("width")||"auto",m=this.option("height")||"auto";"auto"===p&&(p=parseFloat(n.dataset.width||"")||(e=>{let t=0;return t=e instanceof HTMLImageElement?e.naturalWidth:e instanceof SVGElement?e.width.baseVal.value:Math.max(e.offsetWidth,e.scrollWidth),t||0})(n)),"auto"===m&&(m=parseFloat(n.dataset.height||"")||(e=>{let t=0;return t=e instanceof HTMLImageElement?e.naturalHeight:e instanceof SVGElement?e.height.baseVal.value:Math.max(e.offsetHeight,e.scrollHeight),t||0})(n));let f=n.parentElement instanceof HTMLPictureElement?n.parentElement:n;this.option("transformParent")&&(f=f.parentElement||f);const g=f.getAttribute("style")||"";f.style.setProperty("transform","none","important"),o&&(f.style.width="",f.style.height=""),f.offsetHeight;const v=n.getBoundingClientRect();let b=v.width*i,y=v.height*i,w=0,x=0;o&&(Math.abs(p-b)>1||Math.abs(m-y)>1)&&({width:b,height:y,top:w,left:x}=((e,t,i,s)=>{const n=i/s;return n>e/t?(i=e,s=e/n):(i=t*n,s=t),{width:i,height:s,top:.5*(t-s),left:.5*(e-i)}})(b,y,p,m)),this.contentRect=Object.assign(Object.assign({},this.contentRect),{top:v.top-a.top+w,bottom:a.bottom-v.bottom+w,left:v.left-a.left+x,right:a.right-v.right+x,fitWidth:b,fitHeight:y,width:b,height:y,fullWidth:p,fullHeight:m}),f.style.cssText=g,o&&(f.style.width=`${b}px`,f.style.height=`${y}px`),this.setTransform(),!0!==e&&this.emit("refresh"),this.ignoreBounds||(me(this.targetScale)<me(this.minScale)?this.zoomTo(this.minScale,{friction:0}):this.targetScale>this.maxScale?this.zoomTo(this.maxScale,{friction:0}):this.state===Ae.Init||this.checkBounds().inBounds||this.requestTick()),this.updateControls()}getBounds(){const e=this.option("bounds");if("auto"!==e)return e;const{contentWidth:t,contentHeight:i}=this.calculateContentDim(this.target);let s=0,n=0,o=0,a=0;const r=this.option("infinite");if(!0===r||this.lockedAxis&&r===this.lockedAxis)s=-1/0,o=1/0,n=-1/0,a=1/0;else{let{containerRect:e,contentRect:r}=this,l=me(this.contentRect.fitWidth*this.targetScale,Be),c=me(this.contentRect.fitHeight*this.targetScale,Be),{innerWidth:d,innerHeight:u}=e;if(this.containerRect.width===l&&(d=e.width),this.containerRect.width===c&&(u=e.height),t>d){o=.5*(t-d),s=-1*o;let e=.5*(r.right-r.left);s+=e,o+=e}if(this.contentRect.fitWidth>d&&t<d&&(s-=.5*(this.contentRect.fitWidth-d),o-=.5*(this.contentRect.fitWidth-d)),i>u){a=.5*(i-u),n=-1*a;let e=.5*(r.bottom-r.top);n+=e,a+=e}this.contentRect.fitHeight>u&&i<u&&(s-=.5*(this.contentRect.fitHeight-u),o-=.5*(this.contentRect.fitHeight-u))}return{x:{min:s,max:o},y:{min:n,max:a}}}updateControls(){const e=this,t=e.container,{panMode:i,contentRect:s,fullScale:n,targetScale:o,coverScale:a,maxScale:r,minScale:l}=e;let c={toggleMax:o-l<.5*(r-l)?r:l,toggleCover:o-l<.5*(a-l)?a:l,toggleZoom:o-l<.5*(n-l)?n:l}[e.option("click")||""]||l,d=e.canZoomIn(),u=e.canZoomOut(),h=i===Ne&&!!this.option("touch"),p=u&&h;if(h&&(me(o)<me(l)&&!this.panOnlyZoomed&&(p=!0),(me(s.width,1)>me(s.fitWidth,1)||me(s.height,1)>me(s.fitHeight,1))&&(p=!0)),me(s.width*o,1)<me(s.fitWidth,1)&&(p=!1),i===He&&(p=!1),ye(t,this.cn("isDraggable"),p),!this.option("zoom"))return;let m=d&&me(c)>me(o),f=!m&&!p&&u&&me(c)<me(o);ye(t,this.cn("canZoomIn"),m),ye(t,this.cn("canZoomOut"),f);for(const e of t.querySelectorAll('[data-panzoom-action="zoomIn"]'))d?(e.removeAttribute("disabled"),e.removeAttribute("tabindex")):(e.setAttribute("disabled",""),e.setAttribute("tabindex","-1"));for(const e of t.querySelectorAll('[data-panzoom-action="zoomOut"]'))u?(e.removeAttribute("disabled"),e.removeAttribute("tabindex")):(e.setAttribute("disabled",""),e.setAttribute("tabindex","-1"));for(const e of t.querySelectorAll('[data-panzoom-action="toggleZoom"],[data-panzoom-action="iterateZoom"]')){d||u?(e.removeAttribute("disabled"),e.removeAttribute("tabindex")):(e.setAttribute("disabled",""),e.setAttribute("tabindex","-1"));const t=e.querySelector("g");t&&(t.style.display=d?"":"none")}}panTo({x:e=this.target.e,y:t=this.target.f,scale:i=this.targetScale,friction:s=this.option("friction"),angle:n=0,originX:o=0,originY:a=0,flipX:r=!1,flipY:l=!1,ignoreBounds:c=!1}){this.state!==Ae.Destroy&&this.applyChange({panX:e-this.target.e,panY:t-this.target.f,scale:i/this.targetScale,angle:n,originX:o,originY:a,friction:s,flipX:r,flipY:l,ignoreBounds:c})}applyChange({panX:e=0,panY:t=0,scale:i=1,angle:s=0,originX:n=-this.current.e,originY:o=-this.current.f,friction:a=this.option("friction"),flipX:r=!1,flipY:l=!1,ignoreBounds:c=!1,bounce:d=this.option("bounce")}){const u=this.state;if(u===Ae.Destroy)return;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.friction=a||0,this.ignoreBounds=c;const{current:h}=this,p=h.e,m=h.f,f=this.getMatrix(this.target);let g=(new DOMMatrix).translate(p,m).translate(n,o).translate(e,t);if(this.option("zoom")){if(!c){const e=this.targetScale,t=this.minScale,s=this.maxScale;e*i<t&&(i=t/e),e*i>s&&(i=s/e)}g=g.scale(i)}g=g.translate(-n,-o).translate(-p,-m).multiply(f),s&&(g=g.rotate(s)),r&&(g=g.scale(-1,1)),l&&(g=g.scale(1,-1));for(const e of ke)"e"!==e&&"f"!==e&&(g[e]>this.minScale+1e-5||g[e]<this.minScale-1e-5)?this.target[e]=g[e]:this.target[e]=me(g[e],Be);(this.targetScale<this.scale||Math.abs(i-1)>.1||this.panMode===He||!1===d)&&!c&&this.clampTargetBounds(),u===Ae.Init?this.animate():this.isResting||(this.state=Ae.Panning,this.requestTick())}stop(e=!1){if(this.state===Ae.Init||this.state===Ae.Destroy)return;const t=this.isTicking;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1;for(const t of ke)this.velocity[t]=0,"current"===e?this.current[t]=this.target[t]:"target"===e&&(this.target[t]=this.current[t]);this.setTransform(),Fe(this.container,"is-scaling"),Fe(this.container,"is-animating"),this.isTicking=!1,this.state=Ae.Ready,t&&(this.emit("endAnimation"),this.updateControls())}requestTick(){this.isTicking||(this.emit("startAnimation"),this.updateControls(),_e(this.container,"is-animating"),this.isScaling&&_e(this.container,"is-scaling")),this.isTicking=!0,this.rAF||(this.rAF=requestAnimationFrame((()=>this.animate())))}panWithMouse(e,t=this.option("mouseMoveFriction")){if(this.pmme=e,this.panMode!==He||!e)return;if(me(this.targetScale)<=me(this.minScale))return;this.emit("mouseMove",e);const{container:i,containerRect:s,contentRect:n}=this,o=s.width,a=s.height,r=i.getBoundingClientRect(),l=(e.clientX||0)-r.left,c=(e.clientY||0)-r.top;let{contentWidth:d,contentHeight:u}=this.calculateContentDim(this.target);const h=this.option("mouseMoveFactor");h>1&&(d!==o&&(d*=h),u!==a&&(u*=h));let p=.5*(d-o)-l/o*100/100*(d-o);p+=.5*(n.right-n.left);let m=.5*(u-a)-c/a*100/100*(u-a);m+=.5*(n.bottom-n.top),this.applyChange({panX:p-this.target.e,panY:m-this.target.f,friction:t})}zoomWithWheel(e){if(this.state===Ae.Destroy||this.state===Ae.Init)return;const t=Date.now();if(t-this.pwt<45)return void e.preventDefault();this.pwt=t;var i=[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce((function(e,t){return Math.abs(t)>Math.abs(e)?t:e}));const s=Math.max(-1,Math.min(1,i)),{targetScale:n,maxScale:o,minScale:a}=this;let r=n*(100+45*s)/100;me(r)<me(a)&&me(n)<=me(a)?(this.cwd+=Math.abs(s),r=a):me(r)>me(o)&&me(n)>=me(o)?(this.cwd+=Math.abs(s),r=o):(this.cwd=0,r=Math.max(Math.min(r,o),a)),this.cwd>this.option("wheelLimit")||(e.preventDefault(),me(r)!==me(n)&&this.zoomTo(r,{event:e}))}canZoomIn(){return this.option("zoom")&&(me(this.contentRect.width,1)<me(this.contentRect.fitWidth,1)||me(this.targetScale)<me(this.maxScale))}canZoomOut(){return this.option("zoom")&&me(this.targetScale)>me(this.minScale)}zoomIn(e=1.25,t){this.zoomTo(this.targetScale*e,t)}zoomOut(e=.8,t){this.zoomTo(this.targetScale*e,t)}zoomToFit(e){this.zoomTo("fit",e)}zoomToCover(e){this.zoomTo("cover",e)}zoomToFull(e){this.zoomTo("full",e)}zoomToMax(e){this.zoomTo("max",e)}toggleZoom(e){this.zoomTo(this.targetScale-this.minScale<.5*(this.fullScale-this.minScale)?"full":"fit",e)}toggleMax(e){this.zoomTo(this.targetScale-this.minScale<.5*(this.maxScale-this.minScale)?"max":"fit",e)}toggleCover(e){this.zoomTo(this.targetScale-this.minScale<.5*(this.coverScale-this.minScale)?"cover":"fit",e)}iterateZoom(e){this.zoomTo("next",e)}zoomTo(e=1,{friction:t="auto",originX:i="auto",originY:s="auto",event:n}={}){if(this.isContentLoading||this.state===Ae.Destroy)return;const{targetScale:o}=this;this.stop();let a=1;if(this.panMode===He&&(n=this.pmme||n),n||"auto"===i||"auto"===s){const e=this.content.getBoundingClientRect(),t=this.container.getBoundingClientRect(),o=n?n.clientX:t.left+.5*t.width,a=n?n.clientY:t.top+.5*t.height;i=o-e.left-.5*e.width,s=a-e.top-.5*e.height}const r=this.fullScale,l=this.maxScale;let c=this.coverScale;"number"==typeof e?a=e/o:("next"===e&&(r-c<.2&&(c=r),e=o<r-1e-5?"full":o<l-1e-5?"max":"fit"),a="full"===e?r/o||1:"cover"===e?c/o||1:"max"===e?l/o||1:1/o||1),t="auto"===t?a>1?.15:.25:t,this.applyChange({scale:a,originX:i,originY:s,friction:t}),n&&this.panMode===He&&this.panWithMouse(n,t)}rotateCCW(){this.applyChange({angle:-90})}rotateCW(){this.applyChange({angle:90})}flipX(){this.applyChange({flipX:!0})}flipY(){this.applyChange({flipY:!0})}fitX(){this.stop("target");const{containerRect:e,contentRect:t,target:i}=this;this.applyChange({panX:.5*e.width-(t.left+.5*t.fitWidth)-i.e,panY:.5*e.height-(t.top+.5*t.fitHeight)-i.f,scale:e.width/t.fitWidth/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}fitY(){this.stop("target");const{containerRect:e,contentRect:t,target:i}=this;this.applyChange({panX:.5*e.width-(t.left+.5*t.fitWidth)-i.e,panY:.5*e.innerHeight-(t.top+.5*t.fitHeight)-i.f,scale:e.height/t.fitHeight/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}toggleFS(){const{container:e}=this,t=this.cn("inFullscreen"),i=this.cn("htmlHasFullscreen");e.classList.toggle(t);const s=e.classList.contains(t);s?(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(s?"enterFS":"exitFS")}getMatrix(e=this.current){const{a:t,b:i,c:s,d:n,e:o,f:a}=e;return new DOMMatrix([t,i,s,n,o,a])}reset(e){if(this.state!==Ae.Init&&this.state!==Ae.Destroy){this.stop("current");for(const e of ke)this.target[e]=je[e];this.target.a=this.minScale,this.target.d=this.minScale,this.clampTargetBounds(),this.isResting||(this.friction=void 0===e?this.option("friction"):e,this.state=Ae.Panning,this.requestTick())}}destroy(){this.stop(),this.state=Ae.Destroy,this.detachEvents(),this.detachObserver();const{container:e,content:t}=this,i=this.option("classes")||{};for(const t of Object.values(i))e.classList.remove(t+"");t&&(t.removeEventListener("load",this.onLoad),t.removeEventListener("error",this.onError)),this.detachPlugins()}}Object.defineProperty(qe,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:Ie}),Object.defineProperty(qe,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}});const We=function(e,t){let i=!0;return(...s)=>{i&&(i=!1,e(...s),setTimeout((()=>{i=!0}),t))}},Xe=(e,t)=>{let i=[];return e.childNodes.forEach((e=>{e.nodeType!==Node.ELEMENT_NODE||t&&!e.matches(t)||i.push(e)})),i};var Ye;!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Destroy=2]="Destroy"}(Ye||(Ye={}));const Ue=e=>{if("string"==typeof e||e instanceof HTMLElement)e={html:e};else{const t=e.thumb;void 0!==t&&("string"==typeof t&&(e.thumbSrc=t),t instanceof HTMLImageElement&&(e.thumbEl=t,e.thumbElSrc=t.src,e.thumbSrc=t.src),delete e.thumb)}return Object.assign({html:"",el:null,isDom:!1,class:"",customClass:"",index:-1,dim:0,gap:0,pos:0,transition:!1},e)},Ze=(e={})=>Object.assign({index:-1,slides:[],dim:0,pos:-1},e);class Ke extends Oe{constructor(e,t){super(t),Object.defineProperty(this,"instance",{enumerable:!0,configurable:!0,writable:!0,value:e})}attach(){}detach(){}}class Je extends Ke{constructor(){super(...arguments),Object.defineProperty(this,"isDynamic",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"list",{enumerable:!0,configurable:!0,writable:!0,value:null})}onRefresh(){this.refresh()}build(){let e=this.list;return e||(e=document.createElement("ul"),_e(e,this.cn("list")),e.setAttribute("role","tablist"),this.instance.container.appendChild(e),_e(this.instance.container,this.cn("hasDots")),this.list=e),e}refresh(){var e;const t=this.instance.pages.length,i=Math.min(2,this.option("minCount")),s=Math.max(2e3,this.option("maxCount")),n=this.option("dynamicFrom");if(t<i||t>s)return void this.cleanup();const o="number"==typeof n&&t>5&&t>=n,a=!this.list||this.isDynamic!==o||this.list.children.length!==t;a&&this.cleanup();const r=this.build();if(ye(r,this.cn("isDynamic"),!!o),a)for(let e=0;e<t;e++)r.append(this.createItem(e));let l,c=0;for(const t of[...r.children]){const i=c===this.instance.page;i&&(l=t),ye(t,this.cn("isCurrent"),i),null===(e=t.children[0])||void 0===e||e.setAttribute("aria-selected",i?"true":"false");for(const e of["isBeforePrev","isPrev","isNext","isAfterNext"])Fe(t,this.cn(e));c++}if(l=l||r.firstChild,o&&l){const e=l.previousElementSibling,t=e&&e.previousElementSibling;_e(e,this.cn("isPrev")),_e(t,this.cn("isBeforePrev"));const i=l.nextElementSibling,s=i&&i.nextElementSibling;_e(i,this.cn("isNext")),_e(s,this.cn("isAfterNext"))}this.isDynamic=o}createItem(e=0){var t;const i=document.createElement("li");i.setAttribute("role","presentation");const s=ve(this.instance.localize(this.option("dotTpl"),[["%d",e+1]]).replace(/\%i/g,e+""));return i.appendChild(s),null===(t=i.children[0])||void 0===t||t.setAttribute("role","tab"),i}cleanup(){this.list&&(this.list.remove(),this.list=null),this.isDynamic=!1,Fe(this.instance.container,this.cn("hasDots"))}attach(){this.instance.on(["refresh","change"],this.onRefresh)}detach(){this.instance.off(["refresh","change"],this.onRefresh),this.cleanup()}}Object.defineProperty(Je,"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}});const Qe="disabled",et="next",tt="prev";class it extends Ke{constructor(){super(...arguments),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"prev",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"next",{enumerable:!0,configurable:!0,writable:!0,value:null})}onRefresh(){const e=this.instance,t=e.pages.length,i=e.page;if(t<2)return void this.cleanup();this.build();let s=this.prev,n=this.next;s&&n&&(s.removeAttribute(Qe),n.removeAttribute(Qe),e.isInfinite||(i<=0&&s.setAttribute(Qe,""),i>=t-1&&n.setAttribute(Qe,"")))}createButton(e){const t=this.instance,i=document.createElement("button");i.setAttribute("tabindex","0"),i.setAttribute("title",t.localize(`{{${e.toUpperCase()}}}`)),_e(i,this.cn("button")+" "+this.cn(e===et?"isNext":"isPrev"));const s=t.isRTL?e===et?tt:et:e;var n;return i.innerHTML=t.localize(this.option(`${s}Tpl`)),i.dataset[`carousel${n=e,n?n.match("^[a-z]")?n.charAt(0).toUpperCase()+n.substring(1):n:""}`]="true",i}build(){let e=this.container;e||(this.container=e=document.createElement("div"),_e(e,this.cn("container")),this.instance.container.appendChild(e)),this.next||(this.next=e.appendChild(this.createButton(et))),this.prev||(this.prev=e.appendChild(this.createButton(tt)))}cleanup(){this.prev&&this.prev.remove(),this.next&&this.next.remove(),this.container&&this.container.remove(),this.prev=null,this.next=null,this.container=null}attach(){this.instance.on(["refresh","change"],this.onRefresh)}detach(){this.instance.off(["refresh","change"],this.onRefresh),this.cleanup()}}Object.defineProperty(it,"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>',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>'}});class st extends Ke{constructor(){super(...arguments),Object.defineProperty(this,"selectedIndex",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"nav",{enumerable:!0,configurable:!0,writable:!0,value:null})}addAsTargetFor(e){this.target=this.instance,this.nav=e,this.attachEvents()}addAsNavFor(e){this.nav=this.instance,this.target=e,this.attachEvents()}attachEvents(){this.nav&&this.target&&(this.nav.options.initialSlide=this.target.options.initialPage,this.nav.state===Ye.Ready?this.onNavReady(this.nav):this.nav.on("ready",this.onNavReady),this.target.state===Ye.Ready?this.onTargetReady(this.target):this.target.on("ready",this.onTargetReady))}onNavReady(e){e.on("createSlide",this.onNavCreateSlide),e.on("Panzoom.click",this.onNavClick),e.on("Panzoom.touchEnd",this.onNavTouch),this.onTargetChange()}onTargetReady(e){e.on("change",this.onTargetChange),e.on("Panzoom.refresh",this.onTargetChange),this.onTargetChange()}onNavClick(e,t,i){this.onNavTouch(e,e.panzoom,i)}onNavTouch(e,t,i){var s,n;if(Math.abs(t.dragOffset.x)>3||Math.abs(t.dragOffset.y)>3)return;const o=i.target,{nav:a,target:r}=this;if(!a||!r||!o)return;const l=o.closest("[data-index]");if(i.stopPropagation(),i.preventDefault(),!l)return;const c=parseInt(l.dataset.index||"",10)||0,d=r.getPageForSlide(c),u=a.getPageForSlide(c);a.slideTo(u),r.slideTo(d,{friction:(null===(n=null===(s=this.nav)||void 0===s?void 0:s.plugins)||void 0===n?void 0:n.Sync.option("friction"))||0}),this.markSelectedSlide(c)}onNavCreateSlide(e,t){t.index===this.selectedIndex&&this.markSelectedSlide(t.index)}onTargetChange(){const{target:e,nav:t}=this;if(!e||!t)return;if(t.state!==Ye.Ready||e.state!==Ye.Ready)return;const i=e.pages[e.page].slides[0].index,s=t.getPageForSlide(i);this.markSelectedSlide(i),t.slideTo(s,null===t.prevPage?{friction:0}:void 0)}markSelectedSlide(e){const t=this.nav;t&&t.state===Ye.Ready&&(this.selectedIndex=e,[...t.slides].map((t=>{t.el&&t.el.classList[t.index===e?"add":"remove"]("is-nav-selected")})))}attach(){const e=this;let t=e.options.target,i=e.options.nav;t?e.addAsNavFor(t):i&&e.addAsTargetFor(i)}detach(){const e=this,t=e.nav,i=e.target;t&&(t.off("ready",e.onNavReady),t.off("createSlide",e.onNavCreateSlide),t.off("Panzoom.click",e.onNavClick),t.off("Panzoom.touchEnd",e.onNavTouch)),e.nav=null,i&&(i.off("ready",e.onTargetReady),i.off("refresh",e.onTargetChange),i.off("change",e.onTargetChange)),e.target=null}}Object.defineProperty(st,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{friction:.35}});const nt={Navigation:it,Dots:Je,Sync:st};class ot extends Le{get axis(){return this.isHorizontal?"e":"f"}get isEnabled(){return this.state===Ye.Ready}get isInfinite(){let e=!1;const{contentDim:t,viewportDim:i,pages:s,slides:n}=this;return s.length>=2&&t+n[0].dim>=i&&(e=this.option("infinite")),e}get isRTL(){return"rtl"===this.option("direction")}get isHorizontal(){return"x"===this.option("axis")}constructor(e,t={},i={}){if(super(),Object.defineProperty(this,"bp",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"lp",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"userOptions",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:Ye.Init}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"prevPage",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"viewport",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"slides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"pages",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"panzoom",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"inTransition",{enumerable:!0,configurable:!0,writable:!0,value:new Set}),Object.defineProperty(this,"contentDim",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"viewportDim",{enumerable:!0,configurable:!0,writable:!0,value:0}),"string"==typeof e&&(e=document.querySelector(e)),!e||!De(e))throw new Error("No Element found");this.container=e,this.slideNext=We(this.slideNext.bind(this),150),this.slidePrev=We(this.slidePrev.bind(this),150),this.userOptions=t,this.userPlugins=i,queueMicrotask((()=>{this.processOptions()}))}processOptions(){const e=Pe({},ot.defaults,this.userOptions);let t="";const i=e.breakpoints;if(i&&Ce(i))for(const[s,n]of Object.entries(i))window.matchMedia(s).matches&&Ce(n)&&(t+=s,Pe(e,n));t===this.bp&&this.state!==Ye.Init||(this.bp=t,this.state===Ye.Ready&&(e.initialSlide=this.pages[this.page].slides[0].index),this.state!==Ye.Init&&this.destroy(),super.setOptions(e),!1===this.option("enabled")?this.attachEvents():setTimeout((()=>{this.init()}),0))}init(){this.state=Ye.Init,this.emit("init"),this.attachPlugins(Object.assign(Object.assign({},ot.Plugins),this.userPlugins)),this.emit("attachPlugins"),this.initLayout(),this.initSlides(),this.updateMetrics(),this.setInitialPosition(),this.initPanzoom(),this.attachEvents(),this.state=Ye.Ready,this.emit("ready")}initLayout(){const{container:e}=this,t=this.option("classes");_e(e,this.cn("container")),ye(e,t.isLTR,!this.isRTL),ye(e,t.isRTL,this.isRTL),ye(e,t.isVertical,!this.isHorizontal),ye(e,t.isHorizontal,this.isHorizontal);let i=this.option("viewport")||e.querySelector(`.${t.viewport}`);i||(i=document.createElement("div"),_e(i,t.viewport),i.append(...Xe(e,`.${t.slide}`)),e.prepend(i));let s=this.option("track")||e.querySelector(`.${t.track}`);s||(s=document.createElement("div"),_e(s,t.track),s.append(...Array.from(i.childNodes))),s.setAttribute("aria-live","polite"),i.contains(s)||i.prepend(s),this.viewport=i,this.track=s,this.emit("initLayout")}initSlides(){const{track:e}=this;if(e){this.slides=[],[...Xe(e,`.${this.cn("slide")}`)].forEach((e=>{if(De(e)){const t=Ue({el:e,isDom:!0,index:this.slides.length});this.slides.push(t),this.emit("initSlide",t,this.slides.length)}}));for(let e of this.option("slides",[])){const t=Ue(e);t.index=this.slides.length,this.slides.push(t),this.emit("initSlide",t,this.slides.length)}this.emit("initSlides")}}setInitialPage(){let e=0;const t=this.option("initialSlide");e="number"==typeof t?this.getPageForSlide(t):parseInt(this.option("initialPage",0)+"",10)||0,this.page=e}setInitialPosition(){if(!this.track||!this.pages.length)return;const e=this.isHorizontal;let t=this.page;this.pages[t]||(this.page=t=0);const i=this.pages[t].pos*(this.isRTL&&e?1:-1),s=e?`${i}px`:"0",n=e?"0":`${i}px`;this.track.style.transform=`translate3d(${s}, ${n}, 0) scale(1)`,this.option("adaptiveHeight")&&this.setViewportHeight()}initPanzoom(){this.panzoom&&(this.panzoom.destroy(),this.panzoom=null);const e=this.option("Panzoom")||{};this.panzoom=new qe(this.viewport,Pe({},{content:this.track,zoom:!1,panOnlyZoomed:!1,lockAxis:this.isHorizontal?"x":"y",infinite:this.isInfinite,click:!1,dblClick:!1,touch:e=>!(this.pages.length<2&&!e.options.infinite),bounds:()=>this.getBounds(),maxVelocity:e=>Math.abs(e.target[this.axis]-e.current[this.axis])<2*this.viewportDim?100:0},e)),this.panzoom.on("*",((e,t,...i)=>{this.emit(`Panzoom.${t}`,e,...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)}attachEvents(){const e=this.container;e&&(e.addEventListener("click",this.onClick,{passive:!1,capture:!1}),e.addEventListener("slideTo",this.onSlideTo)),window.addEventListener("resize",this.onResize)}createPages(){let e=[];const{contentDim:t,viewportDim:i}=this;let s=this.option("slidesPerPage");("number"!=typeof s||t<=i)&&(s=1/0);let n=0,o=0,a=0;for(const t of this.slides)(!e.length||o+t.dim-i>.05||a===s)&&(e.push(Ze()),n=e.length-1,o=0,a=0),e[n].slides.push(t),o+=t.dim+t.gap,a++;return e}processPages(){const e=this.pages,{contentDim:t,viewportDim:i}=this,s=this.option("center"),n=this.option("fill"),o=n&&s&&t>i&&!this.isInfinite;if(e.forEach(((e,n)=>{e.index=n,e.pos=e.slides[0].pos,e.dim=0;for(const[t,i]of e.slides.entries())e.dim+=i.dim,t<e.slides.length-1&&(e.dim+=i.gap);o&&e.pos+.5*e.dim<.5*i?e.pos=0:o&&e.pos+.5*e.dim>=t-.5*i?e.pos=t-i:s&&(e.pos+=-.5*(i-e.dim))})),e.forEach(((e,s)=>{n&&!this.isInfinite&&t>i&&(e.pos=Math.max(e.pos,0),e.pos=Math.min(e.pos,t-i)),e.pos=me(e.pos,1e3),e.dim=me(e.dim,1e3),Math.abs(e.pos)<=.1&&(e.pos=0)})),this.isInfinite)return e;const a=[];let r;return e.forEach((e=>{const t=Object.assign({},e);r&&t.pos===r.pos?(r.dim+=t.dim,r.slides=[...r.slides,...t.slides]):(t.index=a.length,r=t,a.push(t))})),a}getPageFromIndex(e=0){const t=this.pages.length;let i;return e=parseInt((e||0).toString())||0,i=this.isInfinite?(e%t+t)%t:Math.max(Math.min(e,t-1),0),i}getSlideMetrics(e){var t,i;const s=this.isHorizontal?"width":"height";let n=0,o=0,a=e.el;const r=a&&!a.parentNode;if(a?n=parseFloat(a.dataset[s]||"")||0:(a=document.createElement("div"),a.style.visibility="hidden",(this.track||document.body).prepend(a)),_e(a,this.cn("slide")+" "+e.class+" "+e.customClass),n)a.style[s]=`${n}px`,a.style["width"===s?"height":"width"]="";else{r&&(this.track||document.body).prepend(a);const e=Math.max(1,(null===(t=window.visualViewport)||void 0===t?void 0:t.scale)||1);n=a.getBoundingClientRect()[s]*e}const l=getComputedStyle(a);return"content-box"===l.boxSizing&&(this.isHorizontal?(n+=parseFloat(l.paddingLeft)||0,n+=parseFloat(l.paddingRight)||0):(n+=parseFloat(l.paddingTop)||0,n+=parseFloat(l.paddingBottom)||0)),o=parseFloat(l[this.isHorizontal?"marginRight":"marginBottom"])||0,r?null===(i=a.parentElement)||void 0===i||i.removeChild(a):e.el||a.remove(),{dim:me(n,1e3),gap:me(o,1e3)}}getBounds(){const{isInfinite:e,isRTL:t,isHorizontal:i,pages:s}=this;let n={min:0,max:0};if(e)n={min:-1/0,max:1/0};else if(s.length){const e=s[0].pos,o=s[s.length-1].pos;n=t&&i?{min:e,max:o}:{min:-1*o,max:-1*e}}return{x:i?n:{min:0,max:0},y:i?{min:0,max:0}:n}}repositionSlides(){let e,{isHorizontal:t,isRTL:i,isInfinite:s,viewport:n,viewportDim:o,contentDim:a,page:r,pages:l,slides:c,panzoom:d}=this,u=0,h=0,p=0,m=0;d?m=-1*d.current[this.axis]:l[r]&&(m=l[r].pos||0),e=t?i?"right":"left":"top",i&&t&&(m*=-1);for(const t of c)t.el?("top"===e?(t.el.style.right="",t.el.style.left=""):t.el.style.top="",t.index!==u?t.el.style[e]=0===h?"":`${me(h,1e3)}px`:t.el.style[e]="",p+=t.dim+t.gap,u++):h+=t.dim+t.gap;if(s&&p&&n){let i=getComputedStyle(n),s="padding",r=t?"Right":"Bottom",l=parseFloat(i[s+(t?"Left":"Top")]);m-=l,o+=l,o+=parseFloat(i[s+r]);for(const t of c)t.el&&(me(t.pos)<me(o)&&me(t.pos+t.dim+t.gap)<me(m)&&me(m)>me(a-o)&&(t.el.style[e]=`${me(h+p,1e3)}px`),me(t.pos+t.gap)>=me(a-o)&&me(t.pos)>me(m+o)&&me(m)<me(o)&&(t.el.style[e]=`-${me(p,1e3)}px`))}let f,g,v=[...this.inTransition];if(v.length>1&&(f=l[v[0]],g=l[v[1]]),f&&g){let t=0;for(const i of c)i.el?this.inTransition.has(i.index)&&f.slides.indexOf(i)<0&&(i.el.style[e]=`${me(t+(f.pos-g.pos),1e3)}px`):t+=i.dim+i.gap}}createSlideEl(e){const{track:t,slides:i}=this;if(!t||!e)return;if(e.el&&e.el.parentNode)return;const s=e.el||document.createElement("div");_e(s,this.cn("slide")),_e(s,e.class),_e(s,e.customClass);const n=e.html;n&&(n instanceof HTMLElement?s.appendChild(n):s.innerHTML=e.html+"");const o=[];i.forEach(((e,t)=>{e.el&&o.push(t)}));const a=e.index;let r=null;o.length&&(r=i[o.reduce(((e,t)=>Math.abs(t-a)<Math.abs(e-a)?t:e))]);const l=r&&r.el&&r.el.parentNode?r.index<e.index?r.el.nextSibling:r.el:null;t.insertBefore(s,t.contains(l)?l:null),e.el=s,this.emit("createSlide",e)}removeSlideEl(e,t=!1){const i=e.el;if(!i||!i.parentNode)return;const s=this.cn("isSelected");if(i.classList.contains(s)&&(Fe(i,s),this.emit("unselectSlide",e)),e.isDom&&!t)return i.removeAttribute("aria-hidden"),i.removeAttribute("data-index"),void(i.style.left="");this.emit("removeSlide",e);const n=new CustomEvent("animationend");i.dispatchEvent(n),e.el&&(e.el.remove(),e.el=null)}transitionTo(e=0,t=this.option("transition")){if(!t)return!1;const{pages:i,panzoom:s}=this;e=parseInt((e||0).toString())||0;const n=this.getPageFromIndex(e);if(!s||!i[n]||i.length<2||Math.abs(i[this.page].slides[0].dim-this.viewportDim)>1)return!1;const o=e>this.page?1:-1,a=this.pages[n].pos*(this.isRTL?1:-1);if(this.page===n&&Math.abs(a-s.target[this.axis])<1)return!1;this.clearTransitions();const r=s.isResting;_e(this.container,this.cn("inTransition"));const l=this.pages[this.page].slides[0],c=this.pages[n].slides[0];this.inTransition.add(c.index),this.createSlideEl(c);let d=l.el,u=c.el;r||"slide"===t||(t="fadeFast",d=null);const h=this.isRTL?"next":"prev",p=this.isRTL?"prev":"next";return d&&(this.inTransition.add(l.index),l.transition=t,d.addEventListener("animationend",this.onAnimationEnd),d.classList.add(`f-${t}Out`,`to-${o>0?p:h}`)),u&&(c.transition=t,u.addEventListener("animationend",this.onAnimationEnd),u.classList.add(`f-${t}In`,`from-${o>0?h:p}`)),s.panTo({x:this.isHorizontal?a:0,y:this.isHorizontal?0:a,friction:0}),this.onChange(n),!0}manageSlideVisiblity(){const e=new Set,t=new Set,i=this.getVisibleSlides(parseFloat(this.option("preload",0)+"")||0);for(const s of this.slides)i.has(s)?e.add(s):t.add(s);for(const t of this.inTransition)e.add(this.slides[t]);for(const t of e)this.createSlideEl(t),this.lazyLoadSlide(t);for(const i of t)e.has(i)||this.removeSlideEl(i);this.markSelectedSlides(),this.repositionSlides()}markSelectedSlides(){if(!this.pages[this.page]||!this.pages[this.page].slides)return;const e="aria-hidden";let t=this.cn("isSelected");if(t)for(const i of this.slides){const s=i.el;s&&(s.dataset.index=`${i.index}`,this.pages[this.page].slides.includes(i)?(s.classList.contains(t)||(_e(s,t),this.emit("selectSlide",i)),s.removeAttribute(e)):(s.classList.contains(t)&&(Fe(s,t),this.emit("unselectSlide",i)),s.setAttribute(e,"true")))}}flipInfiniteTrack(){const e=this.panzoom;if(!e||!this.isInfinite)return;const t="x"===this.option("axis")?"e":"f",{viewportDim:i,contentDim:s}=this;let n=e.current[t],o=e.target[t]-n,a=0,r=.5*i,l=s;this.isRTL&&this.isHorizontal?(n<-r&&(a=-1,n+=l),n>l-r&&(a=1,n-=l)):(n>r&&(a=1,n-=l),n<-l+r&&(a=-1,n+=l)),a&&(e.current[t]=n,e.target[t]=n+o)}lazyLoadSlide(e){const t=this,i=e&&e.el;if(!i)return;const s=new Set,n="f-fadeIn";i.querySelectorAll("[data-lazy-srcset]").forEach((e=>{e instanceof HTMLImageElement&&s.add(e)}));let o=Array.from(i.querySelectorAll("[data-lazy-src]"));i.dataset.lazySrc&&o.push(i),o.map((e=>{e instanceof HTMLImageElement?s.add(e):De(e)&&(e.style.backgroundImage=`url('${e.dataset.lazySrc||""}')`,delete e.dataset.lazySrc)}));const a=(e,i,s)=>{s&&(s.remove(),s=null),i.complete&&(i.classList.add(n),setTimeout((()=>{i.classList.remove(n)}),350),i.style.visibility=""),this.option("adaptiveHeight")&&e.el&&this.pages[this.page].slides.indexOf(e)>-1&&(t.updateMetrics(),t.setViewportHeight()),this.emit("load",e)};for(const t of s){let i=null;t.src=t.dataset.lazySrcset||t.dataset.lazySrc||"",delete t.dataset.lazySrc,delete t.dataset.lazySrcset,t.style.visibility="hidden",t.addEventListener("error",(()=>{a(e,t,i)})),t.addEventListener("load",(()=>{a(e,t,i)})),setTimeout((()=>{t.parentNode&&e.el&&(t.complete?a(e,t,i):(i=ve(Re),t.parentNode.insertBefore(i,t)))}),300)}}onAnimationEnd(e){var t;const i=e.target,s=i?parseInt(i.dataset.index||"",10)||0:-1,n=this.slides[s],o=e.animationName;if(!i||!n||!o)return;const a=!!this.inTransition.has(s)&&n.transition;a&&o.substring(0,a.length+2)===`f-${a}`&&this.inTransition.delete(s),this.inTransition.size||this.clearTransitions(),s===this.page&&(null===(t=this.panzoom)||void 0===t?void 0:t.isResting)&&this.emit("settle")}onDecel(e,t=0,i=0,s=0,n=0){const{isRTL:o,isHorizontal:a,axis:r,pages:l}=this,c=l.length,d=Math.abs(Math.atan2(i,t)/(Math.PI/180));let u=0;if(u=d>45&&d<135?a?0:i:a?t:0,!c)return;const h=this.option("dragFree");let p=this.page,m=o&&a?1:-1;const f=e.target[r]*m,g=e.current[r]*m;let{pageIndex:v}=this.getPageFromPosition(f),{pageIndex:b}=this.getPageFromPosition(g);h?this.onChange(v):(Math.abs(u)>5?(l[p].dim<document.documentElement["client"+(this.isHorizontal?"Width":"Height")]-1&&(p=b),p=o&&a?u<0?p-1:p+1:u<0?p+1:p-1):p=0===s&&0===n?p:b,this.slideTo(p,{transition:!1,friction:e.option("decelFriction")}))}onClick(e){const t=e.target,i=t&&De(t)?t.dataset:null;let s,n;i&&(void 0!==i.carouselPage?(n="slideTo",s=i.carouselPage):void 0!==i.carouselNext?n="slideNext":void 0!==i.carouselPrev&&(n="slidePrev")),n?(e.preventDefault(),e.stopPropagation(),t&&!t.hasAttribute("disabled")&&this[n](s)):this.emit("click",e)}onSlideTo(e){const t=e.detail||0;this.slideTo(this.getPageForSlide(t),{friction:0})}onChange(e,t=0){const i=this.page;this.prevPage=i,this.page=e,this.option("adaptiveHeight")&&this.setViewportHeight(),e!==i&&(this.markSelectedSlides(),this.emit("change",e,i,t))}onRefresh(){let e=this.contentDim,t=this.viewportDim;this.updateMetrics(),this.contentDim===e&&this.viewportDim===t||this.slideTo(this.page,{friction:0,transition:!1})}onResize(){this.option("breakpoints")&&this.processOptions()}onBeforeTransform(e){this.lp!==e.current[this.axis]&&(this.flipInfiniteTrack(),this.manageSlideVisiblity()),this.lp=e.current.e}onEndAnimation(){this.inTransition.size||this.emit("settle")}reInit(e=null,t=null){this.destroy(),this.state=Ye.Init,this.userOptions=e||this.userOptions,this.userPlugins=t||this.userPlugins,this.processOptions()}slideTo(e=0,{friction:t=this.option("friction"),transition:i=this.option("transition")}={}){if(this.state===Ye.Destroy)return;e=parseInt((e||0).toString())||0;const s=this.getPageFromIndex(e);if(this.page!==s){const t=new Event("beforeChange",{bubbles:!0,cancelable:!0});if(this.emit("beforeChange",t,e),t.defaultPrevented)return}const{axis:n,isHorizontal:o,isRTL:a,pages:r,panzoom:l}=this,c=r.length,d=a&&o?1:-1;if(!l||!c)return;if(this.transitionTo(e,i))return;let u=r[s].pos;if(this.isInfinite){const t=this.contentDim,i=l.target[n]*d;if(2===c)u+=t*Math.floor(parseFloat(e+"")/2);else{const e=i;u=[u,u-t,u+t].reduce((function(t,i){return Math.abs(i-e)<Math.abs(t-e)?i:t}))}}u*=d,Math.abs(l.target[n]-u)<.1||(l.panTo({x:o?u:0,y:o?0:u,friction:t}),this.onChange(s))}slideToClosest(e){if(this.panzoom){const{pageIndex:t}=this.getPageFromPosition(this.panzoom.current[this.isHorizontal?"e":"f"]);this.slideTo(t,e)}}slideNext(){this.slideTo(this.page+1)}slidePrev(){this.slideTo(this.page-1)}clearTransitions(){this.inTransition.clear(),Fe(this.container,this.cn("inTransition"));const e=["to-prev","to-next","from-prev","from-next"];for(const t of this.slides){const i=t.el;if(i){i.removeEventListener("animationend",this.onAnimationEnd),i.classList.remove(...e);const s=t.transition;s&&i.classList.remove(`f-${s}Out`,`f-${s}In`)}}this.manageSlideVisiblity()}prependSlide(e){var t,i;let s=Array.isArray(e)?e:[e];for(const e of s.reverse())this.slides.unshift(Ue(e));for(let e=0;e<this.slides.length;e++)this.slides[e].index=e;const n=(null===(t=this.pages[this.page])||void 0===t?void 0:t.pos)||0;this.page+=s.length,this.updateMetrics();const o=(null===(i=this.pages[this.page])||void 0===i?void 0:i.pos)||0;if(this.panzoom){const e=this.isRTL?n-o:o-n;this.panzoom.target.e-=e,this.panzoom.current.e-=e,this.panzoom.requestTick()}}appendSlide(e){let t=Array.isArray(e)?e:[e];for(const e of t){const t=Ue(e);t.index=this.slides.length,this.slides.push(t),this.emit("initSlide",t,this.slides.length)}this.updateMetrics()}removeSlide(e){const t=this.slides.length;e=(e%t+t)%t,this.removeSlideEl(this.slides[e],!0),this.slides.splice(e,1);for(let e=0;e<this.slides.length;e++)this.slides[e].index=e;this.updateMetrics(),this.slideTo(this.page,{friction:0,transition:!1})}updateMetrics(){const{panzoom:e,viewport:t,track:i,isHorizontal:s}=this;if(!i)return;const n=s?"width":"height",o=s?"offsetWidth":"offsetHeight";if(t){let e=Math.max(t[o],me(t.getBoundingClientRect()[n],1e3)),i=getComputedStyle(t),a="padding",r=s?"Right":"Bottom";e-=parseFloat(i[a+(s?"Left":"Top")])+parseFloat(i[a+r]),this.viewportDim=e}let a,r=this.pages.length,l=0;for(const[e,t]of this.slides.entries()){let i=0,s=0;!t.el&&a?(i=a.dim,s=a.gap):(({dim:i,gap:s}=this.getSlideMetrics(t)),a=t),i=me(i,1e3),s=me(s,1e3),t.dim=i,t.gap=s,t.pos=l,l+=i,(this.isInfinite||e<this.slides.length-1)&&(l+=s)}const c=this.contentDim;l=me(l,1e3),this.contentDim=l,e&&(e.contentRect[n]=l,e.contentRect["e"===this.axis?"fullWidth":"fullHeight"]=l),this.pages=this.createPages(),this.pages=this.processPages(),this.state===Ye.Init&&this.setInitialPage(),this.page=Math.max(0,Math.min(this.page,this.pages.length-1)),e&&r===this.pages.length&&Math.abs(l-c)>.5&&(e.target[this.axis]=-1*this.pages[this.page].pos,e.current[this.axis]=-1*this.pages[this.page].pos,e.stop()),this.manageSlideVisiblity(),this.emit("refresh")}getProgress(e,t=!1){void 0===e&&(e=this.page);const i=this,s=i.panzoom,n=i.pages[e]||0;if(!n||!s)return 0;let o=-1*s.current.e,a=i.contentDim;var r=[me((o-n.pos)/(1*n.dim),1e3),me((o+a-n.pos)/(1*n.dim),1e3),me((o-a-n.pos)/(1*n.dim),1e3)].reduce((function(e,t){return Math.abs(t)<Math.abs(e)?t:e}));return t?r:Math.max(-1,Math.min(1,r))}setViewportHeight(){const{page:e,pages:t,viewport:i,isHorizontal:s}=this;if(!i||!t[e])return;let n=0;s&&this.track&&(this.track.style.height="auto",t[e].slides.forEach((e=>{e.el&&(n=Math.max(n,e.el.offsetHeight))}))),i.style.height=n?`${n}px`:""}getPageForSlide(e){for(const t of this.pages)for(const i of t.slides)if(i.index===e)return t.index;return-1}getVisibleSlides(e=0){var t;const i=new Set;let{contentDim:s,viewportDim:n,pages:o,page:a}=this;s=s+(null===(t=this.slides[this.slides.length-1])||void 0===t?void 0:t.gap)||0;let r=0;r=this.panzoom?-1*this.panzoom.current[this.axis]:o[a]&&o[a].pos||0,this.isInfinite&&(r-=Math.floor(r/s)*s),this.isRTL&&this.isHorizontal&&(r*=-1);const l=r-n*e,c=r+n*(e+1),d=this.isInfinite?[-1,0,1]:[0];for(const e of this.slides)for(const t of d){const n=e.pos+t*s,o=e.pos+e.dim+e.gap+t*s;n<c&&o>l&&i.add(e)}return i}getPageFromPosition(e){const{viewportDim:t,contentDim:i}=this,s=this.pages.length,n=this.slides.length,o=this.slides[n-1];let a=0,r=0,l=0;const c=this.option("center");c&&(e+=.5*t),this.isInfinite||(e=Math.max(this.slides[0].pos,Math.min(e,o.pos)));const d=i+o.gap;l=Math.floor(e/d)||0,e-=l*d;let u=o,h=this.slides.find((t=>{const i=e+(u&&!c?.5*u.dim:0);return u=t,t.pos<=i&&t.pos+t.dim+t.gap>i}));return h||(h=o),r=this.getPageForSlide(h.index),a=r+l*s,{page:a,pageIndex:r}}destroy(){if([Ye.Destroy].includes(this.state))return;this.state=Ye.Destroy;const{container:e,viewport:t,track:i,slides:s,panzoom:n}=this,o=this.option("classes");e.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),e.removeEventListener("slideTo",this.onSlideTo),window.removeEventListener("resize",this.onResize),n&&(n.destroy(),this.panzoom=null),s&&s.forEach((e=>{this.removeSlideEl(e)})),this.detachPlugins(),t&&t.offsetParent&&i&&i.offsetParent&&t.replaceWith(...i.childNodes);for(const[t,i]of Object.entries(o))"container"!==t&&i&&e.classList.remove(i);this.track=null,this.viewport=null,this.page=0,this.slides=[];const a=this.events.get("ready");this.events=new Map,a&&this.events.set("ready",a)}}Object.defineProperty(ot,"Panzoom",{enumerable:!0,configurable:!0,writable:!0,value:qe}),Object.defineProperty(ot,"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(ot,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:nt});const at=function(e){const t=window.pageYOffset,i=window.pageYOffset+window.innerHeight;if(!De(e))return 0;const s=e.getBoundingClientRect(),n=s.y+window.pageYOffset,o=s.y+s.height+window.pageYOffset;if(t>o||i<n)return 0;if(t<n&&i>o)return 100;if(n<t&&o>i)return 100;let a=s.height;n<t&&(a-=window.pageYOffset-n),o>i&&(a-=o-i);const r=a/window.innerHeight*100;return Math.round(r)},rt=!("undefined"==typeof window||!window.document||!window.document.createElement);let lt;const ct=["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([tabindex^="-"]):not([disabled]):not([aria-hidden])'].join(","),dt=e=>{if(e&&rt){void 0===lt&&document.createElement("div").focus({get preventScroll(){return lt=!0,!1}});try{if(lt)e.focus({preventScroll:!0});else{const t=window.pageXOffset||document.body.scrollTop,i=window.pageYOffset||document.body.scrollLeft;e.focus(),document.body.scrollTo({top:t,left:i,behavior:"auto"})}}catch(e){}}},ut={dragToClose:!0,hideScrollbar:!0,Carousel:{classes:{container:"fancybox__carousel",viewport:"fancybox__viewport",track:"fancybox__track",slide:"fancybox__slide"}},contentClick:"toggleZoom",contentDblClick:!1,backdropClick:"close",animated:!0,idle:3500,showClass:"f-zoomInUp",hideClass:"f-fadeOut",commonCaption:!1,parentEl:null,startIndex:0,l10n:Object.assign(Object.assign({},ze),{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"}),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>'},groupAll:!1,groupAttr:"data-fancybox",defaultType:"image",defaultDisplay:"block",autoFocus:!0,trapFocus:!0,placeFocusBack:!0,closeButton:"auto",keyboard:{Escape:"close",Delete:"close",Backspace:"close",PageUp:"next",PageDown:"prev",ArrowUp:"prev",ArrowDown:"next",ArrowRight:"next",ArrowLeft:"prev"},Fullscreen:{autoStart:!1},compact:()=>window.matchMedia("(max-width: 578px), (max-height: 578px)").matches,wheel:"zoom"};var ht,pt;!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Closing=2]="Closing",e[e.CustomClosing=3]="CustomClosing",e[e.Destroy=4]="Destroy"}(ht||(ht={})),function(e){e[e.Loading=0]="Loading",e[e.Opening=1]="Opening",e[e.Ready=2]="Ready",e[e.Closing=3]="Closing"}(pt||(pt={}));const mt=()=>{queueMicrotask((()=>{(()=>{const{slug:e,index:t}=ft.parseURL(),i=ri.getInstance();if(i&&!1!==i.option("Hash")){const s=i.carousel;if(e&&s){for(let t of s.slides)if(t.slug&&t.slug===e)return s.slideTo(t.index);if(e===i.option("slug"))return s.slideTo(t-1);const n=i.getSlide(),o=n&&n.triggerEl&&n.triggerEl.dataset;if(o&&o.fancybox===e)return s.slideTo(t-1)}ft.hasSilentClose=!0,i.close()}ft.startFromUrl()})()}))};class ft extends Ke{constructor(){super(...arguments),Object.defineProperty(this,"origHash",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"timer",{enumerable:!0,configurable:!0,writable:!0,value:null})}onChange(){const e=this.instance,t=e.carousel;this.timer&&clearTimeout(this.timer);const i=e.getSlide();if(!t||!i)return;const s=e.isOpeningSlide(i),n=new URL(document.URL).hash;let o,a=i.slug||void 0,r=i.triggerEl||void 0;o=a||this.instance.option("slug"),!o&&r&&r.dataset&&(o=r.dataset.fancybox);let l="";o&&"true"!==o&&(l="#"+o+(!a&&t.slides.length>1?"-"+(i.index+1):"")),s&&(this.origHash=n!==l?n:""),l&&n!==l&&(this.timer=setTimeout((()=>{try{e.state===ht.Ready&&window.history[s?"pushState":"replaceState"]({},document.title,window.location.pathname+window.location.search+l)}catch(e){}}),300))}onClose(){if(this.timer&&clearTimeout(this.timer),!0!==ft.hasSilentClose)try{window.history.replaceState({},document.title,window.location.pathname+window.location.search+(this.origHash||""))}catch(e){}}attach(){const e=this.instance;e.on("Carousel.ready",this.onChange),e.on("Carousel.change",this.onChange),e.on("close",this.onClose)}detach(){const e=this.instance;e.off("Carousel.ready",this.onChange),e.off("Carousel.change",this.onChange),e.off("close",this.onClose)}static parseURL(){const e=window.location.hash.slice(1),t=e.split("-"),i=t[t.length-1],s=i&&/^\+?\d+$/.test(i)&&parseInt(t.pop()||"1",10)||1;return{hash:e,slug:t.join("-"),index:s}}static startFromUrl(){if(ft.hasSilentClose=!1,ri.getInstance()||!1===ri.defaults.Hash)return;const{hash:e,slug:t,index:i}=ft.parseURL();if(!t)return;let s=document.querySelector(`[data-slug="${e}"]`);if(s&&s.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})),ri.getInstance())return;const n=document.querySelectorAll(`[data-fancybox="${t}"]`);n.length&&(s=n[i-1],s&&s.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})))}static destroy(){window.removeEventListener("hashchange",mt,!1)}}function gt(){window.addEventListener("hashchange",mt,!1),setTimeout((()=>{ft.startFromUrl()}),500)}Object.defineProperty(ft,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(ft,"hasSilentClose",{enumerable:!0,configurable:!0,writable:!0,value:!1}),rt&&(/complete|interactive|loaded/.test(document.readyState)?gt():document.addEventListener("DOMContentLoaded",gt));class vt extends Ke{onCreateSlide(e,t,i){const s=this.instance.optionFor(i,"src")||"";i.el&&"image"===i.type&&"string"==typeof s&&this.setImage(i,s)}onRemoveSlide(e,t,i){i.panzoom&&i.panzoom.destroy(),i.panzoom=void 0,i.imageEl=void 0}onChange(e,t,i,s){for(const e of t.slides){const t=e.panzoom;t&&e.index!==i&&t.reset(.35)}}onClose(){var e;const t=this.instance,i=t.container,s=t.getSlide();if(!i||!i.parentElement||!s)return;const{el:n,contentEl:o,panzoom:a}=s,r=s.thumbElSrc;if(!n||!r||!o||!a||a.isContentLoading||a.state===Ae.Init||a.state===Ae.Destroy)return;a.updateMetrics();let l=this.getZoomInfo(s);if(!l)return;this.instance.state=ht.CustomClosing,i.classList.remove("is-zooming-in"),i.classList.add("is-zooming-out"),o.style.backgroundImage=`url('${r}')`;const c=i.getBoundingClientRect();1===((null===(e=window.visualViewport)||void 0===e?void 0:e.scale)||1)&&Object.assign(i.style,{position:"absolute",top:`${window.pageYOffset}px`,left:`${window.pageXOffset}px`,bottom:"auto",right:"auto",width:`${c.width}px`,height:`${c.height}px`,overflow:"hidden"});const{x:d,y:u,scale:h,opacity:p}=l;if(p){const e=((e,t,i,s)=>{const n=t-e;return t=>1+((t-e)/n*-1||0)})(a.scale,h);a.on("afterTransform",(()=>{o.style.opacity=e(a.scale)+""}))}a.on("endAnimation",(()=>{t.destroy()})),a.target.a=h,a.target.b=0,a.target.c=0,a.target.d=h,a.panTo({x:d,y:u,scale:h,friction:p?.2:.33,ignoreBounds:!0}),a.isResting&&t.destroy()}setImage(e,t){const i=this.instance;e.src=t,this.process(e,t).then((t=>{var s;const n=e.contentEl,o=e.imageEl,a=e.thumbElSrc;if(i.isClosing()||!n||!o)return;n.offsetHeight;const r=!!i.isOpeningSlide(e)&&this.getZoomInfo(e);if(this.option("protected")){null===(s=e.el)||void 0===s||s.addEventListener("contextmenu",(e=>{e.preventDefault()}));const t=document.createElement("div");_e(t,"fancybox-protected"),n.appendChild(t)}if(a&&r){const s=t.contentRect,o=Math.max(s.fullWidth,s.fullHeight);let c=null;!r.opacity&&o>1200&&(c=document.createElement("img"),_e(c,"fancybox-ghost"),c.src=a,n.appendChild(c));const d=()=>{c&&(_e(c,"f-fadeFastOut"),setTimeout((()=>{c&&(c.remove(),c=null)}),200))};(l=a,new Promise(((e,t)=>{const i=new Image;i.onload=e,i.onerror=t,i.src=l}))).then((()=>{i.hideLoading(e),e.state=pt.Opening,this.instance.emit("reveal",e),this.zoomIn(e).then((()=>{d(),this.instance.done(e)}),(()=>{})),c&&setTimeout((()=>{d()}),o>2500?800:200)}),(()=>{i.hideLoading(e),i.revealContent(e)}))}else{const s=this.optionFor(e,"initialSize"),n=this.optionFor(e,"zoom"),o={event:i.prevMouseMoveEvent||i.options.event,friction:n?.12:0};let a=i.optionFor(e,"showClass")||void 0,r=!0;i.isOpeningSlide(e)&&("full"===s?t.zoomToFull(o):"cover"===s?t.zoomToCover(o):"max"===s?t.zoomToMax(o):r=!1,t.stop("current")),r&&a&&(a=t.isDragging?"f-fadeIn":""),i.hideLoading(e),i.revealContent(e,a)}var l}),(()=>{i.setError(e,"{{IMAGE_ERROR}}")}))}process(e,t){return new Promise(((i,s)=>{var n;const o=this.instance,a=e.el;o.clearContent(e),o.showLoading(e);let r=this.optionFor(e,"content");if("string"==typeof r&&(r=ve(r)),!r||!De(r)){if(r=document.createElement("img"),r instanceof HTMLImageElement){let i="",s=e.caption;i="string"==typeof s&&s?s.replace(/<[^>]+>/gi,"").substring(0,1e3):`Image ${e.index+1} of ${null===(n=o.carousel)||void 0===n?void 0:n.pages.length}`,r.src=t||"",r.alt=i,r.draggable=!1,e.srcset&&r.setAttribute("srcset",e.srcset)}e.sizes&&r.setAttribute("sizes",e.sizes)}r.classList.add("fancybox-image"),e.imageEl=r,o.setContent(e,r,!1),e.panzoom=new qe(a,Pe({transformParent:!0},this.option("Panzoom")||{},{content:r,width:o.optionFor(e,"width","auto"),height:o.optionFor(e,"height","auto"),wheel:()=>{const e=o.option("wheel");return("zoom"===e||"pan"==e)&&e},click:(t,i)=>{var s,n;if(o.isCompact||o.isClosing())return!1;if(e.index!==(null===(s=o.getSlide())||void 0===s?void 0:s.index))return!1;if(i){const e=i.composedPath()[0];if(["A","BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].includes(e.nodeName))return!1}let a=!i||i.target&&(null===(n=e.contentEl)||void 0===n?void 0:n.contains(i.target));return o.option(a?"contentClick":"backdropClick")||!1},dblClick:()=>o.isCompact?"toggleZoom":o.option("contentDblClick")||!1,spinner:!1,panOnlyZoomed:!0,wheelLimit:1/0,on:{ready:e=>{i(e)},error:()=>{s()},destroy:()=>{s()}}}))}))}zoomIn(e){return new Promise(((t,i)=>{const s=this.instance,n=s.container,{panzoom:o,contentEl:a,el:r}=e;o&&o.updateMetrics();const l=this.getZoomInfo(e);if(!(l&&r&&a&&o&&n))return void i();const{x:c,y:d,scale:u,opacity:h}=l,p=()=>{e.state!==pt.Closing&&(h&&(a.style.opacity=Math.max(Math.min(1,1-(1-o.scale)/(1-u)),0)+""),o.scale>=1&&o.scale>o.targetScale-.1&&t(o))},m=e=>{Fe(n,"is-zooming-in"),e.scale<.99||e.scale>1.01||(a.style.opacity="",e.off("endAnimation",m),e.off("touchStart",m),e.off("afterTransform",p),t(e))};o.on("endAnimation",m),o.on("touchStart",m),o.on("afterTransform",p),o.on(["error","destroy"],(()=>{i()})),o.panTo({x:c,y:d,scale:u,friction:0,ignoreBounds:!0}),o.stop("current");const f={event:"mousemove"===o.panMode?s.prevMouseMoveEvent||s.options.event:void 0},g=this.optionFor(e,"initialSize");_e(n,"is-zooming-in"),s.hideLoading(e),"full"===g?o.zoomToFull(f):"cover"===g?o.zoomToCover(f):"max"===g?o.zoomToMax(f):o.reset(.172)}))}getZoomInfo(e){var t;const{el:i,imageEl:s,thumbEl:n,panzoom:o}=e;if(!i||!s||!n||!o||at(n)<3||!this.optionFor(e,"zoom")||this.instance.state===ht.Destroy)return!1;if(1!==((null===(t=window.visualViewport)||void 0===t?void 0:t.scale)||1))return!1;let{top:a,left:r,width:l,height:c}=n.getBoundingClientRect(),{top:d,left:u,fitWidth:h,fitHeight:p}=o.contentRect;if(!(l&&c&&h&&p))return!1;const m=o.container.getBoundingClientRect();u+=m.left,d+=m.top;const f=-1*(u+.5*h-(r+.5*l)),g=-1*(d+.5*p-(a+.5*c)),v=l/h;let b=this.option("zoomOpacity")||!1;return"auto"===b&&(b=Math.abs(l/c-h/p)>.1),{x:f,y:g,scale:v,opacity:b}}attach(){const e=this,t=e.instance;t.on("Carousel.change",e.onChange),t.on("Carousel.createSlide",e.onCreateSlide),t.on("Carousel.removeSlide",e.onRemoveSlide),t.on("close",e.onClose)}detach(){const e=this,t=e.instance;t.off("Carousel.change",e.onChange),t.off("Carousel.createSlide",e.onCreateSlide),t.off("Carousel.removeSlide",e.onRemoveSlide),t.off("close",e.onClose)}}Object.defineProperty(vt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{initialSize:"fit",Panzoom:{maxScale:1},protected:!1,zoom:!0,zoomOpacity:"auto"}}),"function"==typeof SuppressedError&&SuppressedError;const bt="html",yt="image",wt="map",xt="youtube",St="vimeo",Et="html5video",Tt=(e,t={})=>{const i=new URL(e),s=new URLSearchParams(i.search),n=new URLSearchParams;for(const[e,i]of[...s,...Object.entries(t)]){let t=i.toString();"t"===e?n.set("start",parseInt(t).toString()):n.set(e,t)}let o=n.toString(),a=e.match(/#t=((.*)?\d+s)/);return a&&(o+=`#t=${a[1]}`),o},Ct=["image","html","ajax","inline","clone","iframe","map","pdf","html5video","youtube","vimeo"];class Pt extends Ke{onInitSlide(e,t,i){this.processType(i)}onCreateSlide(e,t,i){this.setContent(i)}onClearContent(e,t){t.xhr&&(t.xhr.abort(),t.xhr=null);const i=t.iframeEl;i&&(i.onload=i.onerror=null,i.src="//about:blank",t.iframeEl=null);const s=t.contentEl,n=t.placeholderEl;if("inline"===t.type&&s&&n)s.classList.remove("fancybox__content"),"none"!==s.style.display&&(s.style.display="none"),n.parentNode&&n.parentNode.insertBefore(s,n),n.remove(),t.contentEl=void 0,t.placeholderEl=void 0;else for(;t.el&&t.el.firstChild;)t.el.removeChild(t.el.firstChild)}onSelectSlide(e,t,i){i.state===pt.Ready&&this.playVideo()}onUnselectSlide(e,t,i){var s,n;if(i.type===Et){try{null===(n=null===(s=i.el)||void 0===s?void 0:s.querySelector("video"))||void 0===n||n.pause()}catch(e){}return}let o;i.type===St?o={method:"pause",value:"true"}:i.type===xt&&(o={event:"command",func:"pauseVideo"}),o&&i.iframeEl&&i.iframeEl.contentWindow&&i.iframeEl.contentWindow.postMessage(JSON.stringify(o),"*"),i.poller&&clearTimeout(i.poller)}onDone(e,t){e.isCurrentSlide(t)&&!e.isClosing()&&this.playVideo()}onRefresh(e,t){t.slides.forEach((e=>{e.el&&(this.resizeIframe(e),this.setAspectRatio(e))}))}onMessage(e){try{let t=JSON.parse(e.data);if("https://player.vimeo.com"===e.origin){if("ready"===t.event)for(let t of Array.from(document.getElementsByClassName("fancybox__iframe")))t instanceof HTMLIFrameElement&&t.contentWindow===e.source&&(t.dataset.ready="true")}else if(e.origin.match(/^https:\/\/(www.)?youtube(-nocookie)?.com$/)&&"onReady"===t.event){const e=document.getElementById(t.id);e&&(e.dataset.ready="true")}}catch(e){}}loadAjaxContent(e){const t=this.instance.optionFor(e,"src")||"";this.instance.showLoading(e);const i=this.instance,s=new XMLHttpRequest;i.showLoading(e),s.onreadystatechange=function(){s.readyState===XMLHttpRequest.DONE&&i.state===ht.Ready&&(i.hideLoading(e),200===s.status?i.setContent(e,s.responseText):i.setError(e,404===s.status?"{{AJAX_NOT_FOUND}}":"{{AJAX_FORBIDDEN}}"))};const n=e.ajax||null;s.open(n?"POST":"GET",t+""),s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.send(n),e.xhr=s}setInlineContent(e){let t=null;if(De(e.src))t=e.src;else if("string"==typeof e.src){const i=e.src.split("#",2).pop();t=i?document.getElementById(i):null}if(t){if("clone"===e.type||t.closest(".fancybox__slide")){t=t.cloneNode(!0);const i=t.dataset.animationName;i&&(t.classList.remove(i),delete t.dataset.animationName);let s=t.getAttribute("id");s=s?`${s}--clone`:`clone-${this.instance.id}-${e.index}`,t.setAttribute("id",s)}else if(t.parentNode){const i=document.createElement("div");i.classList.add("fancybox-placeholder"),t.parentNode.insertBefore(i,t),e.placeholderEl=i}this.instance.setContent(e,t)}else this.instance.setError(e,"{{ELEMENT_NOT_FOUND}}")}setIframeContent(e){const{src:t,el:i}=e;if(!t||"string"!=typeof t||!i)return;i.classList.add("is-loading");const s=this.instance,n=document.createElement("iframe");n.className="fancybox__iframe",n.setAttribute("id",`fancybox__iframe_${s.id}_${e.index}`);for(const[t,i]of Object.entries(this.optionFor(e,"iframeAttr")||{}))n.setAttribute(t,i);n.onerror=()=>{s.setError(e,"{{IFRAME_ERROR}}")},e.iframeEl=n;const o=this.optionFor(e,"preload");if("iframe"!==e.type||!1===o)return n.setAttribute("src",e.src+""),s.setContent(e,n,!1),this.resizeIframe(e),void s.revealContent(e);s.showLoading(e),n.onload=()=>{if(!n.src.length)return;const t="true"!==n.dataset.ready;n.dataset.ready="true",this.resizeIframe(e),t?s.revealContent(e):s.hideLoading(e)},n.setAttribute("src",t),s.setContent(e,n,!1)}resizeIframe(e){const{type:t,iframeEl:i}=e;if(t===xt||t===St)return;const s=null==i?void 0:i.parentElement;if(!i||!s)return;let n=!1!==e.autoSize,o=e.width||0,a=e.height||0;o&&a&&(n=!1);const r=s&&s.style;if(!1!==e.preload&&!1!==n&&r)try{const e=window.getComputedStyle(s),t=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),n=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),l=i.contentWindow;if(l){const e=l.document,i=e.getElementsByTagName(bt)[0],s=e.body;r.width="",s.style.overflow="hidden",o=o||i.scrollWidth+t,r.width=`${o}px`,s.style.overflow="",r.flex="0 0 auto",r.height=`${s.scrollHeight}px`,a=i.scrollHeight+n}}catch(e){}if(o||a){const e={flex:"0 1 auto",width:"",height:""};o&&"auto"!==o&&(e.width=`${o}px`),a&&"auto"!==a&&(e.height=`${a}px`),Object.assign(r,e)}}playVideo(){const e=this.instance.getSlide();if(!e)return;const{el:t}=e;if(!t||!t.offsetParent)return;if(!this.optionFor(e,"videoAutoplay"))return;if(e.type===Et)try{const e=t.querySelector("video");if(e){const t=e.play();void 0!==t&&t.then((()=>{})).catch((t=>{e.muted=!0,e.play()}))}}catch(e){}if(e.type!==xt&&e.type!==St)return;const i=()=>{if(e.iframeEl&&e.iframeEl.contentWindow){let t;if("true"===e.iframeEl.dataset.ready)return t=e.type===xt?{event:"command",func:"playVideo"}:{method:"play",value:"true"},t&&e.iframeEl.contentWindow.postMessage(JSON.stringify(t),"*"),void(e.poller=void 0);e.type===xt&&(t={event:"listening",id:e.iframeEl.getAttribute("id")},e.iframeEl.contentWindow.postMessage(JSON.stringify(t),"*"))}e.poller=setTimeout(i,250)};i()}processType(e){if(e.html)return e.type=bt,e.src=e.html,void(e.html="");const t=this.instance.optionFor(e,"src","");if(!t||"string"!=typeof t)return;let i=e.type,s=null;if(s=t.match(/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|shorts\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i)){const n=this.optionFor(e,xt),{nocookie:o}=n,a=function(e,t){var i={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(i[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(s=Object.getOwnPropertySymbols(e);n<s.length;n++)t.indexOf(s[n])<0&&Object.prototype.propertyIsEnumerable.call(e,s[n])&&(i[s[n]]=e[s[n]])}return i}(n,["nocookie"]),r=`www.youtube${o?"-nocookie":""}.com`,l=Tt(t,a),c=encodeURIComponent(s[2]);e.videoId=c,e.src=`https://${r}/embed/${c}?${l}`,e.thumbSrc=e.thumbSrc||`https://i.ytimg.com/vi/${c}/mqdefault.jpg`,i=xt}else if(s=t.match(/^.+vimeo.com\/(?:\/)?([\d]+)((\/|\?h=)([a-z0-9]+))?(.*)?/)){const n=Tt(t,this.optionFor(e,St)),o=encodeURIComponent(s[1]),a=s[4]||"";e.videoId=o,e.src=`https://player.vimeo.com/video/${o}?${a?`h=${a}${n?"&":""}`:""}${n}`,i=St}if(!i&&e.triggerEl){const t=e.triggerEl.dataset.type;Ct.includes(t)&&(i=t)}i||"string"==typeof t&&("#"===t.charAt(0)?i="inline":(s=t.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(i=Et,e.videoFormat=e.videoFormat||"video/"+("ogv"===s[1]?"ogg":s[1])):t.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?i=yt:t.match(/\.(pdf)((\?|#).*)?$/i)?i="pdf":(s=t.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+.?\d+?)z))|(?:\?ll=))(.*)?/i))?(e.src=`https://maps.google.${s[1]}/?ll=${(s[2]?s[2]+"&z="+Math.floor(parseFloat(s[3]))+(s[4]?s[4].replace(/^\//,"&"):""):s[4]+"").replace(/\?/,"&")}&output=${s[4]&&s[4].indexOf("layer=c")>0?"svembed":"embed"}`,i=wt):(s=t.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i))&&(e.src=`https://maps.google.${s[1]}/maps?q=${s[2].replace("query=","q=").replace("api=1","")}&output=embed`,i=wt)),i=i||this.instance.option("defaultType"),e.type=i,i===yt&&(e.thumbSrc=e.thumbSrc||e.src)}setContent(e){const t=this.instance.optionFor(e,"src")||"";if(e&&e.type&&t){switch(e.type){case bt:this.instance.setContent(e,t);break;case Et:const i=this.option("videoTpl");i&&this.instance.setContent(e,i.replace(/\{\{src\}\}/gi,t+"").replace(/\{\{format\}\}/gi,this.optionFor(e,"videoFormat")||"").replace(/\{\{poster\}\}/gi,e.poster||e.thumbSrc||""));break;case"inline":case"clone":this.setInlineContent(e);break;case"ajax":this.loadAjaxContent(e);break;case"pdf":case wt:case xt:case St:e.preload=!1;case"iframe":this.setIframeContent(e)}this.setAspectRatio(e)}}setAspectRatio(e){const t=e.contentEl;if(!(e.el&&t&&e.type&&[xt,St,Et].includes(e.type)))return;let i,s=e.width||"auto",n=e.height||"auto";if("auto"===s||"auto"===n){i=this.optionFor(e,"videoRatio");const t=(i+"").match(/(\d+)\s*\/\s?(\d+)/);i=t&&t.length>2?parseFloat(t[1])/parseFloat(t[2]):parseFloat(i+"")}else s&&n&&(i=s/n);if(!i)return;t.style.aspectRatio="",t.style.width="",t.style.height="",t.offsetHeight;const o=t.getBoundingClientRect(),a=o.width||1,r=o.height||1;t.style.aspectRatio=i+"",i<a/r?(n="auto"===n?r:Math.min(r,n),t.style.width="auto",t.style.height=`${n}px`):(s="auto"===s?a:Math.min(a,s),t.style.width=`${s}px`,t.style.height="auto")}attach(){const e=this,t=e.instance;t.on("Carousel.initSlide",e.onInitSlide),t.on("Carousel.createSlide",e.onCreateSlide),t.on("Carousel.selectSlide",e.onSelectSlide),t.on("Carousel.unselectSlide",e.onUnselectSlide),t.on("Carousel.Panzoom.refresh",e.onRefresh),t.on("done",e.onDone),t.on("clearContent",e.onClearContent),window.addEventListener("message",e.onMessage)}detach(){const e=this,t=e.instance;t.off("Carousel.initSlide",e.onInitSlide),t.off("Carousel.createSlide",e.onCreateSlide),t.off("Carousel.selectSlide",e.onSelectSlide),t.off("Carousel.unselectSlide",e.onUnselectSlide),t.off("Carousel.Panzoom.refresh",e.onRefresh),t.off("done",e.onDone),t.off("clearContent",e.onClearContent),window.removeEventListener("message",e.onMessage)}}Object.defineProperty(Pt,"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}}});const Mt="play",Ot="pause",Lt="ready";class At extends Ke{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:Lt}),Object.defineProperty(this,"inHover",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"timer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"progressBar",{enumerable:!0,configurable:!0,writable:!0,value:null})}get isActive(){return this.state!==Lt}onReady(e){this.option("autoStart")&&(e.isInfinite||e.page<e.pages.length-1)&&this.start()}onChange(){var e;(null===(e=this.instance.panzoom)||void 0===e?void 0:e.isResting)||(this.removeProgressBar(),this.pause())}onSettle(){this.resume()}onVisibilityChange(){"visible"===document.visibilityState?this.resume():this.pause()}onMouseEnter(){this.inHover=!0,this.pause()}onMouseLeave(){var e;this.inHover=!1,(null===(e=this.instance.panzoom)||void 0===e?void 0:e.isResting)&&this.resume()}onTimerEnd(){const e=this.instance;"play"===this.state&&(e.isInfinite||e.page!==e.pages.length-1?e.slideNext():e.slideTo(0))}removeProgressBar(){this.progressBar&&(this.progressBar.remove(),this.progressBar=null)}createProgressBar(){var e;if(!this.option("showProgress"))return null;this.removeProgressBar();const t=this.instance,i=(null===(e=t.pages[t.page])||void 0===e?void 0:e.slides)||[];let s=this.option("progressParentEl");if(s||(s=(1===i.length?i[0].el:null)||t.viewport),!s)return null;const n=document.createElement("div");return _e(n,"f-progress"),s.prepend(n),this.progressBar=n,n.offsetHeight,n}set(){const e=this,t=e.instance;if(t.pages.length<2)return;if(e.timer)return;const i=e.option("timeout");e.state=Mt,_e(t.container,"has-autoplay");let s=e.createProgressBar();s&&(s.style.transitionDuration=`${i}ms`,s.style.transform="scaleX(1)"),e.timer=setTimeout((()=>{e.timer=null,e.inHover||e.onTimerEnd()}),i),e.emit("set")}clear(){const e=this;e.timer&&(clearTimeout(e.timer),e.timer=null),e.removeProgressBar()}start(){const e=this;if(e.set(),e.state!==Lt){if(e.option("pauseOnHover")){const t=e.instance.container;t.addEventListener("mouseenter",e.onMouseEnter,!1),t.addEventListener("mouseleave",e.onMouseLeave,!1)}document.addEventListener("visibilitychange",e.onVisibilityChange,!1),e.emit("start")}}stop(){const e=this,t=e.state,i=e.instance.container;e.clear(),e.state=Lt,i.removeEventListener("mouseenter",e.onMouseEnter,!1),i.removeEventListener("mouseleave",e.onMouseLeave,!1),document.removeEventListener("visibilitychange",e.onVisibilityChange,!1),Fe(i,"has-autoplay"),t!==Lt&&e.emit("stop")}pause(){const e=this;e.state===Mt&&(e.state=Ot,e.clear(),e.emit(Ot))}resume(){const e=this,t=e.instance;if(t.isInfinite||t.page!==t.pages.length-1)if(e.state!==Mt){if(e.state===Ot&&!e.inHover){const t=new Event("resume",{bubbles:!0,cancelable:!0});e.emit("resume",t),t.defaultPrevented||e.set()}}else e.set();else e.stop()}toggle(){this.state===Mt||this.state===Ot?this.stop():this.start()}attach(){const e=this,t=e.instance;t.on("ready",e.onReady),t.on("Panzoom.startAnimation",e.onChange),t.on("Panzoom.endAnimation",e.onSettle),t.on("Panzoom.touchMove",e.onChange)}detach(){const e=this,t=e.instance;t.off("ready",e.onReady),t.off("Panzoom.startAnimation",e.onChange),t.off("Panzoom.endAnimation",e.onSettle),t.off("Panzoom.touchMove",e.onChange),e.stop()}}Object.defineProperty(At,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{autoStart:!0,pauseOnHover:!0,progressParentEl:null,showProgress:!0,timeout:3e3}});class kt extends Ke{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null})}onPrepare(e){const t=e.carousel;if(!t)return;const i=e.container;i&&(t.options.Autoplay=Pe({autoStart:!1},this.option("Autoplay")||{},{pauseOnHover:!1,timeout:this.option("timeout"),progressParentEl:()=>this.option("progressParentEl")||null,on:{start:()=>{e.emit("startSlideshow")},set:t=>{var s;i.classList.add("has-slideshow"),(null===(s=e.getSlide())||void 0===s?void 0:s.state)!==pt.Ready&&t.pause()},stop:()=>{i.classList.remove("has-slideshow"),e.isCompact||e.endIdle(),e.emit("endSlideshow")},resume:(t,i)=>{var s,n,o;!i||!i.cancelable||(null===(s=e.getSlide())||void 0===s?void 0:s.state)===pt.Ready&&(null===(o=null===(n=e.carousel)||void 0===n?void 0:n.panzoom)||void 0===o?void 0:o.isResting)||i.preventDefault()}}}),t.attachPlugins({Autoplay:At}),this.ref=t.plugins.Autoplay)}onReady(e){const t=e.carousel,i=this.ref;i&&t&&this.option("playOnStart")&&(t.isInfinite||t.page<t.pages.length-1)&&i.start()}onDone(e,t){const i=this.ref,s=e.carousel;if(!i||!s)return;const n=t.panzoom;n&&n.on("startAnimation",(()=>{e.isCurrentSlide(t)&&i.stop()})),e.isCurrentSlide(t)&&i.resume()}onKeydown(e,t){var i;const s=this.ref;s&&t===this.option("key")&&"BUTTON"!==(null===(i=document.activeElement)||void 0===i?void 0:i.nodeName)&&s.toggle()}attach(){const e=this,t=e.instance;t.on("Carousel.init",e.onPrepare),t.on("Carousel.ready",e.onReady),t.on("done",e.onDone),t.on("keydown",e.onKeydown)}detach(){const e=this,t=e.instance;t.off("Carousel.init",e.onPrepare),t.off("Carousel.ready",e.onReady),t.off("done",e.onDone),t.off("keydown",e.onKeydown)}}Object.defineProperty(kt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{key:" ",playOnStart:!1,progressParentEl:e=>{var t;return(null===(t=e.instance.container)||void 0===t?void 0:t.querySelector(".fancybox__toolbar [data-fancybox-toggle-slideshow]"))||e.instance.container},timeout:3e3}});const zt={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"};var It;!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Hidden=2]="Hidden"}(It||(It={}));let Rt=class extends Ke{constructor(){super(...arguments),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:"modern"}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"panzoom",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"thumbWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbClipWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbExtraGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"shouldCenter",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:It.Init})}formatThumb(e,t){return this.instance.localize(t,[["%i",e.index],["%d",e.index+1],["%s",e.thumbSrc||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"]])}getSlides(){const e=[],t=this.option("thumbTpl")||"";if(t)for(const i of this.instance.slides||[]){let s="";i.type&&(s=`for-${i.type}`,i.type&&["video","youtube","vimeo","html5video"].includes(i.type)&&(s+=" for-video")),e.push({html:this.formatThumb(i,t),customClass:s})}return e}onInitSlide(e,t){const i=t.el;i&&(t.thumbSrc=i.dataset.thumbSrc||t.thumbSrc||"",t.thumbClipWidth=parseFloat(i.dataset.thumbClipWidth||"")||t.thumbClipWidth||0,t.thumbHeight=parseFloat(i.dataset.thumbHeight||"")||t.thumbHeight||0)}onInitSlides(){this.build()}onRefreshM(){this.refreshModern()}onChangeM(){"modern"===this.type&&(this.shouldCenter=!0,this.centerModern())}onClickModern(e){e.preventDefault(),e.stopPropagation();const t=this.instance,i=t.page,s=e=>{if(e){const t=e.closest("[data-carousel-index]");if(t)return parseInt(t.dataset.carouselIndex||"",10)||0}return-1},n=(e,t)=>{const i=document.elementFromPoint(e,t);return i?s(i):-1};let o=s(e.target);o<0&&(o=n(e.clientX+this.thumbGap,e.clientY),o===i&&(o=i-1)),o<0&&(o=n(e.clientX-this.thumbGap,e.clientY),o===i&&(o=i+1)),o<0&&(o=(t=>{let s=n(e.clientX-t,e.clientY),a=n(e.clientX+t,e.clientY);return o<0&&s===i&&(o=i+1),o<0&&a===i&&(o=i-1),o})(this.thumbExtraGap)),o===i?this.centerModern():o>-1&&o<t.pages.length&&t.slideTo(o)}onTransformM(){if("modern"!==this.type)return;const{instance:e,container:t,track:i}=this,s=e.panzoom;if(!(t&&i&&s&&this.panzoom))return;ye(t,this.cn("isResting"),s.state!==Ae.Init&&s.isResting);const n=this.thumbGap,o=this.thumbExtraGap,a=this.thumbClipWidth;let r=0,l=0,c=0;for(const t of e.slides){let i=t.index,s=t.thumbSlideEl;if(!s)continue;ye(s,this.cn("isSelected"),i===e.page),l=1-Math.abs(e.getProgress(i)),s.style.setProperty("--progress",l?l+"":"");const d=.5*((t.thumbWidth||0)-a);r+=n,r+=d,l&&(r-=l*(d+o)),s.style.setProperty("--shift",r-n+""),r+=d,l&&(r-=l*(d+o)),r-=n,0===i&&(c=o*l)}i&&(i.style.setProperty("--left",c+""),i.style.setProperty("--width",r+c+n+o*l+"")),this.shouldCenter&&this.centerModern()}buildClassic(){const{container:e,track:t}=this,i=this.getSlides();if(!e||!t||!i)return;const s=new this.instance.constructor(e,Pe({track:t,infinite:!1,center:!0,fill:!0,dragFree:!0,slidesPerPage:1,transition:!1,Dots:!1,Navigation:!1,classes:{container:"f-thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide"}},this.option("Carousel")||{},{Sync:{target:this.instance},slides:i}));this.carousel=s,this.track=t,s.on("ready",(()=>{this.emit("ready")})),s.on("createSlide",((e,t)=>{this.emit("createSlide",t,t.el)}))}buildModern(){if("modern"!==this.type)return;const{container:e,track:t,instance:i}=this,s=this.option("thumbTpl")||"";if(!e||!t||!s)return;e.addEventListener("keydown",(()=>{Fe(e,"is-using-mouse")})),_e(e,"is-horizontal"),this.updateModern();for(const e of i.slides||[]){const i=document.createElement("div");if(_e(i,this.cn("slide")),e.type){let t=`for-${e.type}`;["video","youtube","vimeo","html5video"].includes(e.type)&&(t+=" for-video"),_e(i,t)}i.appendChild(ve(this.formatThumb(e,s))),this.emit("createSlide",e,i),e.thumbSlideEl=i,t.appendChild(i),this.resizeModernSlide(e)}const n=new i.constructor.Panzoom(e,{content:t,lockAxis:"x",zoom:!1,panOnlyZoomed:!1,bounds:()=>{let e=0,t=0,s=i.slides[0],n=i.slides[i.slides.length-1],o=i.slides[i.page];return s&&n&&o&&(t=-1*this.getModernThumbPos(0),0!==i.page&&(t+=.5*(s.thumbWidth||0)),e=-1*this.getModernThumbPos(i.slides.length-1),i.page!==i.slides.length-1&&(e+=(n.thumbWidth||0)-(o.thumbWidth||0)-.5*(n.thumbWidth||0))),{x:{min:e,max:t},y:{min:0,max:0}}}});n.on("touchStart",((e,t)=>{this.shouldCenter=!1,_e(this.container,"is-using-mouse")})),n.on("click",((e,t)=>this.onClickModern(t))),n.on("ready",(()=>{this.centerModern(),this.emit("ready")})),n.on(["afterTransform","refresh"],(e=>{this.lazyLoadModern()})),this.panzoom=n,this.refreshModern()}updateModern(){if("modern"!==this.type)return;const{container:e}=this;e&&(this.thumbGap=parseFloat(getComputedStyle(e).getPropertyValue("--f-thumb-gap"))||0,this.thumbExtraGap=parseFloat(getComputedStyle(e).getPropertyValue("--f-thumb-extra-gap"))||0,this.thumbWidth=parseFloat(getComputedStyle(e).getPropertyValue("--f-thumb-width"))||40,this.thumbClipWidth=parseFloat(getComputedStyle(e).getPropertyValue("--f-thumb-clip-width"))||40,this.thumbHeight=parseFloat(getComputedStyle(e).getPropertyValue("--f-thumb-height"))||40)}refreshModern(){var e;if("modern"===this.type){this.updateModern();for(const e of this.instance.slides||[])this.resizeModernSlide(e);this.onTransformM(),null===(e=this.panzoom)||void 0===e||e.updateMetrics(!0),this.centerModern(0)}}centerModern(e){const t=this.instance,{container:i,panzoom:s}=this;if(!i||!s||s.state===Ae.Init)return;const n=t.page;let o=this.getModernThumbPos(n),a=o;for(let e=t.page-3;e<t.page+3;e++){if(e<0||e>t.pages.length-1||e===t.page)continue;const i=1-Math.abs(t.getProgress(e));i>0&&i<1&&(a+=i*(this.getModernThumbPos(e)-o))}let r=100;void 0===e&&(e=.2,t.inTransition.size>0&&(e=.12),Math.abs(-1*s.current.e-a)>s.containerRect.width&&(e=.5,r=0)),s.options.maxVelocity=r,s.applyChange({panX:me(-1*a-s.target.e,1e3),friction:null===t.prevPage?0:e})}lazyLoadModern(){const{instance:e,panzoom:t}=this;if(!t)return;const i=-1*t.current.e||0;let s=this.getModernThumbPos(e.page);if(t.state!==Ae.Init||0===s)for(const s of e.slides||[]){const e=s.thumbSlideEl;if(!e)continue;const n=e.querySelector("img[data-lazy-src]"),o=s.index,a=this.getModernThumbPos(o),r=i-.5*t.containerRect.innerWidth,l=r+t.containerRect.innerWidth;if(!n||a<r||a>l)continue;let c=n.dataset.lazySrc;if(!c||!c.length)continue;if(delete n.dataset.lazySrc,n.src=c,n.complete)continue;_e(e,this.cn("isLoading"));const d=ve(Re);e.appendChild(d),n.addEventListener("load",(()=>{e.offsetParent&&(e.classList.remove(this.cn("isLoading")),d.remove())}),!1)}}resizeModernSlide(e){if("modern"!==this.type)return;if(!e.thumbSlideEl)return;const t=e.thumbClipWidth&&e.thumbHeight?Math.round(this.thumbHeight*(e.thumbClipWidth/e.thumbHeight)):this.thumbWidth;e.thumbWidth=t}getModernThumbPos(e){const t=this.instance.slides[e],i=this.panzoom;if(!i||!i.contentRect.fitWidth)return 0;let s=i.containerRect.innerWidth,n=i.contentRect.width;2===this.instance.slides.length&&(e-=1,n=2*this.thumbClipWidth);let o=e*(this.thumbClipWidth+this.thumbGap)+this.thumbExtraGap+.5*(t.thumbWidth||0);return o-=n>s?.5*s:.5*n,me(o||0,1)}isDisabled(){const e=this.option("minCount")||0;if(e){const t=this.instance;let i=0;for(const e of t.slides||[])e.thumbSrc&&i++;if(i<e)return!0}const t=this.option("type");return["modern","classic"].indexOf(t)<0}build(){if(this.state!==It.Init)return;if(this.isDisabled())return;const e=this.instance.container,t=this.option("type");this.type=t;const i=document.createElement("div");_e(i,this.cn("container")),_e(i,`is-${t}`);const s=this.option("parentEl");s?s.appendChild(i):e.after(i),this.container=i,_e(e,this.cn("hasThumbs"));const n=document.createElement("div");_e(n,this.cn("track")),i.appendChild(n),this.track=n,"classic"===t?this.buildClassic():this.buildModern(),this.state=It.Ready}cleanup(){this.carousel&&this.carousel.destroy(),this.carousel=null,this.panzoom&&this.panzoom.destroy(),this.panzoom=null,this.container&&this.container.remove(),this.container=null,this.track=null,this.state=It.Init,Fe(this.instance.container,this.cn("hasThumbs"))}attach(){const e=this,t=e.instance;t.on("initSlide",e.onInitSlide),t.state===Ye.Init?t.on("initSlides",e.onInitSlides):e.onInitSlides(),t.on("Panzoom.afterTransform",e.onTransformM),t.on("Panzoom.refresh",e.onRefreshM),t.on("change",e.onChangeM)}detach(){const e=this,t=e.instance;t.off("initSlide",e.onInitSlide),t.off("initSlides",e.onInitSlides),t.off("Panzoom.afterTransform",e.onTransformM),t.off("Panzoom.refresh",e.onRefreshM),t.off("change",e.onChangeM),e.cleanup()}};Object.defineProperty(Rt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:zt});const Dt=Object.assign(Object.assign({},zt),{key:"t",showOnStart:!0,parentEl:null}),Ft="is-masked",_t="aria-hidden";class jt extends Ke{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"hidden",{enumerable:!0,configurable:!0,writable:!0,value:!1})}get isEnabled(){const e=this.ref;return e&&!e.isDisabled()}get isHidden(){return this.hidden}onInit(){var e;const t=this,i=t.instance,s=i.carousel;if(t.ref||!s)return;const n=t.option("parentEl")||i.footer||i.container;if(!n)return;const o=Pe({},t.options,{parentEl:n,classes:{container:"f-thumbs fancybox__thumbs"},Carousel:{Sync:{friction:i.option("Carousel.friction")||0}},on:{ready:e=>{const i=e.container;i&&this.hidden&&(t.refresh(),i.style.transition="none",t.hide(),i.offsetHeight,queueMicrotask((()=>{i.style.transition="",t.show()})))}}});o.Carousel=o.Carousel||{},o.Carousel.on=Pe((null===(e=t.options.Carousel)||void 0===e?void 0:e.on)||{},{click:(e,t)=>{t.stopPropagation()}}),s.options.Thumbs=o,s.attachPlugins({Thumbs:Rt}),t.ref=s.plugins.Thumbs,t.option("showOnStart")||(t.ref.state=It.Hidden,t.hidden=!0)}onResize(){var e;const t=null===(e=this.ref)||void 0===e?void 0:e.container;t&&(t.style.maxHeight="")}onKeydown(e,t){const i=this.option("key");i&&i===t&&this.toggle()}toggle(){const e=this.ref;if(e&&!e.isDisabled())return e.state===It.Hidden?(e.state=It.Init,void e.build()):void(this.hidden?this.show():this.hide())}show(){const e=this.ref;if(!e||e.isDisabled())return;const t=e.container;t&&(this.refresh(),t.offsetHeight,t.removeAttribute(_t),t.classList.remove(Ft),this.hidden=!1)}hide(){const e=this.ref,t=e&&e.container;t&&(this.refresh(),t.offsetHeight,t.classList.add(Ft),t.setAttribute(_t,"true")),this.hidden=!0}refresh(){const e=this.ref;if(!e||!e.state)return;const t=e.container,i=(null==t?void 0:t.firstChild)||null;t&&i&&i.childNodes.length&&(t.style.maxHeight=`${i.getBoundingClientRect().height}px`)}attach(){const e=this,t=e.instance;t.state===ht.Init?t.on("Carousel.init",e.onInit):e.onInit(),t.on("resize",e.onResize),t.on("keydown",e.onKeydown)}detach(){var e;const t=this,i=t.instance;i.off("Carousel.init",t.onInit),i.off("resize",t.onResize),i.off("keydown",t.onKeydown),null===(e=i.carousel)||void 0===e||e.detachPlugins(["Thumbs"]),t.ref=null}}Object.defineProperty(jt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:Dt});const Bt={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"}};var Ht;!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Disabled=2]="Disabled"}(Ht||(Ht={}));const Nt={tabindex:"-1",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"};class $t extends Ke{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:Ht.Init}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null})}onReady(e){var t;if(!e.carousel)return;let i=this.option("display"),s=this.option("absolute"),n=this.option("enabled");if("auto"===n){const e=this.instance.carousel;let t=0;if(e)for(const i of e.slides)(i.panzoom||"image"===i.type)&&t++;t||(n=!1)}n||(i=void 0);let o=0;const a={left:[],middle:[],right:[]};if(i)for(const e of["left","middle","right"])for(const s of i[e]){const i=this.createEl(s);i&&(null===(t=a[e])||void 0===t||t.push(i),o++)}let r=null;if(o&&(r=this.createContainer()),r){for(const[e,t]of Object.entries(a)){const i=document.createElement("div");_e(i,"fancybox__toolbar__column is-"+e);for(const e of t)i.appendChild(e);"auto"!==s||"middle"!==e||t.length||(s=!0),r.appendChild(i)}!0===s&&_e(r,"is-absolute"),this.state=Ht.Ready,this.onRefresh()}else this.state=Ht.Disabled}onClick(e){var t,i;const s=this.instance,n=s.getSlide(),o=null==n?void 0:n.panzoom,a=e.target,r=a&&De(a)?a.dataset:null;if(!r)return;if(void 0!==r.fancyboxToggleThumbs)return e.preventDefault(),e.stopPropagation(),void(null===(t=s.plugins.Thumbs)||void 0===t||t.toggle());if(void 0!==r.fancyboxToggleFullscreen)return e.preventDefault(),e.stopPropagation(),void this.instance.toggleFullscreen();if(void 0!==r.fancyboxToggleSlideshow){e.preventDefault(),e.stopPropagation();const t=null===(i=s.carousel)||void 0===i?void 0:i.plugins.Autoplay;let n=t.isActive;return o&&"mousemove"===o.panMode&&!n&&o.reset(),void(n?t.stop():t.start())}const l=r.panzoomAction,c=r.panzoomChange;if((c||l)&&(e.preventDefault(),e.stopPropagation()),c){let t={};try{t=JSON.parse(c)}catch(e){}o&&o.applyChange(t)}else l&&o&&o[l]&&o[l]()}onChange(){this.onRefresh()}onRefresh(){if(this.instance.isClosing())return;const e=this.container;if(!e)return;const t=this.instance.getSlide();if(!t||t.state!==pt.Ready)return;const i=t&&!t.error&&t.panzoom;for(const t of e.querySelectorAll("[data-panzoom-action]"))i?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));let s=i&&i.canZoomIn(),n=i&&i.canZoomOut();for(const t of e.querySelectorAll('[data-panzoom-action="zoomIn"]'))s?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));for(const t of e.querySelectorAll('[data-panzoom-action="zoomOut"]'))n?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));for(const t of e.querySelectorAll('[data-panzoom-action="toggleZoom"],[data-panzoom-action="iterateZoom"]')){n||s?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));const e=t.querySelector("g");e&&(e.style.display=s?"":"none")}}onDone(e,t){var i;null===(i=t.panzoom)||void 0===i||i.on("afterTransform",(()=>{this.instance.isCurrentSlide(t)&&this.onRefresh()})),this.instance.isCurrentSlide(t)&&this.onRefresh()}createContainer(){const e=this.instance.container;if(!e)return null;const t=this.option("parentEl")||e,i=document.createElement("div");return _e(i,"fancybox__toolbar"),t.prepend(i),i.addEventListener("click",this.onClick,{passive:!1,capture:!0}),e&&_e(e,"has-toolbar"),this.container=i,i}createEl(e){const t=this.instance,i=t.carousel;if(!i)return null;if("toggleFS"===e)return null;if("fullscreen"===e&&!t.fsAPI)return null;let s=null;const n=i.slides.length||0;let o=0,a=0;for(const e of i.slides)(e.panzoom||"image"===e.type)&&o++,("image"===e.type||e.downloadSrc)&&a++;if(n<2&&["infobar","prev","next"].includes(e))return s;if(void 0!==Bt[e]&&!o)return null;if("download"===e&&!a)return null;if("thumbs"===e){const e=t.plugins.Thumbs;if(!e||!e.isEnabled)return null}if("slideshow"===e&&(!i.plugins.Autoplay||n<2))return null;if(void 0!==Bt[e]){const t=Bt[e];s=document.createElement("button"),s.setAttribute("title",this.instance.localize(`{{${e.toUpperCase()}}}`)),_e(s,"f-button"),t.action&&(s.dataset.panzoomAction=t.action),t.change&&(s.dataset.panzoomChange=JSON.stringify(t.change)),s.appendChild(ve(this.instance.localize(t.icon)))}else{const t=(this.option("items")||[])[e];t&&(s=ve(this.instance.localize(t.tpl)),"function"==typeof t.click&&s.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),"function"==typeof t.click&&t.click.call(this,this,e)})))}const r=null==s?void 0:s.querySelector("svg");if(r)for(const[e,t]of Object.entries(Nt))r.getAttribute(e)||r.setAttribute(e,String(t));return s}removeContainer(){const e=this.container;e&&e.remove(),this.container=null,this.state=Ht.Disabled;const t=this.instance.container;t&&Fe(t,"has-toolbar")}attach(){const e=this,t=e.instance;t.on("Carousel.initSlides",e.onReady),t.on("done",e.onDone),t.on("reveal",e.onChange),t.on("Carousel.change",e.onChange),e.onReady(e.instance)}detach(){const e=this,t=e.instance;t.off("Carousel.initSlides",e.onReady),t.off("done",e.onDone),t.off("reveal",e.onChange),t.off("Carousel.change",e.onChange),e.removeContainer()}}Object.defineProperty($t,"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}});const Vt={Hash:ft,Html:Pt,Images:vt,Slideshow:kt,Thumbs:jt,Toolbar:$t},Gt="with-fancybox",qt="hide-scrollbar",Wt="--fancybox-scrollbar-compensate",Xt="--fancybox-body-margin",Yt="is-animated",Ut="is-compact",Zt="is-loading",Kt="disabled",Jt="tabindex",Qt="download",ei="href",ti="src",ii=function(){var e=window.getSelection();return e&&"Range"===e.type};let si=null,ni=null;const oi=new Map;let ai=0;class ri extends Le{get isIdle(){return this.idle}get isCompact(){return this.option("compact")}constructor(e=[],t={},i={}){super(t),Object.defineProperty(this,"userSlides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"idle",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"idleTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"ignoreFocusChange",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:ht.Init}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"footer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"lastFocus",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"prevMouseMoveEvent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fsAPI",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.fsAPI=(()=>{let e,t="",i="",s="";return document.fullscreenEnabled?(t="requestFullscreen",i="exitFullscreen",s="fullscreenElement"):document.webkitFullscreenEnabled&&(t="webkitRequestFullscreen",i="webkitExitFullscreen",s="webkitFullscreenElement"),t&&(e={request:function(e){return"webkitRequestFullscreen"===t?e[t](Element.ALLOW_KEYBOARD_INPUT):e[t]()},exit:function(){return document[s]&&document[i]()},isFullscreen:function(){return document[s]}}),e})(),this.id=t.id||++ai,oi.set(this.id,this),this.userSlides=e,this.userPlugins=i,queueMicrotask((()=>{this.init()}))}init(){if(this.state===ht.Destroy)return;this.state=ht.Init,this.attachPlugins(Object.assign(Object.assign({},ri.Plugins),this.userPlugins)),this.emit("init"),this.emit("attachPlugins"),!0===this.option("hideScrollbar")&&(()=>{if(!rt)return;const e=document.body;if(e.classList.contains(qt))return;let t=window.innerWidth-document.documentElement.getBoundingClientRect().width;t<0&&(t=0);const i=e.currentStyle||window.getComputedStyle(e),s=parseFloat(i.marginRight);document.documentElement.style.setProperty(Wt,`${t}px`),s&&e.style.setProperty(Xt,`${s}px`),e.classList.add(qt)})(),this.initLayout(),this.scale();const e=()=>{this.initCarousel(this.userSlides),this.state=ht.Ready,this.attachEvents(),this.emit("ready"),setTimeout((()=>{this.container&&this.container.setAttribute("aria-hidden","false")}),16)},t=this.fsAPI;this.option("Fullscreen.autoStart")&&t&&!t.isFullscreen()?t.request(this.container).then((()=>e())).catch((()=>e())):e()}initLayout(){var e,t;const i=this.option("parentEl")||document.body,s=ve(this.localize(this.option("tpl.main")||""));s&&(s.setAttribute("id",`fancybox-${this.id}`),s.setAttribute("aria-label",this.localize("{{MODAL}}")),s.classList.toggle(Ut,this.isCompact),_e(s,this.option("mainClass")||""),this.container=s,this.footer=s.querySelector(".fancybox__footer"),i.appendChild(s),_e(document.documentElement,Gt),si&&ni||(si=document.createElement("span"),_e(si,"fancybox-focus-guard"),si.setAttribute(Jt,"0"),si.setAttribute("aria-hidden","true"),si.setAttribute("aria-label","Focus guard"),ni=si.cloneNode(),null===(e=s.parentElement)||void 0===e||e.insertBefore(si,s),null===(t=s.parentElement)||void 0===t||t.append(ni)),this.option("animated")&&(_e(s,Yt),setTimeout((()=>{this.isClosing()||Fe(s,Yt)}),350)),this.emit("initLayout"))}initCarousel(e){const t=this.container;if(!t)return;const i=t.querySelector(".fancybox__carousel");if(!i)return;const s=this.carousel=new ot(i,Pe({},{slides:e,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("*",((e,t,...i)=>{this.emit(`Carousel.${t}`,e,...i)})),s.on(["ready","change"],(()=>{this.manageCaption()})),this.on("Carousel.removeSlide",((e,t,i)=>{this.clearContent(i),i.state=void 0})),s.on("Panzoom.touchStart",(()=>{var e,t;this.isCompact||this.endIdle(),(null===(e=document.activeElement)||void 0===e?void 0:e.closest(".f-thumbs"))&&(null===(t=this.container)||void 0===t||t.focus())})),s.on("settle",(()=>{this.idleTimer||this.isCompact||!this.option("idle")||this.setIdle(),this.option("autoFocus")&&!this.isClosing&&this.checkFocus()})),this.option("dragToClose")&&(s.on("Panzoom.afterTransform",((e,t)=>{const i=this.getSlide();if(i&&fe(i.el))return;const s=this.container;if(s){const e=Math.abs(t.current.f),i=e<1?"":Math.max(.5,Math.min(1,1-e/t.contentRect.fitHeight*1.5));s.style.setProperty("--fancybox-ts",i?"0s":""),s.style.setProperty("--fancybox-opacity",i+"")}})),s.on("Panzoom.touchEnd",((e,t,i)=>{var s;const n=this.getSlide();if(n&&fe(n.el))return;if(t.isMobile&&document.activeElement&&-1!==["TEXTAREA","INPUT"].indexOf(null===(s=document.activeElement)||void 0===s?void 0:s.nodeName))return;const o=Math.abs(t.dragOffset.y);"y"===t.lockedAxis&&(o>=200||o>=50&&t.dragOffset.time<300)&&(i&&i.cancelable&&i.preventDefault(),this.close(i,"f-throwOut"+(t.current.f<0?"Up":"Down")))}))),s.on("change",(e=>{var t;let i=null===(t=this.getSlide())||void 0===t?void 0:t.triggerEl;if(i){const t=new CustomEvent("slideTo",{bubbles:!0,cancelable:!0,detail:e.page});i.dispatchEvent(t)}})),s.on(["refresh","change"],(e=>{const t=this.container;if(!t)return;for(const i of t.querySelectorAll("[data-fancybox-current-index]"))i.innerHTML=e.page+1;for(const i of t.querySelectorAll("[data-fancybox-count]"))i.innerHTML=e.pages.length;if(!e.isInfinite){for(const i of t.querySelectorAll("[data-fancybox-next]"))e.page<e.pages.length-1?(i.removeAttribute(Kt),i.removeAttribute(Jt)):(i.setAttribute(Kt,""),i.setAttribute(Jt,"-1"));for(const i of t.querySelectorAll("[data-fancybox-prev]"))e.page>0?(i.removeAttribute(Kt),i.removeAttribute(Jt)):(i.setAttribute(Kt,""),i.setAttribute(Jt,"-1"))}const i=this.getSlide();if(!i)return;let s=i.downloadSrc||"";s||"image"!==i.type||i.error||"string"!=typeof i[ti]||(s=i[ti]);for(const e of t.querySelectorAll("[data-fancybox-download]")){const t=i.downloadFilename;s?(e.removeAttribute(Kt),e.removeAttribute(Jt),e.setAttribute(ei,s),e.setAttribute(Qt,t||s),e.setAttribute("target","_blank")):(e.setAttribute(Kt,""),e.setAttribute(Jt,"-1"),e.removeAttribute(ei),e.removeAttribute(Qt))}})),this.emit("initCarousel")}attachEvents(){const e=this,t=e.container;if(!t)return;t.addEventListener("click",e.onClick,{passive:!1,capture:!1}),t.addEventListener("wheel",e.onWheel,{passive:!1,capture:!1}),document.addEventListener("keydown",e.onKeydown,{passive:!1,capture:!0}),document.addEventListener("visibilitychange",e.onVisibilityChange,!1),document.addEventListener("mousemove",e.onMousemove),e.option("trapFocus")&&document.addEventListener("focus",e.onFocus,!0),window.addEventListener("resize",e.onResize);const i=window.visualViewport;i&&(i.addEventListener("scroll",e.onResize),i.addEventListener("resize",e.onResize))}detachEvents(){const e=this,t=e.container;if(!t)return;document.removeEventListener("keydown",e.onKeydown,{passive:!1,capture:!0}),t.removeEventListener("wheel",e.onWheel,{passive:!1,capture:!1}),t.removeEventListener("click",e.onClick,{passive:!1,capture:!1}),document.removeEventListener("mousemove",e.onMousemove),window.removeEventListener("resize",e.onResize);const i=window.visualViewport;i&&(i.removeEventListener("resize",e.onResize),i.removeEventListener("scroll",e.onResize)),document.removeEventListener("visibilitychange",e.onVisibilityChange,!1),document.removeEventListener("focus",e.onFocus,!0)}scale(){const e=this.container;if(!e)return;const t=window.visualViewport,i=Math.max(1,(null==t?void 0:t.scale)||1);let s="",n="",o="";if(t&&i>1){let e=`${t.offsetLeft}px`,a=`${t.offsetTop}px`;s=t.width*i+"px",n=t.height*i+"px",o=`translate3d(${e}, ${a}, 0) scale(${1/i})`}e.style.transform=o,e.style.width=s,e.style.height=n}onClick(e){var t,i;const{container:s,isCompact:n}=this;if(!s||this.isClosing())return;!n&&this.option("idle")&&this.resetIdle();const o=e.composedPath()[0];if(o.closest(".f-spinner")||o.closest("[data-fancybox-close]"))return e.preventDefault(),void this.close(e);if(o.closest("[data-fancybox-prev]"))return e.preventDefault(),void this.prev();if(o.closest("[data-fancybox-next]"))return e.preventDefault(),void this.next();const a=document.activeElement;if(ii()&&a&&s.contains(a))return;if(o===(null===(t=this.carousel)||void 0===t?void 0:t.container))return;if(n&&"image"===(null===(i=this.getSlide())||void 0===i?void 0:i.type))return void(this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null):this.clickTimer=setTimeout((()=>{this.toggleIdle(),this.clickTimer=null}),350));if(this.emit("click",e),e.defaultPrevented)return;let r=!1;if(o.closest(".fancybox__content")){if(a){if(a.closest("[contenteditable]"))return;o.matches(ct)||a.blur()}if(ii())return;r=this.option("contentClick")}else o.closest(".fancybox__carousel")&&!o.matches(ct)&&(r=this.option("backdropClick"));"close"===r?(e.preventDefault(),this.close(e)):"next"===r?(e.preventDefault(),this.next()):"prev"===r&&(e.preventDefault(),this.prev())}onWheel(e){var t;let i=this.option("wheel",e);(null===(t=e.target)||void 0===t?void 0:t.closest(".fancybox__thumbs"))&&(i="slide");const s="slide"===i,n=[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce((function(e,t){return Math.abs(t)>Math.abs(e)?t:e})),o=Math.max(-1,Math.min(1,n)),a=Date.now();this.pwt&&a-this.pwt<300?s&&e.preventDefault():(this.pwt=a,this.emit("wheel",e),e.defaultPrevented||("close"===i?(e.preventDefault(),this.close(e)):"slide"===i&&(e.preventDefault(),this[o>0?"prev":"next"]())))}onKeydown(e){if(!this.isTopmost())return;this.isCompact||!this.option("idle")||this.isClosing()||this.resetIdle();const t=e.key,i=this.option("keyboard");if(!i||e.ctrlKey||e.altKey||e.shiftKey)return;const s=e.composedPath()[0],n=document.activeElement&&document.activeElement.classList,o=n&&n.contains("f-button")||s.dataset.carouselPage||s.dataset.carouselIndex;if("Escape"!==t&&!o&&De(s)&&(s.isContentEditable||-1!==["TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(s.nodeName)))return;this.emit("keydown",t,e);const a=i[t];"function"==typeof this[a]&&(e.preventDefault(),this[a]())}onResize(){const e=Ut,t=this.container;if(!t)return;const i=this.isCompact;t.classList.toggle(e,i),this.manageCaption(this.getSlide()),this.isCompact?this.clearIdle():this.endIdle(),this.scale(),this.emit("resize")}onFocus(e){this.isTopmost()&&this.checkFocus(e)}onMousemove(e){this.prevMouseMoveEvent=e,!this.isCompact&&this.option("idle")&&this.resetIdle()}onVisibilityChange(){"visible"===document.visibilityState?this.checkFocus():this.endIdle()}manageCloseBtn(e){const t=this.optionFor(e,"closeButton")||!1;if("auto"===t){const e=this.plugins.Toolbar;if(e&&e.state===Ht.Ready)return}if(!t)return;if(!e.contentEl||e.closeBtnEl)return;const i=this.option("tpl.closeButton");if(i){const t=ve(this.localize(i));e.closeBtnEl=e.contentEl.appendChild(t),e.el&&_e(e.el,"has-close-btn")}}manageCaption(e=void 0){var t,i;const s="fancybox__caption",n="has-caption",o=this.container;if(!o)return;Fe(o,n);const a=this.isCompact||this.option("commonCaption"),r=!a;if(this.caption&&this.stop(this.caption),r&&this.caption&&(this.caption.remove(),this.caption=null),a&&!this.caption)for(const e of(null===(t=this.carousel)||void 0===t?void 0:t.slides)||[])e.captionEl&&(e.captionEl.remove(),e.captionEl=void 0,Fe(e.el,n),null===(i=e.el)||void 0===i||i.removeAttribute("aria-labelledby"));if(e||(e=this.getSlide()),!e||a&&!this.isCurrentSlide(e))return;const l=e.el;let c=this.optionFor(e,"caption","");if(!c)return void(a&&this.caption&&this.animate(this.caption,"f-fadeOut",(()=>{this.caption&&(this.caption.innerHTML="")})));let d=null;if(r){if(d=e.captionEl||null,l&&!d){const t=s+`_${this.id}_${e.index}`;d=document.createElement("div"),_e(d,s),d.setAttribute("id",t),e.captionEl=l.appendChild(d),_e(l,n),l.setAttribute("aria-labelledby",t)}}else d=this.caption,d||(d=o.querySelector("."+s)),d||(d=document.createElement("div"),d.dataset.fancyboxCaption="",_e(d,s),(this.footer||o).prepend(d)),_e(o,n),this.caption=d;d&&(d.innerHTML="","string"==typeof c||"number"==typeof c?d.innerHTML=c+"":c instanceof HTMLElement&&d.appendChild(c))}checkFocus(e){var t;const i=document.activeElement||null;i&&(null===(t=this.container)||void 0===t?void 0:t.contains(i))||this.focus(e)}focus(e){var t;if(this.ignoreFocusChange)return;const i=document.activeElement||null,s=(null==e?void 0:e.target)||null,n=this.container,o=this.getSlide();if(!n||!(null===(t=this.carousel)||void 0===t?void 0:t.viewport))return;if(!e&&i&&n.contains(i))return;const a=o&&o.state===pt.Ready?o.el:null;if(!a||a.contains(i)||n===i)return;e&&e.cancelable&&e.preventDefault(),this.ignoreFocusChange=!0;const r=Array.from(n.querySelectorAll(ct));let l=[],c=null;for(let e of r){const t=!e.offsetParent||e.closest('[aria-hidden="true"]'),i=a&&a.contains(e),s=!this.carousel.viewport.contains(e);if(e===n||(i||s)&&!t){l.push(e);const t=e.dataset.origTabindex;void 0!==t&&t&&(e.tabIndex=parseFloat(t)),e.removeAttribute("data-orig-tabindex"),!e.hasAttribute("autoFocus")&&c||(c=e)}else{const t=void 0===e.dataset.origTabindex?e.getAttribute("tabindex")||"":e.dataset.origTabindex;t&&(e.dataset.origTabindex=t),e.tabIndex=-1}}let d=null;e?(!s||l.indexOf(s)<0)&&(d=c||n,l.length&&(i===ni?d=l[0]:this.lastFocus!==n&&i!==si||(d=l[l.length-1]))):d=o&&"image"===o.type?n:c||n,d&&dt(d),this.lastFocus=document.activeElement,this.ignoreFocusChange=!1}next(){const e=this.carousel;e&&e.pages.length>1&&e.slideNext()}prev(){const e=this.carousel;e&&e.pages.length>1&&e.slidePrev()}jumpTo(...e){this.carousel&&this.carousel.slideTo(...e)}isTopmost(){var e;return(null===(e=ri.getInstance())||void 0===e?void 0:e.id)==this.id}animate(e=null,t="",i){if(!e||!t)return void(i&&i());this.stop(e);const s=n=>{n.target===e&&e.dataset.animationName&&(e.removeEventListener("animationend",s),delete e.dataset.animationName,i&&i(),Fe(e,t))};e.dataset.animationName=t,e.addEventListener("animationend",s),_e(e,t)}stop(e){e&&e.dispatchEvent(new CustomEvent("animationend",{bubbles:!1,cancelable:!0,currentTarget:e}))}setContent(e,t="",i=!0){if(this.isClosing())return;const s=e.el;if(!s)return;let n=null;if(De(t)?n=t:(n=ve(t+""),De(n)||(n=document.createElement("div"),n.innerHTML=t+"")),["img","picture","iframe","video","audio"].includes(n.nodeName.toLowerCase())){const e=document.createElement("div");e.appendChild(n),n=e}De(n)&&e.filter&&!e.error&&(n=n.querySelector(e.filter)),n&&De(n)?(_e(n,"fancybox__content"),e.id&&n.setAttribute("id",e.id),"none"!==n.style.display&&"none"!==getComputedStyle(n).getPropertyValue("display")||(n.style.display=e.display||this.option("defaultDisplay")||"flex"),s.classList.add(`has-${e.error?"error":e.type||"unknown"}`),s.prepend(n),e.contentEl=n,i&&this.revealContent(e),this.manageCloseBtn(e),this.manageCaption(e)):this.setError(e,"{{ELEMENT_NOT_FOUND}}")}revealContent(e,t){const i=e.el,s=e.contentEl;i&&s&&(this.emit("reveal",e),this.hideLoading(e),e.state=pt.Opening,(t=this.isOpeningSlide(e)?void 0===t?this.optionFor(e,"showClass"):t:"f-fadeIn")?this.animate(s,t,(()=>{this.done(e)})):this.done(e))}done(e){this.isClosing()||(e.state=pt.Ready,this.emit("done",e),_e(e.el,"is-done"),this.isCurrentSlide(e)&&this.option("autoFocus")&&queueMicrotask((()=>{var t;null===(t=e.panzoom)||void 0===t||t.updateControls(),this.option("autoFocus")&&(this.option("autoFocus")?this.focus():this.checkFocus())})),this.isOpeningSlide(e)&&!this.isCompact&&this.option("idle")&&this.setIdle())}isCurrentSlide(e){const t=this.getSlide();return!(!e||!t)&&t.index===e.index}isOpeningSlide(e){var t,i;return null===(null===(t=this.carousel)||void 0===t?void 0:t.prevPage)&&e.index===(null===(i=this.getSlide())||void 0===i?void 0:i.index)}showLoading(e){e.state=pt.Loading;const t=e.el;t&&(_e(t,Zt),this.emit("loading",e),e.spinnerEl||setTimeout((()=>{if(!this.isClosing()&&!e.spinnerEl&&e.state===pt.Loading){let i=ve(Re);e.spinnerEl=i,t.prepend(i),this.animate(i,"f-fadeIn")}}),250))}hideLoading(e){const t=e.el;if(!t)return;const i=e.spinnerEl;this.isClosing()?null==i||i.remove():(Fe(t,Zt),i&&this.animate(i,"f-fadeOut",(()=>{i.remove()})),e.state===pt.Loading&&(this.emit("loaded",e),e.state=pt.Ready))}setError(e,t){if(this.isClosing())return;const i=new Event("error",{bubbles:!0,cancelable:!0});if(this.emit("error",i,e),i.defaultPrevented)return;e.error=t,this.hideLoading(e),this.clearContent(e);const s=document.createElement("div");s.classList.add("fancybox-error"),s.innerHTML=this.localize(t||"<p>{{ERROR}}</p>"),this.setContent(e,s)}clearContent(e){if(void 0===e.state)return;this.emit("clearContent",e),e.contentEl&&(e.contentEl.remove(),e.contentEl=void 0);const t=e.el;t&&(Fe(t,"has-error"),Fe(t,"has-unknown"),Fe(t,`has-${e.type||"unknown"}`)),e.closeBtnEl&&e.closeBtnEl.remove(),e.closeBtnEl=void 0,e.captionEl&&e.captionEl.remove(),e.captionEl=void 0,e.spinnerEl&&e.spinnerEl.remove(),e.spinnerEl=void 0}getSlide(){var e;const t=this.carousel;return(null===(e=null==t?void 0:t.pages[null==t?void 0:t.page])||void 0===e?void 0:e.slides[0])||void 0}close(e,t){if(this.isClosing())return;const i=new Event("shouldClose",{bubbles:!0,cancelable:!0});if(this.emit("shouldClose",i,e),i.defaultPrevented)return;e&&e.cancelable&&(e.preventDefault(),e.stopPropagation());const s=this.fsAPI,n=()=>{this.proceedClose(e,t)};s&&s.isFullscreen()===this.container?Promise.resolve(s.exit()).then((()=>n())):n()}clearIdle(){this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=null}setIdle(e=!1){const t=()=>{this.clearIdle(),this.idle=!0,_e(this.container,"is-idle"),this.emit("setIdle")};if(this.clearIdle(),!this.isClosing())if(e)t();else{const e=this.option("idle");e&&(this.idleTimer=setTimeout(t,e))}}endIdle(){this.clearIdle(),this.idle&&!this.isClosing()&&(this.idle=!1,Fe(this.container,"is-idle"),this.emit("endIdle"))}resetIdle(){this.endIdle(),this.setIdle()}toggleIdle(){this.idle?this.endIdle():this.setIdle(!0)}toggleFullscreen(){const e=this.fsAPI;e&&(e.isFullscreen()?e.exit():this.container&&e.request(this.container))}isClosing(){return[ht.Closing,ht.CustomClosing,ht.Destroy].includes(this.state)}proceedClose(e,t){var i,s;this.state=ht.Closing,this.clearIdle(),this.detachEvents();const n=this.container,o=this.carousel,a=this.getSlide(),r=a&&this.option("placeFocusBack")?a.triggerEl||this.option("triggerEl"):null;if(r&&(at(r)?dt(r):r.focus()),n&&(_e(n,"is-closing"),n.setAttribute("aria-hidden","true"),this.option("animated")&&_e(n,Yt),n.style.pointerEvents="none"),o){o.clearTransitions(),null===(i=o.panzoom)||void 0===i||i.destroy(),null===(s=o.plugins.Navigation)||void 0===s||s.detach();for(const e of o.slides){e.state=pt.Closing,this.hideLoading(e);const t=e.contentEl;t&&this.stop(t);const i=null==e?void 0:e.panzoom;i&&(i.stop(),i.detachEvents(),i.detachObserver()),this.isCurrentSlide(e)||o.emit("removeSlide",e)}}this.emit("close",e),this.state!==ht.CustomClosing?(void 0===t&&a&&(t=this.optionFor(a,"hideClass")),t&&a?(this.animate(a.contentEl,t,(()=>{o&&o.emit("removeSlide",a)})),setTimeout((()=>{this.destroy()}),500)):this.destroy()):setTimeout((()=>{this.destroy()}),500)}destroy(){var e;if(this.state===ht.Destroy)return;this.state=ht.Destroy,null===(e=this.carousel)||void 0===e||e.destroy();const t=this.container;t&&t.remove(),oi.delete(this.id);const i=ri.getInstance();i?i.focus():(si&&(si.remove(),si=null),ni&&(ni.remove(),ni=null),Fe(document.documentElement,Gt),(()=>{if(!rt)return;const e=document,t=e.body;t.classList.remove(qt),t.style.setProperty(Xt,""),e.documentElement.style.setProperty(Wt,"")})(),this.emit("destroy"))}static bind(e,t,i){if(!rt)return;let s,n="",o={};if(void 0===e?s=document.body:"string"==typeof e?(s=document.body,n=e,"object"==typeof t&&(o=t||{})):(s=e,"string"==typeof t&&(n=t),"object"==typeof i&&(o=i||{})),!s||!De(s))return;n=n||"[data-fancybox]";const a=ri.openers.get(s)||new Map;a.set(n,o),ri.openers.set(s,a),1===a.size&&s.addEventListener("click",ri.fromEvent)}static unbind(e,t){let i,s="";if("string"==typeof e?(i=document.body,s=e):(i=e,"string"==typeof t&&(s=t)),!i)return;const n=ri.openers.get(i);n&&s&&n.delete(s),s&&n||(ri.openers.delete(i),i.removeEventListener("click",ri.fromEvent))}static destroy(){let e;for(;e=ri.getInstance();)e.destroy();for(const e of ri.openers.keys())e.removeEventListener("click",ri.fromEvent);ri.openers=new Map}static fromEvent(e){if(e.defaultPrevented)return;if(e.button&&0!==e.button)return;if(e.ctrlKey||e.metaKey||e.shiftKey)return;let t=e.composedPath()[0];const i=t.closest("[data-fancybox-trigger]");if(i){const e=i.dataset.fancyboxTrigger||"",s=document.querySelectorAll(`[data-fancybox="${e}"]`),n=parseInt(i.dataset.fancyboxIndex||"",10)||0;t=s[n]||t}if(!(t&&t instanceof Element))return;let s,n,o,a;if([...ri.openers].reverse().find((([e,i])=>!(!e.contains(t)||![...i].reverse().find((([i,r])=>{let l=t.closest(i);return!!l&&(s=e,n=i,o=l,a=r,!0)}))))),!s||!n||!o)return;a=a||{},e.preventDefault(),t=o;let r=[],l=Pe({},ut,a);l.event=e,l.triggerEl=t,l.delegate=i;const c=l.groupAll,d=l.groupAttr,u=d&&t?t.getAttribute(`${d}`):"";if((!t||u||c)&&(r=[].slice.call(s.querySelectorAll(n))),t&&!c&&(r=u?r.filter((e=>e.getAttribute(`${d}`)===u)):[t]),!r.length)return;const h=ri.getInstance();return h&&h.options.triggerEl&&r.indexOf(h.options.triggerEl)>-1?void 0:(t&&(l.startIndex=r.indexOf(t)),ri.fromNodes(r,l))}static fromSelector(e,t){let i=null,s="";if("string"==typeof e?(i=document.body,s=e):e instanceof HTMLElement&&"string"==typeof t&&(i=e,s=t),!i||!s)return!1;const n=ri.openers.get(i);if(!n)return!1;const o=n.get(s);return!!o&&ri.fromNodes(Array.from(i.querySelectorAll(s)),o)}static fromNodes(e,t){t=Pe({},ut,t||{});const i=[];for(const s of e){const e=s.dataset||{},n=e[ti]||s.getAttribute(ei)||s.getAttribute("currentSrc")||s.getAttribute(ti)||void 0;let o;const a=t.delegate;let r;a&&i.length===t.startIndex&&(o=a instanceof HTMLImageElement?a:a.querySelector("img:not([aria-hidden])")),o||(o=s instanceof HTMLImageElement?s:s.querySelector("img:not([aria-hidden])")),o&&(r=o.currentSrc||o[ti]||void 0,!r&&o.dataset&&(r=o.dataset.lazySrc||o.dataset[ti]||void 0));const l={src:n,triggerEl:s,thumbEl:o,thumbElSrc:r,thumbSrc:r};for(const t in e)l[t]=e[t]+"";i.push(l)}return new ri(i,t)}static getInstance(e){return e?oi.get(e):Array.from(oi.values()).reverse().find((e=>!e.isClosing()&&e))||null}static getSlide(){var e;return(null===(e=ri.getInstance())||void 0===e?void 0:e.getSlide())||null}static show(e=[],t={}){return new ri(e,t)}static next(){const e=ri.getInstance();e&&e.next()}static prev(){const e=ri.getInstance();e&&e.prev()}static close(e=!0,...t){if(e)for(const e of oi.values())e.close(...t);else{const e=ri.getInstance();e&&e.close(...t)}}}Object.defineProperty(ri,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.24"}),Object.defineProperty(ri,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:ut}),Object.defineProperty(ri,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:Vt}),Object.defineProperty(ri,"openers",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),document.addEventListener("DOMContentLoaded",(function(){!function(){if(document.querySelectorAll(".video-custom").length>0){const e=document.querySelector(".video-custom__player"),t=document.querySelector(".video-custom__background"),i=document.querySelector(".video-custom__background"),s=()=>{e.hasAttribute("controls")?(e.removeAttribute("controls"),e.pause(),t.classList.remove("video-custom__background--toggle")):(e.setAttribute("controls","controls"),e.play(),t.classList.add("video-custom__background--toggle"))};e.addEventListener("click",s),i.addEventListener("click",s)}}(),function(){if(document.querySelector(".swiper")){const e=document.querySelector(".hero__swiper");e&&new se(e,{modules:[re],slidesPerView:1,spaceBetween:24,pagination:{el:".swiper-pagination",clickable:!0},breakpoints:{576:{slidesPerView:2},1200:{slidesPerView:3}}});const t=document.querySelector(".services-reviews-js");t&&new se(t,{modules:[oe],slidesPerView:1,spaceBetween:24,autoHeight:!0,navigation:{nextEl:".services-reviews__button.swiper-button-next",prevEl:".services-reviews__button.swiper-button-prev"},breakpoints:{992:{slidesPerView:2}}});const i=document.querySelector(".reviews__swiper");if(i&&new se(i,{modules:[oe],slidesPerView:1,spaceBetween:24,navigation:{nextEl:".reviews__button.swiper-button-next",prevEl:".reviews__button.swiper-button-prev"},breakpoints:{992:{slidesPerView:2}}}),document.querySelector(".slider-history")){const e=new se(".slider-history-year-js",{modules:[oe],grabCursor:!0,slidesPerView:"auto",navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}}),t=new se(".slider-history-js",{modules:[ce],spaceBetween:24,slidesPerView:1,thumbs:{swiper:e},on:{init:function(){const i=e.slides.length-1;setTimeout((()=>{e.slideTo(i,0),t.slideTo(i,0)}),100)}}});new se(".slider-history-photo-js",{modules:[re],slidesPerView:1,loop:!1,nested:!0,lazy:!0,spaceBetween:24,pagination:{el:".slider-history__pagination.swiper-pagination",clickable:!0}})}const s=document.querySelector(".experts-road-js");s&&new se(s,{modules:[de,oe],spaceBetween:23,slidesPerGroup:1,slidesPerView:1,grid:{rows:1,fill:"row"},navigation:{nextEl:".experts-road__button-next.swiper-button-next",prevEl:".experts-road__button-prev.swiper-button-prev"},breakpoints:{425:{slidesPerGroup:2,slidesPerView:2},768:{slidesPerGroup:3,slidesPerView:3,grid:{rows:2}}}});const n=document.querySelectorAll(".slider-team-js");n.length>0&&n.forEach((e=>{new se(e,{modules:[oe,re],slidesPerView:1.2,spaceBetween:24,grabCursor:!0,pagination:{el:".slider-team-js .swiper-pagination"},navigation:{nextEl:".slider-team-js .swiper-button-next",prevEl:".slider-team-js .swiper-button-prev"},breakpoints:{576:{slidesPerView:2.2}}})}));const o=document.querySelectorAll(".slider-branches-js");o.length>0&&o.forEach((e=>{new se(e,{modules:[oe,re],slidesPerView:1,spaceBetween:24,grabCursor:!0,pagination:{el:".slider-branches-js.swiper-pagination"},navigation:{nextEl:".slider-branches-js .swiper-button-next",prevEl:".slider-branches-js .swiper-button-prev"},breakpoints:{768:{slidesPerView:2}}})})),new se(".quiz-js",{modules:[oe,re],spaceBetween:24,slidesPerView:1,speed:1e3,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{el:".swiper-pagination",clickable:!1,type:"fraction"}});const a=document.querySelector(".slider-news-services-js");a&&new se(a,{slidesPerView:2,spaceBetween:16,grabCursor:!0,breakpoints:{992:{spaceBetween:24,slidesPerView:4}}});const r=document.querySelectorAll(".tabs-gutenberg");r.length>0&&r.forEach((e=>{const t=new se(e.querySelector(".tabs-gutenberg-button-js"),{grabCursor:!0,slidesPerView:"auto",autoHeight:!0});new se(e.querySelector(".tabs-gutenberg-content-js"),{modules:[ce,pe],allowTouchMove:!1,spaceBetween:24,autoHeight:!0,slidesPerView:1,effect:"fade",speed:300,fadeEffect:{crossFade:!0},thumbs:{autoScrollOffset:1,swiper:t}})}));const l=document.querySelectorAll(".slider-gallery-js");l.length>0&&l.forEach((e=>{const t=e.closest(".slider-gallery");new se(e,{modules:[oe,re,le],slidesPerView:1,spaceBetween:24,grabCursor:!0,pagination:{el:t.querySelector(".slider-gallery__pagination.swiper-pagination"),type:"custom",renderCustom:function(e,t,i){return`<div class="slider-gallery__counter"><span class="swiper-pagination-current">${t<10?`0${t}`:t}</span><span class="slider-gallery__slash"></span><span class="swiper-pagination-total">${i<10?`0${i}`:i}</span></div>`}},navigation:{nextEl:t.querySelector(".slider-gallery__next.swiper-button-next"),prevEl:t.querySelector(".slider-gallery__prev.swiper-button-prev")}})}));const c=document.querySelectorAll(".slider-clients-js");c.length>0&&c.forEach((e=>{new se(e,{modules:[le],speed:6e3,slidesPerView:2,spaceBetween:16,grabCursor:!0,autoplay:{delay:0,pauseOnMouseEnter:!0,disableOnInteraction:!1,stopOnLastSlide:!1},breakpoints:{992:{spaceBetween:38,slidesPerView:4}}})}));const d=document.querySelector(".news__list");d&&new se(d,{modules:[re],spaceBetween:24,slidesPerView:3,allowTouchMove:!0,pagination:{el:".swiper-pagination",clickable:!0},breakpoints:{992:{slidesPerView:3,allowTouchMove:!0,pagination:{clickable:!0,el:".swiper-pagination"}},576:{slidesPerView:2},0:{slidesPerView:1}}});const u=document.querySelector(".testing-center__slider");u&&new se(u,{modules:[oe,re],spaceBetween:24,slidesPerView:1,lazy:!0,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}});const h=document.querySelector(" .departure-experts__slider");h&&new se(h,{modules:[oe,re],spaceBetween:24,slidesPerView:1,navigation:{nextEl:".departure-experts-btn.swiper-button-next",prevEl:".departure-experts-btn.swiper-button-prev"},pagination:{el:".swiper-pagination",clickable:!0}})}}(),ri.bind("[data-fancybox], .wp-block-image a",{type:"inline",dragToClose:!1,touch:!1}),document.querySelectorAll(".journal-company__card").forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault();let t=this.id.split("_")[1];ri.show([{src:"#popup_"+t,type:"inline",autoFocus:!1}])}))})),ri.bind('[data-fancybox="gallery"]',{}),function(){if(document.querySelectorAll(".custom-select").length>0){const e=document.querySelectorAll(".custom-select__choice");document.addEventListener("click",(t=>{e.forEach((e=>{e.contains(t.target)?e.classList.toggle("open"):e.classList.remove("open")}))})),document.addEventListener("click",(e=>{if(e.target.matches(".custom-select ul > li")){const t=e.target,i=t.closest(".custom-select__choice"),s=i.querySelector(".custom-select__option"),n=i.querySelectorAll("ul > li");s.innerText=t.innerText,i.classList.remove("open"),n.forEach((e=>{e.classList.remove("active")})),t.classList.add("active")}}))}}()})),(0,s.Z)((async()=>{document.fonts&&document.fonts.ready.then((function(){document.body.classList.add("font-loaded")}))}))}},e=>{var t=t=>e(e.s=t);t("./scripts/app.js"),t("./styles/app.scss")}]);