(()=>{var e,t,s={553:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});var i=s(436),n=s.n(i);const r={selector:".c-horizontal-scroll",overflowClass:"c-horizontal-scroll--overflows",init(){document.addEventListener("scroll",n()((e=>{const t=e.target;if(!t.matches||!t.matches(r.selector))return;const s=parseFloat(t.style.getPropertyValue("--overflow-opacity")||0);if(s>=1)return;const i=t.scrollWidth-t.clientWidth,n=Math.min(150,i),a=t.scrollLeft,o=Math.min(1,(a/n).toFixed(2));o>s&&t.style.setProperty("--overflow-opacity",o)}),100),!0),document.querySelectorAll(r.selector).forEach((e=>{r.updateOverflowClass(e)})),document.addEventListener("heavy:overlayOpen",(e=>{e.detail.overlay.querySelectorAll(r.selector).forEach((e=>{r.updateOverflowClass(e)}))}))},contentOverflowing:e=>e.scrollWidth>e.clientWidth,isOverflowingRight:e=>e.scrollLeft+e.clientWidth{"use strict";s.d(t,{default:()=>r});var i=s(138);const n={init(){(0,i.O)(".c-select__button","click",(e=>{const t=e.target,s=t.closest(".c-select"),i=s.querySelectorAll(".c-select__dropdown li");s.classList.toggle("active"),t.setAttribute("aria-expanded","true"===t.getAttribute("aria-expanded")?"false":"true"),i.forEach((e=>{e.addEventListener("click",(t=>n.handler(t,s,e)))}));const r=({target:e})=>{document.removeEventListener("click",r),s.contains(e)||(s.classList.remove("active"),t.setAttribute("aria-expanded","false"))};s.classList.contains("active")&&setTimeout((()=>{document.addEventListener("click",r)}),100)}))},handler(e,t,s){const i=t.querySelector(".c-select__value"),n=s.querySelector("[type=radio]");"click"===e.type&&0!==e.clientX&&0!==e.clientY&&(i.dataset.previousValue=i.textContent?.trim(),setTimeout((()=>{i.textContent=s.textContent,t.classList.remove("active"),n.click()}),0))},revertToPreviousValue(e){const t=e.querySelector(".c-select__value"),s=e.querySelectorAll("[type=radio]"),{previousValue:i=""}=t.dataset;t.textContent=i,[...s].find((e=>e.value.trim()===i)).checked=!0}},r=n},138:(e,t,s)=>{"use strict";s.d(t,{O:()=>i,y:()=>n});const i=(e,t,s)=>{if("function"!=typeof s)return;const i=e=>{e.forEach((e=>{const i="_hasEventHandler_"+t;e[i]||(e.addEventListener(t,s),e[i]=!0)}))};i(document.querySelectorAll(e)),document.addEventListener("heavy:overlayOpen",(t=>{var s;const{overlay:n}=t.detail;i(null!==(s=n.querySelectorAll(e))&&void 0!==s?s:[])})),document.addEventListener("heavy:modalOpen",(t=>{var s;const{modal:n}=t.detail;i(null!==(s=n.querySelectorAll(e))&&void 0!==s?s:[])}))},n=async()=>new Promise((e=>{setTimeout(e,0)}))},857:(e,t,s)=>{var i=s(772).Symbol;e.exports=i},366:(e,t,s)=>{var i=s(857),n=s(107),r=s(157),a=i?i.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?n(e):r(e)}},704:(e,t,s)=>{var i=s(153),n=/^\s+/;e.exports=function(e){return e?e.slice(0,i(e)+1).replace(n,""):e}},242:(e,t,s)=>{var i="object"==typeof s.g&&s.g&&s.g.Object===Object&&s.g;e.exports=i},107:(e,t,s)=>{var i=s(857),n=Object.prototype,r=n.hasOwnProperty,a=n.toString,o=i?i.toStringTag:void 0;e.exports=function(e){var t=r.call(e,o),s=e[o];try{e[o]=void 0;var i=!0}catch(e){}var n=a.call(e);return i&&(t?e[o]=s:delete e[o]),n}},157:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},772:(e,t,s)=>{var i=s(242),n="object"==typeof self&&self&&self.Object===Object&&self,r=i||n||Function("return this")();e.exports=r},153:e=>{var t=/\s/;e.exports=function(e){for(var s=e.length;s--&&t.test(e.charAt(s)););return s}},73:(e,t,s)=>{var i=s(259),n=s(100),r=s(642),a=Math.max,o=Math.min;e.exports=function(e,t,s){var l,c,d,u,p,m,h=0,f=!1,v=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var s=l,i=c;return l=c=void 0,h=t,u=e.apply(i,s)}function y(e){var s=e-m;return void 0===m||s>=t||s<0||v&&e-h>=d}function w(){var e=n();if(y(e))return S(e);p=setTimeout(w,function(e){var s=t-(e-m);return v?o(s,d-(e-h)):s}(e))}function S(e){return p=void 0,g&&l?b(e):(l=c=void 0,u)}function E(){var e=n(),s=y(e);if(l=arguments,c=this,m=e,s){if(void 0===p)return function(e){return h=e,p=setTimeout(w,t),f?b(e):u}(m);if(v)return clearTimeout(p),p=setTimeout(w,t),b(m)}return void 0===p&&(p=setTimeout(w,t)),u}return t=r(t)||0,i(s)&&(f=!!s.leading,d=(v="maxWait"in s)?a(r(s.maxWait)||0,t):d,g="trailing"in s?!!s.trailing:g),E.cancel=function(){void 0!==p&&clearTimeout(p),h=0,l=m=c=p=void 0},E.flush=function(){return void 0===p?u:S(n())},E}},259:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},125:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},795:(e,t,s)=>{var i=s(366),n=s(125);e.exports=function(e){return"symbol"==typeof e||n(e)&&"[object Symbol]"==i(e)}},100:(e,t,s)=>{var i=s(772);e.exports=function(){return i.Date.now()}},436:(e,t,s)=>{var i=s(73),n=s(259);e.exports=function(e,t,s){var r=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return n(s)&&(r="leading"in s?!!s.leading:r,a="trailing"in s?!!s.trailing:a),i(e,t,{leading:r,maxWait:t,trailing:a})}},642:(e,t,s)=>{var i=s(704),n=s(259),r=s(795),a=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(r(e))return NaN;if(n(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=i(e);var s=o.test(e);return s||l.test(e)?c(e.slice(2),s?2:8):a.test(e)?NaN:+e}}},i={};function n(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return s[e](r,r.exports,n),r.exports}n.m=s,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var s in t)n.o(t,s)&&!n.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,s)=>(n.f[s](e,t),t)),[])),n.u=e=>"webpack/chunks/"+e+"."+n.h()+".js",n.miniCssF=e=>{},n.h=()=>"1f853a928145e977f7a3",n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="@xwp/heavy:",n.l=(s,i,r,a)=>{if(e[s])e[s].push(i);else{var o,l;if(void 0!==r)for(var c=document.getElementsByTagName("script"),d=0;d{o.onerror=o.onload=null,clearTimeout(m);var n=e[s];if(delete e[s],o.parentNode&&o.parentNode.removeChild(o),n&&n.forEach((e=>e(i))),t)return t(i)},m=setTimeout(p.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=p.bind(null,o.onerror),o.onload=p.bind(null,o.onload),l&&document.head.appendChild(o)}},n.p="/wp-content/themes/heavy/assets/dist/",(()=>{var e={903:0};n.f.j=(t,s)=>{var i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)s.push(i[2]);else{var r=new Promise(((s,n)=>i=e[t]=[s,n]));s.push(i[2]=r);var a=n.p+n.u(t),o=new Error;n.l(a,(s=>{if(n.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var r=s&&("load"===s.type?"missing":s.type),a=s&&s.target&&s.target.src;o.message="Loading chunk "+t+" failed.\n("+r+": "+a+")",o.name="ChunkLoadError",o.type=r,o.request=a,i[1](o)}}),"chunk-"+t,t)}};var t=(t,s)=>{var i,r,[a,o,l]=s,c=0;if(a.some((t=>0!==e[t]))){for(i in o)n.o(o,i)&&(n.m[i]=o[i]);l&&l(n)}for(t&&t(s);c{"use strict";const e={detectUser(){let t=-1{var i;s.toggle("is-logged-in",!0);const n=null!==(i=t?.detail?.user_alias)&&void 0!==i?i:"";n&&e.saveUsername(n),e.setUser()})),t?(s.toggle("is-logged-in",!0),e.setUser(),!0):(s.toggle("is-anonymous",!0),s.remove("is-logged-in"),!1)},getUserObject(){const e=document.cookie.split("; ").find((e=>e.startsWith("fp.user=")));let t;if(t=e?JSON.parse(e.substring(8)):null,!t){const e=localStorage.getItem("fp.user");e&&(t=JSON.parse(e))}return t},sanitize:e=>"string"==typeof e?e.trim().replace(/[^a-zA-Z0-9\s\-]/g,""):"",extractName:e=>e&&e.user_name?e.user_name:null,extractUsername:e=>e&&e.user_alias?e.user_alias:null,extractAccessToken:e=>e&&e.access_token?e.access_token:null,applyName(t){if(t){const s=t.split(" ")[0];for(const t of document.querySelectorAll(".fp-auth-username-dynamic"))t.textContent=e.sanitize(s);const i=document.querySelector("input#flip_pay_name");i&&(i.value=e.sanitize(t)),document.dispatchEvent(new CustomEvent("heavy:logged-in"))}},applyAccessToken(t){if(t){const s=document.querySelector("input#flip_pay_access_token");s&&(s.value=e.sanitize(t))}},setUser(){const t=e.getUserObject(),s=e.extractName(t);if(s){const i=e.extractAccessToken(t);return i&&e.applyAccessToken(i),e.applyName(s),!0}return!1},saveUsername(e){var t,s;if("undefined"==typeof UpdateNicknameData)return;if((null!==(t=UpdateNicknameData.nickname)&&void 0!==t?t:"")===e)return;const i=null!==(s=UpdateNicknameData.nonce)&&void 0!==s?s:"";e&&i&&fetch("/wp-json/heavy/v1/update-nickname",{headers:{"Content-Type":"application/json","X-WP-Nonce":i},method:"POST",body:JSON.stringify({nickname:e})}).catch((e=>{console.error("There was a problem with saving the username:",e)}))},init(){document.querySelector(".has-auth")&&(e.detectUser()||document.body.addEventListener("fp_user_event",(()=>{e.detectUser()})))}},t=e,s={init(){if("serviceWorker"in navigator){let e="heavy-page-cache";const t=location.href;let s,i=localStorage.getItem(e+"_saved"),n=JSON.parse(i),r=!1;if(n?n.forEach((e=>{e.url===t&&(r=!0)})):n=[],!r&&!document.querySelector("#offline-template")&&document.querySelector("body.single")&&(s=document.querySelector("h1.c-headline")?.textContent,s)){let e={};e.title=s,e.url=t,e.cachedTime=Date.now(),n.push(e)}caches.open(e).then((t=>{t.keys().then((t=>{n.forEach(((e,s)=>{if(!t.find((t=>t.url===e.url))){const e=1;n.splice(s,e)}})),localStorage.setItem(e+"_saved",JSON.stringify(n))}))})),localStorage.setItem(e+"_saved",JSON.stringify(n))}}};var i=n(138);const r={init(){(0,i.O)(".js-class-swapper","click",(e=>{const t=e.target,{classFrom:s,classTo:i,swapDelay:n=0}=t.dataset;s&&i&&setTimeout((()=>{const e=document.querySelectorAll(`.${s}`);e&&requestAnimationFrame((()=>{e.forEach((e=>e.classList.replace(s,i)))}))}),n)}))}},a={init(){window.matchMedia("(prefers-color-scheme: dark)").matches?a.switchColorScheme("dark"):a.switchColorScheme("light")},switchColorScheme(e){[...document.querySelectorAll("[data-colorscheme]")].map((t=>{t.dataset.colorscheme=e}))}},o=a,l={init(e=".wc_comment"){const t=document.querySelectorAll(e);t&&t.forEach((e=>{e.addEventListener("focus",l.turnOffOverlays),e.addEventListener("blur",l.turnOnOverlays)}));const s=document.querySelector("#wpd-bubble-wrapper");s&&(s.dataset.overlayTarget="comments-overlay",s.addEventListener("click",(e=>{e.stopPropagation()})))},turnOffOverlays(){document.body.classList.add("is-commenting")},turnOnOverlays(){document.body.classList.remove("is-commenting")}},c=l,d={init(){document.querySelector("[data-href]")&&document.body.addEventListener("click",(e=>{const{target:t}=e;if(!t)return;const s=this.findDynamicLink(t);if(!s)return;const{href:i}=s.dataset;if(!i)return;const n=document.querySelector(`[href="${i}"]`);n&&n.click&&(e.preventDefault(),n.click())}))},findDynamicLink(e){if(e.dataset&&e.dataset.href)return e;return e.closest("[data-href]")||null}},u={init(){var e;const t=/Android/i.test(navigator.userAgent),s=null!==(e=navigator?.deviceMemory)&&void 0!==e?e:null,i=parseFloat(document.body.dataset.memoryDetectionTreshold)||null;t&&null!==s&&null!==i&&(window.lowMemoryDevice=s<=i)}},p={iosSafariDisablerSelector:".ios-safari-disabled",init(){const e=window.navigator.userAgent;if(window.navigator.userAgent&&/iPad|iPhone|iPod/.test(e)&&!/CriOS/.test(e)&&!/OPiOS/.test(e)){const e=document.querySelectorAll(this.iosSafariDisablerSelector);e&&[].forEach.call(e,(function(e){e.classList.add("hidden")}))}}},m={init(){[...document.querySelectorAll("[data-drawer]")].forEach((e=>{const t=e.dataset.drawer,s=[...document.querySelectorAll(`[data-drawer-toggle="${t}"]`)];let i=document.querySelector(`.l-backdrop--${t}`);null===i&&(i=document.createElement("div"),i.className=`l-backdrop l-backdrop--${t}`,e.insertAdjacentElement("afterend",i));const n={drawer:e,toggles:s,backdrop:i};i.addEventListener("click",(e=>this.toggle(e,n,!1).bind(this))),s.forEach((e=>{e.addEventListener("click",(e=>{this.toggle(e,n)}))}))})),window.requestAnimationFrame((function(){[...document.querySelectorAll("[data-drawer-toggle]")].forEach((e=>{e.classList.add("is-ready")}))}))},toggle(e,t,s=null){const{drawer:i,toggles:n,backdrop:r}=t,a=i.querySelector("input[type=search]");if(e.preventDefault(),null!==a)if(i.classList.contains("is-drawer-expanded")){if(a.blur(),-1!==e.currentTarget.className.indexOf("search-button")&&""!==a.value)return void a.form.submit()}else{setTimeout((()=>{a.focus()}),125);const e=navigator.userAgent,t=/iPad|iPhone|iPod/.test(e),s=/OS 11_(\d{1,2})/.test(e);if(t&&s){let e=4;const t=50,s=setInterval((()=>{a.style.marginTop="-0.1px",a.focus(),setTimeout((()=>{a.style.marginTop=""}),t),e--,0===e&&clearInterval(s)}),500)}}let o=!i.classList.contains("is-drawer-expanded");null!==s&&(o=s),requestAnimationFrame((()=>{i.classList.toggle("is-drawer-expanded",o),r.classList.toggle("is-backdrop-visible",o),n.map((e=>e.classList.toggle("is-toggle-active",o)))}))}};var h=n(436),f=n.n(h);const v=()=>{const e=document.querySelector(".l-header");if(!e)return;let t=document.querySelector(".site-header-sentinel");t||(t=document.createElement("div"),t.classList.add("site-header-sentinel"),e.parentElement.insertBefore(t,e));let s=window.scrollY;function i(){let i=e.classList.contains("is-stuck"),n=e.classList.contains("is-animated");const{top:r,height:a}=t.getBoundingClientRect(),o=i;s<=window.scrollY?o?0>r+a&&(n=!0):(n=!1,0>r&&(i=!0)):o&&(n=!0,0>r-a||(i=!1,n=!1),r>=0&&(i=!1)),requestAnimationFrame((()=>{e.classList.toggle("is-stuck",i),e.classList.toggle("is-animated",n),document.body.classList.toggle("is-past-header",i)})),s=window.scrollY}window.addEventListener("resize",f()(i,100),!1),window.addEventListener("scroll",f()(i,100),!1),i()},g=e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value},b=e=>{if(void 0!==e.meta&&void 0!==e.meta.show_video_thumbnail&&void 0!==e.meta.video_thumbnail&&e.meta.show_video_thumbnail){const t=document.createElement("img");return t.setAttribute("src",e.meta.video_thumbnail.replace(/&/g,"&")),t.setAttribute("alt",e.title.rendered),t.setAttribute("class","c-article__image"),t}if(void 0!==e.featured_image&&""!==e.featured_image.src){const t=document.createElement("img");return t.setAttribute("srcset",e.featured_image.srcset.replace(/&/g,"&")),t.setAttribute("src",e.featured_image.src.replace(/&/g,"&")),t.setAttribute("sizes",e.featured_image.sizes),t.setAttribute("alt",e.featured_image.desc),t.setAttribute("class","c-article__image"),t}return null},y={locale:"en-US",init(e=".c-infinite-scroller"){const t=document.querySelector(e);t&&("undefined"!=typeof heavyJS&&heavyJS.locale&&(this.locale=heavyJS.locale),"loading"!==document.readyState?this.observe(t):window.addEventListener("DOMContentLoaded",this.observe,!1))},removeLoadingClass(e){e.classList.remove("is-loading")},observe(e){const t="/wp-json/wp/v2/";new IntersectionObserver((([s])=>{const{isIntersecting:i}=s;if(i&&!e.classList.contains("is-loading")){e.classList.add("is-loading");const i=new XMLHttpRequest,n=1,r=s.target.dataset.type,a="https:"===encodeURI(window.location.protocol)?"https:":"http:",o=parseInt(s.target.dataset.page,10)+n,l=parseInt(s.target.dataset.perPage,10),c=s.target.dataset.placement,d=s.target.dataset.exclude,u=s.target.dataset.postType||"posts",p=window.location.hostname,m=s.target.dataset.category,h=r?r+"="+s.target.dataset.id+"&":"";if(s.target.dataset.page=o,/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/.test(p)){if("single"===c)i.open("GET",a+"//"+encodeURIComponent(p)+t+u+"?"+h+"page="+o+"&per_page="+l+"&exclude="+d+"&_fields[]=id&_fields[]=title&_fields[]=date&_fields[]=human_time_diff&_fields[]=link&_fields[]=featured_image&_fields[]=featured_media&_fields[]=meta");else if("team-news"===c)i.open("GET",a+"//"+encodeURIComponent(p)+"/wp-json/heavy/v1/news-alerts?page="+o+"&per_page="+l+"&team="+m);else if("homepage-news"===c){const e=new URLSearchParams;e.append("page",o),e.append("per_page",l),["League","Team","Position","Type"].forEach((t=>{s.target.dataset[`queryParam${t}`]&&e.append(t.toLowerCase(),s.target.dataset[`queryParam${t}`])})),i.open("GET",a+"//"+encodeURIComponent(p)+"/wp-json/heavy/v1/news-alerts?"+e.toString())}else i.open("GET",a+"//"+encodeURIComponent(p)+t+u+"?"+h+"page="+o+"&per_page=30&_fields[]=id&_fields[]=title&_fields[]=date&_fields[]=human_time_diff&_fields[]=link&_fields[]=featured_image&_fields[]=featured_media&_fields[]=meta");i.addEventListener("load",(()=>{requestAnimationFrame((()=>this.removeLoadingClass(e))),200===i.status&&""!==i.responseText?"single"===c?this.postsOutputSingle(i,e):"team-news"===c||"homepage-news"===c?this.postsOutputNewsAlerts(i,e):this.postsOutput(i):e.remove()})),i.send()}else this.removeLoadingClass(e),e.remove()}}),{root:null,rootMargin:"50px",threshold:[0,1]}).observe(e)},postsOutput(e){const t=JSON.parse(e.response),s=["large","odd","even","odd","even"];let i=0,n=0,r=document.createElement("ul");const a=document.createElement("div");a.setAttribute("class","l-stream__wrap"),r.setAttribute("class","l-stream__list"),a.appendChild(r);for(const e in t)if(t.hasOwnProperty(e)){let o=s[i],l="large"===o?"c-article--large":"",c="large"===o?"c-headline--large":"c-headline--default",d=t[e],u=d.human_time_diff+" ago";const p=document.createElement("li");p.setAttribute("class",`l-stream__item l-stream__item--${o}`);const m=document.createElement("article");m.setAttribute("id",`post-${d.id}`),m.setAttribute("class",`c-article ${l}`),p.appendChild(m);const h=document.createElement("div");h.setAttribute("class","c-article__image-wrap");const f=b(d);null!==f&&h.appendChild(f);const v=document.createElement("a");v.setAttribute("href",d.link),v.setAttribute("class","c-article__link"),m.appendChild(v);const y=document.createElement("h2");y.setAttribute("class",`c-headline ${c} h-hover`),y.setAttribute("itemprop","headline"),v.appendChild(y);const w=document.createTextNode(g(d.title.rendered));y.appendChild(w);const S=document.createElement("div");S.setAttribute("class","c-article__meta"),v.appendChild(S);const E=document.createElement("time");E.setAttribute("datetime",d.date),E.setAttribute("itemprop","datePublished"),S.appendChild(E),"es_ES"===this.locale&&(u="Hace "+d.human_time_diff);const T=document.createTextNode(u);E.appendChild(T),r.appendChild(p),i++,n++,15===n&&(r=document.createElement("ul"),r.setAttribute("class","l-stream__list l-stream__list--inverted"),a.appendChild(r)),s.length+1===i&&(i=0)}document.querySelector(".l-stream").appendChild(a)},postsOutputSingle(e,t){const s=JSON.parse(e.response);let i=0,n=document.createElement("ul"),r=parseInt(t.dataset.page,10),a=parseInt(t.dataset.perPage,10),o=parseInt(t.dataset.maxPage,10);const l=document.createElement("div");l.setAttribute("class","l-posts-grid__wrap"),n.setAttribute("class","l-posts-grid__list"),l.appendChild(n);for(const e in s){if(s.hasOwnProperty(e)){let t=s[e],i=t.human_time_diff+" ago";const r=document.createElement("li");r.setAttribute("class","l-posts-grid__item");const a=document.createElement("article");a.setAttribute("id",`post-${t.id}`),a.setAttribute("class","c-article c-article--grid-item"),r.appendChild(a);const o=document.createTextNode(g(t.title.rendered)),l=document.createElement("div");l.setAttribute("class","c-article__image-wrap");const c=b(t);null!==c&&l.appendChild(c);const d=document.createElement("a");d.setAttribute("href",t.link),d.setAttribute("class","c-article__link"),d.appendChild(l),a.appendChild(d);const u=document.createElement("h3");u.setAttribute("class","c-article__title"),u.setAttribute("itemprop","headline"),d.appendChild(u),u.appendChild(o);const p=document.createElement("div");p.setAttribute("class","c-article__meta"),d.appendChild(p);const m=document.createElement("time");m.setAttribute("datetime",t.date),m.setAttribute("itemprop","datePublished"),p.appendChild(m),"es_ES"===this.locale&&(i="Hace "+t.human_time_diff);const h=document.createTextNode(i);m.appendChild(h),n.appendChild(r)}i++}(i=o)&&t.remove(),requestAnimationFrame((function(){document.querySelector(".l-posts-grid").appendChild(l)}))},postsOutputNewsAlerts(e,t){const s=JSON.parse(e.response);let i=".l-news-alerts",n=0,r=window.location.hash.substring(1),a="";const o=document.createDocumentFragment();if(r.startsWith("team-news")){const e=r.split("-");a=e.length>2?parseInt(e[2]):""}for(const e in s){if(s.hasOwnProperty(e)){const t=s[e],i=document.createElement("article");i.setAttribute("id",`team-news-${t.id}`),i.setAttribute("class","c-alert"),t.id===a&&i.classList.add("c-alert--focused");const n=document.createElement("header");n.setAttribute("class","c-alert__header");const r=document.createElement("div");r.setAttribute("class","c-alert__meta");const l=document.createElement("time");l.setAttribute("datetime",t.date.iso),l.setAttribute("class","c-alert__date"),l.innerText=t.date.readable,r.appendChild(l);const c=document.createElement("h3");c.setAttribute("class","c-alert__title");const d=Boolean(t?.player?.id),u=document.body.classList.contains("tag_nfl")&&!document.body.classList.contains("home")||null!==document.querySelector(".l-team--nfl")||document.body.classList.contains("tag_nba")&&!document.body.classList.contains("home")||null!==document.querySelector(".l-team--nba")||null!==document.querySelector('.c-overlay.is-active [data-overlay-league="nfl"]')||null!==document.querySelector('.c-overlay.is-active [data-overlay-league="nba"]'),p=u?document.createElement("a"):document.createElement("span");u?(p.setAttribute("href",t.player.link),p.setAttribute("class","c-alert__player")):p.setAttribute("class","c-alert__player__nolink");let m=t.title;d&&(p.innerText=g(t.player.name),c.appendChild(p),m=": "+m);const h=document.createTextNode(g(m));c.appendChild(h),r.appendChild(c),n.appendChild(r);const f=document.createElement("div");f.setAttribute("class","c-alert__image c-alert__image--rounded");let v=t.player.image;v||(v="/wp-content/themes/heavy/assets/images/player-placeholder-100.png");const b=document.createElement("img");if(b.setAttribute("src",v+"?w=100"),b.setAttribute("alt",t.title),b.setAttribute("width","50"),b.setAttribute("height","50"),b.setAttribute("loading","lazy"),u){const e=document.createElement("a");e.setAttribute("href",t.player.link),e.appendChild(b),f.appendChild(e)}else f.appendChild(b);n.appendChild(f);const y=document.createElement("p");y.setAttribute("class","c-alert__excerpt"),y.innerText=t.content,i.appendChild(n),i.appendChild(y),o.appendChild(i)}n++}n<8&&t.remove();let l=document.querySelector(i).querySelector(".l-news-alerts__wrap"),c=null;null===l?(l=document.createElement("div"),l.setAttribute("class","l-news-alerts__wrap"),l.appendChild(o),c=function(){document.querySelector(i).appendChild(l)}):c=function(){l.appendChild(o)},requestAnimationFrame(c)}};var w=n(553);const S={init(){S.trackEvent()},trackEvent(){S.notify()},notify(){let e;"function"==typeof Event?e=new Event("InitRevcontent"):(e=document.createEvent("Event"),e.initEvent("InitRevcontent",!0,!0)),"complete"===document.readyState?window.dispatchEvent(e):window.addEventListener("load",(function(){window.dispatchEvent(e)}))}},E=S,T={init(){"requestIdleCallback"in window?requestIdleCallback(T.notify):T.notify()},notify(){if(!window.lowMemoryDevice&&!window.isSlowHardware){let e;"function"==typeof Event?e=new Event("InitVideo"):(e=document.createEvent("Event"),e.initEvent("InitVideo",!0,!0)),"complete"===document.readyState?window.dispatchEvent(e):window.addEventListener("load",(function(){window.dispatchEvent(e)}))}window.addEventListener("InitVideo",T.onInitVideo)},onInitVideo(){setTimeout((()=>{const e=async e=>{const t=e.target.closest(".cnx-button-closebutton");if(t){e.preventDefault();const s=t.closest(".cnx-main-container");s&&(e.stopPropagation(),s.classList.add("hidden"),await(0,i.y)(),s.remove())}};document.body.addEventListener("pointerdown",e),document.body.addEventListener("pointerup",e)}),500)}},x=T,C={facebookCommentsElm:"",init(e){this.facebookCommentsElm=document.querySelectorAll(e),this.facebookCommentsElm.forEach((e=>{new IntersectionObserver(this.loadFbSdk,{rootMargin:"500px"}).observe(e)}))},loadFbSdk(e,t){if(e[0].isIntersecting){const e=document.querySelector('meta[property="fb:app_id"]');let s="1103740676351644";e&&e.getAttribute("content")&&(s=e.getAttribute("content"));const i=document.createElement("script");i.src="https://connect.facebook.net/en_US/sdk.js",document.body.appendChild(i),window.fbAsyncInit=function(){FB.init({appId:s,autoLogAppEvents:!0,xfbml:!0,version:"v3.0"})},C.facebookCommentsElm.forEach((e=>{t.unobserve(e)}))}}},L=C,_={interval:250,maxWait:8e3,available(e,t=_.interval,s=_.maxWait){return new Promise(((i,n)=>{const r=window.setInterval((()=>{if(this.findVarByName(e))return i(),clearTimeout(a),void clearInterval(r)}),t),a=window.setTimeout((function(){clearTimeout(r),n()}),s)}))},findVarByName(e){let t=0,s=e.split("."),i=window;try{for(;null!=i&&t{const t={rootMargin:this.rootMargin};new IntersectionObserver(this.loadScribdScripts,t).observe(e)}))},loadScribdScripts(e,t){if(e[0].isIntersecting){document.querySelectorAll("iframe.scribd_iframe_embed").forEach((e=>{e.getAttribute("data-src")&&(e.setAttribute("src",e.getAttribute("data-src")),e.onload=function(){e.removeAttribute("data-src")})}));const e=document.querySelector("iframe.scribd_iframe_embed + script[data-script]");if(e){const t=document.createElement("script");t.innerHTML=e.attributes["data-script"].nodeValue,document.body.appendChild(t)}t.disconnect()}},lazyLoadDDHQ(e){this.ddhqElements=document.querySelectorAll(e),this.ddhqElements.forEach((e=>{const t={rootMargin:this.rootMargin};new IntersectionObserver(this.loadDDHQScripts,t).observe(e)}))},loadDDHQScripts(e,t){e[0].isIntersecting&&(document.querySelectorAll(".ddhq_embed script").forEach((e=>{e.getAttribute("data-src")&&(e.setAttribute("src",e.getAttribute("data-src")),e.onload=function(){e.removeAttribute("data-src")})})),t.disconnect())},loadScript(e){const t=document.querySelector(e);if(t&&t.attributes["data-lazy-src"]){const e=document.createElement("script");e.src=t.attributes["data-lazy-src"].nodeValue,document.body.appendChild(e)}}},O={el:null,classBase:"",selector:"",activeSubMenu:null,init(e=".c-menu"){if(this.selector=e,this.classBase=this.selector,0===this.classBase.indexOf(".")){const e=1;this.classBase=this.classBase.substr(e)}this.el=document.querySelector(this.selector),this.el&&(this.el.addEventListener("click",(e=>this.handleClick(e))),this.el.addEventListener("mouseenter",(()=>this.toggleHover(!0))))},handleClick(e){const{target:t}=e;return!t.classList.contains(`${this.classBase}__expander`)||(this.toggleSubMenu(t.parentElement),e.preventDefault(),!1)},toggleSubMenu(e){null===this.activeSubMenu||(this.activeSubMenu.classList.remove("is-sub-menu-expanded"),e!==this.activeSubMenu)?(this.activeSubMenu=e,this.activeSubMenu.classList.add("is-sub-menu-expanded")):this.activeSubMenu=null},toggleHover(e=!1){null===this.activeSubMenu&&this.el.classList.toggle("is-hover",e)}};function P(e,t,s){var i=new Date,n="expires=";i.setTime(i.getTime()+864e5*s),n+=i.toUTCString(),document.cookie=e+"="+t+";"+n+";path=/"}function q(e){var t,s,i=e+"=",n=decodeURIComponent(document.cookie).split(";");for(t=0;t{let t=document.createElement("a"),s=document.createElement("span");if(s.classList.add("screen-reader-text"),s.textContent="Share",t.appendChild(s),t.classList.add("c-share__button"),t.setAttribute("href","gonative://share/sharePage"),e.hasChildNodes())for(let t=e.childNodes.length-1;0<=t;--t)e.removeChild(e.childNodes[t]);e.appendChild(t)}))}}},N={init(){if("undefined"==typeof OneSignalData)return;const e=parseInt(OneSignalData.delay,10);"number"==typeof e&&0!==e&&setTimeout(this.loadOsSdk,e)},loadOsSdk(){const e=document.createElement("script");e.src="https://cdn.onesignal.com/sdks/OneSignalSDK.js",document.body.appendChild(e)}},F={init(){const e=document.createElement("div");e.classList.add("c-toast-container"),document.body.appendChild(e),document.addEventListener("heavy:toast",(e=>{const{message:t,type:s}=e.detail;F.show(t,s)}))},show(e,t=null,s=null){const i=Array.from(document.querySelectorAll(".c-toast")).find((t=>t.innerText===e));if(i)return;const n=document.createElement("div");n.classList.add("c-toast"),null!==t&&n.classList.add(`is-${t}`),null===s&&(s="error"===t?1e4:5e3),n.innerText=e,document.querySelector(".c-toast-container").appendChild(n),setTimeout((()=>n.parentNode.removeChild(n)),s)}},$=F;var B=n(338);const G={init(){const e=new Map([["play-in-tournament","PIT"],["regular-season","REG"],["postseason","PST"],["preseason","PRE"]]);(0,i.O)("[type=radio][name=season_years]","change",(async t=>{const s=document.querySelector(".c-overlay .c-overlay__content");if(null===s)return;s.classList.add("is-loading");const i=t.target,{nonce:n,year:r,league:a,overlay:o,entity:l,id:c}=i.dataset,d=document.getElementById(o)?.querySelector('.tabs [aria-selected="true"]')?.dataset?.label,u={action:"sport_seasons_overlay",_wpnonce:n,season_year:r,active_type:e.get(d)||"REG",league:a,overlay:o,entity:l,id:c},p=await G.getMarkup(u);if(null===p)return B.default.revertToPreviousValue(i.closest(".c-select")),void s.classList.remove("is-loading");const m=(new DOMParser).parseFromString(p,"text/html");requestAnimationFrame((function(){s.innerHTML=m?.querySelector(".c-overlay__content")?.innerHTML;const e=new CustomEvent("heavy:overlayOpen",{detail:{overlay:s}});document.dispatchEvent(e),s.classList.remove("is-loading")}))}))},prepareFormData(e){const t=new FormData;return Object.keys(e).forEach((s=>{t.append(s,e[s])})),t},async getMarkup(e){let t=null;try{const s=await fetch(heavyJS.ajaxurl,{method:"POST",body:G.prepareFormData(e)}),{data:i,success:n}=await s.json();if(!n)throw new Error(i?.message);if(t=i?.html?i.html:null,!t)throw new Error("Cannot fetch the data, please try again later.")}catch(e){$.show(e.message,"error")}finally{return t}}},j=G,V=({eventName:e,eventMethod:t="auto",eventId:s=""})=>{if(!e)return;const i=()=>{const i={method:t};s&&(i.id=s),window.gtag("event",e,i)};k.available("gtag").then((()=>{"requestIdleCallback"in window?requestIdleCallback(i):i()})).catch((()=>{console.error("Failed to TrackAnalytics, gtag unavailable.")}))},H={triggerSelector:"[data-overlay-target]",init(){const e=document.querySelector(H.triggerSelector),t=document.querySelector(".c-overlay");if(!e||!t)return;(0,i.O)(H.triggerSelector+':not([data-overlay-target^="subscribe-form"])',"click",H.show),(0,i.O)(".c-overlay__close","click",H.close),setTimeout(j.init,0);const s=window.location.hash.substring(1);if(s.startsWith("subscribe-form"))return;let n;n=s.startsWith("team-news")?document.getElementById("team-news"):s.startsWith("comment")?document.getElementById("comments-overlay"):document.getElementById(s),n instanceof Element&&H.showOverlay(n),window.addEventListener("showOverlay",(function(e){if(!e.detail)return void console.warn('showOverlay event received without detail. Expected format: { detail: "elementId" }');const t=document.getElementById(e.detail);t instanceof Element&&H.showOverlay(t)})),document.addEventListener("keydown",(e=>{"Escape"===e.key&&H.close()})),document.addEventListener("heavy:modalOpen",H.close)},show(e){const t=e.target.closest("[data-overlay-target]"),s=t.dataset.overlayTarget,i=t.dataset.overlayScrollTo;if(s.startsWith("subscribe-form"))return;if(!s)return;if(window.location.hash.substring(1)===s)return;const n=document.getElementById(s);n&&H.showOverlay(n,t),window.history.replaceState({overlay:!0,overlayScrollTo:i},"",window.location.pathname+"#"+s),i&&H.scrollTo(i)},showOverlay(e,t){const s=document.querySelector(".c-overlay"),n=t?.dataset?.tabTarget;if(!e||!s)return;let r=document.querySelector(".c-overlay__background"),a=e.dataset.overlayRender;const o=e.dataset.overlayType;if(!r){const e=document.createElement("div");e.classList.add("c-overlay__background"),s.before(e),r=document.querySelector(".c-overlay__background")}document.documentElement.classList.add("is-overlay-open"),H.removeOverlay(s),s.classList.add("is-active"),a&&(a=a.replace(/[^a-z0-9-_]/g,""),s.classList.add(`is-${a}`)),setTimeout((()=>{let t,r,a;if(t="dynamic"===o?e.querySelector(".h-template"):e.content?e.content.cloneNode(!0):e.cloneNode(!0),document.body.classList.contains("home")&&(t.id=e.getAttribute("id")?`${e.id}-overlay`:null),"team-news"===e.id){const e=window.location.hash.substring(1);let s="";if(e.startsWith("team-news")){const t=e.split("-");s=t.length>2?parseInt(t[2]):""}if(s){const e=t.querySelector(`#team-news-${s}`);e&&e.classList.add("c-alert--focused")}}s.appendChild(t);const l=s.querySelector(".c-overlay__header");l.addEventListener("touchstart",(function(e){r=e.touches[0].clientY}),{passive:!0}),l.addEventListener("touchmove",(function(e){const t=e.touches[0].clientY;a=r-t}),{passive:!0}),l.addEventListener("touchend",(function(){a<-25&&H.close()})),s.scrollTop=0,(0,i.O)(".c-heavy-sports-table--sortable th:not(.c-heavy-sports-th--non-sortable)","click",H.sortTable);const c=s.querySelector(".js-overlay__close");c&&c.addEventListener("click",H.close);const d=new CustomEvent("heavy:overlayOpen",{detail:{overlay:s}});if(document.dispatchEvent(d),n){const e=s.querySelector(`button[data-label=${n}]`);e&&e.click()}}),0),r.addEventListener("click",H.close),setTimeout((()=>{V({eventName:"overlay_open",eventId:e.id,eventMethod:t?"click":"auto"})}),0)},close(){const e=document.querySelector(".c-overlay"),t=document.querySelector(".js-overlay__close");if(document.documentElement.classList.remove("is-overlay-open"),!e||!t||!e.classList.contains("is-active"))return;const s=document.querySelector(".c-overlay__background");e.classList.remove("is-active"),e.classList.forEach((t=>{t.startsWith("is-")&&e.classList.remove(t)})),t.removeEventListener("click",H.close),s.removeEventListener("click",H.close),window.history.replaceState({overlay:!1},"",window.location.pathname)},removeOverlay(e){let t;e&&(e.firstChild?.dataset?.parent&&(t=document.getElementById(e.firstChild?.dataset.parent)),t&&t.append(...e.childNodes),e.innerHTML="")},sortTable(e){const t=e.target.closest("th"),s=t.closest("table"),i=s.querySelectorAll("tbody");i&&(s.querySelectorAll("th").forEach((e=>{e.classList.remove("c-heavy-sports-th--sorted")})),i.forEach((e=>{Array.from(e.querySelectorAll("tbody tr:not(:has(.c-heavy-sports-table__series_title))")).sort(H.compare(Array.from(t.parentNode.children).indexOf(t),this.asc)).forEach((t=>e.appendChild(t)))})),this.asc=!this.asc,t.classList.add("c-heavy-sports-th--sorted"),t.classList.toggle("c-heavy-sports-th--sorted-asc"))},compare(e,t){const s=(e,t)=>{var s;const i=e.children[t];return i?(null!==(s=i.dataset?.sortValue)&&void 0!==s?s:i.querySelector("[data-sort-value]")?.dataset.sortValue)||i.innerText||i.textContent:""};return(i,n)=>{return r=s(t?i:n,e),a=s(t?n:i,e),""===r||""===a||isNaN(r)||isNaN(a)?a.toString().localeCompare(r):a-r;var r,a}},scrollTo(e){if(!e)return;const t=document.querySelector(e),s=document.querySelector(".c-overlay"),i=s.querySelector(".c-overlay__header");t&&(t.scrollIntoView(),s.scrollBy(0,-i.offsetHeight))}},R=H,W={init(){window.innerWidth<1024||!document.querySelector(".js-popup")||document.querySelectorAll(".js-popup").forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault(),window.open(this.getAttribute("href"),"","menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600")}))}))}},U={init(e=".tqb-shortcode-new-content"){const t=document.querySelectorAll(e);t&&t.forEach((e=>{e.addEventListener("click",U.turnOffOverlays)}))},turnOffOverlays(){const e=document.querySelectorAll(".tqb-shortcode-new-content"),t=document.querySelectorAll(".connatix");document.body.classList.add("is-quiz-focused"),e&&e.forEach((e=>{e.removeEventListener("click",U.turnOffOverlays)})),t&&t.forEach((e=>{e.remove()}))}},Y=U,X={init(){"complete"===document.readyState?X.detectDelayedScripts():window.addEventListener("load",(function(){X.detectDelayedScripts()}))},detectDelayedScripts(){[...document.querySelectorAll("script[data-delay]")].forEach((e=>{const t=parseInt(e.dataset.delay,10);delete e.dataset.delay,setTimeout(X.enableScriptTag,t,e)}))},enableScriptTag(e){e.dataset.src&&(e.setAttribute("src",e.dataset.src),delete e.dataset.src)}},J=X;function K(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function Q(e,t){void 0===e&&(e={}),void 0===t&&(t={}),Object.keys(t).forEach((s=>{void 0===e[s]?e[s]=t[s]:K(t[s])&&K(e[s])&&Object.keys(t[s]).length>0&&Q(e[s],t[s])}))}const Z={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 ee(){const e="undefined"!=typeof document?document:{};return Q(e,Z),e}const te={document:Z,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 se(){const e="undefined"!=typeof window?window:{};return Q(e,te),e}function ie(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function ne(){return Date.now()}function re(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function ae(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let i=1;it.indexOf(e)<0));for(let t=0,i=s.length;tr?"next":"prev",d=(e,t)=>"next"===c&&e>=t||"prev"===c&&e<=t,u=()=>{a=(new Date).getTime(),null===o&&(o=a);const e=Math.max(Math.min((a-o)/l,1),0),c=.5-Math.cos(e*Math.PI)/2;let p=r+c*(s-r);if(d(p,s)&&(p=s),t.wrapperEl.scrollTo({[i]:p}),d(p,s))return t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout((()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[i]:p})})),void n.cancelAnimationFrame(t.cssModeFrameID);t.cssModeFrameID=n.requestAnimationFrame(u)};u()}function ce(e,t){return void 0===t&&(t=""),[...e.children].filter((e=>e.matches(t)))}function de(e,t){void 0===t&&(t=[]);const s=document.createElement(e);return s.classList.add(...Array.isArray(t)?t:[t]),s}function ue(e,t){return se().getComputedStyle(e,null).getPropertyValue(t)}function pe(e){let t,s=e;if(s){for(t=0;null!==(s=s.previousSibling);)1===s.nodeType&&(t+=1);return t}}function me(e,t){const s=[];let i=e.parentElement;for(;i;)t?i.matches(t)&&s.push(i):s.push(i),i=i.parentElement;return s}function he(e,t,s){const i=se();return s?e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(i.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(i.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-left":"margin-bottom")):e.offsetWidth}let fe,ve,ge;function be(){return fe||(fe=function(){const e=se(),t=ee();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),fe}var ye={on(e,t,s){const i=this;if(!i.eventsListeners||i.destroyed)return i;if("function"!=typeof t)return i;const n=s?"unshift":"push";return e.split(" ").forEach((e=>{i.eventsListeners[e]||(i.eventsListeners[e]=[]),i.eventsListeners[e][n](t)})),i},once(e,t,s){const i=this;if(!i.eventsListeners||i.destroyed)return i;if("function"!=typeof t)return i;function n(){i.off(e,n),n.__emitterProxy&&delete n.__emitterProxy;for(var s=arguments.length,r=new Array(s),a=0;a=0&&t.eventsAnyListeners.splice(s,1),t},off(e,t){const s=this;return!s.eventsListeners||s.destroyed?s:s.eventsListeners?(e.split(" ").forEach((e=>{void 0===t?s.eventsListeners[e]=[]:s.eventsListeners[e]&&s.eventsListeners[e].forEach(((i,n)=>{(i===t||i.__emitterProxy&&i.__emitterProxy===t)&&s.eventsListeners[e].splice(n,1)}))})),s):s},emit(){const e=this;if(!e.eventsListeners||e.destroyed)return e;if(!e.eventsListeners)return e;let t,s,i;for(var n=arguments.length,r=new Array(n),a=0;a{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach((e=>{e.apply(i,[t,...s])})),e.eventsListeners&&e.eventsListeners[t]&&e.eventsListeners[t].forEach((e=>{e.apply(i,s)}))})),e}};const we=(e,t)=>{if(!e||e.destroyed||!e.params)return;const s=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(s){let t=s.querySelector(`.${e.params.lazyPreloaderClass}`);!t&&e.isElement&&(t=s.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`)),t&&t.remove()}},Se=(e,t)=>{if(!e.slides[t])return;const s=e.slides[t].querySelector('[loading="lazy"]');s&&s.removeAttribute("loading")},Ee=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const s=e.slides.length;if(!s||!t||t<0)return;t=Math.min(t,s);const i="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),n=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const s=n,r=[s-t];return r.push(...Array.from({length:t}).map(((e,t)=>s+i+t))),void e.slides.forEach(((t,s)=>{r.includes(t.column)&&Se(e,s)}))}const r=n+i-1;if(e.params.rewind||e.params.loop)for(let i=n-t;i<=r+t;i+=1){const t=(i%s+s)%s;(tr)&&Se(e,t)}else for(let i=Math.max(n-t,0);i<=Math.min(r+t,s-1);i+=1)i!==n&&(i>r||i=0?w=parseFloat(w.replace("%",""))/100*a:"string"==typeof w&&(w=parseFloat(w)),e.virtualSize=-w,u.forEach((e=>{o?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""})),i.centeredSlides&&i.cssMode&&(oe(n,"--swiper-centered-offset-before",""),oe(n,"--swiper-centered-offset-after",""));const x=i.grid&&i.grid.rows>1&&e.grid;let C;x&&e.grid.initSlides(p);const L="auto"===i.slidesPerView&&i.breakpoints&&Object.keys(i.breakpoints).filter((e=>void 0!==i.breakpoints[e].slidesPerView)).length>0;for(let n=0;n1&&m.push(e.virtualSize-a)}if(c&&i.loop){const t=f[0]+w;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!(i.cssMode&&!i.loop)||t!==u.length-1)).forEach((e=>{e.style[s]=`${w}px`}))}if(i.centeredSlides&&i.centeredSlidesBounds){let e=0;f.forEach((t=>{e+=t+(w||0)})),e-=w;const t=e-a;m=m.map((e=>e<=0?-v:e>t?t+g:e))}if(i.centerInsufficientSlides){let e=0;if(f.forEach((t=>{e+=t+(w||0)})),e-=w,e{m[s]=e-t})),h.forEach(((e,s)=>{h[s]=e+t}))}}if(Object.assign(e,{slides:u,snapGrid:m,slidesGrid:h,slidesSizesGrid:f}),i.centeredSlides&&i.cssMode&&!i.centeredSlidesBounds){oe(n,"--swiper-centered-offset-before",-m[0]+"px"),oe(n,"--swiper-centered-offset-after",e.size/2-f[f.length-1]/2+"px");const t=-e.snapGrid[0],s=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map((e=>e+t)),e.slidesGrid=e.slidesGrid.map((e=>e+s))}if(p!==d&&e.emit("slidesLengthChange"),m.length!==b&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),h.length!==y&&e.emit("slidesGridLengthChange"),i.watchSlidesProgress&&e.updateSlidesOffset(),!(c||i.cssMode||"slide"!==i.effect&&"fade"!==i.effect)){const t=`${i.containerModifierClass}backface-hidden`,s=e.el.classList.contains(t);p<=i.maxBackfaceHiddenSlides?s||e.el.classList.add(t):s&&e.el.classList.remove(t)}},updateAutoHeight:function(e){const t=this,s=[],i=t.virtual&&t.params.virtual.enabled;let n,r=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const a=e=>i?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=>{s.push(e)}));else for(n=0;nt.slides.length&&!i)break;s.push(a(e))}else s.push(a(t.activeIndex));for(n=0;nr?e:r}(r||0===r)&&(t.wrapperEl.style.height=`${r}px`)},updateSlidesOffset:function(){const e=this,t=e.slides,s=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let i=0;i{e.classList.remove(s.slideVisibleClass)})),t.visibleSlidesIndexes=[],t.visibleSlides=[];let o=s.spaceBetween;"string"==typeof o&&o.indexOf("%")>=0?o=parseFloat(o.replace("%",""))/100*t.size:"string"==typeof o&&(o=parseFloat(o));for(let e=0;e=0&&p1&&m<=t.size||p<=0&&m>=t.size)&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(e),i[e].classList.add(s.slideVisibleClass)),l.progress=n?-d:d,l.originalProgress=n?-u:u}},updateProgress:function(e){const t=this;if(void 0===e){const s=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*s||0}const s=t.params,i=t.maxTranslate()-t.minTranslate();let{progress:n,isBeginning:r,isEnd:a,progressLoop:o}=t;const l=r,c=a;if(0===i)n=0,r=!0,a=!0;else{n=(e-t.minTranslate())/i;const s=Math.abs(e-t.minTranslate())<1,o=Math.abs(e-t.maxTranslate())<1;r=s||n<=0,a=o||n>=1,s&&(n=0),o&&(n=1)}if(s.loop){const s=t.getSlideIndexByData(0),i=t.getSlideIndexByData(t.slides.length-1),n=t.slidesGrid[s],r=t.slidesGrid[i],a=t.slidesGrid[t.slidesGrid.length-1],l=Math.abs(e);o=l>=n?(l-n)/a:(l+a-r)/a,o>1&&(o-=1)}Object.assign(t,{progress:n,progressLoop:o,isBeginning:r,isEnd:a}),(s.watchSlidesProgress||s.centeredSlides&&s.autoHeight)&&t.updateSlidesProgress(e),r&&!l&&t.emit("reachBeginning toEdge"),a&&!c&&t.emit("reachEnd toEdge"),(l&&!r||c&&!a)&&t.emit("fromEdge"),t.emit("progress",n)},updateSlidesClasses:function(){const e=this,{slides:t,params:s,slidesEl:i,activeIndex:n}=e,r=e.virtual&&s.virtual.enabled,a=e=>ce(i,`.${s.slideClass}${e}, swiper-slide${e}`)[0];let o;if(t.forEach((e=>{e.classList.remove(s.slideActiveClass,s.slideNextClass,s.slidePrevClass)})),r)if(s.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),o=a(`[data-swiper-slide-index="${t}"]`)}else o=a(`[data-swiper-slide-index="${n}"]`);else o=t[n];if(o){o.classList.add(s.slideActiveClass);let e=function(e,t){const s=[];for(;e.nextElementSibling;){const i=e.nextElementSibling;t?i.matches(t)&&s.push(i):s.push(i),e=i}return s}(o,`.${s.slideClass}, swiper-slide`)[0];s.loop&&!e&&(e=t[0]),e&&e.classList.add(s.slideNextClass);let i=function(e,t){const s=[];for(;e.previousElementSibling;){const i=e.previousElementSibling;t?i.matches(t)&&s.push(i):s.push(i),e=i}return s}(o,`.${s.slideClass}, swiper-slide`)[0];s.loop&&0===!i&&(i=t[t.length-1]),i&&i.classList.add(s.slidePrevClass)}e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,s=t.rtlTranslate?t.translate:-t.translate,{snapGrid:i,params:n,activeIndex:r,realIndex:a,snapIndex:o}=t;let l,c=e;const d=e=>{let s=e-t.virtual.slidesBefore;return s<0&&(s=t.virtual.slides.length+s),s>=t.virtual.slides.length&&(s-=t.virtual.slides.length),s};if(void 0===c&&(c=function(e){const{slidesGrid:t,params:s}=e,i=e.rtlTranslate?e.translate:-e.translate;let n;for(let e=0;e=t[e]&&i=t[e]&&i=t[e]&&(n=e);return s.normalizeSlideIndex&&(n<0||void 0===n)&&(n=0),n}(t)),i.indexOf(s)>=0)l=i.indexOf(s);else{const e=Math.min(n.slidesPerGroupSkip,c);l=e+Math.floor((c-e)/n.slidesPerGroup)}if(l>=i.length&&(l=i.length-1),c===r)return l!==o&&(t.snapIndex=l,t.emit("snapIndexChange")),void(t.params.loop&&t.virtual&&t.params.virtual.enabled&&(t.realIndex=d(c)));let u;u=t.virtual&&n.virtual.enabled&&n.loop?d(c):t.slides[c]?parseInt(t.slides[c].getAttribute("data-swiper-slide-index")||c,10):c,Object.assign(t,{previousSnapIndex:o,snapIndex:l,previousRealIndex:a,realIndex:u,previousIndex:r,activeIndex:c}),t.initialized&&Ee(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),a!==u&&t.emit("realIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&t.emit("slideChange")},updateClickedSlide:function(e){const t=this,s=t.params,i=e.closest(`.${s.slideClass}, swiper-slide`);let n,r=!1;if(i)for(let e=0;ea?"next":r=l.length&&(v=l.length-1);const g=-l[v];if(o.normalizeSlideIndex)for(let e=0;e=s&&t=s&&t=s&&(a=e)}if(r.initialized&&a!==u){if(!r.allowSlideNext&&(p?g>r.translate&&g>r.minTranslate():gr.translate&&g>r.maxTranslate()&&(u||0)!==a)return!1}let b;if(a!==(d||0)&&s&&r.emit("beforeSlideChangeStart"),r.updateProgress(g),b=a>u?"next":a0?(r._cssModeVirtualInitialSet=!0,requestAnimationFrame((()=>{m[e?"scrollLeft":"scrollTop"]=s}))):m[e?"scrollLeft":"scrollTop"]=s,t&&requestAnimationFrame((()=>{r.wrapperEl.style.scrollSnapType="",r._immediateVirtual=!1}))}else{if(!r.support.smoothScroll)return le({swiper:r,targetPosition:s,side:e?"left":"top"}),!0;m.scrollTo({[e?"left":"top"]:s,behavior:"smooth"})}return!0}return r.setTransition(t),r.setTranslate(g),r.updateActiveIndex(a),r.updateSlidesClasses(),r.emit("beforeTransitionStart",t,i),r.transitionStart(s,b),0===t?r.transitionEnd(s,b):r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(s,b))}),r.wrapperEl.addEventListener("transitionend",r.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e,t,s,i){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===s&&(s=!0),"string"==typeof e&&(e=parseInt(e,10));const n=this;let r=e;return n.params.loop&&(n.virtual&&n.params.virtual.enabled?r+=n.virtual.slidesBefore:r=n.getSlideIndexByData(r)),n.slideTo(r,t,s,i)},slideNext:function(e,t,s){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);const i=this,{enabled:n,params:r,animating:a}=i;if(!n)return i;let o=r.slidesPerGroup;"auto"===r.slidesPerView&&1===r.slidesPerGroup&&r.slidesPerGroupAuto&&(o=Math.max(i.slidesPerViewDynamic("current",!0),1));const l=i.activeIndexu(e)));let h=r[m.indexOf(p)-1];if(void 0===h&&n.cssMode){let e;r.forEach(((t,s)=>{p>=t&&(e=s)})),void 0!==e&&(h=r[e>0?e-1:e])}let f=0;if(void 0!==h&&(f=a.indexOf(h),f<0&&(f=i.activeIndex-1),"auto"===n.slidesPerView&&1===n.slidesPerGroup&&n.slidesPerGroupAuto&&(f=f-i.slidesPerViewDynamic("previous",!0)+1,f=Math.max(f,0))),n.rewind&&i.isBeginning){const n=i.params.virtual&&i.params.virtual.enabled&&i.virtual?i.virtual.slides.length-1:i.slides.length-1;return i.slideTo(n,e,t,s)}return i.slideTo(f,e,t,s)},slideReset:function(e,t,s){return void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),this.slideTo(this.activeIndex,e,t,s)},slideToClosest:function(e,t,s,i){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),void 0===i&&(i=.5);const n=this;let r=n.activeIndex;const a=Math.min(n.params.slidesPerGroupSkip,r),o=a+Math.floor((r-a)/n.params.slidesPerGroup),l=n.rtlTranslate?n.translate:-n.translate;if(l>=n.snapGrid[o]){const e=n.snapGrid[o];l-e>(n.snapGrid[o+1]-e)*i&&(r+=n.params.slidesPerGroup)}else{const e=n.snapGrid[o-1];l-e<=(n.snapGrid[o]-e)*i&&(r-=n.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,n.slidesGrid.length-1),n.slideTo(r,e,t,s)},slideToClickedSlide:function(){const e=this,{params:t,slidesEl:s}=e,i="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let n,r=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?re.slides.length-e.loopedSlides+i/2?(e.loopFix(),r=e.getSlideIndex(ce(s,`${a}[data-swiper-slide-index="${n}"]`)[0]),ie((()=>{e.slideTo(r)}))):e.slideTo(r):r>e.slides.length-i?(e.loopFix(),r=e.getSlideIndex(ce(s,`${a}[data-swiper-slide-index="${n}"]`)[0]),ie((()=>{e.slideTo(r)}))):e.slideTo(r)}else e.slideTo(r)}};function Le(e){const t=this,s=ee(),i=se(),n=t.touchEventsData;n.evCache.push(e);const{params:r,touches:a,enabled:o}=t;if(!o)return;if(!r.simulateTouch&&"mouse"===e.pointerType)return;if(t.animating&&r.preventInteractionOnTransition)return;!t.animating&&r.cssMode&&r.loop&&t.loopFix();let l=e;l.originalEvent&&(l=l.originalEvent);let c=l.target;if("wrapper"===r.touchEventsTarget&&!t.wrapperEl.contains(c))return;if("which"in l&&3===l.which)return;if("button"in l&&l.button>0)return;if(n.isTouched&&n.isMoved)return;const d=!!r.noSwipingClass&&""!==r.noSwipingClass,u=e.composedPath?e.composedPath():e.path;d&&l.target&&l.target.shadowRoot&&u&&(c=u[0]);const p=r.noSwipingSelector?r.noSwipingSelector:`.${r.noSwipingClass}`,m=!(!l.target||!l.target.shadowRoot);if(r.noSwiping&&(m?function(e,t){return void 0===t&&(t=this),function t(s){if(!s||s===ee()||s===se())return null;s.assignedSlot&&(s=s.assignedSlot);const i=s.closest(e);return i||s.getRootNode?i||t(s.getRootNode().host):null}(t)}(p,c):c.closest(p)))return void(t.allowClick=!0);if(r.swipeHandler&&!c.closest(r.swipeHandler))return;a.currentX=l.pageX,a.currentY=l.pageY;const h=a.currentX,f=a.currentY,v=r.edgeSwipeDetection||r.iOSEdgeSwipeDetection,g=r.edgeSwipeThreshold||r.iOSEdgeSwipeThreshold;if(v&&(h<=g||h>=i.innerWidth-g)){if("prevent"!==v)return;e.preventDefault()}Object.assign(n,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),a.startX=h,a.startY=f,n.touchStartTime=ne(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,r.threshold>0&&(n.allowThresholdMove=!1);let b=!0;c.matches(n.focusableElements)&&(b=!1,"SELECT"===c.nodeName&&(n.isTouched=!1)),s.activeElement&&s.activeElement.matches(n.focusableElements)&&s.activeElement!==c&&s.activeElement.blur();const y=b&&t.allowTouchMove&&r.touchStartPreventDefault;!r.touchStartForcePreventDefault&&!y||c.isContentEditable||l.preventDefault(),r.freeMode&&r.freeMode.enabled&&t.freeMode&&t.animating&&!r.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",l)}function _e(e){const t=ee(),s=this,i=s.touchEventsData,{params:n,touches:r,rtlTranslate:a,enabled:o}=s;if(!o)return;if(!n.simulateTouch&&"mouse"===e.pointerType)return;let l=e;if(l.originalEvent&&(l=l.originalEvent),!i.isTouched)return void(i.startMoving&&i.isScrolling&&s.emit("touchMoveOpposite",l));const c=i.evCache.findIndex((e=>e.pointerId===l.pointerId));c>=0&&(i.evCache[c]=l);const d=i.evCache.length>1?i.evCache[0]:l,u=d.pageX,p=d.pageY;if(l.preventedByNestedSwiper)return r.startX=u,void(r.startY=p);if(!s.allowTouchMove)return l.target.matches(i.focusableElements)||(s.allowClick=!1),void(i.isTouched&&(Object.assign(r,{startX:u,startY:p,prevX:s.touches.currentX,prevY:s.touches.currentY,currentX:u,currentY:p}),i.touchStartTime=ne()));if(n.touchReleaseOnEdges&&!n.loop)if(s.isVertical()){if(pr.startY&&s.translate>=s.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else if(ur.startX&&s.translate>=s.minTranslate())return;if(t.activeElement&&l.target===t.activeElement&&l.target.matches(i.focusableElements))return i.isMoved=!0,void(s.allowClick=!1);if(i.allowTouchCallbacks&&s.emit("touchMove",l),l.targetTouches&&l.targetTouches.length>1)return;r.currentX=u,r.currentY=p;const m=r.currentX-r.startX,h=r.currentY-r.startY;if(s.params.threshold&&Math.sqrt(m**2+h**2)=25&&(e=180*Math.atan2(Math.abs(h),Math.abs(m))/Math.PI,i.isScrolling=s.isHorizontal()?e>n.touchAngle:90-e>n.touchAngle)}if(i.isScrolling&&s.emit("touchMoveOpposite",l),void 0===i.startMoving&&(r.currentX===r.startX&&r.currentY===r.startY||(i.startMoving=!0)),i.isScrolling||s.zoom&&s.params.zoom&&s.params.zoom.enabled&&i.evCache.length>1)return void(i.isTouched=!1);if(!i.startMoving)return;s.allowClick=!1,!n.cssMode&&l.cancelable&&l.preventDefault(),n.touchMoveStopPropagation&&!n.nested&&l.stopPropagation();let f=s.isHorizontal()?m:h,v=s.isHorizontal()?r.currentX-r.previousX:r.currentY-r.previousY;n.oneWayMovement&&(f=Math.abs(f)*(a?1:-1),v=Math.abs(v)*(a?1:-1)),r.diff=f,f*=n.touchRatio,a&&(f=-f,v=-v);const g=s.touchesDirection;s.swipeDirection=f>0?"prev":"next",s.touchesDirection=v>0?"prev":"next";const b=s.params.loop&&!n.cssMode;if(!i.isMoved){if(b&&s.loopFix({direction:s.swipeDirection}),i.startTranslate=s.getTranslate(),s.setTransition(0),s.animating){const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});s.wrapperEl.dispatchEvent(e)}i.allowMomentumBounce=!1,!n.grabCursor||!0!==s.allowSlideNext&&!0!==s.allowSlidePrev||s.setGrabCursor(!0),s.emit("sliderFirstMove",l)}let y;i.isMoved&&g!==s.touchesDirection&&b&&Math.abs(f)>=1&&(s.loopFix({direction:s.swipeDirection,setTranslate:!0}),y=!0),s.emit("sliderMove",l),i.isMoved=!0,i.currentTranslate=f+i.startTranslate;let w=!0,S=n.resistanceRatio;if(n.touchReleaseOnEdges&&(S=0),f>0?(b&&!y&&i.currentTranslate>(n.centeredSlides?s.minTranslate()-s.size/2:s.minTranslate())&&s.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),i.currentTranslate>s.minTranslate()&&(w=!1,n.resistance&&(i.currentTranslate=s.minTranslate()-1+(-s.minTranslate()+i.startTranslate+f)**S))):f<0&&(b&&!y&&i.currentTranslate<(n.centeredSlides?s.maxTranslate()+s.size/2:s.maxTranslate())&&s.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:s.slides.length-("auto"===n.slidesPerView?s.slidesPerViewDynamic():Math.ceil(parseFloat(n.slidesPerView,10)))}),i.currentTranslatei.startTranslate&&(i.currentTranslate=i.startTranslate),s.allowSlidePrev||s.allowSlideNext||(i.currentTranslate=i.startTranslate),n.threshold>0){if(!(Math.abs(f)>n.threshold||i.allowThresholdMove))return void(i.currentTranslate=i.startTranslate);if(!i.allowThresholdMove)return i.allowThresholdMove=!0,r.startX=r.currentX,r.startY=r.currentY,i.currentTranslate=i.startTranslate,void(r.diff=s.isHorizontal()?r.currentX-r.startX:r.currentY-r.startY)}n.followFinger&&!n.cssMode&&((n.freeMode&&n.freeMode.enabled&&s.freeMode||n.watchSlidesProgress)&&(s.updateActiveIndex(),s.updateSlidesClasses()),n.freeMode&&n.freeMode.enabled&&s.freeMode&&s.freeMode.onTouchMove(),s.updateProgress(i.currentTranslate),s.setTranslate(i.currentTranslate))}function ke(e){const t=this,s=t.touchEventsData,i=s.evCache.findIndex((t=>t.pointerId===e.pointerId));if(i>=0&&s.evCache.splice(i,1),["pointercancel","pointerout","pointerleave","contextmenu"].includes(e.type)&&(!["pointercancel","contextmenu"].includes(e.type)||!t.browser.isSafari&&!t.browser.isWebView))return;const{params:n,touches:r,rtlTranslate:a,slidesGrid:o,enabled:l}=t;if(!l)return;if(!n.simulateTouch&&"mouse"===e.pointerType)return;let c=e;if(c.originalEvent&&(c=c.originalEvent),s.allowTouchCallbacks&&t.emit("touchEnd",c),s.allowTouchCallbacks=!1,!s.isTouched)return s.isMoved&&n.grabCursor&&t.setGrabCursor(!1),s.isMoved=!1,void(s.startMoving=!1);n.grabCursor&&s.isMoved&&s.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const d=ne(),u=d-s.touchStartTime;if(t.allowClick){const e=c.path||c.composedPath&&c.composedPath();t.updateClickedSlide(e&&e[0]||c.target),t.emit("tap click",c),u<300&&d-s.lastClickTime<300&&t.emit("doubleTap doubleClick",c)}if(s.lastClickTime=ne(),ie((()=>{t.destroyed||(t.allowClick=!0)})),!s.isTouched||!s.isMoved||!t.swipeDirection||0===r.diff||s.currentTranslate===s.startTranslate)return s.isTouched=!1,s.isMoved=!1,void(s.startMoving=!1);let p;if(s.isTouched=!1,s.isMoved=!1,s.startMoving=!1,p=n.followFinger?a?t.translate:-t.translate:-s.currentTranslate,n.cssMode)return;if(n.freeMode&&n.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:p});let m=0,h=t.slidesSizesGrid[0];for(let e=0;e=o[e]&&p=o[e]&&(m=e,h=o[o.length-1]-o[o.length-2])}let f=null,v=null;n.rewind&&(t.isBeginning?v=n.virtual&&n.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(f=0));const g=(p-o[m])/h,b=mn.longSwipesMs){if(!n.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(g>=n.longSwipesRatio?t.slideTo(n.rewind&&t.isEnd?f:m+b):t.slideTo(m)),"prev"===t.swipeDirection&&(g>1-n.longSwipesRatio?t.slideTo(m+b):null!==v&&g<0&&Math.abs(g)>n.longSwipesRatio?t.slideTo(v):t.slideTo(m))}else{if(!n.shortSwipes)return void t.slideTo(t.activeIndex);!t.navigation||c.target!==t.navigation.nextEl&&c.target!==t.navigation.prevEl?("next"===t.swipeDirection&&t.slideTo(null!==f?f:m+b),"prev"===t.swipeDirection&&t.slideTo(null!==v?v:m)):c.target===t.navigation.nextEl?t.slideTo(m+b):t.slideTo(m)}}function Ae(){const e=this,{params:t,el:s}=e;if(s&&0===s.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:i,allowSlidePrev:n,snapGrid:r}=e,a=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const o=a&&t.loop;!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||o?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=i,e.params.watchOverflow&&r!==e.snapGrid&&e.checkOverflow()}function Ie(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function Me(){const e=this,{wrapperEl:t,rtlTranslate:s,enabled:i}=e;if(!i)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 r=e.maxTranslate()-e.minTranslate();n=0===r?0:(e.translate-e.minTranslate())/r,n!==e.progress&&e.updateProgress(s?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function Oe(e){const t=this;we(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update()}let Pe=!1;function qe(){}const ze=(e,t)=>{const s=ee(),{params:i,el:n,wrapperEl:r,device:a}=e,o=!!i.nested,l="on"===t?"addEventListener":"removeEventListener",c=t;n[l]("pointerdown",e.onTouchStart,{passive:!1}),s[l]("pointermove",e.onTouchMove,{passive:!1,capture:o}),s[l]("pointerup",e.onTouchEnd,{passive:!0}),s[l]("pointercancel",e.onTouchEnd,{passive:!0}),s[l]("pointerout",e.onTouchEnd,{passive:!0}),s[l]("pointerleave",e.onTouchEnd,{passive:!0}),s[l]("contextmenu",e.onTouchEnd,{passive:!0}),(i.preventClicks||i.preventClicksPropagation)&&n[l]("click",e.onClick,!0),i.cssMode&&r[l]("scroll",e.onScroll),i.updateOnWindowResize?e[c](a.ios||a.android?"resize orientationchange observerUpdate":"resize observerUpdate",Ae,!0):e[c]("observerUpdate",Ae,!0),n[l]("load",e.onLoad,{capture:!0})},De=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var Ne={init:!0,direction:"horizontal",oneWayMovement:!1,touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,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,loopedSlides:null,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",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function Fe(e,t){return function(s){void 0===s&&(s={});const i=Object.keys(s)[0],n=s[i];"object"==typeof n&&null!==n?(["navigation","pagination","scrollbar"].indexOf(i)>=0&&!0===e[i]&&(e[i]={auto:!0}),i in e&&"enabled"in n?(!0===e[i]&&(e[i]={enabled:!0}),"object"!=typeof e[i]||"enabled"in e[i]||(e[i].enabled=!0),e[i]||(e[i]={enabled:!1}),ae(t,s)):ae(t,s)):ae(t,s)}}const $e={eventsEmitter:ye,update:Te,translate:{getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y");const{params:t,rtlTranslate:s,translate:i,wrapperEl:n}=this;if(t.virtualTranslate)return s?-i:i;if(t.cssMode)return i;let r=function(e,t){void 0===t&&(t="x");const s=se();let i,n,r;const a=function(e){const t=se();let s;return t.getComputedStyle&&(s=t.getComputedStyle(e,null)),!s&&e.currentStyle&&(s=e.currentStyle),s||(s=e.style),s}(e);return s.WebKitCSSMatrix?(n=a.transform||a.webkitTransform,n.split(",").length>6&&(n=n.split(", ").map((e=>e.replace(",","."))).join(", ")),r=new s.WebKitCSSMatrix("none"===n?"":n)):(r=a.MozTransform||a.OTransform||a.MsTransform||a.msTransform||a.transform||a.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),i=r.toString().split(",")),"x"===t&&(n=s.WebKitCSSMatrix?r.m41:16===i.length?parseFloat(i[12]):parseFloat(i[4])),"y"===t&&(n=s.WebKitCSSMatrix?r.m42:16===i.length?parseFloat(i[13]):parseFloat(i[5])),n||0}(n,e);return r+=this.cssOverflowAdjustment(),s&&(r=-r),r||0},setTranslate:function(e,t){const s=this,{rtlTranslate:i,params:n,wrapperEl:r,progress:a}=s;let o,l=0,c=0;s.isHorizontal()?l=i?-e:e:c=e,n.roundLengths&&(l=Math.floor(l),c=Math.floor(c)),s.previousTranslate=s.translate,s.translate=s.isHorizontal()?l:c,n.cssMode?r[s.isHorizontal()?"scrollLeft":"scrollTop"]=s.isHorizontal()?-l:-c:n.virtualTranslate||(s.isHorizontal()?l-=s.cssOverflowAdjustment():c-=s.cssOverflowAdjustment(),r.style.transform=`translate3d(${l}px, ${c}px, 0px)`);const d=s.maxTranslate()-s.minTranslate();o=0===d?0:(e-s.minTranslate())/d,o!==a&&s.updateProgress(e),s.emit("setTranslate",s.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e,t,s,i,n){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===s&&(s=!0),void 0===i&&(i=!0);const r=this,{params:a,wrapperEl:o}=r;if(r.animating&&a.preventInteractionOnTransition)return!1;const l=r.minTranslate(),c=r.maxTranslate();let d;if(d=i&&e>l?l:i&&e{e.setAttribute("data-swiper-slide-index",t)})),t.loopFix({slideRealIndex:e,direction:s.centeredSlides?void 0:"next"}))},loopFix:function(e){let{slideRealIndex:t,slideTo:s=!0,direction:i,setTranslate:n,activeSlideIndex:r,byController:a,byMousewheel:o}=void 0===e?{}:e;const l=this;if(!l.params.loop)return;l.emit("beforeLoopFix");const{slides:c,allowSlidePrev:d,allowSlideNext:u,slidesEl:p,params:m}=l;if(l.allowSlidePrev=!0,l.allowSlideNext=!0,l.virtual&&m.virtual.enabled)return s&&(m.centeredSlides||0!==l.snapIndex?m.centeredSlides&&l.snapIndexe.classList.contains(m.slideActiveClass)))[0]):b=r;const y="next"===i||!i,w="prev"===i||!i;let S=0,E=0;if(rl.slides.length-2*f){E=Math.max(r-(l.slides.length-2*f),m.slidesPerGroup);for(let e=0;e{l.slides[e].swiperLoopMoveDOM=!0,p.prepend(l.slides[e]),l.slides[e].swiperLoopMoveDOM=!1})),y&&g.forEach((e=>{l.slides[e].swiperLoopMoveDOM=!0,p.append(l.slides[e]),l.slides[e].swiperLoopMoveDOM=!1})),l.recalcSlides(),"auto"===m.slidesPerView&&l.updateSlides(),m.watchSlidesProgress&&l.updateSlidesOffset(),s)if(v.length>0&&w)if(void 0===t){const e=l.slidesGrid[b],t=l.slidesGrid[b+S]-e;o?l.setTranslate(l.translate-t):(l.slideTo(b+S,0,!1,!0),n&&(l.touches[l.isHorizontal()?"startX":"startY"]+=t,l.touchEventsData.currentTranslate=l.translate))}else n&&(l.slideToLoop(t,0,!1,!0),l.touchEventsData.currentTranslate=l.translate);else if(g.length>0&&y)if(void 0===t){const e=l.slidesGrid[b],t=l.slidesGrid[b-E]-e;o?l.setTranslate(l.translate-t):(l.slideTo(b-E,0,!1,!0),n&&(l.touches[l.isHorizontal()?"startX":"startY"]+=t,l.touchEventsData.currentTranslate=l.translate))}else l.slideToLoop(t,0,!1,!0);if(l.allowSlidePrev=d,l.allowSlideNext=u,l.controller&&l.controller.control&&!a){const e={slideRealIndex:t,direction:i,setTranslate:n,activeSlideIndex:r,byController:!0};Array.isArray(l.controller.control)?l.controller.control.forEach((t=>{!t.destroyed&&t.params.loop&&t.loopFix({...e,slideTo:t.params.slidesPerView===m.slidesPerView&&s})})):l.controller.control instanceof l.constructor&&l.controller.control.params.loop&&l.controller.control.loopFix({...e,slideTo:l.controller.control.params.slidesPerView===m.slidesPerView&&s})}l.emit("loopFix")},loopDestroy:function(){const e=this,{params:t,slidesEl:s}=e;if(!t.loop||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const i=[];e.slides.forEach((e=>{const t=void 0===e.swiperSlideIndex?1*e.getAttribute("data-swiper-slide-index"):e.swiperSlideIndex;i[t]=e})),e.slides.forEach((e=>{e.removeAttribute("data-swiper-slide-index")})),i.forEach((e=>{s.append(e)})),e.recalcSlides(),e.slideTo(e.realIndex,0)}},grabCursor:{setGrabCursor:function(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const s="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),s.style.cursor="move",s.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,t=ee(),{params:s}=e;e.onTouchStart=Le.bind(e),e.onTouchMove=_e.bind(e),e.onTouchEnd=ke.bind(e),s.cssMode&&(e.onScroll=Me.bind(e)),e.onClick=Ie.bind(e),e.onLoad=Oe.bind(e),Pe||(t.addEventListener("touchstart",qe),Pe=!0),ze(e,"on")},detachEvents:function(){ze(this,"off")}},breakpoints:{setBreakpoint:function(){const e=this,{realIndex:t,initialized:s,params:i,el:n}=e,r=i.breakpoints;if(!r||r&&0===Object.keys(r).length)return;const a=e.getBreakpoint(r,e.params.breakpointsBase,e.el);if(!a||e.currentBreakpoint===a)return;const o=(a in r?r[a]:void 0)||e.originalParams,l=De(e,i),c=De(e,o),d=i.enabled;l&&!c?(n.classList.remove(`${i.containerModifierClass}grid`,`${i.containerModifierClass}grid-column`),e.emitContainerClasses()):!l&&c&&(n.classList.add(`${i.containerModifierClass}grid`),(o.grid.fill&&"column"===o.grid.fill||!o.grid.fill&&"column"===i.grid.fill)&&n.classList.add(`${i.containerModifierClass}grid-column`),e.emitContainerClasses()),["navigation","pagination","scrollbar"].forEach((t=>{if(void 0===o[t])return;const s=i[t]&&i[t].enabled,n=o[t]&&o[t].enabled;s&&!n&&e[t].disable(),!s&&n&&e[t].enable()}));const u=o.direction&&o.direction!==i.direction,p=i.loop&&(o.slidesPerView!==i.slidesPerView||u);u&&s&&e.changeDirection(),ae(e.params,o);const m=e.params.enabled;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),d&&!m?e.disable():!d&&m&&e.enable(),e.currentBreakpoint=a,e.emit("_beforeBreakpoint",o),p&&s&&(e.loopDestroy(),e.loopCreate(t),e.updateSlides()),e.emit("breakpoint",o)},getBreakpoint:function(e,t,s){if(void 0===t&&(t="window"),!e||"container"===t&&!s)return;let i=!1;const n=se(),r="window"===t?n.innerHeight:s.clientHeight,a=Object.keys(e).map((e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:r*t,point:e}}return{value:e,point:e}}));a.sort(((e,t)=>parseInt(e.value,10)-parseInt(t.value,10)));for(let e=0;es}else e.isLocked=1===e.snapGrid.length;!0===s.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===s.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:s,rtl:i,el:n,device:r}=e,a=function(e,t){const s=[];return e.forEach((e=>{"object"==typeof e?Object.keys(e).forEach((i=>{e[i]&&s.push(t+i)})):"string"==typeof e&&s.push(t+e)})),s}(["initialized",s.direction,{"free-mode":e.params.freeMode&&s.freeMode.enabled},{autoheight:s.autoHeight},{rtl:i},{grid:s.grid&&s.grid.rows>1},{"grid-column":s.grid&&s.grid.rows>1&&"column"===s.grid.fill},{android:r.android},{ios:r.ios},{"css-mode":s.cssMode},{centered:s.cssMode&&s.centeredSlides},{"watch-progress":s.watchSlidesProgress}],s.containerModifierClass);t.push(...a),n.classList.add(...t),e.emitContainerClasses()},removeClasses:function(){const{el:e,classNames:t}=this;e.classList.remove(...t),this.emitContainerClasses()}}},Be={};class Ge{constructor(){let e,t;for(var s=arguments.length,i=new Array(s),n=0;n1){const e=[];return r.querySelectorAll(t.el).forEach((s=>{const i=ae({},t,{el:s});e.push(new Ge(i))})),e}const a=this;var o;a.__swiper__=!0,a.support=be(),a.device=(void 0===(o={userAgent:t.userAgent})&&(o={}),ve||(ve=function(e){let{userAgent:t}=void 0===e?{}:e;const s=be(),i=se(),n=i.navigator.platform,r=t||i.navigator.userAgent,a={ios:!1,android:!1},o=i.screen.width,l=i.screen.height,c=r.match(/(Android);?[\s\/]+([\d.]+)?/);let d=r.match(/(iPad).*OS\s([\d_]+)/);const u=r.match(/(iPod)(.*OS\s([\d_]+))?/),p=!d&&r.match(/(iPhone\sOS|iOS)\s([\d_]+)/),m="Win32"===n;let h="MacIntel"===n;return!d&&h&&s.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${o}x${l}`)>=0&&(d=r.match(/(Version)\/([\d.]+)/),d||(d=[0,1,"13_0_0"]),h=!1),c&&!m&&(a.os="android",a.android=!0),(d||p||u)&&(a.os="ios",a.ios=!0),a}(o)),ve),a.browser=(ge||(ge=function(){const e=se();let t=!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 s=String(e.navigator.userAgent);if(s.includes("Version/")){const[e,i]=s.split("Version/")[1].split(" ")[0].split(".").map((e=>Number(e)));t=e<16||16===e&&i<2}}return{isSafari:t||s(),needPerspectiveFix:t,isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent)}}()),ge),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:Fe(t,l),on:a.on.bind(a),once:a.once.bind(a),off:a.off.bind(a),emit:a.emit.bind(a)})}));const c=ae({},Ne,l);return a.params=ae({},c,Be,t),a.originalParams=ae({},a.params),a.passedParams=ae({},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,evCache:[]},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}getSlideIndex(e){const{slidesEl:t,params:s}=this,i=pe(ce(t,`.${s.slideClass}, swiper-slide`)[0]);return pe(e)-i}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=ce(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 s=this;e=Math.min(Math.max(e,0),1);const i=s.minTranslate(),n=(s.maxTranslate()-i)*e+i;s.translateTo(n,void 0===t?0:t),s.updateActiveIndex(),s.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((s=>{const i=e.getSlideClasses(s);t.push({slideEl:s,classNames:i}),e.emit("_slideClass",s,i)})),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){void 0===e&&(e="current"),void 0===t&&(t=!1);const{params:s,slides:i,slidesGrid:n,slidesSizesGrid:r,size:a,activeIndex:o}=this;let l=1;if(s.centeredSlides){let e,t=i[o]?i[o].swiperSlideSize:0;for(let s=o+1;sa&&(e=!0));for(let s=o-1;s>=0;s-=1)i[s]&&!e&&(t+=i[s].swiperSlideSize,l+=1,t>a&&(e=!0))}else if("current"===e)for(let e=o+1;e=0;e-=1)n[o]-n[e]{t.complete&&we(e,t)})),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),s.freeMode&&s.freeMode.enabled&&!s.cssMode)i(),s.autoHeight&&e.updateAutoHeight();else{if(("auto"===s.slidesPerView||s.slidesPerView>1)&&e.isEnd&&!s.centeredSlides){const t=e.virtual&&s.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||i()}s.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t){void 0===t&&(t=!0);const s=this,i=s.params.direction;return e||(e="horizontal"===i?"vertical":"horizontal"),e===i||"horizontal"!==e&&"vertical"!==e||(s.el.classList.remove(`${s.params.containerModifierClass}${i}`),s.el.classList.add(`${s.params.containerModifierClass}${e}`),s.emitContainerClasses(),s.params.direction=e,s.slides.forEach((t=>{"vertical"===e?t.style.width="":t.style.height=""})),s.emit("changeDirection"),t&&s.update()),s}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 s=e||t.params.el;if("string"==typeof s&&(s=document.querySelector(s)),!s)return!1;s.swiper=t,s.parentNode&&s.parentNode.host&&"SWIPER-CONTAINER"===s.parentNode.host.nodeName&&(t.isElement=!0);const i=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let n=s&&s.shadowRoot&&s.shadowRoot.querySelector?s.shadowRoot.querySelector(i()):ce(s,i())[0];return!n&&t.params.createElements&&(n=de("div",t.params.wrapperClass),s.append(n),ce(s,`.${t.params.slideClass}`).forEach((e=>{n.append(e)}))),Object.assign(t,{el:s,wrapperEl:n,slidesEl:t.isElement&&!s.parentNode.host.slideSlots?s.parentNode.host:n,hostEl:t.isElement?s.parentNode.host:s,mounted:!0,rtl:"rtl"===s.dir.toLowerCase()||"rtl"===ue(s,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===s.dir.toLowerCase()||"rtl"===ue(s,"direction")),wrongRTL:"-webkit-box"===ue(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 s=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&s.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),s.forEach((e=>{e.complete?we(t,e):e.addEventListener("load",(e=>{we(t,e.target)}))})),Ee(t),t.initialized=!0,Ee(t),t.emit("init"),t.emit("afterInit"),t}destroy(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);const s=this,{params:i,el:n,wrapperEl:r,slides:a}=s;return void 0===s.params||s.destroyed||(s.emit("beforeDestroy"),s.initialized=!1,s.detachEvents(),i.loop&&s.loopDestroy(),t&&(s.removeClasses(),n.removeAttribute("style"),r.removeAttribute("style"),a&&a.length&&a.forEach((e=>{e.classList.remove(i.slideVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")}))),s.emit("destroy"),Object.keys(s.eventsListeners).forEach((e=>{s.off(e)})),!1!==e&&(s.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){}}))}(s)),s.destroyed=!0),null}static extendDefaults(e){ae(Be,e)}static get extendedDefaults(){return Be}static get defaults(){return Ne}static installModule(e){Ge.prototype.__modules__||(Ge.prototype.__modules__=[]);const t=Ge.prototype.__modules__;"function"==typeof e&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach((e=>Ge.installModule(e))),Ge):(Ge.installModule(e),Ge)}}function je(e,t,s,i){return e.params.createElements&&Object.keys(i).forEach((n=>{if(!s[n]&&!0===s.auto){let r=ce(e.el,`.${i[n]}`)[0];r||(r=de("div",i[n]),r.className=i[n],e.el.append(r)),s[n]=r,t[n]=r}})),s}function Ve(e){return void 0===e&&(e=""),`.${e.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}Object.keys($e).forEach((e=>{Object.keys($e[e]).forEach((t=>{Ge.prototype[t]=$e[e][t]}))})),Ge.use([function(e){let{swiper:t,on:s,emit:i}=e;const n=se();let r=null,a=null;const o=()=>{t&&!t.destroyed&&t.initialized&&(i("beforeResize"),i("resize"))},l=()=>{t&&!t.destroyed&&t.initialized&&i("orientationchange")};s("init",(()=>{t.params.resizeObserver&&void 0!==n.ResizeObserver?t&&!t.destroyed&&t.initialized&&(r=new ResizeObserver((e=>{a=n.requestAnimationFrame((()=>{const{width:s,height:i}=t;let n=s,r=i;e.forEach((e=>{let{contentBoxSize:s,contentRect:i,target:a}=e;a&&a!==t.el||(n=i?i.width:(s[0]||s).inlineSize,r=i?i.height:(s[0]||s).blockSize)})),n===s&&r===i||o()}))})),r.observe(t.el)):(n.addEventListener("resize",o),n.addEventListener("orientationchange",l))})),s("destroy",(()=>{a&&n.cancelAnimationFrame(a),r&&r.unobserve&&t.el&&(r.unobserve(t.el),r=null),n.removeEventListener("resize",o),n.removeEventListener("orientationchange",l)}))},function(e){let{swiper:t,extendParams:s,on:i,emit:n}=e;const r=[],a=se(),o=function(e,s){void 0===s&&(s={});const i=new(a.MutationObserver||a.WebkitMutationObserver)((e=>{if(t.__preventObserver__)return;if(1===e.length)return void n("observerUpdate",e[0]);const s=function(){n("observerUpdate",e[0])};a.requestAnimationFrame?a.requestAnimationFrame(s):a.setTimeout(s,0)}));i.observe(e,{attributes:void 0===s.attributes||s.attributes,childList:void 0===s.childList||s.childList,characterData:void 0===s.characterData||s.characterData}),r.push(i)};s({observer:!1,observeParents:!1,observeSlideChildren:!1}),i("init",(()=>{if(t.params.observer){if(t.params.observeParents){const e=me(t.hostEl);for(let t=0;t{r.forEach((e=>{e.disconnect()})),r.splice(0,r.length)}))}]),Ge.use([function(e){let{swiper:t,extendParams:s,on:i,emit:n}=e;s({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};const r=e=>(Array.isArray(e)?e:[e]).filter((e=>!!e));function a(e){let s;return e&&"string"==typeof e&&t.isElement&&(s=t.el.querySelector(e),s)?s:(e&&("string"==typeof e&&(s=[...document.querySelectorAll(e)]),t.params.uniqueNavElements&&"string"==typeof e&&s.length>1&&1===t.el.querySelectorAll(e).length&&(s=t.el.querySelector(e))),e&&!s?e:s)}function o(e,s){const i=t.params.navigation;(e=r(e)).forEach((e=>{e&&(e.classList[s?"add":"remove"](...i.disabledClass.split(" ")),"BUTTON"===e.tagName&&(e.disabled=s),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](i.lockClass))}))}function l(){const{nextEl:e,prevEl:s}=t.navigation;if(t.params.loop)return o(s,!1),void o(e,!1);o(s,t.isBeginning&&!t.params.rewind),o(e,t.isEnd&&!t.params.rewind)}function c(e){e.preventDefault(),(!t.isBeginning||t.params.loop||t.params.rewind)&&(t.slidePrev(),n("navigationPrev"))}function d(e){e.preventDefault(),(!t.isEnd||t.params.loop||t.params.rewind)&&(t.slideNext(),n("navigationNext"))}function u(){const e=t.params.navigation;if(t.params.navigation=je(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!e.nextEl&&!e.prevEl)return;let s=a(e.nextEl),i=a(e.prevEl);Object.assign(t.navigation,{nextEl:s,prevEl:i}),s=r(s),i=r(i);const n=(s,i)=>{s&&s.addEventListener("click","next"===i?d:c),!t.enabled&&s&&s.classList.add(...e.lockClass.split(" "))};s.forEach((e=>n(e,"next"))),i.forEach((e=>n(e,"prev")))}function p(){let{nextEl:e,prevEl:s}=t.navigation;e=r(e),s=r(s);const i=(e,s)=>{e.removeEventListener("click","next"===s?d:c),e.classList.remove(...t.params.navigation.disabledClass.split(" "))};e.forEach((e=>i(e,"next"))),s.forEach((e=>i(e,"prev")))}i("init",(()=>{!1===t.params.navigation.enabled?m():(u(),l())})),i("toEdge fromEdge lock unlock",(()=>{l()})),i("destroy",(()=>{p()})),i("enable disable",(()=>{let{nextEl:e,prevEl:s}=t.navigation;e=r(e),s=r(s),[...e,...s].filter((e=>!!e)).forEach((e=>e.classList[t.enabled?"remove":"add"](t.params.navigation.lockClass)))})),i("click",((e,s)=>{let{nextEl:i,prevEl:a}=t.navigation;i=r(i),a=r(a);const o=s.target;if(t.params.navigation.hideOnClick&&!a.includes(o)&&!i.includes(o)){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===o||t.pagination.el.contains(o)))return;let e;i.length?e=i[0].classList.contains(t.params.navigation.hiddenClass):a.length&&(e=a[0].classList.contains(t.params.navigation.hiddenClass)),n(!0===e?"navigationShow":"navigationHide"),[...i,...a].filter((e=>!!e)).forEach((e=>e.classList.toggle(t.params.navigation.hiddenClass)))}}));const m=()=>{t.el.classList.add(...t.params.navigation.navigationDisabledClass.split(" ")),p()};Object.assign(t.navigation,{enable:()=>{t.el.classList.remove(...t.params.navigation.navigationDisabledClass.split(" ")),u(),l()},disable:m,update:l,init:u,destroy:p})},function(e){let{swiper:t,extendParams:s,on:i,emit:n}=e;const r="swiper-pagination";let a;s({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:`${r}-bullet`,bulletActiveClass:`${r}-bullet-active`,modifierClass:`${r}-`,currentClass:`${r}-current`,totalClass:`${r}-total`,hiddenClass:`${r}-hidden`,progressbarFillClass:`${r}-progressbar-fill`,progressbarOppositeClass:`${r}-progressbar-opposite`,clickableClass:`${r}-clickable`,lockClass:`${r}-lock`,horizontalClass:`${r}-horizontal`,verticalClass:`${r}-vertical`,paginationDisabledClass:`${r}-disabled`}}),t.pagination={el:null,bullets:[]};let o=0;const l=e=>(Array.isArray(e)?e:[e]).filter((e=>!!e));function c(){return!t.params.pagination.el||!t.pagination.el||Array.isArray(t.pagination.el)&&0===t.pagination.el.length}function d(e,s){const{bulletActiveClass:i}=t.params.pagination;e&&(e=e[("prev"===s?"previous":"next")+"ElementSibling"])&&(e.classList.add(`${i}-${s}`),(e=e[("prev"===s?"previous":"next")+"ElementSibling"])&&e.classList.add(`${i}-${s}-${s}`))}function u(e){const s=e.target.closest(Ve(t.params.pagination.bulletClass));if(!s)return;e.preventDefault();const i=pe(s)*t.params.slidesPerGroup;if(t.params.loop){if(t.realIndex===i)return;const e=t.realIndex,s=t.getSlideIndexByData(i),n=t.getSlideIndexByData(t.realIndex);if(s>t.slides.length-t.loopedSlides){const i=t.activeIndex;t.loopFix({direction:s>n?"next":"prev",activeSlideIndex:s,slideTo:!1}),i===t.activeIndex&&t.slideToLoop(e,0,!1,!0)}t.slideToLoop(i)}else t.slideTo(i)}function p(){const e=t.rtl,s=t.params.pagination;if(c())return;let i,r,u=t.pagination.el;u=l(u);const p=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,m=t.params.loop?Math.ceil(p/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(r=t.previousRealIndex||0,i=t.params.slidesPerGroup>1?Math.floor(t.realIndex/t.params.slidesPerGroup):t.realIndex):void 0!==t.snapIndex?(i=t.snapIndex,r=t.previousSnapIndex):(r=t.previousIndex||0,i=t.activeIndex||0),"bullets"===s.type&&t.pagination.bullets&&t.pagination.bullets.length>0){const n=t.pagination.bullets;let l,c,p;if(s.dynamicBullets&&(a=he(n[0],t.isHorizontal()?"width":"height",!0),u.forEach((e=>{e.style[t.isHorizontal()?"width":"height"]=a*(s.dynamicMainBullets+4)+"px"})),s.dynamicMainBullets>1&&void 0!==r&&(o+=i-(r||0),o>s.dynamicMainBullets-1?o=s.dynamicMainBullets-1:o<0&&(o=0)),l=Math.max(i-o,0),c=l+(Math.min(n.length,s.dynamicMainBullets)-1),p=(c+l)/2),n.forEach((e=>{const t=[...["","-next","-next-next","-prev","-prev-prev","-main"].map((e=>`${s.bulletActiveClass}${e}`))].map((e=>"string"==typeof e&&e.includes(" ")?e.split(" "):e)).flat();e.classList.remove(...t)})),u.length>1)n.forEach((e=>{const n=pe(e);n===i?e.classList.add(...s.bulletActiveClass.split(" ")):t.isElement&&e.setAttribute("part","bullet"),s.dynamicBullets&&(n>=l&&n<=c&&e.classList.add(...`${s.bulletActiveClass}-main`.split(" ")),n===l&&d(e,"prev"),n===c&&d(e,"next"))}));else{const e=n[i];if(e&&e.classList.add(...s.bulletActiveClass.split(" ")),t.isElement&&n.forEach(((e,t)=>{e.setAttribute("part",t===i?"bullet-active":"bullet")})),s.dynamicBullets){const e=n[l],t=n[c];for(let e=l;e<=c;e+=1)n[e]&&n[e].classList.add(...`${s.bulletActiveClass}-main`.split(" "));d(e,"prev"),d(t,"next")}}if(s.dynamicBullets){const i=Math.min(n.length,s.dynamicMainBullets+4),r=(a*i-a)/2-p*a,o=e?"right":"left";n.forEach((e=>{e.style[t.isHorizontal()?o:"top"]=`${r}px`}))}}u.forEach(((e,r)=>{if("fraction"===s.type&&(e.querySelectorAll(Ve(s.currentClass)).forEach((e=>{e.textContent=s.formatFractionCurrent(i+1)})),e.querySelectorAll(Ve(s.totalClass)).forEach((e=>{e.textContent=s.formatFractionTotal(m)}))),"progressbar"===s.type){let n;n=s.progressbarOpposite?t.isHorizontal()?"vertical":"horizontal":t.isHorizontal()?"horizontal":"vertical";const r=(i+1)/m;let a=1,o=1;"horizontal"===n?a=r:o=r,e.querySelectorAll(Ve(s.progressbarFillClass)).forEach((e=>{e.style.transform=`translate3d(0,0,0) scaleX(${a}) scaleY(${o})`,e.style.transitionDuration=`${t.params.speed}ms`}))}"custom"===s.type&&s.renderCustom?(e.innerHTML=s.renderCustom(t,i+1,m),0===r&&n("paginationRender",e)):(0===r&&n("paginationRender",e),n("paginationUpdate",e)),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](s.lockClass)}))}function m(){const e=t.params.pagination;if(c())return;const s=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length;let i=t.pagination.el;i=l(i);let r="";if("bullets"===e.type){let i=t.params.loop?Math.ceil(s/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&&t.params.freeMode.enabled&&i>s&&(i=s);for(let s=0;s`}"fraction"===e.type&&(r=e.renderFraction?e.renderFraction.call(t,e.currentClass,e.totalClass):` / `),"progressbar"===e.type&&(r=e.renderProgressbar?e.renderProgressbar.call(t,e.progressbarFillClass):``),t.pagination.bullets=[],i.forEach((s=>{"custom"!==e.type&&(s.innerHTML=r||""),"bullets"===e.type&&t.pagination.bullets.push(...s.querySelectorAll(Ve(e.bulletClass)))})),"custom"!==e.type&&n("paginationRender",i[0])}function h(){t.params.pagination=je(t,t.originalParams.pagination,t.params.pagination,{el:"swiper-pagination"});const e=t.params.pagination;if(!e.el)return;let s;"string"==typeof e.el&&t.isElement&&(s=t.el.querySelector(e.el)),s||"string"!=typeof e.el||(s=[...document.querySelectorAll(e.el)]),s||(s=e.el),s&&0!==s.length&&(t.params.uniqueNavElements&&"string"==typeof e.el&&Array.isArray(s)&&s.length>1&&(s=[...t.el.querySelectorAll(e.el)],s.length>1&&(s=s.filter((e=>me(e,".swiper")[0]===t.el))[0])),Array.isArray(s)&&1===s.length&&(s=s[0]),Object.assign(t.pagination,{el:s}),s=l(s),s.forEach((s=>{"bullets"===e.type&&e.clickable&&s.classList.add(...(e.clickableClass||"").split(" ")),s.classList.add(e.modifierClass+e.type),s.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass),"bullets"===e.type&&e.dynamicBullets&&(s.classList.add(`${e.modifierClass}${e.type}-dynamic`),o=0,e.dynamicMainBullets<1&&(e.dynamicMainBullets=1)),"progressbar"===e.type&&e.progressbarOpposite&&s.classList.add(e.progressbarOppositeClass),e.clickable&&s.addEventListener("click",u),t.enabled||s.classList.add(e.lockClass)})))}function f(){const e=t.params.pagination;if(c())return;let s=t.pagination.el;s&&(s=l(s),s.forEach((s=>{s.classList.remove(e.hiddenClass),s.classList.remove(e.modifierClass+e.type),s.classList.remove(t.isHorizontal()?e.horizontalClass:e.verticalClass),e.clickable&&(s.classList.remove(...(e.clickableClass||"").split(" ")),s.removeEventListener("click",u))}))),t.pagination.bullets&&t.pagination.bullets.forEach((t=>t.classList.remove(...e.bulletActiveClass.split(" "))))}i("changeDirection",(()=>{if(!t.pagination||!t.pagination.el)return;const e=t.params.pagination;let{el:s}=t.pagination;s=l(s),s.forEach((s=>{s.classList.remove(e.horizontalClass,e.verticalClass),s.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass)}))})),i("init",(()=>{!1===t.params.pagination.enabled?v():(h(),m(),p())})),i("activeIndexChange",(()=>{void 0===t.snapIndex&&p()})),i("snapIndexChange",(()=>{p()})),i("snapGridLengthChange",(()=>{m(),p()})),i("destroy",(()=>{f()})),i("enable disable",(()=>{let{el:e}=t.pagination;e&&(e=l(e),e.forEach((e=>e.classList[t.enabled?"remove":"add"](t.params.pagination.lockClass))))})),i("lock unlock",(()=>{p()})),i("click",((e,s)=>{const i=s.target,r=l(t.pagination.el);if(t.params.pagination.el&&t.params.pagination.hideOnClick&&r&&r.length>0&&!i.classList.contains(t.params.pagination.bulletClass)){if(t.navigation&&(t.navigation.nextEl&&i===t.navigation.nextEl||t.navigation.prevEl&&i===t.navigation.prevEl))return;const e=r[0].classList.contains(t.params.pagination.hiddenClass);n(!0===e?"paginationShow":"paginationHide"),r.forEach((e=>e.classList.toggle(t.params.pagination.hiddenClass)))}}));const v=()=>{t.el.classList.add(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=l(e),e.forEach((e=>e.classList.add(t.params.pagination.paginationDisabledClass)))),f()};Object.assign(t.pagination,{enable:()=>{t.el.classList.remove(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=l(e),e.forEach((e=>e.classList.remove(t.params.pagination.paginationDisabledClass)))),h(),m(),p()},disable:v,render:m,update:p,init:h,destroy:f})}]);const He={init(){const e=document.querySelectorAll(".swiper");e&&e.forEach((e=>{var t;const s=e.querySelector(".swiper-button-prev"),i=e.querySelector(".swiper-button-next"),n=parseInt(null!==(t=e.dataset.slidesPerView)&&void 0!==t?t:1),r=new Ge(e,{slidesPerView:n,spaceBetween:16,loop:!0,pagination:{el:".swiper-pagination",clickable:!0}});s&&s.addEventListener("click",(e=>{e.preventDefault(),r.slidePrev()})),i&&i.addEventListener("click",(e=>{e.preventDefault(),r.slideNext()}))}))}},Re={init(){[...document.querySelectorAll("[data-toggle-selector]")].map((e=>{const t=e.querySelector(e.dataset.toggleSelector);null!==t&&t.addEventListener("click",(t=>{t.preventDefault(),e.classList.toggle(e.dataset.toggleClass)}))}))}},We=e=>{const{apiUrl:t,namespace:s="heavy/v1"}=heavyApi;return Ue.reduceRight(((e,t)=>s=>t(s,e)),(e=>{let i,n,{url:r,path:a,endpoint:o,headers:l,body:c,data:d,...u}=e;"string"==typeof o&&(i=s.replace(/^\/|\/$/g,""),n=o.replace(/^\//,""),a=n?i+"/"+n:i),"string"==typeof a&&(-1!==t.indexOf("?")&&(a=a.replace("?","&")),a=a.replace(/^\//,""),r=t+a),l={Accept:"application/json, */*;q=0.1",...l},delete l["X-WP-Nonce"],d&&(c=JSON.stringify(d),l["Content-Type"]="application/json");const p={code:"fetch_error",message:"You are probably offline."},m={code:"invalid_json",message:"The response is not a valid JSON response."};return window.fetch(r||a||window.location.href,{...u,headers:l,body:c}).then((e=>Promise.resolve(e).then((e=>{if(e.status>=200&&e.status<300)return e;throw e})).then((e=>{if(204===e.status)return null;if(e&&e.json)return e.json().catch((()=>{throw m}));throw m}))),(()=>{throw p}))}))(e)},Ue=[];We.use=e=>{Ue.unshift(e)};const Ye={init(e,t={}){this.form=e,this.nameInput=this.form.querySelector('[name="name"]'),this.emailInput=this.form.querySelector('[name="email"]'),this.isSubmitting=!1,this.formSubmitButton=this.form.querySelector('[type="submit"]'),this.formCheckboxes=this.form.querySelectorAll('[type="checkbox"]');const{focusInput:s=!0}=t;s&&this.focusNameInput(),this.autoFillData(),this.onFillForm(),this.attachEvents()},async submit(e){const t=this;let s=e?.target,i=!1;if(s||(s=t.form),!s)return i;if(this.isSubmitting)return i;t.setIsSubmitting(!0);const n={name:s.querySelector('[name="name"]')?.value,email:s.querySelector('[name="email"]')?.value,lists:t.getListIdKeys(s)};try{const t=await We({endpoint:"subscribe",method:"POST",data:n});i=this.displayMessage(t),setTimeout((()=>{V({eventName:"sign_up",eventId:i?"subscribe-form":"subscribe-form-error",eventMethod:e?"manual":"auto"})}),0)}catch(e){this.displayErrorMessage(e),i=!1}return t.setIsSubmitting(!1),i},getListIdKeys(e){const t=e.querySelector('[name="list-api-id"]')?.value||"",s=e.querySelector('[name="list-alert-api-id"]')?.value||"",i=[];return e.querySelector('[name="list-news"]')?.checked&&i.push(t),e.querySelector('[name="list-alerts"]')?.checked&&i.push(s),i},attachEvents(){const e=this;e.form.addEventListener("submit",(t=>{t.preventDefault(),e.submit(t)}))},focusNameInput(){const e=this;e.nameInput&&setTimeout((()=>e.nameInput.focus()),0)},setIsSubmitting(e){const t=this;if(this.isSubmitting=e,!t.form)return;const s=t.form.querySelector(".c-subscribe-form__submit");e?(t.form.classList.add("is-submitting"),s.setAttribute("disabled","disabled")):(t.form.classList.remove("is-submitting"),s.removeAttribute("disabled"))},displayErrorMessage(e){self=this;const t=this.form.querySelector(".c-subscribe-form__message");t&&(t.classList.remove("is-success"),t.classList.add("is-error"),t.textContent=heavySubscribe.error+" ("+parseInt(e.status)+")",$.show(heavySubscribe.error,"error"))},displayMessage({response:{code:e},body:t}){self=this;const s=this.form.querySelector(".c-subscribe-form__message");let i="",n=!1;if(s){if(s.classList.remove("is-success"),s.classList.remove("is-error"),s.textContent="",201===e)i=heavySubscribe.success,s.classList.add("is-success"),document.dispatchEvent(new CustomEvent("heavy:subscribed")),n=!0;else{const e=JSON.parse(t);s.classList.add("is-error"),i=e.Message}return $.show(i,n?"success":"error"),s.textContent=i,n}},autoFillData(){const e=this,t=document.cookie.split("; ").find((e=>e.startsWith("fp.user=")));let s,i,n;if(s=t?JSON.parse(t.substring(8)):null,i=s?.user_name,n=s?.user_email,!i){const e=localStorage.getItem("fp.user");e&&(s=JSON.parse(e),i=s?.user_name,n=s?.user_email)}i&&(e.nameInput.value=i),n&&(e.emailInput.value=n),e.formSubmitButton.disabled=!e.filledInForm()},filledInForm(){const e=this;let t=!1,s=!1;return 0===e.formCheckboxes.length&&""!==e.emailInput.value||(e.formCheckboxes.forEach((e=>{e.checked&&(s=!0)})),s&&""!==e.emailInput.value&&(t=!0),t)},onFillForm(){const e=this;e.emailInput.addEventListener("input",(()=>{e.formSubmitButton.disabled=!e.filledInForm()})),e.formCheckboxes.forEach((t=>{t.addEventListener("change",(()=>{e.formSubmitButton.disabled=!e.filledInForm()}))}))}},Xe={init(){const e=document.querySelectorAll(".disabled-script"),t={rootMargin:"500px"};e.forEach((e=>{new IntersectionObserver(this.enableScripts,t).observe(e)}))},enableScripts(e,t){e.forEach((function(e){if(e.isIntersecting){const s=e.target,i=document.createElement("script");i.textContent=s.innerHTML,s.parentNode.replaceChild(i,s),t.unobserve(s)}}))}},Je={selectors:{table:".c-heavy-sports-table__table.is-expandable",button:".c-btn--table-expand"},init(){document.addEventListener("heavy:overlayOpen",(e=>{const{overlay:t}=e.detail;t.querySelectorAll(Je.selectors.table).forEach((e=>{Je.setup(e)}))}));for(const e of window.heavyTables||[]){const t=document.getElementById(e);t&&Je.setup(t)}(0,i.O)(Je.selectors.button,"click",(e=>{const t=e.target;t.textContent=t.dataset.loadingText,setTimeout((()=>{Je.expand(t.parentNode.querySelector(Je.selectors.table),5),t.remove()}),100)}))},setup(e){const t=e.querySelector("tbody tr").querySelectorAll("td");let s=0;Array.from(t).slice(0,5).forEach(((t,i)=>{s+=t.offsetWidth,e.style.setProperty(`--columns-${i+1}-width`,`${s}px`)}));const i=e.querySelector("tbody").rows.length,n=parseInt(getComputedStyle(e).getPropertyValue("--count--rows-visible"));e.dataset.totalVisibleRows=n,i<=n?e.parentNode.querySelector(Je.selectors.button).remove():e.style.height=`${e.offsetHeight}px`,e.classList.add("initialised")},expand(e,t=1){if(!e)return;const s=e.querySelector("tbody"),i=e.offsetHeight,n=parseInt(e.dataset.totalVisibleRows),r=s.querySelector("tr"),a=s.rows.length-n;t=Math.min(t,a);const o=r.offsetHeight*t;e.style.height=`${i+o}px`,e.style.overflowY="scroll"}},Ke=Je,Qe=class{static slug="";run(){}getState(){return{}}},Ze=class extends Qe{static slug="comment";run(){const e=new CustomEvent("showOverlay",{detail:"comments-overlay"});window.dispatchEvent(e);const t=document.querySelector("#comments-title");t instanceof Element&&t.scrollIntoView()}},et=class extends Qe{static slug="contest";run(){console.log("ContestIntent")}},tt={triggerSelector:'[data-overlay-target^="subscribe-form"]',modalsSelector:".c-subscribe-form",overlaySelector:".c-subscribe-form__overlay",init(){if(!document.querySelector(tt.modalsSelector))return;const e=window.location.hash.substring(1);if(e.startsWith("subscribe-form")&&!at.isPending(nt)){const t=document.getElementById(e)||document.querySelector(tt.modalsSelector);tt.show({modal:t})}(0,i.O)(tt.triggerSelector,"click",tt.handleTriggerClick),setTimeout((()=>{const e=document.querySelectorAll(tt.triggerSelector);requestAnimationFrame((()=>{e.forEach((e=>{e.classList.add("is-enabled")}))}))}),0)},handleTriggerClick(e){const t=e.target.closest(".c-subscribe-modal__trigger");if(!t)return;const s=t.getAttribute("data-overlay-target")||"subscribe-form",i={modal:document.getElementById(s)||document.querySelector(tt.modalsSelector),event:e};tt.show(i)},async show({modal:e,event:t=null}){const s=this;if(!e)return;document.documentElement.classList.add("is-critical-overlay-open"),e.classList.add("is-active"),s.modal=e,s.overlay=e.querySelector(tt.overlaySelector),s.closeTrigger=e.querySelector(".l-drawer__close"),s.formSubmitButton=e.querySelector(".c-subscribe-form__submit"),s.attachEvents(),await(0,i.y)(),window.history.replaceState({overlay:!0},"",window.location.pathname+"#"+e.id);const n=new CustomEvent("heavy:modalOpen",{detail:{isModalOpen:!0,modal:e}});document.dispatchEvent(n),setTimeout((()=>{V({eventName:"overlay_open",eventId:"subscribe-form",eventMethod:t?"click":"auto"})}),0)},async close(){const e=this;e.modal&&(document.documentElement.classList.remove("is-critical-overlay-open"),e.modal.classList.remove("is-active"),await(0,i.y)(),e.countDown&&(clearTimeout(e.countDown),e.countDown=null),e.detachEvents(),window.history.replaceState({overlay:!1},"",window.location.pathname))},attachEvents(){const e=this;e.boundClose=e.close.bind(e),e.boundKeyUp=function(t){"Escape"===t.key&&e.close()},e.closeTrigger.addEventListener("click",e.boundClose),e.overlay.addEventListener("click",e.boundClose),document.addEventListener("heavy:subscribed",e.initCountDown.bind(e)),document.addEventListener("keyup",e.boundKeyUp)},detachEvents(){const e=this;e.closeTrigger.removeEventListener("click",e.boundClose),e.overlay.removeEventListener("click",e.boundClose),document.removeEventListener("keyup",e.boundKeyUp)},attachTriggerEvents(e){const t=this,s=e.detail.overlay.querySelector(".c-subscribe-modal__trigger");s&&s.addEventListener("click",(()=>t.show()))},initCountDown(){const e=this;e.countDown=setTimeout((()=>e.close()),3e3)},filledInForm(){let e=!1,t=!1;return this.formCheckboxes.forEach((e=>{e.checked&&(t=!0)})),t&&""!==this.emailInput.value&&(e=!0),e},onFillForm(){const e=this;e.emailInput.addEventListener("input",(()=>{e.formSubmitButton.disabled=!e.filledInForm()})),e.formCheckboxes.forEach((t=>{t.addEventListener("change",(()=>{e.formSubmitButton.disabled=!e.filledInForm()}))}))}},st=tt;class it extends Qe{static slug="subscribe";static formSelector=".c-subscribe-form__form";getState(){const e=window.location.hash.substring(1);let t=null,s=document.getElementById(e);const i=e.startsWith("subscribe-form");return!s&&i&&(s=document.querySelector(st.modalsSelector)),s&&(t=s.querySelector(it.formSelector)),t?{ids:[...t.querySelectorAll(".c-subscribe-form__optin [type=checkbox]")].map((e=>{var t;return e.checked&&null!==(t=e.previousElementSibling?.value)&&void 0!==t?t:null})).filter((e=>null!==e))}:{}}async run(e){const{ids:t=[]}=e,s=window.location.hash.substring(1);let i=null,n=document.getElementById(s);const r=s.startsWith("subscribe-form");!n&&r&&(n=document.querySelector(st.modalsSelector)),n&&(i=n.querySelector(it.formSelector),i&&([...i.querySelectorAll(".c-subscribe-form__optin [type=checkbox]")].forEach((e=>{var s;const i=null!==(s=e.previousElementSibling?.value)&&void 0!==s?s:null;e.checked=t.includes(i)})),Ye.init(i),Ye.autoFillData(),await Ye.submit()||(r?st.show({modal:n}):R.showOverlay(n))))}}const nt=it,rt={intentField:"heavy-intent",intentDataField:"heavy-intent-data",intentFetchCounter:"heavy-intent-fetch-counter",init(){rt.setIntentListeners(),document.addEventListener("heavy:logged-in",(()=>{rt.runIntent()}))},setIntentListeners(){document.querySelectorAll("[data-intent]").forEach((e=>{e.addEventListener("click",(()=>{let t=e.dataset.intent;var s;t=t.replace(/[^a-z-]/g,""),t&&(rt.setIntent(t),rt.setIntentData(null!==(s=rt.getIntentObject(t)?.getState?.())&&void 0!==s?s:""))}))}))},runIntent(){var e;const t=null!==(e=rt.getIntent())&&void 0!==e?e:"";if(!t)return;const s=rt.getIntentData();rt.getIntentObject(t)?.run(s),setTimeout((()=>{V({eventName:"login",eventMethod:t})}),0),rt.clearIntent()},clearIntent(){localStorage.removeItem(rt.intentField),localStorage.removeItem(rt.intentDataField),localStorage.removeItem(rt.intentFetchCounter)},getIntentObject(e){switch(e){case"comment":return new Ze;case"subscribe":return new nt;case"contest":return new et;case"login":case"adfree":break;default:console.error("Unknown intent:",e)}},isPending:e=>rt.getIntent()===e.slug,getIntent(){var e;const t=null!==(e=localStorage.getItem(rt.intentField))&&void 0!==e?e:"",s=parseInt(localStorage.getItem(rt.intentFetchCounter)||"0",10)+1;return localStorage.setItem(rt.intentFetchCounter,s),s>6&&rt.clearIntent(),t},setIntent(e){localStorage.setItem(rt.intentField,e)},getIntentData(){var e;return JSON.parse(null!==(e=localStorage.getItem(rt.intentDataField))&&void 0!==e?e:"{}")},setIntentData(e){localStorage.setItem(rt.intentDataField,JSON.stringify(e))}},at=rt;async function ot(){if(at.init(),setTimeout(u.init,0),setTimeout(t.init,0),setTimeout(m.init.bind(m),0),setTimeout(O.init.bind(O),0),setTimeout(v,0),0{s.init()}),1e3),setTimeout(w.Z.init,0),k.available("IntersectionObserver").then((()=>{setTimeout((()=>I.init("[data-lazy-load]")),0),setTimeout(y.init.bind(y),0),setTimeout(p.init,0),setTimeout((()=>L.init('#comments-loading, #comments-loaded, .fb-comments, .fb-group, .fb-comment-embed, .fb-post, .fb-video, .fb-follow, .fb-like, .fb-like-box, .fb-page, .fb-quote, .fb-save, .fb-send, .fb-share-button, [href*="facebook.com"]:not(a)')),0),setTimeout((()=>{M.init({scribd:".scribd_iframe_embed",ddhq:".ddhq_embed"})}),0),setTimeout(Xe.init.bind(Xe),0)})),document.addEventListener("heavy:overlayOpen",(e=>{0y.init(".c-overlay-infinite-scroll")),0)}));const e=".c-subscribe-form__form";document.querySelectorAll(e).forEach((e=>Ye.init(e))),document.addEventListener("heavy:overlayOpen",(t=>{const{overlay:s}=t.detail;s.querySelectorAll(e).forEach((e=>Ye.init(e,{focusInput:!1})))})),document.addEventListener("heavy:modalOpen",(t=>{const{modal:s}=t.detail;s.querySelectorAll(e).forEach((e=>Ye.init(e)))})),"subscribe"===at.getIntent()&&$.show("You will be signed up to the newsletter","loading")}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",ot):ot()})()})();