@20minutes/hela 2.17.2 → 2.17.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +974 -954
- package/dist/index.umd.cjs +1 -1
- package/dist/js/scripts.es.js +435 -368
- package/dist/js/scripts.umd.cjs +1 -1
- package/dist/scss/abstracts/mixins/_index.scss +1 -0
- package/dist/scss/abstracts/mixins/_slider.scss +24 -0
- package/dist/scss/abstracts/variables/_token-variables.scss +1 -1
- package/dist/src/assets/scripts/scrollToTopComment.d.ts +1 -0
- package/dist/src/components/atoms/Avatar/Avatar.d.ts +1 -1
- package/dist/src/components/atoms/Avatar/Avatar.stories.d.ts +2 -0
- package/dist/src/components/atoms/Button/Button.d.ts +3 -1
- package/dist/src/components/atoms/Button/Button.stories.d.ts +1 -0
- package/dist/src/components/atoms/ScrollToTopButton/ScrollToTopButton.stories.d.ts +2 -0
- package/dist/src/components/molecules/Comment/Comment.d.ts +2 -1
- package/dist/src/components/molecules/Comment/Comment.stories.d.ts +1 -0
- package/dist/src/components/molecules/MediaLink/MediaLink.d.ts +1 -0
- package/dist/src/components/organisms/Elections/ElectionsResult.stories.d.ts +1 -1
- package/dist/src/constants/politicalPartiesColors.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/js/scripts.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(T,z){typeof exports=="object"&&typeof module<"u"?z(exports):typeof define=="function"&&define.amd?define(["exports"],z):(T=typeof globalThis<"u"?globalThis:T||self,z(T.scripts={}))})(this,(function(T){"use strict";const z=()=>/Android/i.test(navigator.userAgent),Bt=typeof window<"u"&&navigator.userAgent.toLowerCase().includes("firefox"),Ft=()=>{const s=document.getElementById("js-download-band");s&&z()&&s.setAttribute("href","https://app.adjust.com/15shf6wg?campaign=Bandeau_1&deep_link=20minutes%3A%2F%2Fhome")},Zt=()=>{const s=document.querySelector("#js-election-selector");s&&s.addEventListener("change",t=>{window.location.replace(t.target.value)})},kt=()=>{const s=document.querySelector(".c-search-banner");if(!s)return;const t=document.getElementById("js-search-banner-expand-button");if(t instanceof HTMLButtonElement){const e=s.querySelector("[aria-expanded]"),i=s.querySelector("[aria-hidden]");if(!e||!i)return;t.addEventListener("click",()=>{e.getAttribute("aria-expanded")==="true"?(e.setAttribute("aria-expanded","false"),i.setAttribute("aria-hidden","true")):(e.setAttribute("aria-expanded","true"),i.setAttribute("aria-hidden","false"))})}},qt=[{text:"Paris",_index:"town_1717424751904",_id:"75056",_score:1,_source:{output:"Paris (75000)",url:"/elections/resultats/paris/paris-75000"}},{text:"Paris 10ème Arrondissement",_index:"town_1717424751904",_id:"75056AR10",_score:1,_source:{output:"Paris 10ème Arrondissement (75010)",url:"/elections/resultats/paris/paris-75010"}},{text:"Paris 11ème Arrondissement",_index:"town_1717424751904",_id:"75056AR11",_score:1,_source:{output:"Paris 11ème Arrondissement (75011)",url:"/elections/resultats/paris/paris-75011"}}],Nt=(s,t,e,i,n,o)=>{const r=document.getElementById(s);if(!r)return;const a=r.dataset.storybook,l=r.querySelector(`#${s}-search`),c=l?.getAttribute("data-api-url"),d=r.querySelector(".c-autocomplete__menu");if(!l||!d||!c)return;const h=r.querySelector(".c-autocomplete__input-spinner"),u=l.getAttribute("data-trigger-message"),p=async g=>{try{let y;return a&&t.includes("20minutes.fr")?y=qt:y=await(await fetch(`${c}${e}${encodeURIComponent(g)}`)).json(),o?y[o]:y}catch(y){return console.error("Error fetching autocomplete results:",y),[]}},f=(g,y)=>{const b=document.createElement("li");b.id=`/${g}`,b.textContent=y,b.addEventListener("click",()=>{l instanceof HTMLInputElement&&(l.value=y,d.classList.add("u-hidden"))}),d.appendChild(b)},m=()=>{h?.classList.toggle("u-hidden")},_=()=>{const g=document.createElement("li");g.textContent=u,d.appendChild(g)},S=async g=>{m(),d.classList.remove("u-hidden");const y=await p(g);d.innerHTML="",y.length===0&&d.classList.add("u-hidden"),y.forEach(b=>{f(b[i],b[n])}),m()},L=g=>{if(!(g.target instanceof HTMLInputElement))return;const y=g.target.value;d.classList.remove("u-hidden"),y.length>=3?S(y):(d.innerHTML="",_())};l.addEventListener("input",L),l.addEventListener("focusout",()=>{setTimeout(()=>d.classList.add("u-hidden"),300)}),l.addEventListener("focusin",()=>{d.childElementCount>0&&d.classList.remove("u-hidden")})},Ht=()=>{const s=document.querySelector(".js-content-header"),t=document.querySelector(".js-limit-scroll-close-article-btn"),e=document.querySelector(".js-close-article-btn"),i=document.querySelector(".c-header-mobile"),n=i instanceof HTMLElement?i.offsetHeight:0;if(s&&t&&e){const o=new IntersectionObserver(()=>{const r=e.classList,a=r.contains("u-hidden"),l=s.getBoundingClientRect().bottom-n,c=t.getBoundingClientRect().bottom-n;a&&l<=0&&c>=0&&r.remove("u-hidden"),!a&&(l>=0||c<=0)&&r.add("u-hidden")},{root:document,rootMargin:`-${n}px 0px 0px 0px`});o.observe(s),o.observe(t)}},Wt=s=>{s.stopImmediatePropagation(),s.preventDefault();const t=s.currentTarget;if(t instanceof HTMLButtonElement){const i=t.parentElement?.querySelector(`#${t.getAttribute("aria-controls")}`);t.getAttribute("aria-expanded")==="true"?(t.setAttribute("aria-expanded","false"),i?.setAttribute("aria-hidden","true")):(t.setAttribute("aria-expanded","true"),i?.setAttribute("aria-hidden","false"))}},Vt=(s=document.querySelector(".js-collapse__button"))=>{s&&document.querySelectorAll(".c-collapse__button").forEach(e=>{e.addEventListener("click",i=>{Wt(i)})})},j=(s,t)=>{const e=document.querySelector(`#${t}`);if(e){const i=e.querySelector(".js-countdown-days"),n=e.querySelector(".js-countdown-hours"),o=e.querySelector(".js-countdown-minutes"),r=e.querySelector(".js-countdown-seconds");if(!i||!n||!o||!r)return;window.counters={paralympicsGames:"2024-08-28 20:00:00",winterOlympicsGames:"2026-02-06 20:00:00",eurovision:"2026-05-16 21:00:00",worldFoot2026:"2026-06-11 15:00:00"};const a=window.counters[s],l=new Date(a).getTime(),c=setInterval(()=>{const d=new Date().getTime(),h=l-d;if(h<=0)clearInterval(c);else{const u=Math.floor(h/864e5),p=Math.floor(h%(1e3*60*60*24)/(1e3*60*60)),f=Math.floor(h%(1e3*60*60)/(1e3*60)),m=Math.floor(h%(1e3*60)/1e3);i.innerHTML=u.toString(),n.innerHTML=p.toString(),o.innerHTML=f.toString(),r.innerHTML=m.toString()}},1e3)}},jt=s=>{const t=s.getBBox(),e=t.width/20;return[t.x-e,t.y-e,t.width+e*2,t.height+e*2].join(" ")},Gt=()=>{const s=document.querySelector(".c-map-districts-container"),t=document.querySelector(".c-map-districts");if(!s||!t)return;const e=document.querySelector(".c-map-districts-container__description"),i=document.querySelector(".c-map-districts-container__department"),n=document.querySelector(".c-map-districts-container__unzoom-button");let o=t;const r=t.getAttribute("viewBox"),a=(f,m)=>f.matches?.call(f,m),l=(f,m,_=".c-map-districts__zoomable:not(.js-selected-area)")=>{if(!f)return;let S,L=f.parentElement;for(;L instanceof SVGGraphicsElement&&L!==m;)a(L,_)&&(S=L),L=L.parentElement;return S},c=(f,m,_)=>{if(!f)return;let S=f.parentElement;for(;S instanceof SVGGraphicsElement&&S!==_;){if(m===S)return!0;S=S.parentElement}return _===m},d=(f,m)=>{if(m&&n&&e){s.classList.remove("c-map-districts-container--department-view"),e.classList.remove("u-hidden"),i?.classList.add("u-hidden"),n.classList.add("u-hidden"),m!==r&&(e.classList.add("u-hidden"),n.classList.remove("u-hidden")),o.classList.remove("js-selected-area"),o=f;const _=o.getAttribute("data-info");i&&_&&(s.classList.add("c-map-districts-container--department-view"),i.classList.remove("u-hidden"),i.innerHTML=_),o.classList.add("js-selected-area"),t.setAttribute("viewBox",m)}},h=f=>{f.stopPropagation();const m=f.currentTarget;if(o&&t&&m instanceof SVGGraphicsElement){if(m===o)return;if(f.preventDefault(),o!==t&&!c(m,o,t)){d(t,r);return}const _=l(m,o);d(_||m,jt(_||m))}},u=()=>{t&&o!==t&&d(t,r)};t.addEventListener("click",u),n&&n.addEventListener("click",u),document.querySelectorAll(".c-map-districts__zoomable").forEach(f=>{f.addEventListener("click",m=>h(m))})},Ut=()=>{const s=document.getElementById("elections-form-search"),t=document.querySelector(".c-search-form__autocomplete");if(!s||!t)return;const e=o=>{t.classList.remove("u-hidden");const r=t.querySelectorAll("li"),a=[];return r.forEach(l=>{const c=l.querySelector("a");c&&c.innerHTML.toLowerCase().includes(o.toLowerCase())&&a.push(l.innerHTML)}),a},i=o=>{t.innerHTML+=`<li>${o}</li>`},n=({target:o})=>{if(!(o instanceof HTMLInputElement))return;const r=o.value;if(t.classList.add("u-hidden"),r.length>=3){const a=e(r);t.innerHTML="",a.length===0&&t.classList.add("u-hidden"),a.forEach(l=>{i(l)})}};s.addEventListener("input",n),s.addEventListener("focusout",()=>{setTimeout(()=>t.classList.add("u-hidden"),300)}),s.addEventListener("focusin",()=>{t.childElementCount>0&&t.classList.remove("u-hidden")})},Kt=(s,t)=>{s.setAttribute("aria-expanded","true"),s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach(n=>n.classList.remove(t));const i=s.querySelector(".js-ellipsis-button__label");i instanceof HTMLSpanElement&&(i.innerHTML="Voir moins")},Xt=(s,t)=>{s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach(n=>n.classList.add(t)),s.setAttribute("aria-expanded","false");const i=s.querySelector(".js-ellipsis-button__label");i instanceof HTMLSpanElement&&(i.innerHTML="Voir plus")},Yt=(s,t)=>{const e=s.currentTarget;if(s.preventDefault(),e instanceof HTMLButtonElement){const i=t?"u-ellipsis-multiline":"u-ellipsis";return e.getAttribute("aria-expanded")==="true"?Xt(e,i):Kt(e,i)}return null},Jt=(s=document.querySelector(".js-ellipsis-button"))=>{s&&document.querySelectorAll(".js-ellipsis-button").forEach(e=>{const i=e.getAttribute("data-multiple")==="true";e.addEventListener("click",n=>Yt(n,i))})},Qt=s=>{s.setAttribute("aria-expanded","true"),s.parentNode?.querySelectorAll(".js-expand-target")?.forEach(i=>i.setAttribute("aria-hidden","false"));const e=s.querySelector(".js-expand-button__label");e instanceof HTMLSpanElement&&(e.innerHTML="Voir moins")},te=s=>{s.parentNode?.querySelectorAll(".js-expand-target")?.forEach(i=>i.setAttribute("aria-hidden","true")),s.setAttribute("aria-expanded","false");const e=s.querySelector(".js-expand-button__label");e instanceof HTMLSpanElement&&(e.innerHTML="Voir plus")},ee=s=>{const t=s.currentTarget;return s.preventDefault(),t instanceof HTMLButtonElement?t.getAttribute("aria-expanded")==="true"?te(t):Qt(t):null},ie=s=>{const t=s.parentNode?.querySelector(".js-expand-target");return!t||t.classList.contains("c-elections-result__members")?!1:(t.textContent?.trim().length??0)<255},se=(s=document.querySelector(".js-expand-button"))=>{s&&document.querySelectorAll(".js-expand-button").forEach(e=>{ie(e)?(e.style.display="none",e.parentNode?.querySelectorAll(".js-expand-target")?.forEach(n=>n.setAttribute("aria-hidden","false"))):e.addEventListener("click",ee)})},ne=()=>{const s=document.querySelector(".js-game-alert");Bt&&s&&s.classList.remove("u-hidden")},oe=()=>{const s=document.querySelectorAll(".js-half-donut-result");for(const t of Array.from(s)){const e=t.querySelector(".c-half-donut"),i=t.querySelector(".c-legend");if(!e||!i)return;i.querySelectorAll("[data-color]").forEach(n=>{const o=n.getAttribute("data-color"),r=e.querySelector(`.c-half-donut__zone--${o}`);r?.addEventListener("mouseenter",()=>{n.classList.add("c-legend__item--is-hovered"),e.classList.add("c-half-donut--is-hovered"),i.classList.add("c-legend--is-hovered")}),r?.addEventListener("mouseleave",()=>{n.classList.remove("c-legend__item--is-hovered"),e.classList.remove("c-half-donut--is-hovered"),i.classList.remove("c-legend--is-hovered")}),n.addEventListener("mouseenter",()=>{r?.classList.add("c-half-donut__zone--is-hovered"),i.classList.add("c-legend--is-hovered"),e.classList.add("c-half-donut--is-hovered")}),n.addEventListener("mouseleave",()=>{r?.classList.remove("c-half-donut__zone--is-hovered"),i.classList.remove("c-legend--is-hovered"),e.classList.remove("c-half-donut--is-hovered")})})}},re=()=>{const s=document.querySelector(".c-image-slider__container");if(!s)return()=>{};const t=document.querySelectorAll(".c-image-slider__slide"),e=document.querySelector(".c-image-slider__button-container--previous"),i=document.querySelector(".c-image-slider__button-container--next"),n=document.querySelectorAll(".c-image-slider__indicator");let o=0,r=null,a=!1;const l=()=>{n.forEach((g,y)=>{g.classList.toggle("c-image-slider__indicator--is-active",y===o)})},c=(g=!0)=>{if(!(s instanceof HTMLElement))return;s.style.transition=g?"transform 0.3s ease":"none";const y=-o*100;s.style.transform=`translateX(${y}%)`,l()},d=g=>{o=g,c(!0)},h=()=>{r&&clearInterval(r),r=setInterval(()=>{if(!a){const g=(o+1)%t.length;d(g)}},4e3)},u=()=>{r&&(clearInterval(r),r=null)},p=()=>{a=!0,u()},f=()=>{a=!1,h()};e?.addEventListener("click",()=>{p();const g=(o-1+t.length)%t.length;d(g),setTimeout(f,5e3)}),i?.addEventListener("click",()=>{p();const g=(o+1)%t.length;d(g),setTimeout(f,5e3)}),n.forEach((g,y)=>{g.addEventListener("click",()=>{p(),d(y),setTimeout(f,5e3)})});let m=0,_=0,S=!1;return s.addEventListener("touchstart",g=>{s instanceof HTMLElement&&(p(),m=g.touches[0].clientX,_=m,S=!0,s.style.transition="none")}),s.addEventListener("touchmove",g=>{if(!(s instanceof HTMLElement))return;_=g.touches[0].clientX;const y=_-m,b=-o*window.innerWidth+y;s.style.transform=`translateX(${b}px)`}),s.addEventListener("touchend",()=>{if(!S)return;S=!1;const g=_-m;Math.abs(g)>75&&(g<0?o=Math.min(o+1,t.length-1):g>0&&(o=Math.max(o-1,0))),c(!0),setTimeout(f,5e3)}),c(!0),h(),()=>{u()}},ae=s=>{s.stopImmediatePropagation(),s.preventDefault();const t=s.currentTarget,e=document.getElementById("info-button-content");!(t instanceof HTMLButtonElement)||!e||(t.getAttribute("aria-expanded")==="true"?(t.setAttribute("aria-expanded","false"),e.setAttribute("aria-hidden","true")):(t.setAttribute("aria-expanded","true"),e.setAttribute("aria-hidden","false")))},le=()=>{const s=document.querySelector(".js-info-banner__button");s instanceof HTMLButtonElement&&s.addEventListener("click",ae)},v={inert:":not([inert]):not([inert] *)",negTabIndex:':not([tabindex^="-"])',disabled:":not(:disabled)"};var ce=[`a[href]${v.inert}${v.negTabIndex}`,`area[href]${v.inert}${v.negTabIndex}`,`input:not([type="hidden"]):not([type="radio"])${v.inert}${v.negTabIndex}${v.disabled}`,`input[type="radio"]${v.inert}${v.negTabIndex}${v.disabled}`,`select${v.inert}${v.negTabIndex}${v.disabled}`,`textarea${v.inert}${v.negTabIndex}${v.disabled}`,`button${v.inert}${v.negTabIndex}${v.disabled}`,`details${v.inert} > summary:first-of-type${v.negTabIndex}`,`iframe${v.inert}${v.negTabIndex}`,`audio[controls]${v.inert}${v.negTabIndex}`,`video[controls]${v.inert}${v.negTabIndex}`,`[contenteditable]${v.inert}${v.negTabIndex}`,`[tabindex]${v.inert}${v.negTabIndex}`];function st(s){(s.querySelector("[autofocus]")||s).focus()}function de(s){const t=M(s,!0),e=t?M(s,!1)||t:null;return[t,e]}function M(s,t){if(t&&rt(s))return s;if(ue(s))if(s.shadowRoot){let e=nt(s.shadowRoot,t);for(;e;){const i=M(e,t);if(i)return i;e=ot(e,t)}}else if(s.localName==="slot"){const e=s.assignedElements({flatten:!0});t||e.reverse();for(const i of e){const n=M(i,t);if(n)return n}}else{let e=nt(s,t);for(;e;){const i=M(e,t);if(i)return i;e=ot(e,t)}}return!t&&rt(s)?s:null}function nt(s,t){return t?s.firstElementChild:s.lastElementChild}function ot(s,t){return t?s.nextElementSibling:s.previousElementSibling}const he=s=>s.matches("details:not([open]) *")&&!s.matches("details>summary:first-of-type")?!0:!(s.offsetWidth||s.offsetHeight||s.getClientRects().length),rt=s=>s.shadowRoot?.delegatesFocus?!1:s.matches(ce.join(","))&&!he(s);function ue(s){return s.shadowRoot&&s.getAttribute("tabindex")==="-1"?!1:!s.matches(":disabled,[hidden],[inert]")}function D(s=document){const t=s.activeElement;return t?t.shadowRoot?D(t.shadowRoot)||document.activeElement:t:null}function pe(s,t){const[e,i]=de(s);if(!e)return t.preventDefault();const n=D();t.shiftKey&&n===e?(i.focus(),t.preventDefault()):!t.shiftKey&&n===i&&(e.focus(),t.preventDefault())}function I(s,t){function e(i){if(!i||i===document||i===window)return null;const n=at(i);return n&&(i=n),i.closest(s)||e(i.getRootNode().host)}return e(t)}function at(s){return s.assignedSlot||(s.parentNode?at(s.parentNode):null)}const O="data-a11y-dialog";class lt{$el;id;previouslyFocused;shown;constructor(t){this.$el=t,this.id=this.$el.getAttribute(O)||this.$el.id,this.previouslyFocused=null,this.shown=!1,this.maintainFocus=this.maintainFocus.bind(this),this.bindKeypress=this.bindKeypress.bind(this),this.handleTriggerClicks=this.handleTriggerClicks.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.$el.setAttribute("aria-hidden","true"),this.$el.setAttribute("aria-modal","true"),this.$el.setAttribute("tabindex","-1"),this.$el.hasAttribute("role")||this.$el.setAttribute("role","dialog"),document.addEventListener("click",this.handleTriggerClicks,!0)}destroy(){return this.fire("destroy").defaultPrevented?this:(this.hide(),document.removeEventListener("click",this.handleTriggerClicks,!0),this.$el.replaceWith(this.$el.cloneNode(!0)),this)}show(t){return this.shown?this:this.fire("show",t).defaultPrevented?this:(this.shown=!0,this.$el.removeAttribute("aria-hidden"),this.previouslyFocused=D(),this.previouslyFocused?.tagName==="BODY"&&t?.target&&(this.previouslyFocused=t.target),t?.type==="focus"?this.maintainFocus():st(this.$el),document.body.addEventListener("focus",this.maintainFocus,!0),this.$el.addEventListener("keydown",this.bindKeypress,!0),this)}hide(t){return this.shown?this.fire("hide",t).defaultPrevented?this:(this.shown=!1,this.$el.setAttribute("aria-hidden","true"),document.body.removeEventListener("focus",this.maintainFocus,!0),this.$el.removeEventListener("keydown",this.bindKeypress,!0),this.previouslyFocused?.focus?.(),this):this}on(t,e,i){return this.$el.addEventListener(t,e,i),this}off(t,e,i){return this.$el.removeEventListener(t,e,i),this}fire(t,e){const i=new CustomEvent(t,{detail:e,cancelable:!0});return this.$el.dispatchEvent(i),i}handleTriggerClicks(t){const e=t.composedPath()[0],i=I(`[${O}-show="${this.id}"]`,e),n=I(`[${O}-hide="${this.id}"]`,e),o=I(`[${O}-hide]`,e)&&I('[aria-modal="true"]',e)===this.$el;i&&this.show(t),(n||o)&&this.hide(t)}bindKeypress(t){if(I('[aria-modal="true"]',D())!==this.$el)return;let e=!1;try{e=!!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open')}catch{}t.key==="Escape"&&this.$el.getAttribute("role")!=="alertdialog"&&!e&&(t.preventDefault(),this.hide(t)),t.key==="Tab"&&pe(this.$el,t)}maintainFocus(){const t=D();I(`[aria-modal="true"], [${O}-ignore-focus-trap]`,t)||st(this.$el)}}function ct(){for(const s of document.querySelectorAll("[data-a11y-dialog]"))new lt(s)}typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ct):ct());const me=()=>document.querySelectorAll(".js-modal").forEach(s=>{if(!(s instanceof HTMLElement))return;const t=new lt(s);if(s.id==="dialog-menu"){const e=document.querySelectorAll("button[data-a11y-dialog-show='dialog-menu']"),i=document.querySelectorAll("button[data-a11y-dialog-hide='dialog-menu']");e.length>0&&i.length>0&&(t.on("show",()=>{e.forEach(n=>n.classList.add("u-hidden")),i.forEach(n=>n.classList.remove("u-hidden"))}),t.on("hide",()=>{e.forEach(n=>n.classList.remove("u-hidden")),i.forEach(n=>n.classList.add("u-hidden"))}))}t.on("show",()=>{document.body.classList.add("noscroll")}).on("hide",()=>{document.body.classList.remove("noscroll")})}),dt="68px",ht="50px",G=({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})=>{const n=s.classList.contains("c-breadcrumb--is-small")?ht:dt;e.classList.contains("o-nav-button--visible")&&!i.classList.contains("o-nav-button--visible")&&(s.style.paddingRight=n,s.style.paddingLeft=""),i.classList.contains("o-nav-button--visible")&&(s.style.paddingLeft=n,e.classList.contains("o-nav-button--visible")&&(s.style.paddingRight=n),e.classList.contains("o-nav-button--visible")||(s.style.paddingRight="")),!e.classList.contains("o-nav-button--visible")&&!i.classList.contains("o-nav-button--visible")&&(t.style.width="",s.style.paddingRight="")},fe=({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})=>{const n=t.scrollLeft>0,o=t.scrollLeft+(t.clientWidth+.5)<t.scrollWidth;n&&o?(e.classList?.add("o-nav-button--visible"),i.classList?.add("o-nav-button--visible")):n?(e.classList?.remove("o-nav-button--visible"),i.classList?.add("o-nav-button--visible")):o?(e.classList?.add("o-nav-button--visible"),i.classList?.remove("o-nav-button--visible")):(e.classList?.remove("o-nav-button--visible"),i.classList?.remove("o-nav-button--visible")),e.classList.contains("c-slider__button-container--has-space-around")&&i.classList.contains("c-slider__button-container--has-space-around")&&G({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})},ge=({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i,sliderVariant:n})=>{if(t){const a=t.closest(".js-overview-bar-container")?.querySelector(".c-stepper")?.querySelectorAll(".c-stepper__item");if(a){const l=Array.from(a).findIndex(c=>c.classList.contains("c-stepper__item--loading"));if(l<0)a[0].classList.add("c-stepper__item--loading");else{a[l].classList.remove("c-stepper__item--loading"),a[l].classList.add("c-stepper__item--loaded");const c=a[l].querySelector(".c-stepper__loader");c&&c instanceof HTMLElement&&(c.style.transition="width 0s linear"),l+1<a.length&&a[l+1].classList.add("c-stepper__item--loading")}}if(t.scrollWidth-t.clientWidth>t.clientWidth){let l=t.scrollLeft;switch(n){case"three-columns-articles":l+=t.clientWidth+32;break;case"rubrics":l+=t.clientWidth-36;break;default:l+=Math.ceil(t.clientWidth*.6);break}t.scrollTo({left:l,behavior:"smooth"}),i.classList.add("o-nav-button--visible"),l+t.clientWidth>=t.scrollWidth&&e.classList.remove("o-nav-button--visible")}else{const l=t.scrollWidth-t.clientWidth;t.scrollTo({left:l,behavior:"smooth"}),e.classList.remove("o-nav-button--visible"),i.classList.add("o-nav-button--visible")}e.classList.contains("c-slider__button-container--has-space-around")&&i.classList.contains("c-slider__button-container--has-space-around")&&G({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})}},ve=({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i,sliderVariant:n,delay:o})=>{if(t){const l=t.closest(".js-overview-bar-container")?.querySelector(".c-stepper")?.querySelectorAll(".c-stepper__item");if(l){const c=Array.from(l).findIndex(d=>d.classList.contains("c-stepper__item--loading"));c<0?l[0].classList.add("c-stepper__item--loading"):(l[c].classList.remove("c-stepper__item--loading"),l[c].classList.remove("c-stepper__item--loaded"),c-1>0&&(l[c-1].classList.remove("c-stepper__item--loading"),l[c-1].classList.remove("c-stepper__item--loaded"),setTimeout(()=>{const d=l[c-1].querySelector(".c-stepper__loader");l[c-1].classList.add("c-stepper__item--loading"),d&&d instanceof HTMLElement&&(d.style.transition=`width ${o/1e3}s linear`)},0)))}if(t.clientWidth<t.scrollLeft){let c=t.scrollLeft;switch(n){case"three-columns-articles":c-=t.clientWidth+32;break;case"rubrics":c-=t.clientWidth-36;break;default:c-=Math.ceil(t.clientWidth*.6);break}t.scrollTo({left:c,behavior:"smooth"}),e.classList.add("o-nav-button--visible"),c===0&&i.classList.remove("o-nav-button--visible")}else t.scrollTo({left:0,behavior:"smooth"}),i.classList.remove("o-nav-button--visible"),t.clientWidth<t.scrollWidth&&e.classList.add("o-nav-button--visible");e.classList.contains("c-slider__button-container--has-space-around")&&i.classList.contains("c-slider__button-container--has-space-around")&&G({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})}},ye=({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})=>{fe({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})},_e=s=>{const{sliderVariant:t}=s.dataset,{sliderAuto:e}=s.dataset,{sliderDelay:i}=s.dataset,n=i?parseInt(i,10):3e3,r=s.closest(".js-overview-bar-container")?.querySelector(".c-stepper"),a=r?.querySelectorAll(".c-stepper__item"),l=s.querySelector(".js-navigation-container__list"),c=s.querySelector(".o-nav-button--next-button"),d=s.querySelector(".o-nav-button--previous-button");if(!(!l||!c||!d)){if(l.clientWidth<l.scrollWidth&&(c.classList.add("o-nav-button--visible"),c.classList.contains("c-slider__button-container--has-space-around"))){const h=s.classList.contains("c-breadcrumb--is-small")?ht:dt;s.style.paddingRight=h}if(c.addEventListener("click",ge.bind(!1,{navigationContainer:s,navigatedList:l,nextBtn:c,prevBtn:d,sliderVariant:t})),d.addEventListener("click",ve.bind(!1,{navigationContainer:s,navigatedList:l,nextBtn:c,prevBtn:d,sliderVariant:t,delay:n})),e==="true"){const h=r?r.querySelector(".c-stepper__item--loading"):null;a&&(a.forEach(u=>{const p=u.querySelector(".c-stepper__loader");p&&p instanceof HTMLElement&&(p.style.transition=`width ${n/1e3}s linear`)}),h||a[0].classList.add("c-stepper__item--loading")),setInterval(()=>{c.classList.contains("o-nav-button--visible")?c.click():l&&d&&(l.scrollLeft=0,a&&(a.forEach(u=>{const p=u.querySelector(".c-stepper__loader");p&&p instanceof HTMLElement&&(p.style.transition="width 0s linear"),u.classList.remove("c-stepper__item--loading"),u.classList.remove("c-stepper__item--loaded"),setTimeout(()=>{p&&p instanceof HTMLElement&&(p.style.transition=`width ${n/1e3}s linear`)},0)}),setTimeout(()=>{a[0].classList.add("c-stepper__item--loading")},0)),d.click())},n)}}},we=()=>{const s=document.querySelectorAll(".js-navigation-container");Array.from(s).forEach(t=>{const e=t.querySelector(".js-navigation-container__list");if(e){const i=new ResizeObserver(n=>{n.forEach(o=>{const{width:r}=o.contentRect;r>0&&(_e(t),i.disconnect())})});i.observe(e)}})},be=()=>{const s=document.querySelectorAll(".js-navigation-container");for(const t of Array.from(s))if(t){const e=t.querySelector(".js-navigation-container__list"),i=t.querySelector(".o-nav-button--next-button"),n=t.querySelector(".o-nav-button--previous-button");e&&i&&n&&window.addEventListener("resize",ye.bind(!1,{navigationContainer:t,navigatedList:e,nextBtn:i,prevBtn:n}))}};function A(s,t,e){const i=document.createElement(t);return s&&(i.className=s),e&&e.appendChild(i),i}function w(s,t){return s.x=t.x,s.y=t.y,t.id!==void 0&&(s.id=t.id),s}function ut(s){s.x=Math.round(s.x),s.y=Math.round(s.y)}function U(s,t){const e=Math.abs(s.x-t.x),i=Math.abs(s.y-t.y);return Math.sqrt(e*e+i*i)}function $(s,t){return s.x===t.x&&s.y===t.y}function R(s,t,e){return Math.min(Math.max(s,t),e)}function B(s,t,e){let i=`translate3d(${s}px,${t||0}px,0)`;return e!==void 0&&(i+=` scale3d(${e},${e},1)`),i}function C(s,t,e,i){s.style.transform=B(t,e,i)}const Se="cubic-bezier(.4,0,.22,1)";function pt(s,t,e,i){s.style.transition=t?`${t} ${e}ms ${i||Se}`:"none"}function K(s,t,e){s.style.width=typeof t=="number"?`${t}px`:t,s.style.height=typeof e=="number"?`${e}px`:e}function Le(s){pt(s)}function Ae(s){return"decode"in s?s.decode().catch(()=>{}):s.complete?Promise.resolve(s):new Promise((t,e)=>{s.onload=()=>t(s),s.onerror=e})}const E={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function Ee(s){return"button"in s&&s.button===1||s.ctrlKey||s.metaKey||s.altKey||s.shiftKey}function xe(s,t,e=document){let i=[];if(s instanceof Element)i=[s];else if(s instanceof NodeList||Array.isArray(s))i=Array.from(s);else{const n=typeof s=="string"?s:t;n&&(i=Array.from(e.querySelectorAll(n)))}return i}function mt(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}let ft=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{ft=!0}}))}catch{}class Ce{constructor(){this._pool=[]}add(t,e,i,n){this._toggleListener(t,e,i,n)}remove(t,e,i,n){this._toggleListener(t,e,i,n,!0)}removeAll(){this._pool.forEach(t=>{this._toggleListener(t.target,t.type,t.listener,t.passive,!0,!0)}),this._pool=[]}_toggleListener(t,e,i,n,o,r){if(!t)return;const a=o?"removeEventListener":"addEventListener";e.split(" ").forEach(c=>{if(c){r||(o?this._pool=this._pool.filter(h=>h.type!==c||h.listener!==i||h.target!==t):this._pool.push({target:t,type:c,listener:i,passive:n}));const d=ft?{passive:n||!1}:!1;t[a](c,i,d)}})}}function gt(s,t){if(s.getViewportSizeFn){const e=s.getViewportSizeFn(s,t);if(e)return e}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function F(s,t,e,i,n){let o=0;if(t.paddingFn)o=t.paddingFn(e,i,n)[s];else if(t.padding)o=t.padding[s];else{const r="padding"+s[0].toUpperCase()+s.slice(1);t[r]&&(o=t[r])}return Number(o)||0}function vt(s,t,e,i){return{x:t.x-F("left",s,t,e,i)-F("right",s,t,e,i),y:t.y-F("top",s,t,e,i)-F("bottom",s,t,e,i)}}class Pe{constructor(t){this.slide=t,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(t){this.currZoomLevel=t,this.slide.width?(this._updateAxis("x"),this._updateAxis("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}_updateAxis(t){const{pswp:e}=this.slide,i=this.slide[t==="x"?"width":"height"]*this.currZoomLevel,o=F(t==="x"?"left":"top",e.options,e.viewportSize,this.slide.data,this.slide.index),r=this.slide.panAreaSize[t];this.center[t]=Math.round((r-i)/2)+o,this.max[t]=i>r?Math.round(r-i)+o:this.center[t],this.min[t]=i>r?o:this.center[t]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(t,e){return R(e,this.max[t],this.min[t])}}const yt=4e3;let _t=class{constructor(t,e,i,n){this.pswp=n,this.options=t,this.itemData=e,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,e,i){const n={x:t,y:e};this.elementSize=n,this.panAreaSize=i;const o=i.x/n.x,r=i.y/n.y;this.fit=Math.min(1,o<r?o:r),this.fill=Math.min(1,o>r?o:r),this.vFill=Math.min(1,r),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const e=t+"ZoomLevel",i=this.options[e];if(i)return typeof i=="function"?i(this):i==="fill"?this.fill:i==="fit"?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,this.fit*3),this.elementSize&&t*this.elementSize.x>yt&&(t=yt/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}};class Te{constructor(t,e,i){this.data=t,this.index=e,this.pswp=i,this.isActive=e===i.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!i.opener.isOpen,this.zoomLevels=new _t(i.options,t,e,i),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:e}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=A("pswp__zoom-wrap","div"),this.holderElement=null,this.currZoomLevel=1,this.width=this.content.width,this.height=this.content.height,this.heavyAppended=!1,this.bounds=new Pe(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(t){t&&!this.isActive?this.activate():!t&&this.isActive&&this.deactivate()}append(t){this.holderElement=t,this.container.style.transformOrigin="0 0",this.data&&(this.calculateSize(),this.load(),this.updateContentSize(),this.appendHeavy(),this.holderElement.appendChild(this.container),this.zoomAndPanToInitial(),this.pswp.dispatch("firstZoomPan",{slide:this}),this.applyCurrentZoomPan(),this.pswp.dispatch("afterSetContent",{slide:this}),this.isActive&&this.activate())}load(){this.content.load(!1),this.pswp.dispatch("slideLoad",{slide:this})}appendHeavy(){const{pswp:t}=this;this.heavyAppended||!t.opener.isOpen||t.mainScroll.isShifted()||!this.isActive&&!1||this.pswp.dispatch("appendHeavy",{slide:this}).defaultPrevented||(this.heavyAppended=!0,this.content.append(),this.pswp.dispatch("appendHeavyContent",{slide:this}))}activate(){this.isActive=!0,this.appendHeavy(),this.content.activate(),this.pswp.dispatch("slideActivate",{slide:this})}deactivate(){this.isActive=!1,this.content.deactivate(),this.currZoomLevel!==this.zoomLevels.initial&&this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize(),this.pswp.dispatch("slideDeactivate",{slide:this})}destroy(){this.content.hasSlide=!1,this.content.remove(),this.container.remove(),this.pswp.dispatch("slideDestroy",{slide:this})}resize(){this.currZoomLevel===this.zoomLevels.initial||!this.isActive?(this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize()):(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y))}updateContentSize(t){const e=this.currentResolution||this.zoomLevels.initial;if(!e)return;const i=Math.round(this.width*e)||this.pswp.viewportSize.x,n=Math.round(this.height*e)||this.pswp.viewportSize.y;!this.sizeChanged(i,n)&&!t||this.content.setDisplayedSize(i,n)}sizeChanged(t,e){return t!==this.prevDisplayedWidth||e!==this.prevDisplayedHeight?(this.prevDisplayedWidth=t,this.prevDisplayedHeight=e,!0):!1}getPlaceholderElement(){var t;return(t=this.content.placeholder)===null||t===void 0?void 0:t.element}zoomTo(t,e,i,n){const{pswp:o}=this;if(!this.isZoomable()||o.mainScroll.isShifted())return;o.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:e,transitionDuration:i}),o.animations.stopAllPan();const r=this.currZoomLevel;n||(t=R(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",e,r),this.pan.y=this.calculateZoomToPanOffset("y",e,r),ut(this.pan);const a=()=>{this._setResolution(t),this.applyCurrentZoomPan()};i?o.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:a,duration:i,easing:o.options.easing}):a()}toggleZoom(t){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,t,this.pswp.options.zoomAnimationDuration)}setZoomLevel(t){this.currZoomLevel=t,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(t,e,i){if(this.bounds.max[t]-this.bounds.min[t]===0)return this.bounds.center[t];e||(e=this.pswp.getViewportCenterPoint()),i||(i=this.zoomLevels.initial);const o=this.currZoomLevel/i;return this.bounds.correctPan(t,(this.pan[t]-e[t])*o+e[t])}panTo(t,e){this.pan.x=this.bounds.correctPan("x",t),this.pan.y=this.bounds.correctPan("y",e),this.applyCurrentZoomPan()}isPannable(){return!!this.width&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return!!this.width&&this.content.isZoomable()}applyCurrentZoomPan(){this._applyZoomTransform(this.pan.x,this.pan.y,this.currZoomLevel),this===this.pswp.currSlide&&this.pswp.dispatch("zoomPanUpdate",{slide:this})}zoomAndPanToInitial(){this.currZoomLevel=this.zoomLevels.initial,this.bounds.update(this.currZoomLevel),w(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(t,e,i){i/=this.currentResolution||this.zoomLevels.initial,C(this.container,t,e,i)}calculateSize(){const{pswp:t}=this;w(this.panAreaSize,vt(t.options,t.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),t.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){const t=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return B(this.pan.x,this.pan.y,t)}_setResolution(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}}const Ie=.35,ze=.6,wt=.4,bt=.5;function Me(s,t){return s*t/(1-t)}class De{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&w(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:t,prevP1:e,dragAxis:i}=this.gestures,{currSlide:n}=this.pswp;if(i==="y"&&this.pswp.options.closeOnVerticalDrag&&n&&n.currZoomLevel<=n.zoomLevels.fit&&!this.gestures.isMultitouch){const o=n.pan.y+(t.y-e.y);if(!this.pswp.dispatch("verticalDrag",{panY:o}).defaultPrevented){this._setPanWithFriction("y",o,ze);const r=1-Math.abs(this._getVerticalDragRatio(n.pan.y));this.pswp.applyBgOpacity(r),n.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),n&&(ut(n.pan),n.applyCurrentZoomPan()))}end(){const{velocity:t}=this.gestures,{mainScroll:e,currSlide:i}=this.pswp;let n=0;if(this.pswp.animations.stopAll(),e.isShifted()){const r=(e.x-e.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-bt&&r<0||t.x<.1&&r<-.5?(n=1,t.x=Math.min(t.x,0)):(t.x>bt&&r>0||t.x>-.1&&r>.5)&&(n=-1,t.x=Math.max(t.x,0)),e.moveIndexBy(n,!0,t.x)}i&&i.currZoomLevel>i.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(t){const{velocity:e}=this.gestures,{currSlide:i}=this.pswp;if(!i)return;const{pan:n,bounds:o}=i,r=n[t],a=this.pswp.bgOpacity<1&&t==="y",c=r+Me(e[t],.995);if(a){const f=this._getVerticalDragRatio(r),m=this._getVerticalDragRatio(c);if(f<0&&m<-wt||f>0&&m>wt){this.pswp.close();return}}const d=o.correctPan(t,c);if(r===d)return;const h=d===c?1:.82,u=this.pswp.bgOpacity,p=d-r;this.pswp.animations.startSpring({name:"panGesture"+t,isPan:!0,start:r,end:d,velocity:e[t],dampingRatio:h,onUpdate:f=>{if(a&&this.pswp.bgOpacity<1){const m=1-(d-f)/p;this.pswp.applyBgOpacity(R(u+(1-u)*m,0,1))}n[t]=Math.floor(f),i.applyCurrentZoomPan()}})}_panOrMoveMainScroll(t){const{p1:e,dragAxis:i,prevP1:n,isMultitouch:o}=this.gestures,{currSlide:r,mainScroll:a}=this.pswp,l=e[t]-n[t],c=a.x+l;if(!l||!r)return!1;if(t==="x"&&!r.isPannable()&&!o)return a.moveTo(c,!0),!0;const{bounds:d}=r,h=r.pan[t]+l;if(this.pswp.options.allowPanToNext&&i==="x"&&t==="x"&&!o){const u=a.getCurrSlideX(),p=a.x-u,f=l>0,m=!f;if(h>d.min[t]&&f){if(d.min[t]<=this.startPan[t])return a.moveTo(c,!0),!0;this._setPanWithFriction(t,h)}else if(h<d.max[t]&&m){if(this.startPan[t]<=d.max[t])return a.moveTo(c,!0),!0;this._setPanWithFriction(t,h)}else if(p!==0){if(p>0)return a.moveTo(Math.max(c,u),!0),!0;if(p<0)return a.moveTo(Math.min(c,u),!0),!0}else this._setPanWithFriction(t,h)}else t==="y"?!a.isShifted()&&d.min.y!==d.max.y&&this._setPanWithFriction(t,h):this._setPanWithFriction(t,h);return!1}_getVerticalDragRatio(t){var e,i;return(t-((e=(i=this.pswp.currSlide)===null||i===void 0?void 0:i.bounds.center.y)!==null&&e!==void 0?e:0))/(this.pswp.viewportSize.y/3)}_setPanWithFriction(t,e,i){const{currSlide:n}=this.pswp;if(!n)return;const{pan:o,bounds:r}=n;if(r.correctPan(t,e)!==e||i){const l=Math.round(e-o[t]);o[t]+=l*(i||Ie)}else o[t]=e}}const Oe=.05,$e=.15;function St(s,t,e){return s.x=(t.x+e.x)/2,s.y=(t.y+e.y)/2,s}class Re{constructor(t){this.gestures=t,this._startPan={x:0,y:0},this._startZoomPoint={x:0,y:0},this._zoomPoint={x:0,y:0},this._wasOverFitZoomLevel=!1,this._startZoomLevel=1}start(){const{currSlide:t}=this.gestures.pswp;t&&(this._startZoomLevel=t.currZoomLevel,w(this._startPan,t.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:t,startP1:e,p2:i,startP2:n,pswp:o}=this.gestures,{currSlide:r}=o;if(!r)return;const a=r.zoomLevels.min,l=r.zoomLevels.max;if(!r.isZoomable()||o.mainScroll.isShifted())return;St(this._startZoomPoint,e,n),St(this._zoomPoint,t,i);let c=1/U(e,n)*U(t,i)*this._startZoomLevel;if(c>r.zoomLevels.initial+r.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),c<a)if(o.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=r.zoomLevels.initial){const d=1-(a-c)/(a/1.2);o.dispatch("pinchClose",{bgOpacity:d}).defaultPrevented||o.applyBgOpacity(d)}else c=a-(a-c)*$e;else c>l&&(c=l+(c-l)*Oe);r.pan.x=this._calculatePanForZoomLevel("x",c),r.pan.y=this._calculatePanForZoomLevel("y",c),r.setZoomLevel(c),r.applyCurrentZoomPan()}end(){const{pswp:t}=this.gestures,{currSlide:e}=t;(!e||e.currZoomLevel<e.zoomLevels.initial)&&!this._wasOverFitZoomLevel&&t.options.pinchToClose?t.close():this.correctZoomPan()}_calculatePanForZoomLevel(t,e){const i=e/this._startZoomLevel;return this._zoomPoint[t]-(this._startZoomPoint[t]-this._startPan[t])*i}correctZoomPan(t){const{pswp:e}=this.gestures,{currSlide:i}=e;if(!(i!=null&&i.isZoomable()))return;this._zoomPoint.x===0&&(t=!0);const n=i.currZoomLevel;let o,r=!0;n<i.zoomLevels.initial?o=i.zoomLevels.initial:n>i.zoomLevels.max?o=i.zoomLevels.max:(r=!1,o=n);const a=e.bgOpacity,l=e.bgOpacity<1,c=w({x:0,y:0},i.pan);let d=w({x:0,y:0},c);t&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=n,w(this._startPan,c)),r&&(d={x:this._calculatePanForZoomLevel("x",o),y:this._calculatePanForZoomLevel("y",o)}),i.setZoomLevel(o),d={x:i.bounds.correctPan("x",d.x),y:i.bounds.correctPan("y",d.y)},i.setZoomLevel(n);const h=!$(d,c);if(!h&&!r&&!l){i._setResolution(o),i.applyCurrentZoomPan();return}e.animations.stopAllPan(),e.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:u=>{if(u/=1e3,h||r){if(h&&(i.pan.x=c.x+(d.x-c.x)*u,i.pan.y=c.y+(d.y-c.y)*u),r){const p=n+(o-n)*u;i.setZoomLevel(p)}i.applyCurrentZoomPan()}l&&e.bgOpacity<1&&e.applyBgOpacity(R(a+(1-a)*u,0,1))},onComplete:()=>{i._setResolution(o),i.applyCurrentZoomPan()}})}}function Lt(s){return!!s.target.closest(".pswp__container")}class Be{constructor(t){this.gestures=t}click(t,e){const i=e.target.classList,n=i.contains("pswp__img"),o=i.contains("pswp__item")||i.contains("pswp__zoom-wrap");n?this._doClickOrTapAction("imageClick",t,e):o&&this._doClickOrTapAction("bgClick",t,e)}tap(t,e){Lt(e)&&this._doClickOrTapAction("tap",t,e)}doubleTap(t,e){Lt(e)&&this._doClickOrTapAction("doubleTap",t,e)}_doClickOrTapAction(t,e,i){var n;const{pswp:o}=this.gestures,{currSlide:r}=o,a=t+"Action",l=o.options[a];if(!o.dispatch(a,{point:e,originalEvent:i}).defaultPrevented){if(typeof l=="function"){l.call(o,e,i);return}switch(l){case"close":case"next":o[l]();break;case"zoom":r?.toggleZoom(e);break;case"zoom-or-close":r!=null&&r.isZoomable()&&r.zoomLevels.secondary!==r.zoomLevels.initial?r.toggleZoom(e):o.options.clickToCloseNonZoomable&&o.close();break;case"toggle-controls":(n=this.gestures.pswp.element)===null||n===void 0||n.classList.toggle("pswp--ui-visible");break}}}}const Fe=10,Ze=300,ke=25;class qe{constructor(t){this.pswp=t,this.dragAxis=null,this.p1={x:0,y:0},this.p2={x:0,y:0},this.prevP1={x:0,y:0},this.prevP2={x:0,y:0},this.startP1={x:0,y:0},this.startP2={x:0,y:0},this.velocity={x:0,y:0},this._lastStartP1={x:0,y:0},this._intervalP1={x:0,y:0},this._numActivePoints=0,this._ongoingPointers=[],this._touchEventEnabled="ontouchstart"in window,this._pointerEventEnabled=!!window.PointerEvent,this.supportsTouch=this._touchEventEnabled||this._pointerEventEnabled&&navigator.maxTouchPoints>1,this._numActivePoints=0,this._intervalTime=0,this._velocityCalculated=!1,this.isMultitouch=!1,this.isDragging=!1,this.isZooming=!1,this.raf=null,this._tapTimer=null,this.supportsTouch||(t.options.allowPanToNext=!1),this.drag=new De(this),this.zoomLevels=new Re(this),this.tapHandler=new Be(this),t.on("bindEvents",()=>{t.events.add(t.scrollWrap,"click",this._onClick.bind(this)),this._pointerEventEnabled?this._bindEvents("pointer","down","up","cancel"):this._touchEventEnabled?(this._bindEvents("touch","start","end","cancel"),t.scrollWrap&&(t.scrollWrap.ontouchmove=()=>{},t.scrollWrap.ontouchend=()=>{})):this._bindEvents("mouse","down","up")})}_bindEvents(t,e,i,n){const{pswp:o}=this,{events:r}=o,a=n?t+n:"";r.add(o.scrollWrap,t+e,this.onPointerDown.bind(this)),r.add(window,t+"move",this.onPointerMove.bind(this)),r.add(window,t+i,this.onPointerUp.bind(this)),a&&r.add(o.scrollWrap,a,this.onPointerUp.bind(this))}onPointerDown(t){const e=t.type==="mousedown"||t.pointerType==="mouse";if(e&&t.button>0)return;const{pswp:i}=this;if(!i.opener.isOpen){t.preventDefault();return}i.dispatch("pointerDown",{originalEvent:t}).defaultPrevented||(e&&(i.mouseDetected(),this._preventPointerEventBehaviour(t,"down")),i.animations.stopAll(),this._updatePoints(t,"down"),this._numActivePoints===1&&(this.dragAxis=null,w(this.startP1,this.p1)),this._numActivePoints>1?(this._clearTapTimer(),this.isMultitouch=!0):this.isMultitouch=!1)}onPointerMove(t){this._preventPointerEventBehaviour(t,"move"),this._numActivePoints&&(this._updatePoints(t,"move"),!this.pswp.dispatch("pointerMove",{originalEvent:t}).defaultPrevented&&(this._numActivePoints===1&&!this.isDragging?(this.dragAxis||this._calculateDragDirection(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this._clearTapTimer(),this._updateStartPoints(),this._intervalTime=Date.now(),this._velocityCalculated=!1,w(this._intervalP1,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this._rafStopLoop(),this._rafRenderLoop())):this._numActivePoints>1&&!this.isZooming&&(this._finishDrag(),this.isZooming=!0,this._updateStartPoints(),this.zoomLevels.start(),this._rafStopLoop(),this._rafRenderLoop())))}_finishDrag(){this.isDragging&&(this.isDragging=!1,this._velocityCalculated||this._updateVelocity(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(t){this._numActivePoints&&(this._updatePoints(t,"up"),!this.pswp.dispatch("pointerUp",{originalEvent:t}).defaultPrevented&&(this._numActivePoints===0&&(this._rafStopLoop(),this.isDragging?this._finishDrag():!this.isZooming&&!this.isMultitouch&&this._finishTap(t)),this._numActivePoints<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),this._numActivePoints===1&&(this.dragAxis=null,this._updateStartPoints()))))}_rafRenderLoop(){(this.isDragging||this.isZooming)&&(this._updateVelocity(),this.isDragging?$(this.p1,this.prevP1)||this.drag.change():(!$(this.p1,this.prevP1)||!$(this.p2,this.prevP2))&&this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(t){const e=Date.now(),i=e-this._intervalTime;i<50&&!t||(this.velocity.x=this._getVelocity("x",i),this.velocity.y=this._getVelocity("y",i),this._intervalTime=e,w(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(t){const{mainScroll:e}=this.pswp;if(e.isShifted()){e.moveIndexBy(0,!0);return}if(t.type.indexOf("cancel")>0)return;if(t.type==="mouseup"||t.pointerType==="mouse"){this.tapHandler.click(this.startP1,t);return}const i=this.pswp.options.doubleTapAction?Ze:0;this._tapTimer?(this._clearTapTimer(),U(this._lastStartP1,this.startP1)<ke&&this.tapHandler.doubleTap(this.startP1,t)):(w(this._lastStartP1,this.startP1),this._tapTimer=setTimeout(()=>{this.tapHandler.tap(this.startP1,t),this._clearTapTimer()},i))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(t,e){const i=this.p1[t]-this._intervalP1[t];return Math.abs(i)>1&&e>5?i/e:0}_rafStopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}_preventPointerEventBehaviour(t,e){this.pswp.applyFilters("preventPointerEvent",!0,t,e)&&t.preventDefault()}_updatePoints(t,e){if(this._pointerEventEnabled){const i=t,n=this._ongoingPointers.findIndex(o=>o.id===i.pointerId);e==="up"&&n>-1?this._ongoingPointers.splice(n,1):e==="down"&&n===-1?this._ongoingPointers.push(this._convertEventPosToPoint(i,{x:0,y:0})):n>-1&&this._convertEventPosToPoint(i,this._ongoingPointers[n]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&w(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&w(this.p2,this._ongoingPointers[1])}else{const i=t;this._numActivePoints=0,i.type.indexOf("touch")>-1?i.touches&&i.touches.length>0&&(this._convertEventPosToPoint(i.touches[0],this.p1),this._numActivePoints++,i.touches.length>1&&(this._convertEventPosToPoint(i.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(t,this.p1),e==="up"?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){w(this.prevP1,this.p1),w(this.prevP2,this.p2)}_updateStartPoints(){w(this.startP1,this.p1),w(this.startP2,this.p2),this._updatePrevPoints()}_calculateDragDirection(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{const t=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(t!==0){const e=t>0?"x":"y";Math.abs(this.p1[e]-this.startP1[e])>=Fe&&(this.dragAxis=e)}}}_convertEventPosToPoint(t,e){return e.x=t.pageX-this.pswp.offset.x,e.y=t.pageY-this.pswp.offset.y,"pointerId"in t?e.id=t.pointerId:t.identifier!==void 0&&(e.id=t.identifier),e}_onClick(t){this.pswp.mainScroll.isShifted()&&(t.preventDefault(),t.stopPropagation())}}const Ne=.35;class He{constructor(t){this.pswp=t,this.x=0,this.slideWidth=0,this._currPositionIndex=0,this._prevPositionIndex=0,this._containerShiftIndex=-1,this.itemHolders=[]}resize(t){const{pswp:e}=this,i=Math.round(e.viewportSize.x+e.viewportSize.x*e.options.spacing),n=i!==this.slideWidth;n&&(this.slideWidth=i,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach((o,r)=>{n&&C(o.el,(r+this._containerShiftIndex)*this.slideWidth),t&&o.slide&&o.slide.resize()})}resetPosition(){this._currPositionIndex=0,this._prevPositionIndex=0,this.slideWidth=0,this._containerShiftIndex=-1}appendHolders(){this.itemHolders=[];for(let t=0;t<3;t++){const e=A("pswp__item","div",this.pswp.container);e.setAttribute("role","group"),e.setAttribute("aria-roledescription","slide"),e.setAttribute("aria-hidden","true"),e.style.display=t===1?"block":"none",this.itemHolders.push({el:e})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(t,e,i){const{pswp:n}=this;let o=n.potentialIndex+t;const r=n.getNumItems();if(n.canLoop()){o=n.getLoopedIndex(o);const l=(t+r)%r;l<=r/2?t=l:t=l-r}else o<0?o=0:o>=r&&(o=r-1),t=o-n.potentialIndex;n.potentialIndex=o,this._currPositionIndex-=t,n.animations.stopMainScroll();const a=this.getCurrSlideX();if(!e)this.moveTo(a),this.updateCurrItem();else{n.animations.startSpring({isMainScroll:!0,start:this.x,end:a,velocity:i||0,naturalFrequency:30,dampingRatio:1,onUpdate:c=>{this.moveTo(c)},onComplete:()=>{this.updateCurrItem(),n.appendHeavy()}});let l=n.potentialIndex-n.currIndex;if(n.canLoop()){const c=(l+r)%r;c<=r/2?l=c:l=c-r}Math.abs(l)>1&&this.updateCurrItem()}return!!t}getCurrSlideX(){return this.slideWidth*this._currPositionIndex}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){var t;const{pswp:e}=this,i=this._prevPositionIndex-this._currPositionIndex;if(!i)return;this._prevPositionIndex=this._currPositionIndex,e.currIndex=e.potentialIndex;let n=Math.abs(i),o;n>=3&&(this._containerShiftIndex+=i+(i>0?-3:3),n=3,this.itemHolders.forEach(r=>{var a;(a=r.slide)===null||a===void 0||a.destroy(),r.slide=void 0}));for(let r=0;r<n;r++)i>0?(o=this.itemHolders.shift(),o&&(this.itemHolders[2]=o,this._containerShiftIndex++,C(o.el,(this._containerShiftIndex+2)*this.slideWidth),e.setContent(o,e.currIndex-n+r+2))):(o=this.itemHolders.pop(),o&&(this.itemHolders.unshift(o),this._containerShiftIndex--,C(o.el,this._containerShiftIndex*this.slideWidth),e.setContent(o,e.currIndex+n-r-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),e.animations.stopAllPan(),this.itemHolders.forEach((r,a)=>{r.slide&&r.slide.setIsActive(a===1)}),e.currSlide=(t=this.itemHolders[1])===null||t===void 0?void 0:t.slide,e.contentLoader.updateLazy(i),e.currSlide&&e.currSlide.applyCurrentZoomPan(),e.dispatch("change")}moveTo(t,e){if(!this.pswp.canLoop()&&e){let i=(this.slideWidth*this._currPositionIndex-t)/this.slideWidth;i+=this.pswp.currIndex;const n=Math.round(t-this.x);(i<0&&n>0||i>=this.pswp.getNumItems()-1&&n<0)&&(t=this.x+n*Ne)}this.x=t,this.pswp.container&&C(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:e??!1})}}const We={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},P=(s,t)=>t?s:We[s];class Ve{constructor(t){this.pswp=t,this._wasFocused=!1,t.on("bindEvents",()=>{t.options.trapFocus&&(t.options.initialPointerPos||this._focusRoot(),t.events.add(document,"focusin",this._onFocusIn.bind(this))),t.events.add(document,"keydown",this._onKeyDown.bind(this))});const e=document.activeElement;t.on("destroy",()=>{t.options.returnFocus&&e&&this._wasFocused&&e.focus()})}_focusRoot(){!this._wasFocused&&this.pswp.element&&(this.pswp.element.focus(),this._wasFocused=!0)}_onKeyDown(t){const{pswp:e}=this;if(e.dispatch("keydown",{originalEvent:t}).defaultPrevented||Ee(t))return;let i,n,o=!1;const r="key"in t;switch(r?t.key:t.keyCode){case P("Escape",r):e.options.escKey&&(i="close");break;case P("z",r):i="toggleZoom";break;case P("ArrowLeft",r):n="x";break;case P("ArrowUp",r):n="y";break;case P("ArrowRight",r):n="x",o=!0;break;case P("ArrowDown",r):o=!0,n="y";break;case P("Tab",r):this._focusRoot();break}if(n){t.preventDefault();const{currSlide:a}=e;e.options.arrowKeys&&n==="x"&&e.getNumItems()>1?i=o?"next":"prev":a&&a.currZoomLevel>a.zoomLevels.fit&&(a.pan[n]+=o?-80:80,a.panTo(a.pan.x,a.pan.y))}i&&(t.preventDefault(),e[i]())}_onFocusIn(t){const{template:e}=this.pswp;e&&document!==t.target&&e!==t.target&&!e.contains(t.target)&&e.focus()}}const je="cubic-bezier(.4,0,.22,1)";class Ge{constructor(t){var e;this.props=t;const{target:i,onComplete:n,transform:o,onFinish:r=()=>{},duration:a=333,easing:l=je}=t;this.onFinish=r;const c=o?"transform":"opacity",d=(e=t[c])!==null&&e!==void 0?e:"";this._target=i,this._onComplete=n,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{pt(i,c,a,l),this._helperTimeout=setTimeout(()=>{i.addEventListener("transitionend",this._onTransitionEnd,!1),i.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},a+500),i.style[c]=d},30)},0)}_onTransitionEnd(t){t.target===this._target&&this._finalizeAnimation()}_finalizeAnimation(){this._finished||(this._finished=!0,this.onFinish(),this._onComplete&&this._onComplete())}destroy(){this._helperTimeout&&clearTimeout(this._helperTimeout),Le(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}}const Ue=12,Ke=.75;class Xe{constructor(t,e,i){this.velocity=t*1e3,this._dampingRatio=e||Ke,this._naturalFrequency=i||Ue,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(t,e){let i=0,n;e/=1e3;const o=Math.E**(-this._dampingRatio*this._naturalFrequency*e);if(this._dampingRatio===1)n=this.velocity+this._naturalFrequency*t,i=(t+n*e)*o,this.velocity=i*-this._naturalFrequency+n*o;else if(this._dampingRatio<1){n=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*t+this.velocity);const r=Math.cos(this._dampedFrequency*e),a=Math.sin(this._dampedFrequency*e);i=o*(t*r+n*a),this.velocity=i*-this._naturalFrequency*this._dampingRatio+o*(-this._dampedFrequency*t*a+this._dampedFrequency*n*r)}return i}}class Ye{constructor(t){this.props=t,this._raf=0;const{start:e,end:i,velocity:n,onUpdate:o,onComplete:r,onFinish:a=()=>{},dampingRatio:l,naturalFrequency:c}=t;this.onFinish=a;const d=new Xe(n,l,c);let h=Date.now(),u=e-i;const p=()=>{this._raf&&(u=d.easeFrame(u,Date.now()-h),Math.abs(u)<1&&Math.abs(d.velocity)<50?(o(i),r&&r(),this.onFinish()):(h=Date.now(),o(u+i),this._raf=requestAnimationFrame(p)))};this._raf=requestAnimationFrame(p)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}}class Je{constructor(){this.activeAnimations=[]}startSpring(t){this._start(t,!0)}startTransition(t){this._start(t)}_start(t,e){const i=e?new Ye(t):new Ge(t);return this.activeAnimations.push(i),i.onFinish=()=>this.stop(i),i}stop(t){t.destroy();const e=this.activeAnimations.indexOf(t);e>-1&&this.activeAnimations.splice(e,1)}stopAll(){this.activeAnimations.forEach(t=>{t.destroy()}),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter(t=>t.props.isPan?(t.destroy(),!1):!0)}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter(t=>t.props.isMainScroll?(t.destroy(),!1):!0)}isPanRunning(){return this.activeAnimations.some(t=>t.props.isPan)}}class Qe{constructor(t){this.pswp=t,t.events.add(t.element,"wheel",this._onWheel.bind(this))}_onWheel(t){t.preventDefault();const{currSlide:e}=this.pswp;let{deltaX:i,deltaY:n}=t;if(e&&!this.pswp.dispatch("wheel",{originalEvent:t}).defaultPrevented)if(t.ctrlKey||this.pswp.options.wheelToZoom){if(e.isZoomable()){let o=-n;t.deltaMode===1?o*=.05:o*=t.deltaMode?1:.002,o=2**o;const r=e.currZoomLevel*o;e.zoomTo(r,{x:t.clientX,y:t.clientY})}}else e.isPannable()&&(t.deltaMode===1&&(i*=18,n*=18),e.panTo(e.pan.x-i,e.pan.y-n))}}function ti(s){if(typeof s=="string")return s;if(!s||!s.isCustomSVG)return"";const t=s;let e='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return e=e.split("%d").join(t.size||32),t.outlineID&&(e+='<use class="pswp__icn-shadow" xlink:href="#'+t.outlineID+'"/>'),e+=t.inner,e+="</svg>",e}class ei{constructor(t,e){var i;const n=e.name||e.className;let o=e.html;if(t.options[n]===!1)return;typeof t.options[n+"SVG"]=="string"&&(o=t.options[n+"SVG"]),t.dispatch("uiElementCreate",{data:e});let r="";e.isButton?(r+="pswp__button ",r+=e.className||`pswp__button--${e.name}`):r+=e.className||`pswp__${e.name}`;let a=e.isButton?e.tagName||"button":e.tagName||"div";a=a.toLowerCase();const l=A(r,a);if(e.isButton){a==="button"&&(l.type="button");let{title:h}=e;const{ariaLabel:u}=e;typeof t.options[n+"Title"]=="string"&&(h=t.options[n+"Title"]),h&&(l.title=h);const p=u||h;p&&l.setAttribute("aria-label",p)}l.innerHTML=ti(o),e.onInit&&e.onInit(l,t),e.onClick&&(l.onclick=h=>{typeof e.onClick=="string"?t[e.onClick]():typeof e.onClick=="function"&&e.onClick(h,l,t)});const c=e.appendTo||"bar";let d=t.element;c==="bar"?(t.topBar||(t.topBar=A("pswp__top-bar pswp__hide-on-close","div",t.scrollWrap)),d=t.topBar):(l.classList.add("pswp__hide-on-close"),c==="wrapper"&&(d=t.scrollWrap)),(i=d)===null||i===void 0||i.appendChild(t.applyFilters("uiElement",l,e))}}function At(s,t,e){s.classList.add("pswp__button--arrow"),s.setAttribute("aria-controls","pswp__items"),t.on("change",()=>{t.options.loop||(e?s.disabled=!(t.currIndex<t.getNumItems()-1):s.disabled=!(t.currIndex>0))})}const ii={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<path d="M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z" id="pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:At},si={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<use xlink:href="#pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(s,t)=>{At(s,t,!0)}},ni={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M24 10l-2-2-6 6-6-6-2 2 6 6-6 6 2 2 6-6 6 6 2-2-6-6z" id="pswp__icn-close"/>',outlineID:"pswp__icn-close"},onClick:"close"},oi={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M17.426 19.926a6 6 0 1 1 1.5-1.5L23 22.5 21.5 24l-4.074-4.074z" id="pswp__icn-zoom"/><path fill="currentColor" class="pswp__zoom-icn-bar-h" d="M11 16v-2h6v2z"/><path fill="currentColor" class="pswp__zoom-icn-bar-v" d="M13 12h2v6h-2z"/>',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},ri={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 16a5.2 5.2 0 1 1-5.2-5.2V8a8 8 0 1 0 8 8h-2.8Z" id="pswp__icn-loading"/>',outlineID:"pswp__icn-loading"},onInit:(s,t)=>{let e,i=null;const n=(a,l)=>{s.classList.toggle("pswp__preloader--"+a,l)},o=a=>{e!==a&&(e=a,n("active",a))},r=()=>{var a;if(!((a=t.currSlide)!==null&&a!==void 0&&a.content.isLoading())){o(!1),i&&(clearTimeout(i),i=null);return}i||(i=setTimeout(()=>{var l;o(!!(!((l=t.currSlide)===null||l===void 0)&&l.content.isLoading())),i=null},t.options.preloaderDelay))};t.on("change",r),t.on("loadComplete",a=>{t.currSlide===a.slide&&r()}),t.ui&&(t.ui.updatePreloaderVisibility=r)}},ai={name:"counter",order:5,onInit:(s,t)=>{t.on("change",()=>{s.innerText=t.currIndex+1+t.options.indexIndicatorSep+t.getNumItems()})}};function Et(s,t){s.classList.toggle("pswp--zoomed-in",t)}class li{constructor(t){this.pswp=t,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this._lastUpdatedZoomLevel=void 0}init(){const{pswp:t}=this;this.isRegistered=!1,this.uiElementsData=[ni,ii,si,oi,ri,ai],t.dispatch("uiRegister"),this.uiElementsData.sort((e,i)=>(e.order||0)-(i.order||0)),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach(e=>{this.registerElement(e)}),t.on("change",()=>{var e;(e=t.element)===null||e===void 0||e.classList.toggle("pswp--one-slide",t.getNumItems()===1)}),t.on("zoomPanUpdate",()=>this._onZoomPanUpdate())}registerElement(t){this.isRegistered?this.items.push(new ei(this.pswp,t)):this.uiElementsData.push(t)}_onZoomPanUpdate(){const{template:t,currSlide:e,options:i}=this.pswp;if(this.pswp.opener.isClosing||!t||!e)return;let{currZoomLevel:n}=e;if(this.pswp.opener.isOpen||(n=e.zoomLevels.initial),n===this._lastUpdatedZoomLevel)return;this._lastUpdatedZoomLevel=n;const o=e.zoomLevels.initial-e.zoomLevels.secondary;if(Math.abs(o)<.01||!e.isZoomable()){Et(t,!1),t.classList.remove("pswp--zoom-allowed");return}t.classList.add("pswp--zoom-allowed");const r=n===e.zoomLevels.initial?e.zoomLevels.secondary:e.zoomLevels.initial;Et(t,r<=n),(i.imageClickAction==="zoom"||i.imageClickAction==="zoom-or-close")&&t.classList.add("pswp--click-to-zoom")}}function ci(s){const t=s.getBoundingClientRect();return{x:t.left,y:t.top,w:t.width}}function di(s,t,e){const i=s.getBoundingClientRect(),n=i.width/t,o=i.height/e,r=n>o?n:o,a=(i.width-t*r)/2,l=(i.height-e*r)/2,c={x:i.left+a,y:i.top+l,w:t*r};return c.innerRect={w:i.width,h:i.height,x:a,y:l},c}function hi(s,t,e){const i=e.dispatch("thumbBounds",{index:s,itemData:t,instance:e});if(i.thumbBounds)return i.thumbBounds;const{element:n}=t;let o,r;if(n&&e.options.thumbSelector!==!1){const a=e.options.thumbSelector||"img";r=n.matches(a)?n:n.querySelector(a)}return r=e.applyFilters("thumbEl",r,t,s),r&&(t.thumbCropped?o=di(r,t.width||t.w||0,t.height||t.h||0):o=ci(r)),e.applyFilters("thumbBounds",o,t,s)}let ui=class{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}},pi=class{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){var n,o,r;this._filters[t]||(this._filters[t]=[]),(n=this._filters[t])===null||n===void 0||n.push({fn:e,priority:i}),(o=this._filters[t])===null||o===void 0||o.sort((a,l)=>a.priority-l.priority),(r=this.pswp)===null||r===void 0||r.addFilter(t,e,i)}removeFilter(t,e){this._filters[t]&&(this._filters[t]=this._filters[t].filter(i=>i.fn!==e)),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){var i;return(i=this._filters[t])===null||i===void 0||i.forEach(n=>{e[0]=n.fn.apply(this,e)}),e[0]}on(t,e){var i,n;this._listeners[t]||(this._listeners[t]=[]),(i=this._listeners[t])===null||i===void 0||i.push(e),(n=this.pswp)===null||n===void 0||n.on(t,e)}off(t,e){var i;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(n=>e!==n)),(i=this.pswp)===null||i===void 0||i.off(t,e)}dispatch(t,e){var i;if(this.pswp)return this.pswp.dispatch(t,e);const n=new ui(t,e);return(i=this._listeners[t])===null||i===void 0||i.forEach(o=>{o.call(this,n)}),n}},mi=class{constructor(t,e){if(this.element=A("pswp__img pswp__img--placeholder",t?"img":"div",e),t){const i=this.element;i.decoding="async",i.alt="",i.src=t,i.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&(this.element.tagName==="IMG"?(K(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=B(0,0,t/250)):K(this.element,t,e))}destroy(){var t;(t=this.element)!==null&&t!==void 0&&t.parentNode&&this.element.remove(),this.element=null}},fi=class{constructor(t,e,i){this.instance=e,this.data=t,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=E.IDLE,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(t,e){if(this.slide&&this.usePlaceholder())if(this.placeholder){const i=this.placeholder.element;i&&!i.parentElement&&this.slide.container.prepend(i)}else{const i=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new mi(i,this.slide.container)}this.element&&!e||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=A("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=A("pswp__content","div"),this.element.innerHTML=this.data.html||""),e&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var e,i;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const n=this.element;this.updateSrcsetSizes(),this.data.srcset&&(n.srcset=this.data.srcset),n.src=(e=this.data.src)!==null&&e!==void 0?e:"",n.alt=(i=this.data.alt)!==null&&i!==void 0?i:"",this.state=E.LOADING,n.complete?this.onLoaded():(n.onload=()=>{this.onLoaded()},n.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=E.LOADED,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===E.LOADED||this.state===E.ERROR)&&this.removePlaceholder())}onError(){this.state=E.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===E.LOADING,this)}isError(){return this.state===E.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(t,e){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(K(this.element,t,e),this.isImageContent()&&!this.isError()))){const i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=e,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:e,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==E.ERROR,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,e=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||e>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=e+"px",t.dataset.largestUsedSize=String(e))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var t,e;let i=A("pswp__error-msg","div");i.innerText=(t=(e=this.instance.options)===null||e===void 0?void 0:e.errorMsg)!==null&&t!==void 0?t:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=A("pswp__content pswp__error-msg-container","div"),this.element.appendChild(i),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===E.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||mt())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!mt()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===E.LOADED||this.state===E.ERROR)&&this.removePlaceholder()))}};const gi=5;function xt(s,t,e){const i=t.createContentFromData(s,e);let n;const{options:o}=t;if(o){n=new _t(o,s,-1);let r;t.pswp?r=t.pswp.viewportSize:r=gt(o,t);const a=vt(o,r,s,e);n.update(i.width,i.height,a)}return i.lazyLoad(),n&&i.setDisplayedSize(Math.ceil(i.width*n.initial),Math.ceil(i.height*n.initial)),i}function vi(s,t){const e=t.getItemData(s);if(!t.dispatch("lazyLoadSlide",{index:s,itemData:e}).defaultPrevented)return xt(e,t,s)}class yi{constructor(t){this.pswp=t,this.limit=Math.max(t.options.preload[0]+t.options.preload[1]+1,gi),this._cachedItems=[]}updateLazy(t){const{pswp:e}=this;if(e.dispatch("lazyLoad").defaultPrevented)return;const{preload:i}=e.options,n=t===void 0?!0:t>=0;let o;for(o=0;o<=i[1];o++)this.loadSlideByIndex(e.currIndex+(n?o:-o));for(o=1;o<=i[0];o++)this.loadSlideByIndex(e.currIndex+(n?-o:o))}loadSlideByIndex(t){const e=this.pswp.getLoopedIndex(t);let i=this.getContentByIndex(e);i||(i=vi(e,this.pswp),i&&this.addToCache(i))}getContentBySlide(t){let e=this.getContentByIndex(t.index);return e||(e=this.pswp.createContentFromData(t.data,t.index),this.addToCache(e)),e.setSlide(t),e}addToCache(t){if(this.removeByIndex(t.index),this._cachedItems.push(t),this._cachedItems.length>this.limit){const e=this._cachedItems.findIndex(i=>!i.isAttached&&!i.hasSlide);e!==-1&&this._cachedItems.splice(e,1)[0].destroy()}}removeByIndex(t){const e=this._cachedItems.findIndex(i=>i.index===t);e!==-1&&this._cachedItems.splice(e,1)}getContentByIndex(t){return this._cachedItems.find(e=>e.index===t)}destroy(){this._cachedItems.forEach(t=>t.destroy()),this._cachedItems=[]}}let _i=class extends pi{getNumItems(){var t;let e=0;const i=(t=this.options)===null||t===void 0?void 0:t.dataSource;i&&"length"in i?e=i.length:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),i.items&&(e=i.items.length));const n=this.dispatch("numItems",{dataSource:i,numItems:e});return this.applyFilters("numItems",n.numItems,i)}createContentFromData(t,e){return new fi(t,this,e)}getItemData(t){var e;const i=(e=this.options)===null||e===void 0?void 0:e.dataSource;let n={};Array.isArray(i)?n=i[t]:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),n=i.items[t]);let o=n;o instanceof Element&&(o=this._domElementToItemData(o));const r=this.dispatch("itemData",{itemData:o||{},index:t});return this.applyFilters("itemData",r.itemData,t)}_getGalleryDOMElements(t){var e,i;return(e=this.options)!==null&&e!==void 0&&e.children||(i=this.options)!==null&&i!==void 0&&i.childSelector?xe(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){const e={element:t},i=t.tagName==="A"?t:t.querySelector("a");if(i){e.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(e.srcset=i.dataset.pswpSrcset),e.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,e.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,e.w=e.width,e.h=e.height,i.dataset.pswpType&&(e.type=i.dataset.pswpType);const o=t.querySelector("img");if(o){var n;e.msrc=o.currentSrc||o.src,e.alt=(n=o.getAttribute("alt"))!==null&&n!==void 0?n:""}(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0)}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return xt(t,this,e)}};const Z=.003;class wi{constructor(t){this.pswp=t,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this._duration=void 0,this._useAnimation=!1,this._croppedZoom=!1,this._animateRootOpacity=!1,this._animateBgOpacity=!1,this._placeholder=void 0,this._opacityElement=void 0,this._cropContainer1=void 0,this._cropContainer2=void 0,this._thumbBounds=void 0,this._prepareOpen=this._prepareOpen.bind(this),t.on("firstZoomPan",this._prepareOpen)}open(){this._prepareOpen(),this._start()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;const t=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this._duration=this.pswp.options.hideAnimationDuration,t&&t.currZoomLevel*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps(),setTimeout(()=>{this._start()},this._croppedZoom?30:0)}_prepareOpen(){if(this.pswp.off("firstZoomPan",this._prepareOpen),!this.isOpening){const t=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this._duration=this.pswp.options.showAnimationDuration,t&&t.zoomLevels.initial*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps()}}_applyStartProps(){const{pswp:t}=this,e=this.pswp.currSlide,{options:i}=t;if(i.showHideAnimationType==="fade"?(i.showHideOpacity=!0,this._thumbBounds=void 0):i.showHideAnimationType==="none"?(i.showHideOpacity=!1,this._duration=0,this._thumbBounds=void 0):this.isOpening&&t._initialThumbBounds?this._thumbBounds=t._initialThumbBounds:this._thumbBounds=this.pswp.getThumbBounds(),this._placeholder=e?.getPlaceholderElement(),t.animations.stopAll(),this._useAnimation=!!(this._duration&&this._duration>50),this._animateZoom=!!this._thumbBounds&&e?.content.usePlaceholder()&&(!this.isClosing||!t.mainScroll.isShifted()),!this._animateZoom)this._animateRootOpacity=!0,this.isOpening&&e&&(e.zoomAndPanToInitial(),e.applyCurrentZoomPan());else{var n;this._animateRootOpacity=(n=i.showHideOpacity)!==null&&n!==void 0?n:!1}if(this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>Z,this._opacityElement=this._animateRootOpacity?t.element:t.bg,!this._useAnimation){this._duration=0,this._animateZoom=!1,this._animateBgOpacity=!1,this._animateRootOpacity=!0,this.isOpening&&(t.element&&(t.element.style.opacity=String(Z)),t.applyBgOpacity(1));return}if(this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect){var o;this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=(o=this.pswp.currSlide)===null||o===void 0?void 0:o.holderElement,t.container&&(t.container.style.overflow="hidden",t.container.style.width=t.viewportSize.x+"px")}else this._croppedZoom=!1;this.isOpening?(this._animateRootOpacity?(t.element&&(t.element.style.opacity=String(Z)),t.applyBgOpacity(1)):(this._animateBgOpacity&&t.bg&&(t.bg.style.opacity=String(Z)),t.element&&(t.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(Z)))):this.isClosing&&(t.mainScroll.itemHolders[0]&&(t.mainScroll.itemHolders[0].el.style.display="none"),t.mainScroll.itemHolders[2]&&(t.mainScroll.itemHolders[2].el.style.display="none"),this._croppedZoom&&t.mainScroll.x!==0&&(t.mainScroll.resetPosition(),t.mainScroll.resize()))}_start(){this.isOpening&&this._useAnimation&&this._placeholder&&this._placeholder.tagName==="IMG"?new Promise(t=>{let e=!1,i=!0;Ae(this._placeholder).finally(()=>{e=!0,i||t(!0)}),setTimeout(()=>{i=!1,e&&t(!0)},50),setTimeout(t,250)}).finally(()=>this._initiate()):this._initiate()}_initiate(){var t,e;(t=this.pswp.element)===null||t===void 0||t.style.setProperty("--pswp-transition-duration",this._duration+"ms"),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),(e=this.pswp.element)===null||e===void 0||e.classList.toggle("pswp--ui-visible",this.isOpening),this.isOpening?(this._placeholder&&(this._placeholder.style.opacity="1"),this._animateToOpenState()):this.isClosing&&this._animateToClosedState(),this._useAnimation||this._onAnimationComplete()}_onAnimationComplete(){const{pswp:t}=this;if(this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,t.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),t.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed)t.destroy();else if(this.isOpen){var e;this._animateZoom&&t.container&&(t.container.style.overflow="visible",t.container.style.width="100%"),(e=t.currSlide)===null||e===void 0||e.applyCurrentZoomPan()}}_animateToOpenState(){const{pswp:t}=this;this._animateZoom&&(this._croppedZoom&&this._cropContainer1&&this._cropContainer2&&(this._animateTo(this._cropContainer1,"transform","translate3d(0,0,0)"),this._animateTo(this._cropContainer2,"transform","none")),t.currSlide&&(t.currSlide.zoomAndPanToInitial(),this._animateTo(t.currSlide.container,"transform",t.currSlide.getCurrentTransform()))),this._animateBgOpacity&&t.bg&&this._animateTo(t.bg,"opacity",String(t.options.bgOpacity)),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","1")}_animateToClosedState(){const{pswp:t}=this;this._animateZoom&&this._setClosedStateZoomPan(!0),this._animateBgOpacity&&t.bgOpacity>.01&&t.bg&&this._animateTo(t.bg,"opacity","0"),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","0")}_setClosedStateZoomPan(t){if(!this._thumbBounds)return;const{pswp:e}=this,{innerRect:i}=this._thumbBounds,{currSlide:n,viewportSize:o}=e;if(this._croppedZoom&&i&&this._cropContainer1&&this._cropContainer2){const r=-o.x+(this._thumbBounds.x-i.x)+i.w,a=-o.y+(this._thumbBounds.y-i.y)+i.h,l=o.x-i.w,c=o.y-i.h;t?(this._animateTo(this._cropContainer1,"transform",B(r,a)),this._animateTo(this._cropContainer2,"transform",B(l,c))):(C(this._cropContainer1,r,a),C(this._cropContainer2,l,c))}n&&(w(n.pan,i||this._thumbBounds),n.currZoomLevel=this._thumbBounds.w/n.width,t?this._animateTo(n.container,"transform",n.getCurrentTransform()):n.applyCurrentZoomPan())}_animateTo(t,e,i){if(!this._duration){t.style[e]=i;return}const{animations:n}=this.pswp,o={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{n.activeAnimations.length||this._onAnimationComplete()},target:t};o[e]=i,n.startTransition(o)}}const bi={allowPanToNext:!0,spacing:.1,loop:!0,pinchToClose:!0,closeOnVerticalDrag:!0,hideAnimationDuration:333,showAnimationDuration:333,zoomAnimationDuration:333,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,maxWidthToAnimate:4e3,clickToCloseNonZoomable:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",indexIndicatorSep:" / ",preloaderDelay:2e3,bgOpacity:.8,index:0,errorMsg:"The image cannot be loaded",preload:[1,2],easing:"cubic-bezier(.4,0,.22,1)"};class Si extends _i{constructor(t){super(),this.options=this._prepareOptions(t||{}),this.offset={x:0,y:0},this._prevViewportSize={x:0,y:0},this.viewportSize={x:0,y:0},this.bgOpacity=1,this.currIndex=0,this.potentialIndex=0,this.isOpen=!1,this.isDestroying=!1,this.hasMouse=!1,this._initialItemData={},this._initialThumbBounds=void 0,this.topBar=void 0,this.element=void 0,this.template=void 0,this.container=void 0,this.scrollWrap=void 0,this.currSlide=void 0,this.events=new Ce,this.animations=new Je,this.mainScroll=new He(this),this.gestures=new qe(this),this.opener=new wi(this),this.keyboard=new Ve(this),this.contentLoader=new yi(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this._createMainStructure();let t="pswp--open";return this.gestures.supportsTouch&&(t+=" pswp--touch"),this.options.mainClass&&(t+=" "+this.options.mainClass),this.element&&(this.element.className+=" "+t),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new Qe(this),(Number.isNaN(this.currIndex)||this.currIndex<0||this.currIndex>=this.getNumItems())&&(this.currIndex=0),this.gestures.supportsTouch||this.mouseDetected(),this.updateSize(),this.offset.y=window.pageYOffset,this._initialItemData=this.getItemData(this.currIndex),this.dispatch("gettingData",{index:this.currIndex,data:this._initialItemData,slide:void 0}),this._initialThumbBounds=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",()=>{const{itemHolders:e}=this.mainScroll;e[0]&&(e[0].el.style.display="block",this.setContent(e[0],this.currIndex-1)),e[2]&&(e[2].el.style.display="block",this.setContent(e[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this._handlePageResize.bind(this)),this.events.add(window,"scroll",this._updatePageScrollOffset.bind(this)),this.dispatch("bindEvents")}),this.mainScroll.itemHolders[1]&&this.setContent(this.mainScroll.itemHolders[1],this.currIndex),this.dispatch("change"),this.opener.open(),this.dispatch("afterInit"),!0}getLoopedIndex(t){const e=this.getNumItems();return this.options.loop&&(t>e-1&&(t-=e),t<0&&(t+=e)),R(t,0,e-1)}appendHeavy(){this.mainScroll.itemHolders.forEach(t=>{var e;(e=t.slide)===null||e===void 0||e.appendHeavy()})}goTo(t){this.mainScroll.moveIndexBy(this.getLoopedIndex(t)-this.potentialIndex)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...t){var e;(e=this.currSlide)===null||e===void 0||e.zoomTo(...t)}toggleZoom(){var t;(t=this.currSlide)===null||t===void 0||t.toggleZoom()}close(){!this.opener.isOpen||this.isDestroying||(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){var t;if(!this.isDestroying){this.options.showHideAnimationType="none",this.close();return}this.dispatch("destroy"),this._listeners={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),(t=this.element)===null||t===void 0||t.remove(),this.mainScroll.itemHolders.forEach(e=>{var i;(i=e.slide)===null||i===void 0||i.destroy()}),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(t){this.contentLoader.removeByIndex(t),this.mainScroll.itemHolders.forEach((e,i)=>{var n,o;let r=((n=(o=this.currSlide)===null||o===void 0?void 0:o.index)!==null&&n!==void 0?n:0)-1+i;if(this.canLoop()&&(r=this.getLoopedIndex(r)),r===t&&(this.setContent(e,t,!0),i===1)){var a;this.currSlide=e.slide,(a=e.slide)===null||a===void 0||a.setIsActive(!0)}}),this.dispatch("change")}setContent(t,e,i){if(this.canLoop()&&(e=this.getLoopedIndex(e)),t.slide){if(t.slide.index===e&&!i)return;t.slide.destroy(),t.slide=void 0}if(!this.canLoop()&&(e<0||e>=this.getNumItems()))return;const n=this.getItemData(e);t.slide=new Te(n,e,this),e===this.currIndex&&(this.currSlide=t.slide),t.slide.append(t.el)}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(t){if(this.isDestroying)return;const e=gt(this.options,this);!t&&$(e,this._prevViewportSize)||(w(this._prevViewportSize,e),this.dispatch("beforeResize"),w(this.viewportSize,this._prevViewportSize),this._updatePageScrollOffset(),this.dispatch("viewportSize"),this.mainScroll.resize(this.opener.isOpen),!this.hasMouse&&window.matchMedia("(any-hover: hover)").matches&&this.mouseDetected(),this.dispatch("resize"))}applyBgOpacity(t){this.bgOpacity=Math.max(t,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){if(!this.hasMouse){var t;this.hasMouse=!0,(t=this.element)===null||t===void 0||t.classList.add("pswp--has_mouse")}}_handlePageResize(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout(()=>{this.updateSize()},500)}_updatePageScrollOffset(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(t,e){this.offset.x=t,this.offset.y=e,this.dispatch("updateScrollOffset")}_createMainStructure(){this.element=A("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=A("pswp__bg","div",this.element),this.scrollWrap=A("pswp__scroll-wrap","section",this.element),this.container=A("pswp__container","div",this.scrollWrap),this.scrollWrap.setAttribute("aria-roledescription","carousel"),this.container.setAttribute("aria-live","off"),this.container.setAttribute("id","pswp__items"),this.mainScroll.appendHolders(),this.ui=new li(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return hi(this.currIndex,this.currSlide?this.currSlide.data:this._initialItemData,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}_prepareOptions(t){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(t.showHideAnimationType="none",t.zoomAnimationDuration=0),{...bi,...t}}}function k(s,t,e){const i=document.createElement(t);return s&&(i.className=s),e&&e.appendChild(i),i}function Li(s,t,e){let i=`translate3d(${s}px,0px,0)`;return e!==void 0&&(i+=` scale3d(${e},${e},1)`),i}function X(s,t,e){s.style.width=typeof t=="number"?`${t}px`:t,s.style.height=typeof e=="number"?`${e}px`:e}const x={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function Ai(s){return"button"in s&&s.button===1||s.ctrlKey||s.metaKey||s.altKey||s.shiftKey}function q(s,t,e=document){let i=[];if(s instanceof Element)i=[s];else if(s instanceof NodeList||Array.isArray(s))i=Array.from(s);else{const n=typeof s=="string"?s:t;n&&(i=Array.from(e.querySelectorAll(n)))}return i}function Ei(s){return typeof s=="function"&&s.prototype&&s.prototype.goTo}function Ct(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}class xi{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}}class Ci{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){var n,o,r;this._filters[t]||(this._filters[t]=[]),(n=this._filters[t])===null||n===void 0||n.push({fn:e,priority:i}),(o=this._filters[t])===null||o===void 0||o.sort((a,l)=>a.priority-l.priority),(r=this.pswp)===null||r===void 0||r.addFilter(t,e,i)}removeFilter(t,e){this._filters[t]&&(this._filters[t]=this._filters[t].filter(i=>i.fn!==e)),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){var i;return(i=this._filters[t])===null||i===void 0||i.forEach(n=>{e[0]=n.fn.apply(this,e)}),e[0]}on(t,e){var i,n;this._listeners[t]||(this._listeners[t]=[]),(i=this._listeners[t])===null||i===void 0||i.push(e),(n=this.pswp)===null||n===void 0||n.on(t,e)}off(t,e){var i;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(n=>e!==n)),(i=this.pswp)===null||i===void 0||i.off(t,e)}dispatch(t,e){var i;if(this.pswp)return this.pswp.dispatch(t,e);const n=new xi(t,e);return(i=this._listeners[t])===null||i===void 0||i.forEach(o=>{o.call(this,n)}),n}}class Pi{constructor(t,e){if(this.element=k("pswp__img pswp__img--placeholder",t?"img":"div",e),t){const i=this.element;i.decoding="async",i.alt="",i.src=t,i.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&(this.element.tagName==="IMG"?(X(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=Li(0,0,t/250)):X(this.element,t,e))}destroy(){var t;(t=this.element)!==null&&t!==void 0&&t.parentNode&&this.element.remove(),this.element=null}}class Ti{constructor(t,e,i){this.instance=e,this.data=t,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=x.IDLE,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(t,e){if(this.slide&&this.usePlaceholder())if(this.placeholder){const i=this.placeholder.element;i&&!i.parentElement&&this.slide.container.prepend(i)}else{const i=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new Pi(i,this.slide.container)}this.element&&!e||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=k("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=k("pswp__content","div"),this.element.innerHTML=this.data.html||""),e&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var e,i;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const n=this.element;this.updateSrcsetSizes(),this.data.srcset&&(n.srcset=this.data.srcset),n.src=(e=this.data.src)!==null&&e!==void 0?e:"",n.alt=(i=this.data.alt)!==null&&i!==void 0?i:"",this.state=x.LOADING,n.complete?this.onLoaded():(n.onload=()=>{this.onLoaded()},n.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=x.LOADED,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===x.LOADED||this.state===x.ERROR)&&this.removePlaceholder())}onError(){this.state=x.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===x.LOADING,this)}isError(){return this.state===x.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(t,e){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(X(this.element,t,e),this.isImageContent()&&!this.isError()))){const i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=e,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:e,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==x.ERROR,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,e=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||e>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=e+"px",t.dataset.largestUsedSize=String(e))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var t,e;let i=k("pswp__error-msg","div");i.innerText=(t=(e=this.instance.options)===null||e===void 0?void 0:e.errorMsg)!==null&&t!==void 0?t:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=k("pswp__content pswp__error-msg-container","div"),this.element.appendChild(i),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===x.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||Ct())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!Ct()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===x.LOADED||this.state===x.ERROR)&&this.removePlaceholder()))}}function Ii(s,t){if(s.getViewportSizeFn){const e=s.getViewportSizeFn(s,t);if(e)return e}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function N(s,t,e,i,n){let o=0;if(t.paddingFn)o=t.paddingFn(e,i,n)[s];else if(t.padding)o=t.padding[s];else{const r="padding"+s[0].toUpperCase()+s.slice(1);t[r]&&(o=t[r])}return Number(o)||0}function zi(s,t,e,i){return{x:t.x-N("left",s,t,e,i)-N("right",s,t,e,i),y:t.y-N("top",s,t,e,i)-N("bottom",s,t,e,i)}}const Pt=4e3;class Mi{constructor(t,e,i,n){this.pswp=n,this.options=t,this.itemData=e,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,e,i){const n={x:t,y:e};this.elementSize=n,this.panAreaSize=i;const o=i.x/n.x,r=i.y/n.y;this.fit=Math.min(1,o<r?o:r),this.fill=Math.min(1,o>r?o:r),this.vFill=Math.min(1,r),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const e=t+"ZoomLevel",i=this.options[e];if(i)return typeof i=="function"?i(this):i==="fill"?this.fill:i==="fit"?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,this.fit*3),this.elementSize&&t*this.elementSize.x>Pt&&(t=Pt/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}}function Tt(s,t,e){const i=t.createContentFromData(s,e);let n;const{options:o}=t;if(o){n=new Mi(o,s,-1);let r;t.pswp?r=t.pswp.viewportSize:r=Ii(o,t);const a=zi(o,r,s,e);n.update(i.width,i.height,a)}return i.lazyLoad(),n&&i.setDisplayedSize(Math.ceil(i.width*n.initial),Math.ceil(i.height*n.initial)),i}function Di(s,t){const e=t.getItemData(s);if(!t.dispatch("lazyLoadSlide",{index:s,itemData:e}).defaultPrevented)return Tt(e,t,s)}class Oi extends Ci{getNumItems(){var t;let e=0;const i=(t=this.options)===null||t===void 0?void 0:t.dataSource;i&&"length"in i?e=i.length:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),i.items&&(e=i.items.length));const n=this.dispatch("numItems",{dataSource:i,numItems:e});return this.applyFilters("numItems",n.numItems,i)}createContentFromData(t,e){return new Ti(t,this,e)}getItemData(t){var e;const i=(e=this.options)===null||e===void 0?void 0:e.dataSource;let n={};Array.isArray(i)?n=i[t]:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),n=i.items[t]);let o=n;o instanceof Element&&(o=this._domElementToItemData(o));const r=this.dispatch("itemData",{itemData:o||{},index:t});return this.applyFilters("itemData",r.itemData,t)}_getGalleryDOMElements(t){var e,i;return(e=this.options)!==null&&e!==void 0&&e.children||(i=this.options)!==null&&i!==void 0&&i.childSelector?q(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){const e={element:t},i=t.tagName==="A"?t:t.querySelector("a");if(i){e.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(e.srcset=i.dataset.pswpSrcset),e.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,e.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,e.w=e.width,e.h=e.height,i.dataset.pswpType&&(e.type=i.dataset.pswpType);const o=t.querySelector("img");if(o){var n;e.msrc=o.currentSrc||o.src,e.alt=(n=o.getAttribute("alt"))!==null&&n!==void 0?n:""}(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0)}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return Tt(t,this,e)}}class $i extends Oi{constructor(t){super(),this.options=t||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){q(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(t){if(Ai(t)||window.pswp)return;let e={x:t.clientX,y:t.clientY};!e.x&&!e.y&&(e=null);let i=this.getClickedIndex(t);i=this.applyFilters("clickedIndex",i,t,this);const n={gallery:t.currentTarget};i>=0&&(t.preventDefault(),this.loadAndOpen(i,n,e))}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);const e=t.target,n=q(this.options.children,this.options.childSelector,t.currentTarget).findIndex(o=>o===e||o.contains(e));return n!==-1?n:this.options.children||this.options.childSelector?-1:0}loadAndOpen(t,e,i){if(window.pswp||!this.options)return!1;if(!e&&this.options.gallery&&this.options.children){const n=q(this.options.gallery);n[0]&&(e={gallery:n[0]})}return this.options.index=t,this.options.initialPointerPos=i,this.shouldOpen=!0,this.preload(t,e),!0}preload(t,e){const{options:i}=this;e&&(i.dataSource=e);const n=[],o=typeof i.pswpModule;if(Ei(i.pswpModule))n.push(Promise.resolve(i.pswpModule));else{if(o==="string")throw new Error("pswpModule as string is no longer supported");if(o==="function")n.push(i.pswpModule());else throw new Error("pswpModule is not valid")}typeof i.openPromise=="function"&&n.push(i.openPromise()),i.preloadFirstSlide!==!1&&t>=0&&(this._preloadedContent=Di(t,this));const r=++this._uid;Promise.all(n).then(a=>{if(this.shouldOpen){const l=a[0];this._openPhotoswipe(l,r)}})}_openPhotoswipe(t,e){if(e!==this._uid&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;const i=typeof t=="object"?new t.default(this.options):new t(this.options);this.pswp=i,window.pswp=i,Object.keys(this._listeners).forEach(n=>{var o;(o=this._listeners[n])===null||o===void 0||o.forEach(r=>{i.on(n,r)})}),Object.keys(this._filters).forEach(n=>{var o;(o=this._filters[n])===null||o===void 0||o.forEach(r=>{i.addFilter(n,r.fn,r.priority)})}),this._preloadedContent&&(i.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),i.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),i.init()}destroy(){var t;(t=this.pswp)===null||t===void 0||t.destroy(),this.shouldOpen=!1,this._listeners={},q(this.options.gallery,this.options.gallerySelector).forEach(e=>{e.removeEventListener("click",this.onThumbnailsClick,!1)})}}const Ri=()=>{let s=null;return s=new $i({gallery:"#photoswipe-gallery",children:"a",pswpModule:Si,zoom:!1,imageClickAction:"next",tapAction:"next"}),s.on("uiRegister",()=>{s?.pswp?.ui?.registerElement({name:"custom-caption",appendTo:"root",onInit:t=>{s?.pswp?.on("change",()=>{const e=s?.pswp?.currSlide?.data.element;if(e){const i=e.querySelector(".caption-content");t.innerHTML=i?.innerHTML||""}})}})}),s.init(),()=>{s&&(s.destroy(),s=null)}},Bi=()=>{const s=document.querySelector(".js-limit-scroll-progress-bar"),t=document.querySelector(".c-progress__bar");if(!t)return;const{documentElement:e}=document;let i=e.scrollHeight-e.clientHeight;if(!i)return;const n=e.scrollTop;s&&(i=s.scrollHeight-e.clientHeight+(window.pageYOffset+s.getBoundingClientRect().top));const o=Math.round(n/i*100);t.style.width=`${o}%`,o>=100&&(t.style.width="100%")},Fi=()=>{document.querySelector(".c-progress")&&window.addEventListener("scroll",Bi)},Zi=(s={})=>{const{buttonSelector:t=".c-scroll-to-top"}=s,e=document.querySelector(t),i=e?.querySelector("button");if(!e||!i)return;const n=e.dataset.triggerSelector||"[data-scroll-trigger]",o=parseInt(e.dataset.triggerOffset||"0",10);e.style.display="none";const r=()=>{const l=document.querySelector(n);let c=!1;if(l){const d=l.getBoundingClientRect().top;c=window.pageYOffset>=d-o}else c=window.pageYOffset>300;e.style.display=c?"block":"none"},a=()=>{window.scrollTo({top:0,behavior:"smooth"})};window.addEventListener("scroll",r),i.addEventListener("click",a),r()},Y="#page-content",J="#text-tooltip",ki=".tooltip-btn",It="c-text-tooltip--show",qi=["#page-content .c-content p","#page-content .c-content h2","#page-content .c-content h3","#page-content .c-content h4","#page-content .c-content h5","#page-content .c-content h6","#page-content .c-content li","#page-content .c-content span","#page-content header span","#page-content header h1","#page-content header h2"],zt=(s,t)=>s instanceof Element?t.some(e=>s.matches(e)):!1,Ni=(s,t)=>{const e=s.startContainer.nodeType===Node.ELEMENT_NODE?s.startContainer:s.startContainer.parentElement,i=s.endContainer.nodeType===Node.ELEMENT_NODE?s.endContainer:s.endContainer.parentElement;return!!e&&zt(e,t)||!!i&&zt(i,t)},Hi=s=>{if(!s.focusNode)return null;const t=s.anchorNode?.compareDocumentPosition(s.focusNode);return t?(t&4)>0:s.anchorOffset<s.focusOffset},Wi=(s,t,e)=>{const i=document.querySelector(`${Y} ${J}`),n=document.querySelector(`${Y}`),o=document.querySelectorAll(`${Y} ${J} ${ki}`);if(!i||!n){console.warn("Text tooltip : Tooltip or it's parent are not found in the DOM");return}Array.from(o).forEach(l=>l.setAttribute("data-selected-text",e));const r=s.getClientRects(),a=r[t?r.length-1:0];i.style.top=`${a.top-n.getBoundingClientRect().top-(i.offsetHeight+10)}px`,a.width<i.offsetWidth?i.style.left=`${a.left-n.getBoundingClientRect().left+a.width/2-i.offsetWidth/2}px`:t?i.style.left=`${a.left-n.getBoundingClientRect().left+a.width-i.offsetWidth}px`:i.style.left=`${a.left-n.getBoundingClientRect().left}px`,i.classList.add(It)},Mt=()=>{const s=document.querySelector(`${J}`);s&&s.classList.remove(It)},H=({type:s})=>{const t=window.getSelection();if(s==="selectionchange"){Mt();return}if(!t||!t.rangeCount)return;const e=t.getRangeAt(0),i=t.toString().trim();if(i.length){const n=Ni(e,qi),o=Hi(t)||!1;n&&Wi(e,o,i);return}Mt()},Vi=()=>{if(!window?.getSelection){console.warn("Selection API isn't supported");return}document.addEventListener("mouseup",H),document.addEventListener("selectionchange",H),document.addEventListener("touchend",H),document.addEventListener("touchcancel",H)},ji=s=>{const{target:t}=s;if(t instanceof Element){const e=t.closest(".c-search-form--button");e&&(s.preventDefault(),e.classList.remove("c-search-form--button"))}},Gi=(s=document.querySelector(".c-search-form--button"))=>{s&&s.addEventListener("click",t=>{ji(t)})},Ui=({tabsContainerElement:s,event:t})=>{t.preventDefault();const e=t.target;if(!(e instanceof HTMLButtonElement))return;const i=s.querySelectorAll('[role="tab"]'),n=s.querySelectorAll('[role="tabpanel"]'),o=e.getAttribute("aria-controls"),r=Object.values(n).find(a=>a.id===o);i.forEach(a=>{a.setAttribute("aria-selected","false")}),n.forEach(a=>{a.setAttribute("aria-hidden","true")}),e.setAttribute("aria-selected","true"),r&&r.removeAttribute("aria-hidden")},Dt=s=>s.code==="ArrowLeft"||s.keyCode===39,Ot=s=>s.code==="ArrowRight"||s.keyCode===37,Ki=(s=document.querySelectorAll(".js-tabs"))=>{s.length>0&&s.forEach(t=>{const e=t.querySelectorAll('[role="tab"]');e.forEach(n=>{n.addEventListener("click",o=>{Ui({tabsContainerElement:t,event:o})})});const i=t.querySelector('[role="tablist"]');if(i&&e.length>0){let n=0;i.addEventListener("keydown",o=>{o instanceof KeyboardEvent&&(Dt(o)||Ot(o))&&(e[n].setAttribute("tabindex","-1"),Dt(o)?(n+=1,n>=e.length&&(n=0)):Ot(o)&&(n-=1,n<0&&(n=e.length-1)),e[n].setAttribute("tabindex","0"),e[n].focus())})}})},W=s=>{const[t,e]=s.split("h").map(Number);return t*60+e},$t=()=>{const s=new Date,t=s.getHours(),e=s.getMinutes();return t*60+e},Xi=(s,t)=>{const e=$t();if(e<s||e>t)return 0;const i=t-s;return(e-s)/i},Yi=s=>{const t=$t();let e=null,i=null,n=-1;return Array.from(s).find((o,r,a)=>{if(r===a.length-1)return!1;const l=o.textContent,c=a[r+1].textContent;if(!l||!c)return!1;const d=W(l),h=W(c);return t>=d&&t<h?(e=l,i=c,n=r,!0):!1}),{currentIntervalStartTime:e,currentIntervalEndTime:i,currentIntervalIndex:n}},Ji=()=>{const s=document.querySelectorAll(".c-timeline__time");if(!s||s.length<2)return;const t=document.querySelector(".c-timeline__progress-bar"),{currentIntervalStartTime:e,currentIntervalEndTime:i,currentIntervalIndex:n}=Yi(s);if(!e||!i)return;const o=W(e),r=W(i),a=Xi(o,r);if(t instanceof HTMLElement){if(t.classList.contains("c-timeline__progress-bar--is-desktop")&&s.length>=5){const l="172px / 2";switch(n){case 0:t.style.width=`calc(${l} + (((${l} + 25% - ${l} / 2) - ${l}) * ${a})`;break;case 1:t.style.width=`calc((${l} + 25% - ${l} / 2) + (((50%) - (${l} + 25% - ${l} / 2)) * ${a})`;break;case 2:t.style.width=`calc((50%) + (((75% - ${l} / 2) - (50%)) * ${a})`;break;case 3:t.style.width=`calc((75% - ${l} / 2) + (((100% - ${l}) - (75% - ${l} / 2)) * ${a}`;break;default:t.style.width="0%"}}if(t.classList.contains("c-timeline__progress-bar--is-mobile")){const l="45px / 2",c="20px";switch(n){case 0:case 1:case 2:case 3:t.style.width=`calc((${c} + ${l}) + (((60% + ${l}) - (${c} + ${l})) * ${a})`;break;default:t.style.width="0%"}if(n===1||n===2||n===3){const d=document.querySelectorAll(".c-timeline__time"),h=document.querySelectorAll(".c-timeline__event");d.length>0&&h.length>0&&(d[0].textContent=e,d[1].textContent=i,h[0].textContent=h[n].textContent,h[1].textContent=h[n+1].textContent)}}}},Q="c-icon-item__container--is-highlighted",Qi=s=>{s.find(e=>e.classList.contains(Q))?.classList.remove(Q)},ts=()=>{const s=document.querySelector(".c-toolbar");if(s){const t=window.location.origin+window.location.pathname,e=Array.from(s.querySelectorAll(".c-icon-item__container"));Qi(e),e.find(n=>n.querySelector("a")?.getAttribute("href")===t)?.classList.add(Q)}},tt=s=>{const t=s||document.querySelector(".c-map-towns");if(!t){new MutationObserver((o,r)=>{if(typeof document<"u"){const a=document.querySelector(".c-map-towns");a&&(r.disconnect(),tt(a))}}).observe(document.body,{childList:!0,subtree:!0});return}const e=()=>{const n=document.querySelectorAll(".js-city-marker");if(n.length===0)return!1;const o=()=>{let r=!0;n.forEach(a=>{if(a.getAttribute("aria-hidden")==="false")return;const l=a.querySelector(".js-city-anchor"),c=a.querySelector(".js-city-text"),d=a.querySelector(".js-city-bg");if(!(l instanceof SVGGraphicsElement)||!(c instanceof SVGTextElement)||!(d instanceof SVGRectElement))return;const h=l.getBBox();if(h.width>0){const{x:u,y:p,width:f,height:m}=h,_=a.getAttribute("data-scale"),S=_?` scale(${_})`:"";a.setAttribute("transform",`translate(${u+f/2}, ${p+m/2})${S}`);const L=c.getBBox(),g=8,y=4,b=8,V=L.width+g,it=L.height+y;d.setAttribute("width",`${V}`),d.setAttribute("height",`${it}`),d.setAttribute("x",`${-V/2}`),d.setAttribute("y",`${-it-b}`);const ls=-it/2-b;c.setAttribute("y",`${ls}`),a.setAttribute("aria-hidden","false")}else r=!1}),r||requestAnimationFrame(o)};return requestAnimationFrame(o),!0};if(e())return;new MutationObserver((n,o)=>{e()&&o.disconnect()}).observe(t,{childList:!0,subtree:!0})},es={10:[{id:"10387",name:"Troyes"},{id:"10323",name:"Romilly-sur-Seine"},{id:"10033",name:"Bar-sur-Aube"}],11:[{id:"11262",name:"Narbonne"},{id:"11069",name:"Carcassonne"},{id:"11076",name:"Castelnaudary"}],12:[{id:"12202",name:"Rodez"},{id:"12145",name:"Millau"},{id:"12300",name:"Villefranche-de-Rouergue"}],13:[{id:"13055",name:"Marseille"},{id:"13001",name:"Aix-en-Provence"},{id:"13004",name:"Arles"}],14:[{id:"14118",name:"Caen"},{id:"14366",name:"Lisieux"},{id:"14762",name:"Vire Normandie"}],15:[{id:"15014",name:"Aurillac"},{id:"15187",name:"Saint-Flour"},{id:"15120",name:"Mauriac"}],16:[{id:"16015",name:"Angoulême"},{id:"16102",name:"Cognac"},{id:"16028",name:"Barbezieux-Saint-Hilaire"}],17:[{id:"17300",name:"La Rochelle"},{id:"17415",name:"Saintes"},{id:"17299",name:"Rochefort"}],18:[{id:"18033",name:"Bourges"},{id:"18279",name:"Vierzon"},{id:"18197",name:"Saint-Amand-Montrond"}],19:[{id:"19031",name:"Brive-la-Gaillarde"},{id:"19272",name:"Tulle"},{id:"19275",name:"Ussel"}],21:[{id:"21231",name:"Dijon"},{id:"21054",name:"Beaune"},{id:"21038",name:"Auxonne"}],22:[{id:"22278",name:"Saint-Brieuc"},{id:"22113",name:"Lannion"},{id:"22093",name:"Lamballe-Armor"}],23:[{id:"23096",name:"Guéret"},{id:"23176",name:"La Souterraine"},{id:"23008",name:"Aubusson"}],24:[{id:"24322",name:"Périgueux"},{id:"24037",name:"Bergerac"},{id:"24520",name:"Sarlat-la-Canéda"}],25:[{id:"25056",name:"Besançon"},{id:"25388",name:"Montbéliard"},{id:"25462",name:"Pontarlier"}],26:[{id:"26362",name:"Valence"},{id:"26198",name:"Montélimar"},{id:"26235",name:"Pierrelatte"}],27:[{id:"27229",name:"Évreux"},{id:"27681",name:"Vernon"},{id:"27375",name:"Louviers"}],28:[{id:"28085",name:"Chartres"},{id:"28134",name:"Dreux"},{id:"28088",name:"Châteaudun"}],29:[{id:"29019",name:"Brest"},{id:"29232",name:"Quimper"},{id:"29039",name:"Concarneau"}],30:[{id:"30189",name:"Nîmes"},{id:"30007",name:"Alès"},{id:"30028",name:"Bagnols-sur-Cèze"}],31:[{id:"31555",name:"Toulouse"},{id:"31483",name:"Saint-Gaudens"},{id:"31033",name:"Auterive"}],32:[{id:"32013",name:"Auch"},{id:"32160",name:"L'Isle-Jourdain"},{id:"32107",name:"Condom"}],33:[{id:"33063",name:"Bordeaux"},{id:"33529",name:"La Teste-de-Buch"},{id:"33243",name:"Libourne"}],34:[{id:"34172",name:"Montpellier"},{id:"34032",name:"Béziers"},{id:"34301",name:"Sète"}],35:[{id:"35238",name:"Rennes"},{id:"35288",name:"Saint-Malo"},{id:"35115",name:"Fougères"}],36:[{id:"36044",name:"Châteauroux"},{id:"36088",name:"Issoudun"},{id:"36018",name:"Le Blanc"}],37:[{id:"37261",name:"Tours"},{id:"37003",name:"Amboise"},{id:"37072",name:"Chinon"}],38:[{id:"38185",name:"Grenoble"},{id:"38544",name:"Vienne"},{id:"38053",name:"Bourgoin-Jallieu"}],39:[{id:"39198",name:"Dole"},{id:"39300",name:"Lons-le-Saunier"},{id:"39478",name:"Saint-Claude"}],40:[{id:"40192",name:"Mont-de-Marsan"},{id:"40088",name:"Dax"},{id:"40046",name:"Biscarrosse"}],41:[{id:"41018",name:"Blois"},{id:"41194",name:"Romorantin-Lanthenay"},{id:"41269",name:"Vendôme"}],42:[{id:"42218",name:"Saint-Étienne"},{id:"42187",name:"Roanne"},{id:"42147",name:"Montbrison"}],43:[{id:"43157",name:"Le Puy-en-Velay"},{id:"43137",name:"Monistrol-sur-Loire"},{id:"43040",name:"Brioude"}],44:[{id:"44109",name:"Nantes"},{id:"44184",name:"Saint-Nazaire"},{id:"44131",name:"Pornic"}],45:[{id:"45234",name:"Orléans"},{id:"45208",name:"Montargis"},{id:"45155",name:"Gien"}],46:[{id:"46042",name:"Cahors"},{id:"46102",name:"Figeac"},{id:"46127",name:"Gourdon"}],47:[{id:"47001",name:"Agen"},{id:"47323",name:"Villeneuve-sur-Lot"},{id:"47157",name:"Marmande"}],48:[{id:"48095",name:"Mende"},{id:"48140",name:"Saint-Chély-d'Apcher"},{id:"48080",name:"Langogne"}],49:[{id:"49007",name:"Angers"},{id:"49099",name:"Cholet"},{id:"49328",name:"Saumur"}],50:[{id:"50129",name:"Cherbourg-en-Cotentin"},{id:"50502",name:"Saint-Lô"},{id:"50218",name:"Granville"}],51:[{id:"51454",name:"Reims"},{id:"51108",name:"Châlons-en-Champagne"},{id:"51230",name:"Épernay"}],52:[{id:"52448",name:"Saint-Dizier"},{id:"52121",name:"Chaumont"},{id:"52269",name:"Langres"}],53:[{id:"53130",name:"Laval"},{id:"53062",name:"Château-Gontier-sur-Mayenne"},{id:"53147",name:"Mayenne"}],54:[{id:"54395",name:"Nancy"},{id:"54329",name:"Lunéville"},{id:"54528",name:"Toul"}],55:[{id:"55545",name:"Verdun"},{id:"55029",name:"Bar-le-Duc"},{id:"55122",name:"Commercy"}],56:[{id:"56121",name:"Lorient"},{id:"56260",name:"Vannes"},{id:"56178",name:"Pontivy"}],57:[{id:"57463",name:"Metz"},{id:"57672",name:"Thionville"},{id:"57227",name:"Forbach"}],58:[{id:"58194",name:"Nevers"},{id:"58086",name:"Cosne-Cours-sur-Loire"},{id:"58095",name:"Decize"}],59:[{id:"59350",name:"Lille"},{id:"59183",name:"Dunkerque"},{id:"59606",name:"Valenciennes"}],60:[{id:"60057",name:"Beauvais"},{id:"60159",name:"Compiègne"},{id:"60175",name:"Creil"}],61:[{id:"61001",name:"Alençon"},{id:"61169",name:"Flers"},{id:"61006",name:"Argentan"}],62:[{id:"62193",name:"Calais"},{id:"62041",name:"Arras"},{id:"62160",name:"Boulogne-sur-Mer"}],63:[{id:"63113",name:"Clermont-Ferrand"},{id:"63178",name:"Issoire"},{id:"63430",name:"Thiers"}],64:[{id:"64445",name:"Pau"},{id:"64102",name:"Bayonne"},{id:"64260",name:"Hendaye"}],65:[{id:"65440",name:"Tarbes"},{id:"65258",name:"Lannemezan"},{id:"65025",name:"Argelès-Gazost"}],66:[{id:"66136",name:"Perpignan"},{id:"66049",name:"Céret"},{id:"66149",name:"Prades"}],67:[{id:"67482",name:"Strasbourg"},{id:"67180",name:"Haguenau"},{id:"67462",name:"Sélestat"}],68:[{id:"68224",name:"Mulhouse"},{id:"68066",name:"Colmar"},{id:"68297",name:"Saint-Louis"}],69:[{id:"69123",name:"Lyon"},{id:"69264",name:"Villefranche-sur-Saône"},{id:"69091",name:"Givors"}],70:[{id:"70550",name:"Vesoul"},{id:"70285",name:"Héricourt"},{id:"70310",name:"Lure"}],71:[{id:"71076",name:"Chalon-sur-Saône"},{id:"71270",name:"Mâcon"},{id:"71153",name:"Le Creusot"}],72:[{id:"72181",name:"Le Mans"},{id:"72154",name:"La Flèche"},{id:"72264",name:"Sablé-sur-Sarthe"}],73:[{id:"73065",name:"Chambéry"},{id:"73011",name:"Albertville"},{id:"73248",name:"Saint-Jean-de-Maurienne"}],74:[{id:"74010",name:"Annecy"},{id:"74281",name:"Thonon-les-Bains"},{id:"74012",name:"Annemasse"}],75:[{id:"75056",name:"Paris"}],76:[{id:"76351",name:"Le Havre"},{id:"76540",name:"Rouen"},{id:"76217",name:"Dieppe"}],77:[{id:"77284",name:"Meaux"},{id:"77108",name:"Chelles"},{id:"77288",name:"Melun"}],78:[{id:"78646",name:"Versailles"},{id:"78361",name:"Mantes-la-Jolie"},{id:"78172",name:"Conflans-Sainte-Honorine"}],79:[{id:"79191",name:"Niort"},{id:"79049",name:"Bressuire"},{id:"79329",name:"Thouars"}],80:[{id:"80021",name:"Amiens"},{id:"80001",name:"Abbeville"},{id:"80016",name:"Albert"}],81:[{id:"81004",name:"Albi"},{id:"81065",name:"Castres"},{id:"81105",name:"Graulhet"}],82:[{id:"82121",name:"Montauban"},{id:"82033",name:"Castelsarrasin"},{id:"82037",name:"Caussade"}],83:[{id:"83137",name:"Toulon"},{id:"83061",name:"Fréjus"},{id:"83050",name:"Draguignan"}],84:[{id:"84007",name:"Avignon"},{id:"84031",name:"Carpentras"},{id:"84087",name:"Orange"}],85:[{id:"85191",name:"La Roche-sur-Yon"},{id:"85194",name:"Les Sables-d'Olonne"},{id:"85047",name:"Challans"}],86:[{id:"86194",name:"Poitiers"},{id:"86066",name:"Châtellerault"},{id:"86070",name:"Chauvigny"}],87:[{id:"87085",name:"Limoges"},{id:"87154",name:"Saint-Junien"},{id:"87187",name:"Saint-Yrieix-la-Perche"}],88:[{id:"88160",name:"Épinal"},{id:"88413",name:"Saint-Dié-des-Vosges"},{id:"88196",name:"Gérardmer"}],89:[{id:"89024",name:"Auxerre"},{id:"89387",name:"Sens"},{id:"89206",name:"Joigny"}],90:[{id:"90010",name:"Belfort"},{id:"90081",name:"Réchésy"}],91:[{id:"91228",name:"Évry-Courcouronnes"},{id:"91223",name:"Étampes"},{id:"91692",name:"Les Ulis"}],92:[{id:"92012",name:"Boulogne-Billancourt"}],93:[{id:"93066",name:"Saint-Denis"}],94:[{id:"94081",name:"Vitry-sur-Seine"}],95:[{id:"95018",name:"Argenteuil"},{id:"95487",name:"Persan"},{id:"95351",name:"Louvres"}],971:[{id:"97101",name:"Les Abymes"},{id:"97128",name:"Sainte-Anne"},{id:"97118",name:"Petit-Bourg"}],972:[{id:"97209",name:"Fort-de-France"},{id:"97224",name:"Saint-Joseph"},{id:"97220",name:"Rivière-Pilote"}],973:[{id:"97311",name:"Saint-Laurent-du-Maroni"},{id:"97304",name:"Kourou"}],974:[{id:"97411",name:"Saint-Denis"},{id:"97416",name:"Saint-Pierre"},{id:"97409",name:"Saint-André"}],"03":[{id:"03185",name:"Montluçon"},{id:"03310",name:"Vichy"},{id:"03190",name:"Moulins"}],"04":[{id:"04112",name:"Manosque"},{id:"04070",name:"Digne-les-Bains"},{id:"04209",name:"Sisteron"}],"09":[{id:"09225",name:"Pamiers"},{id:"09261",name:"Saint-Girons"},{id:"09160",name:"Lavelanet"}],"01":[{id:"01053",name:"Bourg-en-Bresse"},{id:"01283",name:"Oyonnax"},{id:"01033",name:"Valserhône"}],"06":[{id:"06088",name:"Nice"},{id:"06029",name:"Cannes"},{id:"06083",name:"Menton"}],"2B":[{id:"2B033",name:"Bastia"},{id:"2B096",name:"Corte"},{id:"2B050",name:"Calvi"}],"2A":[{id:"2A004",name:"Ajaccio"},{id:"2A247",name:"Porto-Vecchio"},{id:"2A032",name:"Bastelicaccia"}],"02":[{id:"02691",name:"Saint-Quentin"},{id:"02722",name:"Soissons"},{id:"02408",name:"Laon"}],"07":[{id:"07010",name:"Annonay"},{id:"07019",name:"Aubenas"},{id:"07324",name:"Tournon-sur-Rhône"}],"05":[{id:"05061",name:"Gap"},{id:"05023",name:"Briançon"},{id:"05046",name:"Embrun"}],"08":[{id:"08105",name:"Charleville-Mézières"},{id:"08362",name:"Rethel"},{id:"08190",name:"Givet"}]},is=(s,t)=>{if(s.startsWith("97"))return Array.from(document.querySelectorAll(`path[id^="town-${s}"][id$="-drom"]`));const e=`[id^="town-${s}"]`;return t?Array.from(t.querySelectorAll(e)):[]},ss=(s,t,e,i)=>{(i.startsWith("97")?s:document.querySelector(`.c-map-towns__layer-towns [href="#${e}"], .c-map-towns__layer-towns [xlink\\:href="#${e}"]`))?.classList.forEach(o=>{o.includes("--")&&t.classList.add(o)})},ns=(s,t)=>{const e=s.getAttribute("id"),i=s.getAttribute("data-url"),n=s.getAttribute("data-name");if(!e||!i)return null;const o=document.createElementNS("http://www.w3.org/2000/svg","a");o.setAttribute("href",i),n&&o.setAttribute("title",n);let r;if(t.startsWith("97")){const a=s.cloneNode(!0);if(!(a instanceof SVGElement))return null;r=a,r.removeAttribute("id")}else r=document.createElementNS("http://www.w3.org/2000/svg","use"),r.setAttribute("href",`#${e}`);return r.classList.add("c-map-towns__path"),ss(s,r,e,t),o.appendChild(r),o},os=(s,t,e)=>{const i=document.createElementNS("http://www.w3.org/2000/svg","g");i.setAttribute("class","js-city-marker c-map-towns__city-marker"),i.setAttribute("aria-hidden","true"),i.setAttribute("data-scale",e.toString());const n=document.createElementNS("http://www.w3.org/2000/svg","use"),r=t.startsWith("97")?`#town-${t}-drom`:`#town-${t}`;n.setAttribute("href",r),n.setAttribute("class","js-city-anchor c-map-towns__city-anchor");const a=document.createElementNS("http://www.w3.org/2000/svg","circle");a.setAttribute("class","c-map-towns__city-circle"),a.setAttribute("r","5"),a.setAttribute("fill","white"),a.setAttribute("stroke","black"),a.setAttribute("strokeWidth","1");const l=document.createElementNS("http://www.w3.org/2000/svg","rect");l.setAttribute("class","js-city-bg"),l.setAttribute("fill","white"),l.setAttribute("rx","4"),l.setAttribute("ry","4");const c=document.createElementNS("http://www.w3.org/2000/svg","text");return c.setAttribute("class","js-city-text c-map-towns__city-text"),c.textContent=s,i.appendChild(n),i.appendChild(a),i.appendChild(l),i.appendChild(c),i},rs=(s,t,e)=>{s.innerHTML="",e.forEach(c=>s.appendChild(c));const i=s.getBBox(),n=5,o=i.width+n*2,r=i.height+n*2;t.setAttribute("viewBox",`${i.x-n} ${i.y-n} ${o} ${r}`);const a=t.clientWidth||800,l=t.clientHeight||600;return Math.max(o/a,r/l)};let Rt=!1;const et=()=>{if(Rt)return;if(!document.querySelector(".c-map-towns")){new MutationObserver((h,u)=>{typeof document<"u"&&document.querySelector(".c-map-towns")&&(u.disconnect(),et())}).observe(document.body,{childList:!0,subtree:!0});return}const t=document.getElementById("js-zoom-overlay"),e=document.getElementById("js-zoom-svg"),i=document.getElementById("js-zoom-group"),n=document.getElementById("js-zoom-close");if(!(t instanceof HTMLElement)||!(e instanceof SVGSVGElement)||!(i instanceof SVGGElement)||!(n instanceof HTMLElement)){requestAnimationFrame(et);return}Rt=!0;const o=document.querySelector(".c-map-towns__map"),r=document.querySelector(".c-map-towns__droms"),a=document.getElementById("js-zoom-label"),l=d=>{const{target:h}=d;if(!(h instanceof Element))return;const u=h?.closest(".c-map-towns__dept-trigger");if(!u)return;const p=u.getAttribute("id")?.replace("out-","")||"",f=u.getAttribute("data-name"),m=document.querySelector(".c-map-towns__sprite"),S=is(p,m).map(b=>ns(b,p)).filter(b=>b!==null);a&&f&&(a.textContent=f);const L=rs(i,e,S);(es[p]||[]).forEach(b=>{const V=os(b.name,b.id,L);i.appendChild(V)}),tt(i),t.setAttribute("aria-hidden","false")};o?.addEventListener("click",l),r?.addEventListener("click",l),n.addEventListener("click",()=>{t.setAttribute("aria-hidden","true")}),t.addEventListener("click",d=>{d.target===t&&t.setAttribute("aria-hidden","true")})},as=()=>{se(),Ki(),Vt(),le(),Jt(),Fi(),Ri(),me(),Gi(),j("winterOlympicsGames","countdown-winter-olympics-games"),j("eurovision","countdown-eurovision"),j("worldFoot2026","countdown-world-foot-2026"),Vi(),Ht(),oe(),Ut(),Nt("localisation-input","https://www.20minutes.fr/elections/resultats/recherche","?searchValue=","text","text"),Gt(),tt(),ts(),Zt(),kt(),re(),et(),we(),be(),ne(),Ft(),Ji(),Zi()};T.initScripts=as,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(T,z){typeof exports=="object"&&typeof module<"u"?z(exports):typeof define=="function"&&define.amd?define(["exports"],z):(T=typeof globalThis<"u"?globalThis:T||self,z(T.scripts={}))})(this,(function(T){"use strict";const z=()=>/Android/i.test(navigator.userAgent),Ft=typeof window<"u"&&navigator.userAgent.toLowerCase().includes("firefox"),Zt=()=>{const s=document.getElementById("js-download-band");s&&z()&&s.setAttribute("href","https://app.adjust.com/15shf6wg?campaign=Bandeau_1&deep_link=20minutes%3A%2F%2Fhome")},qt=()=>{const s=document.querySelector("#js-election-selector");s&&s.addEventListener("change",t=>{window.location.replace(t.target.value)})},kt=()=>{const s=document.querySelector(".c-search-banner");if(!s)return;const t=document.getElementById("js-search-banner-expand-button");if(t instanceof HTMLButtonElement){if(t.hasAttribute("data-search-banner-listener-attached"))return;const e=s.querySelector("[aria-expanded]"),i=s.querySelector("[aria-hidden]");if(!e||!i)return;t.setAttribute("data-search-banner-listener-attached","true"),t.addEventListener("click",()=>{e.getAttribute("aria-expanded")==="true"?(e.setAttribute("aria-expanded","false"),i.setAttribute("aria-hidden","true")):(e.setAttribute("aria-expanded","true"),i.setAttribute("aria-hidden","false"))})}},Nt=[{text:"Paris",_index:"town_1717424751904",_id:"75056",_score:1,_source:{output:"Paris (75000)",url:"/elections/resultats/paris/paris-75000"}},{text:"Paris 10ème Arrondissement",_index:"town_1717424751904",_id:"75056AR10",_score:1,_source:{output:"Paris 10ème Arrondissement (75010)",url:"/elections/resultats/paris/paris-75010"}},{text:"Paris 11ème Arrondissement",_index:"town_1717424751904",_id:"75056AR11",_score:1,_source:{output:"Paris 11ème Arrondissement (75011)",url:"/elections/resultats/paris/paris-75011"}}],Ht=(s,t,e,i,n,o)=>{const r=document.getElementById(s);if(!r)return;const a=r.dataset.storybook,l=r.querySelector(`#${s}-search`),c=l?.getAttribute("data-api-url"),d=r.querySelector(".c-autocomplete__menu");if(!l||!d||!c)return;const h=r.querySelector(".c-autocomplete__input-spinner"),u=l.getAttribute("data-trigger-message"),m=async g=>{try{let _;return a&&t.includes("20minutes.fr")?_=Nt:_=await(await fetch(`${c}${e}${encodeURIComponent(g)}`)).json(),o?_[o]:_}catch(_){return console.error("Error fetching autocomplete results:",_),[]}},f=(g,_)=>{const w=document.createElement("li");w.id=`/${g}`,w.textContent=_,w.addEventListener("click",()=>{l instanceof HTMLInputElement&&(l.value=_,d.classList.add("u-hidden"))}),d.appendChild(w)},p=()=>{h?.classList.toggle("u-hidden")},y=()=>{const g=document.createElement("li");g.textContent=u,d.appendChild(g)},S=async g=>{p(),d.classList.remove("u-hidden");const _=await m(g);d.innerHTML="",_.length===0&&d.classList.add("u-hidden"),_.forEach(w=>{f(w[i],w[n])}),p()},L=g=>{if(!(g.target instanceof HTMLInputElement))return;const _=g.target.value;d.classList.remove("u-hidden"),_.length>=3?S(_):(d.innerHTML="",y())};l.addEventListener("input",L),l.addEventListener("focusout",()=>{setTimeout(()=>d.classList.add("u-hidden"),300)}),l.addEventListener("focusin",()=>{d.childElementCount>0&&d.classList.remove("u-hidden")})},Wt=()=>{const s=document.querySelector(".js-content-header"),t=document.querySelector(".js-limit-scroll-close-article-btn"),e=document.querySelector(".js-close-article-btn"),i=document.querySelector(".c-header-mobile"),n=i instanceof HTMLElement?i.offsetHeight:0;if(s&&t&&e){const o=new IntersectionObserver(()=>{const r=e.classList,a=r.contains("u-hidden"),l=s.getBoundingClientRect().bottom-n,c=t.getBoundingClientRect().bottom-n;a&&l<=0&&c>=0&&r.remove("u-hidden"),!a&&(l>=0||c<=0)&&r.add("u-hidden")},{root:document,rootMargin:`-${n}px 0px 0px 0px`});o.observe(s),o.observe(t)}},Vt=s=>{s.stopImmediatePropagation(),s.preventDefault();const t=s.currentTarget;if(t instanceof HTMLButtonElement){const i=t.parentElement?.querySelector(`#${t.getAttribute("aria-controls")}`);t.getAttribute("aria-expanded")==="true"?(t.setAttribute("aria-expanded","false"),i?.setAttribute("aria-hidden","true")):(t.setAttribute("aria-expanded","true"),i?.setAttribute("aria-hidden","false"))}},jt=(s=document.querySelector(".js-collapse__button"))=>{s&&document.querySelectorAll(".c-collapse__button").forEach(e=>{e.addEventListener("click",i=>{Vt(i)})})},j=(s,t)=>{const e=document.querySelector(`#${t}`);if(e){const i=e.querySelector(".js-countdown-days"),n=e.querySelector(".js-countdown-hours"),o=e.querySelector(".js-countdown-minutes"),r=e.querySelector(".js-countdown-seconds");if(!i||!n||!o||!r)return;window.counters={paralympicsGames:"2024-08-28 20:00:00",winterOlympicsGames:"2026-02-06 20:00:00",eurovision:"2026-05-16 21:00:00",worldFoot2026:"2026-06-11 15:00:00"};const a=window.counters[s],l=new Date(a).getTime(),c=setInterval(()=>{const d=new Date().getTime(),h=l-d;if(h<=0)clearInterval(c);else{const u=Math.floor(h/864e5),m=Math.floor(h%(1e3*60*60*24)/(1e3*60*60)),f=Math.floor(h%(1e3*60*60)/(1e3*60)),p=Math.floor(h%(1e3*60)/1e3);i.innerHTML=u.toString(),n.innerHTML=m.toString(),o.innerHTML=f.toString(),r.innerHTML=p.toString()}},1e3)}},Gt=s=>{const t=s.getBBox(),e=t.width/20;return[t.x-e,t.y-e,t.width+e*2,t.height+e*2].join(" ")},Ut=()=>{const s=document.querySelector(".c-map-districts-container"),t=document.querySelector(".c-map-districts");if(!s||!t)return;const e=document.querySelector(".c-map-districts-container__description"),i=document.querySelector(".c-map-districts-container__department"),n=document.querySelector(".c-map-districts-container__unzoom-button");let o=t;const r=t.getAttribute("viewBox"),a=(f,p)=>f.matches?.call(f,p),l=(f,p,y=".c-map-districts__zoomable:not(.js-selected-area)")=>{if(!f)return;let S,L=f.parentElement;for(;L instanceof SVGGraphicsElement&&L!==p;)a(L,y)&&(S=L),L=L.parentElement;return S},c=(f,p,y)=>{if(!f)return;let S=f.parentElement;for(;S instanceof SVGGraphicsElement&&S!==y;){if(p===S)return!0;S=S.parentElement}return y===p},d=(f,p)=>{if(p&&n&&e){s.classList.remove("c-map-districts-container--department-view"),e.classList.remove("u-hidden"),i?.classList.add("u-hidden"),n.classList.add("u-hidden"),p!==r&&(e.classList.add("u-hidden"),n.classList.remove("u-hidden")),o.classList.remove("js-selected-area"),o=f;const y=o.getAttribute("data-info");i&&y&&(s.classList.add("c-map-districts-container--department-view"),i.classList.remove("u-hidden"),i.innerHTML=y),o.classList.add("js-selected-area"),t.setAttribute("viewBox",p)}},h=f=>{f.stopPropagation();const p=f.currentTarget;if(o&&t&&p instanceof SVGGraphicsElement){if(p===o)return;if(f.preventDefault(),o!==t&&!c(p,o,t)){d(t,r);return}const y=l(p,o);d(y||p,Gt(y||p))}},u=()=>{t&&o!==t&&d(t,r)};t.addEventListener("click",u),n&&n.addEventListener("click",u),document.querySelectorAll(".c-map-districts__zoomable").forEach(f=>{f.addEventListener("click",p=>h(p))})},Kt=()=>{const s=document.getElementById("elections-form-search"),t=document.querySelector(".c-search-form__autocomplete");if(!s||!t)return;const e=o=>{t.classList.remove("u-hidden");const r=t.querySelectorAll("li"),a=[];return r.forEach(l=>{const c=l.querySelector("a");c&&c.innerHTML.toLowerCase().includes(o.toLowerCase())&&a.push(l.innerHTML)}),a},i=o=>{t.innerHTML+=`<li>${o}</li>`},n=({target:o})=>{if(!(o instanceof HTMLInputElement))return;const r=o.value;if(t.classList.add("u-hidden"),r.length>=3){const a=e(r);t.innerHTML="",a.length===0&&t.classList.add("u-hidden"),a.forEach(l=>{i(l)})}};s.addEventListener("input",n),s.addEventListener("focusout",()=>{setTimeout(()=>t.classList.add("u-hidden"),300)}),s.addEventListener("focusin",()=>{t.childElementCount>0&&t.classList.remove("u-hidden")})},Xt=(s,t)=>{s.setAttribute("aria-expanded","true"),s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach(n=>n.classList.remove(t));const i=s.querySelector(".js-ellipsis-button__label");i instanceof HTMLSpanElement&&(i.innerHTML="Voir moins")},Yt=(s,t)=>{s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach(n=>n.classList.add(t)),s.setAttribute("aria-expanded","false");const i=s.querySelector(".js-ellipsis-button__label");i instanceof HTMLSpanElement&&(i.innerHTML="Voir plus")},Jt=(s,t)=>{const e=s.currentTarget;if(s.preventDefault(),e instanceof HTMLButtonElement){const i=t?"u-ellipsis-multiline":"u-ellipsis";return e.getAttribute("aria-expanded")==="true"?Yt(e,i):Xt(e,i)}return null},Qt=(s=document.querySelector(".js-ellipsis-button"))=>{s&&document.querySelectorAll(".js-ellipsis-button").forEach(e=>{const i=e.getAttribute("data-multiple")==="true";e.addEventListener("click",n=>Jt(n,i))})},te=s=>{s.setAttribute("aria-expanded","true"),s.parentNode?.querySelectorAll(".js-expand-target")?.forEach(i=>i.setAttribute("aria-hidden","false"));const e=s.querySelector(".js-expand-button__label");e instanceof HTMLSpanElement&&(e.innerHTML="Voir moins")},ee=s=>{s.parentNode?.querySelectorAll(".js-expand-target")?.forEach(i=>i.setAttribute("aria-hidden","true")),s.setAttribute("aria-expanded","false");const e=s.querySelector(".js-expand-button__label");e instanceof HTMLSpanElement&&(e.innerHTML="Voir plus")},ie=s=>{const t=s.currentTarget;return s.preventDefault(),t instanceof HTMLButtonElement?t.getAttribute("aria-expanded")==="true"?ee(t):te(t):null},se=s=>{const t=s.parentNode?.querySelector(".js-expand-target");return!t||t.classList.contains("c-elections-result__members")?!1:(t.textContent?.trim().length??0)<255},ne=(s=document.querySelector(".js-expand-button"))=>{s&&document.querySelectorAll(".js-expand-button").forEach(e=>{se(e)?(e.style.display="none",e.parentNode?.querySelectorAll(".js-expand-target")?.forEach(n=>n.setAttribute("aria-hidden","false"))):e.addEventListener("click",ie)})},oe=()=>{const s=document.querySelector(".js-game-alert");Ft&&s&&s.classList.remove("u-hidden")},re=()=>{const s=document.querySelectorAll(".js-half-donut-result");for(const t of Array.from(s)){const e=t.querySelector(".c-half-donut"),i=t.querySelector(".c-legend");if(!e||!i)return;i.querySelectorAll("[data-color]").forEach(n=>{const o=n.getAttribute("data-color"),r=e.querySelector(`.c-half-donut__zone--${o}`);r?.addEventListener("mouseenter",()=>{n.classList.add("c-legend__item--is-hovered"),e.classList.add("c-half-donut--is-hovered"),i.classList.add("c-legend--is-hovered")}),r?.addEventListener("mouseleave",()=>{n.classList.remove("c-legend__item--is-hovered"),e.classList.remove("c-half-donut--is-hovered"),i.classList.remove("c-legend--is-hovered")}),n.addEventListener("mouseenter",()=>{r?.classList.add("c-half-donut__zone--is-hovered"),i.classList.add("c-legend--is-hovered"),e.classList.add("c-half-donut--is-hovered")}),n.addEventListener("mouseleave",()=>{r?.classList.remove("c-half-donut__zone--is-hovered"),i.classList.remove("c-legend--is-hovered"),e.classList.remove("c-half-donut--is-hovered")})})}},ae=()=>{const s=document.querySelector(".c-image-slider__container");if(!s)return()=>{};const t=document.querySelectorAll(".c-image-slider__slide"),e=document.querySelector(".c-image-slider__button-container--previous"),i=document.querySelector(".c-image-slider__button-container--next"),n=document.querySelectorAll(".c-image-slider__indicator");let o=0,r=null,a=!1;const l=()=>{n.forEach((g,_)=>{g.classList.toggle("c-image-slider__indicator--is-active",_===o)})},c=(g=!0)=>{if(!(s instanceof HTMLElement))return;s.style.transition=g?"transform 0.3s ease":"none";const _=-o*100;s.style.transform=`translateX(${_}%)`,l()},d=g=>{o=g,c(!0)},h=()=>{r&&clearInterval(r),r=setInterval(()=>{if(!a){const g=(o+1)%t.length;d(g)}},4e3)},u=()=>{r&&(clearInterval(r),r=null)},m=()=>{a=!0,u()},f=()=>{a=!1,h()};e?.addEventListener("click",()=>{m();const g=(o-1+t.length)%t.length;d(g),setTimeout(f,5e3)}),i?.addEventListener("click",()=>{m();const g=(o+1)%t.length;d(g),setTimeout(f,5e3)}),n.forEach((g,_)=>{g.addEventListener("click",()=>{m(),d(_),setTimeout(f,5e3)})});let p=0,y=0,S=!1;return s.addEventListener("touchstart",g=>{s instanceof HTMLElement&&(m(),p=g.touches[0].clientX,y=p,S=!0,s.style.transition="none")}),s.addEventListener("touchmove",g=>{if(!(s instanceof HTMLElement))return;y=g.touches[0].clientX;const _=y-p,w=-o*window.innerWidth+_;s.style.transform=`translateX(${w}px)`}),s.addEventListener("touchend",()=>{if(!S)return;S=!1;const g=y-p;Math.abs(g)>75&&(g<0?o=Math.min(o+1,t.length-1):g>0&&(o=Math.max(o-1,0))),c(!0),setTimeout(f,5e3)}),c(!0),h(),()=>{u()}},le=s=>{s.stopImmediatePropagation(),s.preventDefault();const t=s.currentTarget,e=document.getElementById("info-button-content");!(t instanceof HTMLButtonElement)||!e||(t.getAttribute("aria-expanded")==="true"?(t.setAttribute("aria-expanded","false"),e.setAttribute("aria-hidden","true")):(t.setAttribute("aria-expanded","true"),e.setAttribute("aria-hidden","false")))},ce=()=>{const s=document.querySelector(".js-info-banner__button");s instanceof HTMLButtonElement&&s.addEventListener("click",le)},v={inert:":not([inert]):not([inert] *)",negTabIndex:':not([tabindex^="-"])',disabled:":not(:disabled)"};var de=[`a[href]${v.inert}${v.negTabIndex}`,`area[href]${v.inert}${v.negTabIndex}`,`input:not([type="hidden"]):not([type="radio"])${v.inert}${v.negTabIndex}${v.disabled}`,`input[type="radio"]${v.inert}${v.negTabIndex}${v.disabled}`,`select${v.inert}${v.negTabIndex}${v.disabled}`,`textarea${v.inert}${v.negTabIndex}${v.disabled}`,`button${v.inert}${v.negTabIndex}${v.disabled}`,`details${v.inert} > summary:first-of-type${v.negTabIndex}`,`iframe${v.inert}${v.negTabIndex}`,`audio[controls]${v.inert}${v.negTabIndex}`,`video[controls]${v.inert}${v.negTabIndex}`,`[contenteditable]${v.inert}${v.negTabIndex}`,`[tabindex]${v.inert}${v.negTabIndex}`];function st(s){(s.querySelector("[autofocus]")||s).focus()}function he(s){const t=M(s,!0),e=t?M(s,!1)||t:null;return[t,e]}function M(s,t){if(t&&rt(s))return s;if(pe(s))if(s.shadowRoot){let e=nt(s.shadowRoot,t);for(;e;){const i=M(e,t);if(i)return i;e=ot(e,t)}}else if(s.localName==="slot"){const e=s.assignedElements({flatten:!0});t||e.reverse();for(const i of e){const n=M(i,t);if(n)return n}}else{let e=nt(s,t);for(;e;){const i=M(e,t);if(i)return i;e=ot(e,t)}}return!t&&rt(s)?s:null}function nt(s,t){return t?s.firstElementChild:s.lastElementChild}function ot(s,t){return t?s.nextElementSibling:s.previousElementSibling}const ue=s=>s.matches("details:not([open]) *")&&!s.matches("details>summary:first-of-type")?!0:!(s.offsetWidth||s.offsetHeight||s.getClientRects().length),rt=s=>s.shadowRoot?.delegatesFocus?!1:s.matches(de.join(","))&&!ue(s);function pe(s){return s.shadowRoot&&s.getAttribute("tabindex")==="-1"?!1:!s.matches(":disabled,[hidden],[inert]")}function O(s=document){const t=s.activeElement;return t?t.shadowRoot?O(t.shadowRoot)||document.activeElement:t:null}function me(s,t){const[e,i]=he(s);if(!e)return t.preventDefault();const n=O();t.shiftKey&&n===e?(i.focus(),t.preventDefault()):!t.shiftKey&&n===i&&(e.focus(),t.preventDefault())}function I(s,t){function e(i){if(!i||i===document||i===window)return null;const n=at(i);return n&&(i=n),i.closest(s)||e(i.getRootNode().host)}return e(t)}function at(s){return s.assignedSlot||(s.parentNode?at(s.parentNode):null)}const D="data-a11y-dialog";class lt{$el;id;previouslyFocused;shown;constructor(t){this.$el=t,this.id=this.$el.getAttribute(D)||this.$el.id,this.previouslyFocused=null,this.shown=!1,this.maintainFocus=this.maintainFocus.bind(this),this.bindKeypress=this.bindKeypress.bind(this),this.handleTriggerClicks=this.handleTriggerClicks.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.$el.setAttribute("aria-hidden","true"),this.$el.setAttribute("aria-modal","true"),this.$el.setAttribute("tabindex","-1"),this.$el.hasAttribute("role")||this.$el.setAttribute("role","dialog"),document.addEventListener("click",this.handleTriggerClicks,!0)}destroy(){return this.fire("destroy").defaultPrevented?this:(this.hide(),document.removeEventListener("click",this.handleTriggerClicks,!0),this.$el.replaceWith(this.$el.cloneNode(!0)),this)}show(t){return this.shown?this:this.fire("show",t).defaultPrevented?this:(this.shown=!0,this.$el.removeAttribute("aria-hidden"),this.previouslyFocused=O(),this.previouslyFocused?.tagName==="BODY"&&t?.target&&(this.previouslyFocused=t.target),t?.type==="focus"?this.maintainFocus():st(this.$el),document.body.addEventListener("focus",this.maintainFocus,!0),this.$el.addEventListener("keydown",this.bindKeypress,!0),this)}hide(t){return this.shown?this.fire("hide",t).defaultPrevented?this:(this.shown=!1,this.$el.setAttribute("aria-hidden","true"),document.body.removeEventListener("focus",this.maintainFocus,!0),this.$el.removeEventListener("keydown",this.bindKeypress,!0),this.previouslyFocused?.focus?.(),this):this}on(t,e,i){return this.$el.addEventListener(t,e,i),this}off(t,e,i){return this.$el.removeEventListener(t,e,i),this}fire(t,e){const i=new CustomEvent(t,{detail:e,cancelable:!0});return this.$el.dispatchEvent(i),i}handleTriggerClicks(t){const e=t.composedPath()[0],i=I(`[${D}-show="${this.id}"]`,e),n=I(`[${D}-hide="${this.id}"]`,e),o=I(`[${D}-hide]`,e)&&I('[aria-modal="true"]',e)===this.$el;i&&this.show(t),(n||o)&&this.hide(t)}bindKeypress(t){if(I('[aria-modal="true"]',O())!==this.$el)return;let e=!1;try{e=!!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open')}catch{}t.key==="Escape"&&this.$el.getAttribute("role")!=="alertdialog"&&!e&&(t.preventDefault(),this.hide(t)),t.key==="Tab"&&me(this.$el,t)}maintainFocus(){const t=O();I(`[aria-modal="true"], [${D}-ignore-focus-trap]`,t)||st(this.$el)}}function ct(){for(const s of document.querySelectorAll("[data-a11y-dialog]"))new lt(s)}typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ct):ct());const fe=()=>document.querySelectorAll(".js-modal").forEach(s=>{if(!(s instanceof HTMLElement))return;const t=new lt(s);if(s.id==="dialog-menu"){const e=document.querySelectorAll("button[data-a11y-dialog-show='dialog-menu']"),i=document.querySelectorAll("button[data-a11y-dialog-hide='dialog-menu']");e.length>0&&i.length>0&&(t.on("show",()=>{e.forEach(n=>n.classList.add("u-hidden")),i.forEach(n=>n.classList.remove("u-hidden"))}),t.on("hide",()=>{e.forEach(n=>n.classList.remove("u-hidden")),i.forEach(n=>n.classList.add("u-hidden"))}))}t.on("show",()=>{document.body.classList.add("noscroll")}).on("hide",()=>{document.body.classList.remove("noscroll")})}),dt="68px",ht="50px",G=({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})=>{const n=s.classList.contains("c-breadcrumb--is-small")?ht:dt;e.classList.contains("o-nav-button--visible")&&!i.classList.contains("o-nav-button--visible")&&(s.style.paddingRight=n,s.style.paddingLeft=""),i.classList.contains("o-nav-button--visible")&&(s.style.paddingLeft=n,e.classList.contains("o-nav-button--visible")&&(s.style.paddingRight=n),e.classList.contains("o-nav-button--visible")||(s.style.paddingRight="")),!e.classList.contains("o-nav-button--visible")&&!i.classList.contains("o-nav-button--visible")&&(t.style.width="",s.style.paddingRight="")},ge=({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})=>{const n=t.scrollLeft>0,o=t.scrollLeft+(t.clientWidth+.5)<t.scrollWidth;n&&o?(e.classList?.add("o-nav-button--visible"),i.classList?.add("o-nav-button--visible")):n?(e.classList?.remove("o-nav-button--visible"),i.classList?.add("o-nav-button--visible")):o?(e.classList?.add("o-nav-button--visible"),i.classList?.remove("o-nav-button--visible")):(e.classList?.remove("o-nav-button--visible"),i.classList?.remove("o-nav-button--visible")),e.classList.contains("c-slider__button-container--has-space-around")&&i.classList.contains("c-slider__button-container--has-space-around")&&G({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})},ve=({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i,sliderVariant:n})=>{if(t){const a=t.closest(".js-overview-bar-container")?.querySelector(".c-stepper")?.querySelectorAll(".c-stepper__item");if(a){const l=Array.from(a).findIndex(c=>c.classList.contains("c-stepper__item--loading"));if(l<0)a[0].classList.add("c-stepper__item--loading");else{a[l].classList.remove("c-stepper__item--loading"),a[l].classList.add("c-stepper__item--loaded");const c=a[l].querySelector(".c-stepper__loader");c&&c instanceof HTMLElement&&(c.style.transition="width 0s linear"),l+1<a.length&&a[l+1].classList.add("c-stepper__item--loading")}}if(t.scrollWidth-t.clientWidth>t.clientWidth){let l=t.scrollLeft;switch(n){case"three-columns-articles":l+=t.clientWidth+32;break;case"rubrics":l+=t.clientWidth-36;break;default:l+=Math.ceil(t.clientWidth*.6);break}t.scrollTo({left:l,behavior:"smooth"}),i.classList.add("o-nav-button--visible"),l+t.clientWidth>=t.scrollWidth&&e.classList.remove("o-nav-button--visible")}else{const l=t.scrollWidth-t.clientWidth;t.scrollTo({left:l,behavior:"smooth"}),e.classList.remove("o-nav-button--visible"),i.classList.add("o-nav-button--visible")}e.classList.contains("c-slider__button-container--has-space-around")&&i.classList.contains("c-slider__button-container--has-space-around")&&G({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})}},ye=({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i,sliderVariant:n,delay:o})=>{if(t){const l=t.closest(".js-overview-bar-container")?.querySelector(".c-stepper")?.querySelectorAll(".c-stepper__item");if(l){const c=Array.from(l).findIndex(d=>d.classList.contains("c-stepper__item--loading"));c<0?l[0].classList.add("c-stepper__item--loading"):(l[c].classList.remove("c-stepper__item--loading"),l[c].classList.remove("c-stepper__item--loaded"),c-1>0&&(l[c-1].classList.remove("c-stepper__item--loading"),l[c-1].classList.remove("c-stepper__item--loaded"),setTimeout(()=>{const d=l[c-1].querySelector(".c-stepper__loader");l[c-1].classList.add("c-stepper__item--loading"),d&&d instanceof HTMLElement&&(d.style.transition=`width ${o/1e3}s linear`)},0)))}if(t.clientWidth<t.scrollLeft){let c=t.scrollLeft;switch(n){case"three-columns-articles":c-=t.clientWidth+32;break;case"rubrics":c-=t.clientWidth-36;break;default:c-=Math.ceil(t.clientWidth*.6);break}t.scrollTo({left:c,behavior:"smooth"}),e.classList.add("o-nav-button--visible"),c===0&&i.classList.remove("o-nav-button--visible")}else t.scrollTo({left:0,behavior:"smooth"}),i.classList.remove("o-nav-button--visible"),t.clientWidth<t.scrollWidth&&e.classList.add("o-nav-button--visible");e.classList.contains("c-slider__button-container--has-space-around")&&i.classList.contains("c-slider__button-container--has-space-around")&&G({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})}},_e=({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})=>{ge({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})},be=s=>{const{sliderVariant:t}=s.dataset,{sliderAuto:e}=s.dataset,{sliderDelay:i}=s.dataset,n=i?parseInt(i,10):3e3,r=s.closest(".js-overview-bar-container")?.querySelector(".c-stepper"),a=r?.querySelectorAll(".c-stepper__item"),l=s.querySelector(".js-navigation-container__list"),c=s.querySelector(".o-nav-button--next-button"),d=s.querySelector(".o-nav-button--previous-button");if(!(!l||!c||!d)){if(l.clientWidth<l.scrollWidth&&(c.classList.add("o-nav-button--visible"),c.classList.contains("c-slider__button-container--has-space-around"))){const h=s.classList.contains("c-breadcrumb--is-small")?ht:dt;s.style.paddingRight=h}if(c.addEventListener("click",ve.bind(!1,{navigationContainer:s,navigatedList:l,nextBtn:c,prevBtn:d,sliderVariant:t})),d.addEventListener("click",ye.bind(!1,{navigationContainer:s,navigatedList:l,nextBtn:c,prevBtn:d,sliderVariant:t,delay:n})),e==="true"){const h=r?r.querySelector(".c-stepper__item--loading"):null;a&&(a.forEach(u=>{const m=u.querySelector(".c-stepper__loader");m&&m instanceof HTMLElement&&(m.style.transition=`width ${n/1e3}s linear`)}),h||a[0].classList.add("c-stepper__item--loading")),setInterval(()=>{c.classList.contains("o-nav-button--visible")?c.click():l&&d&&(l.scrollLeft=0,a&&(a.forEach(u=>{const m=u.querySelector(".c-stepper__loader");m&&m instanceof HTMLElement&&(m.style.transition="width 0s linear"),u.classList.remove("c-stepper__item--loading"),u.classList.remove("c-stepper__item--loaded"),setTimeout(()=>{m&&m instanceof HTMLElement&&(m.style.transition=`width ${n/1e3}s linear`)},0)}),setTimeout(()=>{a[0].classList.add("c-stepper__item--loading")},0)),d.click())},n)}}},we=()=>{const s=document.querySelectorAll(".js-navigation-container");Array.from(s).forEach(t=>{const e=t.querySelector(".js-navigation-container__list");if(e){const i=new ResizeObserver(n=>{n.forEach(o=>{const{width:r}=o.contentRect;r>0&&(be(t),i.disconnect())})});i.observe(e)}})},Se=()=>{const s=document.querySelectorAll(".js-navigation-container");for(const t of Array.from(s))if(t){const e=t.querySelector(".js-navigation-container__list"),i=t.querySelector(".o-nav-button--next-button"),n=t.querySelector(".o-nav-button--previous-button");e&&i&&n&&window.addEventListener("resize",_e.bind(!1,{navigationContainer:t,navigatedList:e,nextBtn:i,prevBtn:n}))}};function A(s,t,e){const i=document.createElement(t);return s&&(i.className=s),e&&e.appendChild(i),i}function b(s,t){return s.x=t.x,s.y=t.y,t.id!==void 0&&(s.id=t.id),s}function ut(s){s.x=Math.round(s.x),s.y=Math.round(s.y)}function U(s,t){const e=Math.abs(s.x-t.x),i=Math.abs(s.y-t.y);return Math.sqrt(e*e+i*i)}function $(s,t){return s.x===t.x&&s.y===t.y}function R(s,t,e){return Math.min(Math.max(s,t),e)}function B(s,t,e){let i=`translate3d(${s}px,${t||0}px,0)`;return e!==void 0&&(i+=` scale3d(${e},${e},1)`),i}function x(s,t,e,i){s.style.transform=B(t,e,i)}const Le="cubic-bezier(.4,0,.22,1)";function pt(s,t,e,i){s.style.transition=t?`${t} ${e}ms ${i||Le}`:"none"}function K(s,t,e){s.style.width=typeof t=="number"?`${t}px`:t,s.style.height=typeof e=="number"?`${e}px`:e}function Ae(s){pt(s)}function Ee(s){return"decode"in s?s.decode().catch(()=>{}):s.complete?Promise.resolve(s):new Promise((t,e)=>{s.onload=()=>t(s),s.onerror=e})}const E={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function Ce(s){return"button"in s&&s.button===1||s.ctrlKey||s.metaKey||s.altKey||s.shiftKey}function xe(s,t,e=document){let i=[];if(s instanceof Element)i=[s];else if(s instanceof NodeList||Array.isArray(s))i=Array.from(s);else{const n=typeof s=="string"?s:t;n&&(i=Array.from(e.querySelectorAll(n)))}return i}function mt(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}let ft=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{ft=!0}}))}catch{}class Pe{constructor(){this._pool=[]}add(t,e,i,n){this._toggleListener(t,e,i,n)}remove(t,e,i,n){this._toggleListener(t,e,i,n,!0)}removeAll(){this._pool.forEach(t=>{this._toggleListener(t.target,t.type,t.listener,t.passive,!0,!0)}),this._pool=[]}_toggleListener(t,e,i,n,o,r){if(!t)return;const a=o?"removeEventListener":"addEventListener";e.split(" ").forEach(c=>{if(c){r||(o?this._pool=this._pool.filter(h=>h.type!==c||h.listener!==i||h.target!==t):this._pool.push({target:t,type:c,listener:i,passive:n}));const d=ft?{passive:n||!1}:!1;t[a](c,i,d)}})}}function gt(s,t){if(s.getViewportSizeFn){const e=s.getViewportSizeFn(s,t);if(e)return e}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function F(s,t,e,i,n){let o=0;if(t.paddingFn)o=t.paddingFn(e,i,n)[s];else if(t.padding)o=t.padding[s];else{const r="padding"+s[0].toUpperCase()+s.slice(1);t[r]&&(o=t[r])}return Number(o)||0}function vt(s,t,e,i){return{x:t.x-F("left",s,t,e,i)-F("right",s,t,e,i),y:t.y-F("top",s,t,e,i)-F("bottom",s,t,e,i)}}class Te{constructor(t){this.slide=t,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(t){this.currZoomLevel=t,this.slide.width?(this._updateAxis("x"),this._updateAxis("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}_updateAxis(t){const{pswp:e}=this.slide,i=this.slide[t==="x"?"width":"height"]*this.currZoomLevel,o=F(t==="x"?"left":"top",e.options,e.viewportSize,this.slide.data,this.slide.index),r=this.slide.panAreaSize[t];this.center[t]=Math.round((r-i)/2)+o,this.max[t]=i>r?Math.round(r-i)+o:this.center[t],this.min[t]=i>r?o:this.center[t]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(t,e){return R(e,this.max[t],this.min[t])}}const yt=4e3;let _t=class{constructor(t,e,i,n){this.pswp=n,this.options=t,this.itemData=e,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,e,i){const n={x:t,y:e};this.elementSize=n,this.panAreaSize=i;const o=i.x/n.x,r=i.y/n.y;this.fit=Math.min(1,o<r?o:r),this.fill=Math.min(1,o>r?o:r),this.vFill=Math.min(1,r),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const e=t+"ZoomLevel",i=this.options[e];if(i)return typeof i=="function"?i(this):i==="fill"?this.fill:i==="fit"?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,this.fit*3),this.elementSize&&t*this.elementSize.x>yt&&(t=yt/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}};class Ie{constructor(t,e,i){this.data=t,this.index=e,this.pswp=i,this.isActive=e===i.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!i.opener.isOpen,this.zoomLevels=new _t(i.options,t,e,i),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:e}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=A("pswp__zoom-wrap","div"),this.holderElement=null,this.currZoomLevel=1,this.width=this.content.width,this.height=this.content.height,this.heavyAppended=!1,this.bounds=new Te(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(t){t&&!this.isActive?this.activate():!t&&this.isActive&&this.deactivate()}append(t){this.holderElement=t,this.container.style.transformOrigin="0 0",this.data&&(this.calculateSize(),this.load(),this.updateContentSize(),this.appendHeavy(),this.holderElement.appendChild(this.container),this.zoomAndPanToInitial(),this.pswp.dispatch("firstZoomPan",{slide:this}),this.applyCurrentZoomPan(),this.pswp.dispatch("afterSetContent",{slide:this}),this.isActive&&this.activate())}load(){this.content.load(!1),this.pswp.dispatch("slideLoad",{slide:this})}appendHeavy(){const{pswp:t}=this;this.heavyAppended||!t.opener.isOpen||t.mainScroll.isShifted()||!this.isActive&&!1||this.pswp.dispatch("appendHeavy",{slide:this}).defaultPrevented||(this.heavyAppended=!0,this.content.append(),this.pswp.dispatch("appendHeavyContent",{slide:this}))}activate(){this.isActive=!0,this.appendHeavy(),this.content.activate(),this.pswp.dispatch("slideActivate",{slide:this})}deactivate(){this.isActive=!1,this.content.deactivate(),this.currZoomLevel!==this.zoomLevels.initial&&this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize(),this.pswp.dispatch("slideDeactivate",{slide:this})}destroy(){this.content.hasSlide=!1,this.content.remove(),this.container.remove(),this.pswp.dispatch("slideDestroy",{slide:this})}resize(){this.currZoomLevel===this.zoomLevels.initial||!this.isActive?(this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize()):(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y))}updateContentSize(t){const e=this.currentResolution||this.zoomLevels.initial;if(!e)return;const i=Math.round(this.width*e)||this.pswp.viewportSize.x,n=Math.round(this.height*e)||this.pswp.viewportSize.y;!this.sizeChanged(i,n)&&!t||this.content.setDisplayedSize(i,n)}sizeChanged(t,e){return t!==this.prevDisplayedWidth||e!==this.prevDisplayedHeight?(this.prevDisplayedWidth=t,this.prevDisplayedHeight=e,!0):!1}getPlaceholderElement(){var t;return(t=this.content.placeholder)===null||t===void 0?void 0:t.element}zoomTo(t,e,i,n){const{pswp:o}=this;if(!this.isZoomable()||o.mainScroll.isShifted())return;o.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:e,transitionDuration:i}),o.animations.stopAllPan();const r=this.currZoomLevel;n||(t=R(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",e,r),this.pan.y=this.calculateZoomToPanOffset("y",e,r),ut(this.pan);const a=()=>{this._setResolution(t),this.applyCurrentZoomPan()};i?o.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:a,duration:i,easing:o.options.easing}):a()}toggleZoom(t){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,t,this.pswp.options.zoomAnimationDuration)}setZoomLevel(t){this.currZoomLevel=t,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(t,e,i){if(this.bounds.max[t]-this.bounds.min[t]===0)return this.bounds.center[t];e||(e=this.pswp.getViewportCenterPoint()),i||(i=this.zoomLevels.initial);const o=this.currZoomLevel/i;return this.bounds.correctPan(t,(this.pan[t]-e[t])*o+e[t])}panTo(t,e){this.pan.x=this.bounds.correctPan("x",t),this.pan.y=this.bounds.correctPan("y",e),this.applyCurrentZoomPan()}isPannable(){return!!this.width&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return!!this.width&&this.content.isZoomable()}applyCurrentZoomPan(){this._applyZoomTransform(this.pan.x,this.pan.y,this.currZoomLevel),this===this.pswp.currSlide&&this.pswp.dispatch("zoomPanUpdate",{slide:this})}zoomAndPanToInitial(){this.currZoomLevel=this.zoomLevels.initial,this.bounds.update(this.currZoomLevel),b(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(t,e,i){i/=this.currentResolution||this.zoomLevels.initial,x(this.container,t,e,i)}calculateSize(){const{pswp:t}=this;b(this.panAreaSize,vt(t.options,t.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),t.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){const t=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return B(this.pan.x,this.pan.y,t)}_setResolution(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}}const ze=.35,Me=.6,bt=.4,wt=.5;function Oe(s,t){return s*t/(1-t)}class De{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&b(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:t,prevP1:e,dragAxis:i}=this.gestures,{currSlide:n}=this.pswp;if(i==="y"&&this.pswp.options.closeOnVerticalDrag&&n&&n.currZoomLevel<=n.zoomLevels.fit&&!this.gestures.isMultitouch){const o=n.pan.y+(t.y-e.y);if(!this.pswp.dispatch("verticalDrag",{panY:o}).defaultPrevented){this._setPanWithFriction("y",o,Me);const r=1-Math.abs(this._getVerticalDragRatio(n.pan.y));this.pswp.applyBgOpacity(r),n.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),n&&(ut(n.pan),n.applyCurrentZoomPan()))}end(){const{velocity:t}=this.gestures,{mainScroll:e,currSlide:i}=this.pswp;let n=0;if(this.pswp.animations.stopAll(),e.isShifted()){const r=(e.x-e.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-wt&&r<0||t.x<.1&&r<-.5?(n=1,t.x=Math.min(t.x,0)):(t.x>wt&&r>0||t.x>-.1&&r>.5)&&(n=-1,t.x=Math.max(t.x,0)),e.moveIndexBy(n,!0,t.x)}i&&i.currZoomLevel>i.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(t){const{velocity:e}=this.gestures,{currSlide:i}=this.pswp;if(!i)return;const{pan:n,bounds:o}=i,r=n[t],a=this.pswp.bgOpacity<1&&t==="y",c=r+Oe(e[t],.995);if(a){const f=this._getVerticalDragRatio(r),p=this._getVerticalDragRatio(c);if(f<0&&p<-bt||f>0&&p>bt){this.pswp.close();return}}const d=o.correctPan(t,c);if(r===d)return;const h=d===c?1:.82,u=this.pswp.bgOpacity,m=d-r;this.pswp.animations.startSpring({name:"panGesture"+t,isPan:!0,start:r,end:d,velocity:e[t],dampingRatio:h,onUpdate:f=>{if(a&&this.pswp.bgOpacity<1){const p=1-(d-f)/m;this.pswp.applyBgOpacity(R(u+(1-u)*p,0,1))}n[t]=Math.floor(f),i.applyCurrentZoomPan()}})}_panOrMoveMainScroll(t){const{p1:e,dragAxis:i,prevP1:n,isMultitouch:o}=this.gestures,{currSlide:r,mainScroll:a}=this.pswp,l=e[t]-n[t],c=a.x+l;if(!l||!r)return!1;if(t==="x"&&!r.isPannable()&&!o)return a.moveTo(c,!0),!0;const{bounds:d}=r,h=r.pan[t]+l;if(this.pswp.options.allowPanToNext&&i==="x"&&t==="x"&&!o){const u=a.getCurrSlideX(),m=a.x-u,f=l>0,p=!f;if(h>d.min[t]&&f){if(d.min[t]<=this.startPan[t])return a.moveTo(c,!0),!0;this._setPanWithFriction(t,h)}else if(h<d.max[t]&&p){if(this.startPan[t]<=d.max[t])return a.moveTo(c,!0),!0;this._setPanWithFriction(t,h)}else if(m!==0){if(m>0)return a.moveTo(Math.max(c,u),!0),!0;if(m<0)return a.moveTo(Math.min(c,u),!0),!0}else this._setPanWithFriction(t,h)}else t==="y"?!a.isShifted()&&d.min.y!==d.max.y&&this._setPanWithFriction(t,h):this._setPanWithFriction(t,h);return!1}_getVerticalDragRatio(t){var e,i;return(t-((e=(i=this.pswp.currSlide)===null||i===void 0?void 0:i.bounds.center.y)!==null&&e!==void 0?e:0))/(this.pswp.viewportSize.y/3)}_setPanWithFriction(t,e,i){const{currSlide:n}=this.pswp;if(!n)return;const{pan:o,bounds:r}=n;if(r.correctPan(t,e)!==e||i){const l=Math.round(e-o[t]);o[t]+=l*(i||ze)}else o[t]=e}}const $e=.05,Re=.15;function St(s,t,e){return s.x=(t.x+e.x)/2,s.y=(t.y+e.y)/2,s}class Be{constructor(t){this.gestures=t,this._startPan={x:0,y:0},this._startZoomPoint={x:0,y:0},this._zoomPoint={x:0,y:0},this._wasOverFitZoomLevel=!1,this._startZoomLevel=1}start(){const{currSlide:t}=this.gestures.pswp;t&&(this._startZoomLevel=t.currZoomLevel,b(this._startPan,t.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:t,startP1:e,p2:i,startP2:n,pswp:o}=this.gestures,{currSlide:r}=o;if(!r)return;const a=r.zoomLevels.min,l=r.zoomLevels.max;if(!r.isZoomable()||o.mainScroll.isShifted())return;St(this._startZoomPoint,e,n),St(this._zoomPoint,t,i);let c=1/U(e,n)*U(t,i)*this._startZoomLevel;if(c>r.zoomLevels.initial+r.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),c<a)if(o.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=r.zoomLevels.initial){const d=1-(a-c)/(a/1.2);o.dispatch("pinchClose",{bgOpacity:d}).defaultPrevented||o.applyBgOpacity(d)}else c=a-(a-c)*Re;else c>l&&(c=l+(c-l)*$e);r.pan.x=this._calculatePanForZoomLevel("x",c),r.pan.y=this._calculatePanForZoomLevel("y",c),r.setZoomLevel(c),r.applyCurrentZoomPan()}end(){const{pswp:t}=this.gestures,{currSlide:e}=t;(!e||e.currZoomLevel<e.zoomLevels.initial)&&!this._wasOverFitZoomLevel&&t.options.pinchToClose?t.close():this.correctZoomPan()}_calculatePanForZoomLevel(t,e){const i=e/this._startZoomLevel;return this._zoomPoint[t]-(this._startZoomPoint[t]-this._startPan[t])*i}correctZoomPan(t){const{pswp:e}=this.gestures,{currSlide:i}=e;if(!(i!=null&&i.isZoomable()))return;this._zoomPoint.x===0&&(t=!0);const n=i.currZoomLevel;let o,r=!0;n<i.zoomLevels.initial?o=i.zoomLevels.initial:n>i.zoomLevels.max?o=i.zoomLevels.max:(r=!1,o=n);const a=e.bgOpacity,l=e.bgOpacity<1,c=b({x:0,y:0},i.pan);let d=b({x:0,y:0},c);t&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=n,b(this._startPan,c)),r&&(d={x:this._calculatePanForZoomLevel("x",o),y:this._calculatePanForZoomLevel("y",o)}),i.setZoomLevel(o),d={x:i.bounds.correctPan("x",d.x),y:i.bounds.correctPan("y",d.y)},i.setZoomLevel(n);const h=!$(d,c);if(!h&&!r&&!l){i._setResolution(o),i.applyCurrentZoomPan();return}e.animations.stopAllPan(),e.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:u=>{if(u/=1e3,h||r){if(h&&(i.pan.x=c.x+(d.x-c.x)*u,i.pan.y=c.y+(d.y-c.y)*u),r){const m=n+(o-n)*u;i.setZoomLevel(m)}i.applyCurrentZoomPan()}l&&e.bgOpacity<1&&e.applyBgOpacity(R(a+(1-a)*u,0,1))},onComplete:()=>{i._setResolution(o),i.applyCurrentZoomPan()}})}}function Lt(s){return!!s.target.closest(".pswp__container")}class Fe{constructor(t){this.gestures=t}click(t,e){const i=e.target.classList,n=i.contains("pswp__img"),o=i.contains("pswp__item")||i.contains("pswp__zoom-wrap");n?this._doClickOrTapAction("imageClick",t,e):o&&this._doClickOrTapAction("bgClick",t,e)}tap(t,e){Lt(e)&&this._doClickOrTapAction("tap",t,e)}doubleTap(t,e){Lt(e)&&this._doClickOrTapAction("doubleTap",t,e)}_doClickOrTapAction(t,e,i){var n;const{pswp:o}=this.gestures,{currSlide:r}=o,a=t+"Action",l=o.options[a];if(!o.dispatch(a,{point:e,originalEvent:i}).defaultPrevented){if(typeof l=="function"){l.call(o,e,i);return}switch(l){case"close":case"next":o[l]();break;case"zoom":r?.toggleZoom(e);break;case"zoom-or-close":r!=null&&r.isZoomable()&&r.zoomLevels.secondary!==r.zoomLevels.initial?r.toggleZoom(e):o.options.clickToCloseNonZoomable&&o.close();break;case"toggle-controls":(n=this.gestures.pswp.element)===null||n===void 0||n.classList.toggle("pswp--ui-visible");break}}}}const Ze=10,qe=300,ke=25;class Ne{constructor(t){this.pswp=t,this.dragAxis=null,this.p1={x:0,y:0},this.p2={x:0,y:0},this.prevP1={x:0,y:0},this.prevP2={x:0,y:0},this.startP1={x:0,y:0},this.startP2={x:0,y:0},this.velocity={x:0,y:0},this._lastStartP1={x:0,y:0},this._intervalP1={x:0,y:0},this._numActivePoints=0,this._ongoingPointers=[],this._touchEventEnabled="ontouchstart"in window,this._pointerEventEnabled=!!window.PointerEvent,this.supportsTouch=this._touchEventEnabled||this._pointerEventEnabled&&navigator.maxTouchPoints>1,this._numActivePoints=0,this._intervalTime=0,this._velocityCalculated=!1,this.isMultitouch=!1,this.isDragging=!1,this.isZooming=!1,this.raf=null,this._tapTimer=null,this.supportsTouch||(t.options.allowPanToNext=!1),this.drag=new De(this),this.zoomLevels=new Be(this),this.tapHandler=new Fe(this),t.on("bindEvents",()=>{t.events.add(t.scrollWrap,"click",this._onClick.bind(this)),this._pointerEventEnabled?this._bindEvents("pointer","down","up","cancel"):this._touchEventEnabled?(this._bindEvents("touch","start","end","cancel"),t.scrollWrap&&(t.scrollWrap.ontouchmove=()=>{},t.scrollWrap.ontouchend=()=>{})):this._bindEvents("mouse","down","up")})}_bindEvents(t,e,i,n){const{pswp:o}=this,{events:r}=o,a=n?t+n:"";r.add(o.scrollWrap,t+e,this.onPointerDown.bind(this)),r.add(window,t+"move",this.onPointerMove.bind(this)),r.add(window,t+i,this.onPointerUp.bind(this)),a&&r.add(o.scrollWrap,a,this.onPointerUp.bind(this))}onPointerDown(t){const e=t.type==="mousedown"||t.pointerType==="mouse";if(e&&t.button>0)return;const{pswp:i}=this;if(!i.opener.isOpen){t.preventDefault();return}i.dispatch("pointerDown",{originalEvent:t}).defaultPrevented||(e&&(i.mouseDetected(),this._preventPointerEventBehaviour(t,"down")),i.animations.stopAll(),this._updatePoints(t,"down"),this._numActivePoints===1&&(this.dragAxis=null,b(this.startP1,this.p1)),this._numActivePoints>1?(this._clearTapTimer(),this.isMultitouch=!0):this.isMultitouch=!1)}onPointerMove(t){this._preventPointerEventBehaviour(t,"move"),this._numActivePoints&&(this._updatePoints(t,"move"),!this.pswp.dispatch("pointerMove",{originalEvent:t}).defaultPrevented&&(this._numActivePoints===1&&!this.isDragging?(this.dragAxis||this._calculateDragDirection(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this._clearTapTimer(),this._updateStartPoints(),this._intervalTime=Date.now(),this._velocityCalculated=!1,b(this._intervalP1,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this._rafStopLoop(),this._rafRenderLoop())):this._numActivePoints>1&&!this.isZooming&&(this._finishDrag(),this.isZooming=!0,this._updateStartPoints(),this.zoomLevels.start(),this._rafStopLoop(),this._rafRenderLoop())))}_finishDrag(){this.isDragging&&(this.isDragging=!1,this._velocityCalculated||this._updateVelocity(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(t){this._numActivePoints&&(this._updatePoints(t,"up"),!this.pswp.dispatch("pointerUp",{originalEvent:t}).defaultPrevented&&(this._numActivePoints===0&&(this._rafStopLoop(),this.isDragging?this._finishDrag():!this.isZooming&&!this.isMultitouch&&this._finishTap(t)),this._numActivePoints<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),this._numActivePoints===1&&(this.dragAxis=null,this._updateStartPoints()))))}_rafRenderLoop(){(this.isDragging||this.isZooming)&&(this._updateVelocity(),this.isDragging?$(this.p1,this.prevP1)||this.drag.change():(!$(this.p1,this.prevP1)||!$(this.p2,this.prevP2))&&this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(t){const e=Date.now(),i=e-this._intervalTime;i<50&&!t||(this.velocity.x=this._getVelocity("x",i),this.velocity.y=this._getVelocity("y",i),this._intervalTime=e,b(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(t){const{mainScroll:e}=this.pswp;if(e.isShifted()){e.moveIndexBy(0,!0);return}if(t.type.indexOf("cancel")>0)return;if(t.type==="mouseup"||t.pointerType==="mouse"){this.tapHandler.click(this.startP1,t);return}const i=this.pswp.options.doubleTapAction?qe:0;this._tapTimer?(this._clearTapTimer(),U(this._lastStartP1,this.startP1)<ke&&this.tapHandler.doubleTap(this.startP1,t)):(b(this._lastStartP1,this.startP1),this._tapTimer=setTimeout(()=>{this.tapHandler.tap(this.startP1,t),this._clearTapTimer()},i))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(t,e){const i=this.p1[t]-this._intervalP1[t];return Math.abs(i)>1&&e>5?i/e:0}_rafStopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}_preventPointerEventBehaviour(t,e){this.pswp.applyFilters("preventPointerEvent",!0,t,e)&&t.preventDefault()}_updatePoints(t,e){if(this._pointerEventEnabled){const i=t,n=this._ongoingPointers.findIndex(o=>o.id===i.pointerId);e==="up"&&n>-1?this._ongoingPointers.splice(n,1):e==="down"&&n===-1?this._ongoingPointers.push(this._convertEventPosToPoint(i,{x:0,y:0})):n>-1&&this._convertEventPosToPoint(i,this._ongoingPointers[n]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&b(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&b(this.p2,this._ongoingPointers[1])}else{const i=t;this._numActivePoints=0,i.type.indexOf("touch")>-1?i.touches&&i.touches.length>0&&(this._convertEventPosToPoint(i.touches[0],this.p1),this._numActivePoints++,i.touches.length>1&&(this._convertEventPosToPoint(i.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(t,this.p1),e==="up"?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){b(this.prevP1,this.p1),b(this.prevP2,this.p2)}_updateStartPoints(){b(this.startP1,this.p1),b(this.startP2,this.p2),this._updatePrevPoints()}_calculateDragDirection(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{const t=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(t!==0){const e=t>0?"x":"y";Math.abs(this.p1[e]-this.startP1[e])>=Ze&&(this.dragAxis=e)}}}_convertEventPosToPoint(t,e){return e.x=t.pageX-this.pswp.offset.x,e.y=t.pageY-this.pswp.offset.y,"pointerId"in t?e.id=t.pointerId:t.identifier!==void 0&&(e.id=t.identifier),e}_onClick(t){this.pswp.mainScroll.isShifted()&&(t.preventDefault(),t.stopPropagation())}}const He=.35;class We{constructor(t){this.pswp=t,this.x=0,this.slideWidth=0,this._currPositionIndex=0,this._prevPositionIndex=0,this._containerShiftIndex=-1,this.itemHolders=[]}resize(t){const{pswp:e}=this,i=Math.round(e.viewportSize.x+e.viewportSize.x*e.options.spacing),n=i!==this.slideWidth;n&&(this.slideWidth=i,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach((o,r)=>{n&&x(o.el,(r+this._containerShiftIndex)*this.slideWidth),t&&o.slide&&o.slide.resize()})}resetPosition(){this._currPositionIndex=0,this._prevPositionIndex=0,this.slideWidth=0,this._containerShiftIndex=-1}appendHolders(){this.itemHolders=[];for(let t=0;t<3;t++){const e=A("pswp__item","div",this.pswp.container);e.setAttribute("role","group"),e.setAttribute("aria-roledescription","slide"),e.setAttribute("aria-hidden","true"),e.style.display=t===1?"block":"none",this.itemHolders.push({el:e})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(t,e,i){const{pswp:n}=this;let o=n.potentialIndex+t;const r=n.getNumItems();if(n.canLoop()){o=n.getLoopedIndex(o);const l=(t+r)%r;l<=r/2?t=l:t=l-r}else o<0?o=0:o>=r&&(o=r-1),t=o-n.potentialIndex;n.potentialIndex=o,this._currPositionIndex-=t,n.animations.stopMainScroll();const a=this.getCurrSlideX();if(!e)this.moveTo(a),this.updateCurrItem();else{n.animations.startSpring({isMainScroll:!0,start:this.x,end:a,velocity:i||0,naturalFrequency:30,dampingRatio:1,onUpdate:c=>{this.moveTo(c)},onComplete:()=>{this.updateCurrItem(),n.appendHeavy()}});let l=n.potentialIndex-n.currIndex;if(n.canLoop()){const c=(l+r)%r;c<=r/2?l=c:l=c-r}Math.abs(l)>1&&this.updateCurrItem()}return!!t}getCurrSlideX(){return this.slideWidth*this._currPositionIndex}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){var t;const{pswp:e}=this,i=this._prevPositionIndex-this._currPositionIndex;if(!i)return;this._prevPositionIndex=this._currPositionIndex,e.currIndex=e.potentialIndex;let n=Math.abs(i),o;n>=3&&(this._containerShiftIndex+=i+(i>0?-3:3),n=3,this.itemHolders.forEach(r=>{var a;(a=r.slide)===null||a===void 0||a.destroy(),r.slide=void 0}));for(let r=0;r<n;r++)i>0?(o=this.itemHolders.shift(),o&&(this.itemHolders[2]=o,this._containerShiftIndex++,x(o.el,(this._containerShiftIndex+2)*this.slideWidth),e.setContent(o,e.currIndex-n+r+2))):(o=this.itemHolders.pop(),o&&(this.itemHolders.unshift(o),this._containerShiftIndex--,x(o.el,this._containerShiftIndex*this.slideWidth),e.setContent(o,e.currIndex+n-r-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),e.animations.stopAllPan(),this.itemHolders.forEach((r,a)=>{r.slide&&r.slide.setIsActive(a===1)}),e.currSlide=(t=this.itemHolders[1])===null||t===void 0?void 0:t.slide,e.contentLoader.updateLazy(i),e.currSlide&&e.currSlide.applyCurrentZoomPan(),e.dispatch("change")}moveTo(t,e){if(!this.pswp.canLoop()&&e){let i=(this.slideWidth*this._currPositionIndex-t)/this.slideWidth;i+=this.pswp.currIndex;const n=Math.round(t-this.x);(i<0&&n>0||i>=this.pswp.getNumItems()-1&&n<0)&&(t=this.x+n*He)}this.x=t,this.pswp.container&&x(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:e??!1})}}const Ve={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},P=(s,t)=>t?s:Ve[s];class je{constructor(t){this.pswp=t,this._wasFocused=!1,t.on("bindEvents",()=>{t.options.trapFocus&&(t.options.initialPointerPos||this._focusRoot(),t.events.add(document,"focusin",this._onFocusIn.bind(this))),t.events.add(document,"keydown",this._onKeyDown.bind(this))});const e=document.activeElement;t.on("destroy",()=>{t.options.returnFocus&&e&&this._wasFocused&&e.focus()})}_focusRoot(){!this._wasFocused&&this.pswp.element&&(this.pswp.element.focus(),this._wasFocused=!0)}_onKeyDown(t){const{pswp:e}=this;if(e.dispatch("keydown",{originalEvent:t}).defaultPrevented||Ce(t))return;let i,n,o=!1;const r="key"in t;switch(r?t.key:t.keyCode){case P("Escape",r):e.options.escKey&&(i="close");break;case P("z",r):i="toggleZoom";break;case P("ArrowLeft",r):n="x";break;case P("ArrowUp",r):n="y";break;case P("ArrowRight",r):n="x",o=!0;break;case P("ArrowDown",r):o=!0,n="y";break;case P("Tab",r):this._focusRoot();break}if(n){t.preventDefault();const{currSlide:a}=e;e.options.arrowKeys&&n==="x"&&e.getNumItems()>1?i=o?"next":"prev":a&&a.currZoomLevel>a.zoomLevels.fit&&(a.pan[n]+=o?-80:80,a.panTo(a.pan.x,a.pan.y))}i&&(t.preventDefault(),e[i]())}_onFocusIn(t){const{template:e}=this.pswp;e&&document!==t.target&&e!==t.target&&!e.contains(t.target)&&e.focus()}}const Ge="cubic-bezier(.4,0,.22,1)";class Ue{constructor(t){var e;this.props=t;const{target:i,onComplete:n,transform:o,onFinish:r=()=>{},duration:a=333,easing:l=Ge}=t;this.onFinish=r;const c=o?"transform":"opacity",d=(e=t[c])!==null&&e!==void 0?e:"";this._target=i,this._onComplete=n,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{pt(i,c,a,l),this._helperTimeout=setTimeout(()=>{i.addEventListener("transitionend",this._onTransitionEnd,!1),i.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},a+500),i.style[c]=d},30)},0)}_onTransitionEnd(t){t.target===this._target&&this._finalizeAnimation()}_finalizeAnimation(){this._finished||(this._finished=!0,this.onFinish(),this._onComplete&&this._onComplete())}destroy(){this._helperTimeout&&clearTimeout(this._helperTimeout),Ae(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}}const Ke=12,Xe=.75;class Ye{constructor(t,e,i){this.velocity=t*1e3,this._dampingRatio=e||Xe,this._naturalFrequency=i||Ke,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(t,e){let i=0,n;e/=1e3;const o=Math.E**(-this._dampingRatio*this._naturalFrequency*e);if(this._dampingRatio===1)n=this.velocity+this._naturalFrequency*t,i=(t+n*e)*o,this.velocity=i*-this._naturalFrequency+n*o;else if(this._dampingRatio<1){n=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*t+this.velocity);const r=Math.cos(this._dampedFrequency*e),a=Math.sin(this._dampedFrequency*e);i=o*(t*r+n*a),this.velocity=i*-this._naturalFrequency*this._dampingRatio+o*(-this._dampedFrequency*t*a+this._dampedFrequency*n*r)}return i}}class Je{constructor(t){this.props=t,this._raf=0;const{start:e,end:i,velocity:n,onUpdate:o,onComplete:r,onFinish:a=()=>{},dampingRatio:l,naturalFrequency:c}=t;this.onFinish=a;const d=new Ye(n,l,c);let h=Date.now(),u=e-i;const m=()=>{this._raf&&(u=d.easeFrame(u,Date.now()-h),Math.abs(u)<1&&Math.abs(d.velocity)<50?(o(i),r&&r(),this.onFinish()):(h=Date.now(),o(u+i),this._raf=requestAnimationFrame(m)))};this._raf=requestAnimationFrame(m)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}}class Qe{constructor(){this.activeAnimations=[]}startSpring(t){this._start(t,!0)}startTransition(t){this._start(t)}_start(t,e){const i=e?new Je(t):new Ue(t);return this.activeAnimations.push(i),i.onFinish=()=>this.stop(i),i}stop(t){t.destroy();const e=this.activeAnimations.indexOf(t);e>-1&&this.activeAnimations.splice(e,1)}stopAll(){this.activeAnimations.forEach(t=>{t.destroy()}),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter(t=>t.props.isPan?(t.destroy(),!1):!0)}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter(t=>t.props.isMainScroll?(t.destroy(),!1):!0)}isPanRunning(){return this.activeAnimations.some(t=>t.props.isPan)}}class ti{constructor(t){this.pswp=t,t.events.add(t.element,"wheel",this._onWheel.bind(this))}_onWheel(t){t.preventDefault();const{currSlide:e}=this.pswp;let{deltaX:i,deltaY:n}=t;if(e&&!this.pswp.dispatch("wheel",{originalEvent:t}).defaultPrevented)if(t.ctrlKey||this.pswp.options.wheelToZoom){if(e.isZoomable()){let o=-n;t.deltaMode===1?o*=.05:o*=t.deltaMode?1:.002,o=2**o;const r=e.currZoomLevel*o;e.zoomTo(r,{x:t.clientX,y:t.clientY})}}else e.isPannable()&&(t.deltaMode===1&&(i*=18,n*=18),e.panTo(e.pan.x-i,e.pan.y-n))}}function ei(s){if(typeof s=="string")return s;if(!s||!s.isCustomSVG)return"";const t=s;let e='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return e=e.split("%d").join(t.size||32),t.outlineID&&(e+='<use class="pswp__icn-shadow" xlink:href="#'+t.outlineID+'"/>'),e+=t.inner,e+="</svg>",e}class ii{constructor(t,e){var i;const n=e.name||e.className;let o=e.html;if(t.options[n]===!1)return;typeof t.options[n+"SVG"]=="string"&&(o=t.options[n+"SVG"]),t.dispatch("uiElementCreate",{data:e});let r="";e.isButton?(r+="pswp__button ",r+=e.className||`pswp__button--${e.name}`):r+=e.className||`pswp__${e.name}`;let a=e.isButton?e.tagName||"button":e.tagName||"div";a=a.toLowerCase();const l=A(r,a);if(e.isButton){a==="button"&&(l.type="button");let{title:h}=e;const{ariaLabel:u}=e;typeof t.options[n+"Title"]=="string"&&(h=t.options[n+"Title"]),h&&(l.title=h);const m=u||h;m&&l.setAttribute("aria-label",m)}l.innerHTML=ei(o),e.onInit&&e.onInit(l,t),e.onClick&&(l.onclick=h=>{typeof e.onClick=="string"?t[e.onClick]():typeof e.onClick=="function"&&e.onClick(h,l,t)});const c=e.appendTo||"bar";let d=t.element;c==="bar"?(t.topBar||(t.topBar=A("pswp__top-bar pswp__hide-on-close","div",t.scrollWrap)),d=t.topBar):(l.classList.add("pswp__hide-on-close"),c==="wrapper"&&(d=t.scrollWrap)),(i=d)===null||i===void 0||i.appendChild(t.applyFilters("uiElement",l,e))}}function At(s,t,e){s.classList.add("pswp__button--arrow"),s.setAttribute("aria-controls","pswp__items"),t.on("change",()=>{t.options.loop||(e?s.disabled=!(t.currIndex<t.getNumItems()-1):s.disabled=!(t.currIndex>0))})}const si={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<path d="M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z" id="pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:At},ni={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<use xlink:href="#pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(s,t)=>{At(s,t,!0)}},oi={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M24 10l-2-2-6 6-6-6-2 2 6 6-6 6 2 2 6-6 6 6 2-2-6-6z" id="pswp__icn-close"/>',outlineID:"pswp__icn-close"},onClick:"close"},ri={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M17.426 19.926a6 6 0 1 1 1.5-1.5L23 22.5 21.5 24l-4.074-4.074z" id="pswp__icn-zoom"/><path fill="currentColor" class="pswp__zoom-icn-bar-h" d="M11 16v-2h6v2z"/><path fill="currentColor" class="pswp__zoom-icn-bar-v" d="M13 12h2v6h-2z"/>',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},ai={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 16a5.2 5.2 0 1 1-5.2-5.2V8a8 8 0 1 0 8 8h-2.8Z" id="pswp__icn-loading"/>',outlineID:"pswp__icn-loading"},onInit:(s,t)=>{let e,i=null;const n=(a,l)=>{s.classList.toggle("pswp__preloader--"+a,l)},o=a=>{e!==a&&(e=a,n("active",a))},r=()=>{var a;if(!((a=t.currSlide)!==null&&a!==void 0&&a.content.isLoading())){o(!1),i&&(clearTimeout(i),i=null);return}i||(i=setTimeout(()=>{var l;o(!!(!((l=t.currSlide)===null||l===void 0)&&l.content.isLoading())),i=null},t.options.preloaderDelay))};t.on("change",r),t.on("loadComplete",a=>{t.currSlide===a.slide&&r()}),t.ui&&(t.ui.updatePreloaderVisibility=r)}},li={name:"counter",order:5,onInit:(s,t)=>{t.on("change",()=>{s.innerText=t.currIndex+1+t.options.indexIndicatorSep+t.getNumItems()})}};function Et(s,t){s.classList.toggle("pswp--zoomed-in",t)}class ci{constructor(t){this.pswp=t,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this._lastUpdatedZoomLevel=void 0}init(){const{pswp:t}=this;this.isRegistered=!1,this.uiElementsData=[oi,si,ni,ri,ai,li],t.dispatch("uiRegister"),this.uiElementsData.sort((e,i)=>(e.order||0)-(i.order||0)),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach(e=>{this.registerElement(e)}),t.on("change",()=>{var e;(e=t.element)===null||e===void 0||e.classList.toggle("pswp--one-slide",t.getNumItems()===1)}),t.on("zoomPanUpdate",()=>this._onZoomPanUpdate())}registerElement(t){this.isRegistered?this.items.push(new ii(this.pswp,t)):this.uiElementsData.push(t)}_onZoomPanUpdate(){const{template:t,currSlide:e,options:i}=this.pswp;if(this.pswp.opener.isClosing||!t||!e)return;let{currZoomLevel:n}=e;if(this.pswp.opener.isOpen||(n=e.zoomLevels.initial),n===this._lastUpdatedZoomLevel)return;this._lastUpdatedZoomLevel=n;const o=e.zoomLevels.initial-e.zoomLevels.secondary;if(Math.abs(o)<.01||!e.isZoomable()){Et(t,!1),t.classList.remove("pswp--zoom-allowed");return}t.classList.add("pswp--zoom-allowed");const r=n===e.zoomLevels.initial?e.zoomLevels.secondary:e.zoomLevels.initial;Et(t,r<=n),(i.imageClickAction==="zoom"||i.imageClickAction==="zoom-or-close")&&t.classList.add("pswp--click-to-zoom")}}function di(s){const t=s.getBoundingClientRect();return{x:t.left,y:t.top,w:t.width}}function hi(s,t,e){const i=s.getBoundingClientRect(),n=i.width/t,o=i.height/e,r=n>o?n:o,a=(i.width-t*r)/2,l=(i.height-e*r)/2,c={x:i.left+a,y:i.top+l,w:t*r};return c.innerRect={w:i.width,h:i.height,x:a,y:l},c}function ui(s,t,e){const i=e.dispatch("thumbBounds",{index:s,itemData:t,instance:e});if(i.thumbBounds)return i.thumbBounds;const{element:n}=t;let o,r;if(n&&e.options.thumbSelector!==!1){const a=e.options.thumbSelector||"img";r=n.matches(a)?n:n.querySelector(a)}return r=e.applyFilters("thumbEl",r,t,s),r&&(t.thumbCropped?o=hi(r,t.width||t.w||0,t.height||t.h||0):o=di(r)),e.applyFilters("thumbBounds",o,t,s)}let pi=class{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}},mi=class{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){var n,o,r;this._filters[t]||(this._filters[t]=[]),(n=this._filters[t])===null||n===void 0||n.push({fn:e,priority:i}),(o=this._filters[t])===null||o===void 0||o.sort((a,l)=>a.priority-l.priority),(r=this.pswp)===null||r===void 0||r.addFilter(t,e,i)}removeFilter(t,e){this._filters[t]&&(this._filters[t]=this._filters[t].filter(i=>i.fn!==e)),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){var i;return(i=this._filters[t])===null||i===void 0||i.forEach(n=>{e[0]=n.fn.apply(this,e)}),e[0]}on(t,e){var i,n;this._listeners[t]||(this._listeners[t]=[]),(i=this._listeners[t])===null||i===void 0||i.push(e),(n=this.pswp)===null||n===void 0||n.on(t,e)}off(t,e){var i;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(n=>e!==n)),(i=this.pswp)===null||i===void 0||i.off(t,e)}dispatch(t,e){var i;if(this.pswp)return this.pswp.dispatch(t,e);const n=new pi(t,e);return(i=this._listeners[t])===null||i===void 0||i.forEach(o=>{o.call(this,n)}),n}},fi=class{constructor(t,e){if(this.element=A("pswp__img pswp__img--placeholder",t?"img":"div",e),t){const i=this.element;i.decoding="async",i.alt="",i.src=t,i.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&(this.element.tagName==="IMG"?(K(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=B(0,0,t/250)):K(this.element,t,e))}destroy(){var t;(t=this.element)!==null&&t!==void 0&&t.parentNode&&this.element.remove(),this.element=null}},gi=class{constructor(t,e,i){this.instance=e,this.data=t,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=E.IDLE,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(t,e){if(this.slide&&this.usePlaceholder())if(this.placeholder){const i=this.placeholder.element;i&&!i.parentElement&&this.slide.container.prepend(i)}else{const i=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new fi(i,this.slide.container)}this.element&&!e||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=A("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=A("pswp__content","div"),this.element.innerHTML=this.data.html||""),e&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var e,i;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const n=this.element;this.updateSrcsetSizes(),this.data.srcset&&(n.srcset=this.data.srcset),n.src=(e=this.data.src)!==null&&e!==void 0?e:"",n.alt=(i=this.data.alt)!==null&&i!==void 0?i:"",this.state=E.LOADING,n.complete?this.onLoaded():(n.onload=()=>{this.onLoaded()},n.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=E.LOADED,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===E.LOADED||this.state===E.ERROR)&&this.removePlaceholder())}onError(){this.state=E.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===E.LOADING,this)}isError(){return this.state===E.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(t,e){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(K(this.element,t,e),this.isImageContent()&&!this.isError()))){const i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=e,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:e,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==E.ERROR,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,e=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||e>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=e+"px",t.dataset.largestUsedSize=String(e))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var t,e;let i=A("pswp__error-msg","div");i.innerText=(t=(e=this.instance.options)===null||e===void 0?void 0:e.errorMsg)!==null&&t!==void 0?t:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=A("pswp__content pswp__error-msg-container","div"),this.element.appendChild(i),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===E.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||mt())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!mt()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===E.LOADED||this.state===E.ERROR)&&this.removePlaceholder()))}};const vi=5;function Ct(s,t,e){const i=t.createContentFromData(s,e);let n;const{options:o}=t;if(o){n=new _t(o,s,-1);let r;t.pswp?r=t.pswp.viewportSize:r=gt(o,t);const a=vt(o,r,s,e);n.update(i.width,i.height,a)}return i.lazyLoad(),n&&i.setDisplayedSize(Math.ceil(i.width*n.initial),Math.ceil(i.height*n.initial)),i}function yi(s,t){const e=t.getItemData(s);if(!t.dispatch("lazyLoadSlide",{index:s,itemData:e}).defaultPrevented)return Ct(e,t,s)}class _i{constructor(t){this.pswp=t,this.limit=Math.max(t.options.preload[0]+t.options.preload[1]+1,vi),this._cachedItems=[]}updateLazy(t){const{pswp:e}=this;if(e.dispatch("lazyLoad").defaultPrevented)return;const{preload:i}=e.options,n=t===void 0?!0:t>=0;let o;for(o=0;o<=i[1];o++)this.loadSlideByIndex(e.currIndex+(n?o:-o));for(o=1;o<=i[0];o++)this.loadSlideByIndex(e.currIndex+(n?-o:o))}loadSlideByIndex(t){const e=this.pswp.getLoopedIndex(t);let i=this.getContentByIndex(e);i||(i=yi(e,this.pswp),i&&this.addToCache(i))}getContentBySlide(t){let e=this.getContentByIndex(t.index);return e||(e=this.pswp.createContentFromData(t.data,t.index),this.addToCache(e)),e.setSlide(t),e}addToCache(t){if(this.removeByIndex(t.index),this._cachedItems.push(t),this._cachedItems.length>this.limit){const e=this._cachedItems.findIndex(i=>!i.isAttached&&!i.hasSlide);e!==-1&&this._cachedItems.splice(e,1)[0].destroy()}}removeByIndex(t){const e=this._cachedItems.findIndex(i=>i.index===t);e!==-1&&this._cachedItems.splice(e,1)}getContentByIndex(t){return this._cachedItems.find(e=>e.index===t)}destroy(){this._cachedItems.forEach(t=>t.destroy()),this._cachedItems=[]}}let bi=class extends mi{getNumItems(){var t;let e=0;const i=(t=this.options)===null||t===void 0?void 0:t.dataSource;i&&"length"in i?e=i.length:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),i.items&&(e=i.items.length));const n=this.dispatch("numItems",{dataSource:i,numItems:e});return this.applyFilters("numItems",n.numItems,i)}createContentFromData(t,e){return new gi(t,this,e)}getItemData(t){var e;const i=(e=this.options)===null||e===void 0?void 0:e.dataSource;let n={};Array.isArray(i)?n=i[t]:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),n=i.items[t]);let o=n;o instanceof Element&&(o=this._domElementToItemData(o));const r=this.dispatch("itemData",{itemData:o||{},index:t});return this.applyFilters("itemData",r.itemData,t)}_getGalleryDOMElements(t){var e,i;return(e=this.options)!==null&&e!==void 0&&e.children||(i=this.options)!==null&&i!==void 0&&i.childSelector?xe(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){const e={element:t},i=t.tagName==="A"?t:t.querySelector("a");if(i){e.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(e.srcset=i.dataset.pswpSrcset),e.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,e.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,e.w=e.width,e.h=e.height,i.dataset.pswpType&&(e.type=i.dataset.pswpType);const o=t.querySelector("img");if(o){var n;e.msrc=o.currentSrc||o.src,e.alt=(n=o.getAttribute("alt"))!==null&&n!==void 0?n:""}(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0)}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return Ct(t,this,e)}};const Z=.003;class wi{constructor(t){this.pswp=t,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this._duration=void 0,this._useAnimation=!1,this._croppedZoom=!1,this._animateRootOpacity=!1,this._animateBgOpacity=!1,this._placeholder=void 0,this._opacityElement=void 0,this._cropContainer1=void 0,this._cropContainer2=void 0,this._thumbBounds=void 0,this._prepareOpen=this._prepareOpen.bind(this),t.on("firstZoomPan",this._prepareOpen)}open(){this._prepareOpen(),this._start()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;const t=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this._duration=this.pswp.options.hideAnimationDuration,t&&t.currZoomLevel*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps(),setTimeout(()=>{this._start()},this._croppedZoom?30:0)}_prepareOpen(){if(this.pswp.off("firstZoomPan",this._prepareOpen),!this.isOpening){const t=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this._duration=this.pswp.options.showAnimationDuration,t&&t.zoomLevels.initial*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps()}}_applyStartProps(){const{pswp:t}=this,e=this.pswp.currSlide,{options:i}=t;if(i.showHideAnimationType==="fade"?(i.showHideOpacity=!0,this._thumbBounds=void 0):i.showHideAnimationType==="none"?(i.showHideOpacity=!1,this._duration=0,this._thumbBounds=void 0):this.isOpening&&t._initialThumbBounds?this._thumbBounds=t._initialThumbBounds:this._thumbBounds=this.pswp.getThumbBounds(),this._placeholder=e?.getPlaceholderElement(),t.animations.stopAll(),this._useAnimation=!!(this._duration&&this._duration>50),this._animateZoom=!!this._thumbBounds&&e?.content.usePlaceholder()&&(!this.isClosing||!t.mainScroll.isShifted()),!this._animateZoom)this._animateRootOpacity=!0,this.isOpening&&e&&(e.zoomAndPanToInitial(),e.applyCurrentZoomPan());else{var n;this._animateRootOpacity=(n=i.showHideOpacity)!==null&&n!==void 0?n:!1}if(this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>Z,this._opacityElement=this._animateRootOpacity?t.element:t.bg,!this._useAnimation){this._duration=0,this._animateZoom=!1,this._animateBgOpacity=!1,this._animateRootOpacity=!0,this.isOpening&&(t.element&&(t.element.style.opacity=String(Z)),t.applyBgOpacity(1));return}if(this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect){var o;this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=(o=this.pswp.currSlide)===null||o===void 0?void 0:o.holderElement,t.container&&(t.container.style.overflow="hidden",t.container.style.width=t.viewportSize.x+"px")}else this._croppedZoom=!1;this.isOpening?(this._animateRootOpacity?(t.element&&(t.element.style.opacity=String(Z)),t.applyBgOpacity(1)):(this._animateBgOpacity&&t.bg&&(t.bg.style.opacity=String(Z)),t.element&&(t.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(Z)))):this.isClosing&&(t.mainScroll.itemHolders[0]&&(t.mainScroll.itemHolders[0].el.style.display="none"),t.mainScroll.itemHolders[2]&&(t.mainScroll.itemHolders[2].el.style.display="none"),this._croppedZoom&&t.mainScroll.x!==0&&(t.mainScroll.resetPosition(),t.mainScroll.resize()))}_start(){this.isOpening&&this._useAnimation&&this._placeholder&&this._placeholder.tagName==="IMG"?new Promise(t=>{let e=!1,i=!0;Ee(this._placeholder).finally(()=>{e=!0,i||t(!0)}),setTimeout(()=>{i=!1,e&&t(!0)},50),setTimeout(t,250)}).finally(()=>this._initiate()):this._initiate()}_initiate(){var t,e;(t=this.pswp.element)===null||t===void 0||t.style.setProperty("--pswp-transition-duration",this._duration+"ms"),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),(e=this.pswp.element)===null||e===void 0||e.classList.toggle("pswp--ui-visible",this.isOpening),this.isOpening?(this._placeholder&&(this._placeholder.style.opacity="1"),this._animateToOpenState()):this.isClosing&&this._animateToClosedState(),this._useAnimation||this._onAnimationComplete()}_onAnimationComplete(){const{pswp:t}=this;if(this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,t.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),t.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed)t.destroy();else if(this.isOpen){var e;this._animateZoom&&t.container&&(t.container.style.overflow="visible",t.container.style.width="100%"),(e=t.currSlide)===null||e===void 0||e.applyCurrentZoomPan()}}_animateToOpenState(){const{pswp:t}=this;this._animateZoom&&(this._croppedZoom&&this._cropContainer1&&this._cropContainer2&&(this._animateTo(this._cropContainer1,"transform","translate3d(0,0,0)"),this._animateTo(this._cropContainer2,"transform","none")),t.currSlide&&(t.currSlide.zoomAndPanToInitial(),this._animateTo(t.currSlide.container,"transform",t.currSlide.getCurrentTransform()))),this._animateBgOpacity&&t.bg&&this._animateTo(t.bg,"opacity",String(t.options.bgOpacity)),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","1")}_animateToClosedState(){const{pswp:t}=this;this._animateZoom&&this._setClosedStateZoomPan(!0),this._animateBgOpacity&&t.bgOpacity>.01&&t.bg&&this._animateTo(t.bg,"opacity","0"),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","0")}_setClosedStateZoomPan(t){if(!this._thumbBounds)return;const{pswp:e}=this,{innerRect:i}=this._thumbBounds,{currSlide:n,viewportSize:o}=e;if(this._croppedZoom&&i&&this._cropContainer1&&this._cropContainer2){const r=-o.x+(this._thumbBounds.x-i.x)+i.w,a=-o.y+(this._thumbBounds.y-i.y)+i.h,l=o.x-i.w,c=o.y-i.h;t?(this._animateTo(this._cropContainer1,"transform",B(r,a)),this._animateTo(this._cropContainer2,"transform",B(l,c))):(x(this._cropContainer1,r,a),x(this._cropContainer2,l,c))}n&&(b(n.pan,i||this._thumbBounds),n.currZoomLevel=this._thumbBounds.w/n.width,t?this._animateTo(n.container,"transform",n.getCurrentTransform()):n.applyCurrentZoomPan())}_animateTo(t,e,i){if(!this._duration){t.style[e]=i;return}const{animations:n}=this.pswp,o={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{n.activeAnimations.length||this._onAnimationComplete()},target:t};o[e]=i,n.startTransition(o)}}const Si={allowPanToNext:!0,spacing:.1,loop:!0,pinchToClose:!0,closeOnVerticalDrag:!0,hideAnimationDuration:333,showAnimationDuration:333,zoomAnimationDuration:333,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,maxWidthToAnimate:4e3,clickToCloseNonZoomable:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",indexIndicatorSep:" / ",preloaderDelay:2e3,bgOpacity:.8,index:0,errorMsg:"The image cannot be loaded",preload:[1,2],easing:"cubic-bezier(.4,0,.22,1)"};class Li extends bi{constructor(t){super(),this.options=this._prepareOptions(t||{}),this.offset={x:0,y:0},this._prevViewportSize={x:0,y:0},this.viewportSize={x:0,y:0},this.bgOpacity=1,this.currIndex=0,this.potentialIndex=0,this.isOpen=!1,this.isDestroying=!1,this.hasMouse=!1,this._initialItemData={},this._initialThumbBounds=void 0,this.topBar=void 0,this.element=void 0,this.template=void 0,this.container=void 0,this.scrollWrap=void 0,this.currSlide=void 0,this.events=new Pe,this.animations=new Qe,this.mainScroll=new We(this),this.gestures=new Ne(this),this.opener=new wi(this),this.keyboard=new je(this),this.contentLoader=new _i(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this._createMainStructure();let t="pswp--open";return this.gestures.supportsTouch&&(t+=" pswp--touch"),this.options.mainClass&&(t+=" "+this.options.mainClass),this.element&&(this.element.className+=" "+t),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new ti(this),(Number.isNaN(this.currIndex)||this.currIndex<0||this.currIndex>=this.getNumItems())&&(this.currIndex=0),this.gestures.supportsTouch||this.mouseDetected(),this.updateSize(),this.offset.y=window.pageYOffset,this._initialItemData=this.getItemData(this.currIndex),this.dispatch("gettingData",{index:this.currIndex,data:this._initialItemData,slide:void 0}),this._initialThumbBounds=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",()=>{const{itemHolders:e}=this.mainScroll;e[0]&&(e[0].el.style.display="block",this.setContent(e[0],this.currIndex-1)),e[2]&&(e[2].el.style.display="block",this.setContent(e[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this._handlePageResize.bind(this)),this.events.add(window,"scroll",this._updatePageScrollOffset.bind(this)),this.dispatch("bindEvents")}),this.mainScroll.itemHolders[1]&&this.setContent(this.mainScroll.itemHolders[1],this.currIndex),this.dispatch("change"),this.opener.open(),this.dispatch("afterInit"),!0}getLoopedIndex(t){const e=this.getNumItems();return this.options.loop&&(t>e-1&&(t-=e),t<0&&(t+=e)),R(t,0,e-1)}appendHeavy(){this.mainScroll.itemHolders.forEach(t=>{var e;(e=t.slide)===null||e===void 0||e.appendHeavy()})}goTo(t){this.mainScroll.moveIndexBy(this.getLoopedIndex(t)-this.potentialIndex)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...t){var e;(e=this.currSlide)===null||e===void 0||e.zoomTo(...t)}toggleZoom(){var t;(t=this.currSlide)===null||t===void 0||t.toggleZoom()}close(){!this.opener.isOpen||this.isDestroying||(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){var t;if(!this.isDestroying){this.options.showHideAnimationType="none",this.close();return}this.dispatch("destroy"),this._listeners={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),(t=this.element)===null||t===void 0||t.remove(),this.mainScroll.itemHolders.forEach(e=>{var i;(i=e.slide)===null||i===void 0||i.destroy()}),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(t){this.contentLoader.removeByIndex(t),this.mainScroll.itemHolders.forEach((e,i)=>{var n,o;let r=((n=(o=this.currSlide)===null||o===void 0?void 0:o.index)!==null&&n!==void 0?n:0)-1+i;if(this.canLoop()&&(r=this.getLoopedIndex(r)),r===t&&(this.setContent(e,t,!0),i===1)){var a;this.currSlide=e.slide,(a=e.slide)===null||a===void 0||a.setIsActive(!0)}}),this.dispatch("change")}setContent(t,e,i){if(this.canLoop()&&(e=this.getLoopedIndex(e)),t.slide){if(t.slide.index===e&&!i)return;t.slide.destroy(),t.slide=void 0}if(!this.canLoop()&&(e<0||e>=this.getNumItems()))return;const n=this.getItemData(e);t.slide=new Ie(n,e,this),e===this.currIndex&&(this.currSlide=t.slide),t.slide.append(t.el)}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(t){if(this.isDestroying)return;const e=gt(this.options,this);!t&&$(e,this._prevViewportSize)||(b(this._prevViewportSize,e),this.dispatch("beforeResize"),b(this.viewportSize,this._prevViewportSize),this._updatePageScrollOffset(),this.dispatch("viewportSize"),this.mainScroll.resize(this.opener.isOpen),!this.hasMouse&&window.matchMedia("(any-hover: hover)").matches&&this.mouseDetected(),this.dispatch("resize"))}applyBgOpacity(t){this.bgOpacity=Math.max(t,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){if(!this.hasMouse){var t;this.hasMouse=!0,(t=this.element)===null||t===void 0||t.classList.add("pswp--has_mouse")}}_handlePageResize(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout(()=>{this.updateSize()},500)}_updatePageScrollOffset(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(t,e){this.offset.x=t,this.offset.y=e,this.dispatch("updateScrollOffset")}_createMainStructure(){this.element=A("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=A("pswp__bg","div",this.element),this.scrollWrap=A("pswp__scroll-wrap","section",this.element),this.container=A("pswp__container","div",this.scrollWrap),this.scrollWrap.setAttribute("aria-roledescription","carousel"),this.container.setAttribute("aria-live","off"),this.container.setAttribute("id","pswp__items"),this.mainScroll.appendHolders(),this.ui=new ci(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return ui(this.currIndex,this.currSlide?this.currSlide.data:this._initialItemData,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}_prepareOptions(t){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(t.showHideAnimationType="none",t.zoomAnimationDuration=0),{...Si,...t}}}function q(s,t,e){const i=document.createElement(t);return s&&(i.className=s),e&&e.appendChild(i),i}function Ai(s,t,e){let i=`translate3d(${s}px,0px,0)`;return e!==void 0&&(i+=` scale3d(${e},${e},1)`),i}function X(s,t,e){s.style.width=typeof t=="number"?`${t}px`:t,s.style.height=typeof e=="number"?`${e}px`:e}const C={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function Ei(s){return"button"in s&&s.button===1||s.ctrlKey||s.metaKey||s.altKey||s.shiftKey}function k(s,t,e=document){let i=[];if(s instanceof Element)i=[s];else if(s instanceof NodeList||Array.isArray(s))i=Array.from(s);else{const n=typeof s=="string"?s:t;n&&(i=Array.from(e.querySelectorAll(n)))}return i}function Ci(s){return typeof s=="function"&&s.prototype&&s.prototype.goTo}function xt(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}class xi{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}}class Pi{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){var n,o,r;this._filters[t]||(this._filters[t]=[]),(n=this._filters[t])===null||n===void 0||n.push({fn:e,priority:i}),(o=this._filters[t])===null||o===void 0||o.sort((a,l)=>a.priority-l.priority),(r=this.pswp)===null||r===void 0||r.addFilter(t,e,i)}removeFilter(t,e){this._filters[t]&&(this._filters[t]=this._filters[t].filter(i=>i.fn!==e)),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){var i;return(i=this._filters[t])===null||i===void 0||i.forEach(n=>{e[0]=n.fn.apply(this,e)}),e[0]}on(t,e){var i,n;this._listeners[t]||(this._listeners[t]=[]),(i=this._listeners[t])===null||i===void 0||i.push(e),(n=this.pswp)===null||n===void 0||n.on(t,e)}off(t,e){var i;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(n=>e!==n)),(i=this.pswp)===null||i===void 0||i.off(t,e)}dispatch(t,e){var i;if(this.pswp)return this.pswp.dispatch(t,e);const n=new xi(t,e);return(i=this._listeners[t])===null||i===void 0||i.forEach(o=>{o.call(this,n)}),n}}class Ti{constructor(t,e){if(this.element=q("pswp__img pswp__img--placeholder",t?"img":"div",e),t){const i=this.element;i.decoding="async",i.alt="",i.src=t,i.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&(this.element.tagName==="IMG"?(X(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=Ai(0,0,t/250)):X(this.element,t,e))}destroy(){var t;(t=this.element)!==null&&t!==void 0&&t.parentNode&&this.element.remove(),this.element=null}}class Ii{constructor(t,e,i){this.instance=e,this.data=t,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=C.IDLE,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(t,e){if(this.slide&&this.usePlaceholder())if(this.placeholder){const i=this.placeholder.element;i&&!i.parentElement&&this.slide.container.prepend(i)}else{const i=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new Ti(i,this.slide.container)}this.element&&!e||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=q("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=q("pswp__content","div"),this.element.innerHTML=this.data.html||""),e&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var e,i;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const n=this.element;this.updateSrcsetSizes(),this.data.srcset&&(n.srcset=this.data.srcset),n.src=(e=this.data.src)!==null&&e!==void 0?e:"",n.alt=(i=this.data.alt)!==null&&i!==void 0?i:"",this.state=C.LOADING,n.complete?this.onLoaded():(n.onload=()=>{this.onLoaded()},n.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=C.LOADED,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===C.LOADED||this.state===C.ERROR)&&this.removePlaceholder())}onError(){this.state=C.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===C.LOADING,this)}isError(){return this.state===C.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(t,e){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(X(this.element,t,e),this.isImageContent()&&!this.isError()))){const i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=e,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:e,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==C.ERROR,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,e=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||e>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=e+"px",t.dataset.largestUsedSize=String(e))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var t,e;let i=q("pswp__error-msg","div");i.innerText=(t=(e=this.instance.options)===null||e===void 0?void 0:e.errorMsg)!==null&&t!==void 0?t:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=q("pswp__content pswp__error-msg-container","div"),this.element.appendChild(i),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===C.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||xt())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!xt()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===C.LOADED||this.state===C.ERROR)&&this.removePlaceholder()))}}function zi(s,t){if(s.getViewportSizeFn){const e=s.getViewportSizeFn(s,t);if(e)return e}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function N(s,t,e,i,n){let o=0;if(t.paddingFn)o=t.paddingFn(e,i,n)[s];else if(t.padding)o=t.padding[s];else{const r="padding"+s[0].toUpperCase()+s.slice(1);t[r]&&(o=t[r])}return Number(o)||0}function Mi(s,t,e,i){return{x:t.x-N("left",s,t,e,i)-N("right",s,t,e,i),y:t.y-N("top",s,t,e,i)-N("bottom",s,t,e,i)}}const Pt=4e3;class Oi{constructor(t,e,i,n){this.pswp=n,this.options=t,this.itemData=e,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,e,i){const n={x:t,y:e};this.elementSize=n,this.panAreaSize=i;const o=i.x/n.x,r=i.y/n.y;this.fit=Math.min(1,o<r?o:r),this.fill=Math.min(1,o>r?o:r),this.vFill=Math.min(1,r),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const e=t+"ZoomLevel",i=this.options[e];if(i)return typeof i=="function"?i(this):i==="fill"?this.fill:i==="fit"?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,this.fit*3),this.elementSize&&t*this.elementSize.x>Pt&&(t=Pt/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}}function Tt(s,t,e){const i=t.createContentFromData(s,e);let n;const{options:o}=t;if(o){n=new Oi(o,s,-1);let r;t.pswp?r=t.pswp.viewportSize:r=zi(o,t);const a=Mi(o,r,s,e);n.update(i.width,i.height,a)}return i.lazyLoad(),n&&i.setDisplayedSize(Math.ceil(i.width*n.initial),Math.ceil(i.height*n.initial)),i}function Di(s,t){const e=t.getItemData(s);if(!t.dispatch("lazyLoadSlide",{index:s,itemData:e}).defaultPrevented)return Tt(e,t,s)}class $i extends Pi{getNumItems(){var t;let e=0;const i=(t=this.options)===null||t===void 0?void 0:t.dataSource;i&&"length"in i?e=i.length:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),i.items&&(e=i.items.length));const n=this.dispatch("numItems",{dataSource:i,numItems:e});return this.applyFilters("numItems",n.numItems,i)}createContentFromData(t,e){return new Ii(t,this,e)}getItemData(t){var e;const i=(e=this.options)===null||e===void 0?void 0:e.dataSource;let n={};Array.isArray(i)?n=i[t]:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),n=i.items[t]);let o=n;o instanceof Element&&(o=this._domElementToItemData(o));const r=this.dispatch("itemData",{itemData:o||{},index:t});return this.applyFilters("itemData",r.itemData,t)}_getGalleryDOMElements(t){var e,i;return(e=this.options)!==null&&e!==void 0&&e.children||(i=this.options)!==null&&i!==void 0&&i.childSelector?k(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){const e={element:t},i=t.tagName==="A"?t:t.querySelector("a");if(i){e.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(e.srcset=i.dataset.pswpSrcset),e.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,e.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,e.w=e.width,e.h=e.height,i.dataset.pswpType&&(e.type=i.dataset.pswpType);const o=t.querySelector("img");if(o){var n;e.msrc=o.currentSrc||o.src,e.alt=(n=o.getAttribute("alt"))!==null&&n!==void 0?n:""}(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0)}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return Tt(t,this,e)}}class Ri extends $i{constructor(t){super(),this.options=t||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){k(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(t){if(Ei(t)||window.pswp)return;let e={x:t.clientX,y:t.clientY};!e.x&&!e.y&&(e=null);let i=this.getClickedIndex(t);i=this.applyFilters("clickedIndex",i,t,this);const n={gallery:t.currentTarget};i>=0&&(t.preventDefault(),this.loadAndOpen(i,n,e))}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);const e=t.target,n=k(this.options.children,this.options.childSelector,t.currentTarget).findIndex(o=>o===e||o.contains(e));return n!==-1?n:this.options.children||this.options.childSelector?-1:0}loadAndOpen(t,e,i){if(window.pswp||!this.options)return!1;if(!e&&this.options.gallery&&this.options.children){const n=k(this.options.gallery);n[0]&&(e={gallery:n[0]})}return this.options.index=t,this.options.initialPointerPos=i,this.shouldOpen=!0,this.preload(t,e),!0}preload(t,e){const{options:i}=this;e&&(i.dataSource=e);const n=[],o=typeof i.pswpModule;if(Ci(i.pswpModule))n.push(Promise.resolve(i.pswpModule));else{if(o==="string")throw new Error("pswpModule as string is no longer supported");if(o==="function")n.push(i.pswpModule());else throw new Error("pswpModule is not valid")}typeof i.openPromise=="function"&&n.push(i.openPromise()),i.preloadFirstSlide!==!1&&t>=0&&(this._preloadedContent=Di(t,this));const r=++this._uid;Promise.all(n).then(a=>{if(this.shouldOpen){const l=a[0];this._openPhotoswipe(l,r)}})}_openPhotoswipe(t,e){if(e!==this._uid&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;const i=typeof t=="object"?new t.default(this.options):new t(this.options);this.pswp=i,window.pswp=i,Object.keys(this._listeners).forEach(n=>{var o;(o=this._listeners[n])===null||o===void 0||o.forEach(r=>{i.on(n,r)})}),Object.keys(this._filters).forEach(n=>{var o;(o=this._filters[n])===null||o===void 0||o.forEach(r=>{i.addFilter(n,r.fn,r.priority)})}),this._preloadedContent&&(i.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),i.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),i.init()}destroy(){var t;(t=this.pswp)===null||t===void 0||t.destroy(),this.shouldOpen=!1,this._listeners={},k(this.options.gallery,this.options.gallerySelector).forEach(e=>{e.removeEventListener("click",this.onThumbnailsClick,!1)})}}const Bi=()=>{let s=null;return s=new Ri({gallery:"#photoswipe-gallery",children:"a",pswpModule:Li,zoom:!1,imageClickAction:"next",tapAction:"next"}),s.on("uiRegister",()=>{s?.pswp?.ui?.registerElement({name:"custom-caption",appendTo:"root",onInit:t=>{s?.pswp?.on("change",()=>{const e=s?.pswp?.currSlide?.data.element;if(e){const i=e.querySelector(".caption-content");t.innerHTML=i?.innerHTML||""}})}})}),s.init(),()=>{s&&(s.destroy(),s=null)}},It=s=>Math.min(100,Math.max(0,Math.round(s))),Fi=()=>{const s=document.querySelector(".js-limit-scroll-progress-bar"),t=document.querySelector(".c-progress__bar"),e=document.querySelector(".c-btn__close-progress");if(!t&&!e)return;const{documentElement:i}=document,n=i.scrollTop;if(t){let o=i.scrollHeight-i.clientHeight;if(!o)return;s&&(o=s.scrollHeight-i.clientHeight+(window.pageYOffset+s.getBoundingClientRect().top)),t.style.width=`${It(n/o*100)}%`}if(e){const o=document.querySelector(".js-content-header"),r=document.querySelector(".js-limit-scroll-close-article-btn");if(o&&r){const a=window.pageYOffset+o.getBoundingClientRect().bottom,c=window.pageYOffset+r.getBoundingClientRect().bottom-i.clientHeight-a;if(c>0){const d=It((n-a)/c*100);e.style.setProperty("--progress",`${d}`),e.parentElement?.classList.toggle("c-btn--close-progress-complete",d>=100)}}}},Zi=()=>{const s=document.querySelector(".c-progress"),t=document.querySelector(".c-btn__close-progress");(s||t)&&window.addEventListener("scroll",Fi)},qi=(s={})=>{const{buttonSelector:t=".c-scroll-to-top"}=s,e=document.querySelector(t),i=e?.querySelector("button");if(!e||!i)return;const n=e.dataset.triggerSelector||"[data-scroll-trigger]",o=parseInt(e.dataset.triggerOffset||"0",10);e.style.display="none";const r=()=>{const l=document.querySelector(n);let c=!1;if(l){const d=l.getBoundingClientRect().top;c=window.pageYOffset>=d-o}else c=window.pageYOffset>300;e.style.display=c?"block":"none"},a=()=>{window.scrollTo({top:0,behavior:"smooth"})};window.addEventListener("scroll",r),i.addEventListener("click",a),r()},ki=500,Ni=()=>{const s=document.querySelector("#mbrs-comments-container"),t=s?.querySelector(".c-comment__scroll-to-top-button");if(!s||!t)return;t.style.display="none";let e=!1;const i=()=>{const{top:u}=s.getBoundingClientRect();t.style.display=u<-400?"block":"none"},n=()=>{e||(e=!0,window.addEventListener("scroll",i,{passive:!0}),i())},o=()=>{e&&(e=!1,window.removeEventListener("scroll",i),t.style.display="none")},r=u=>{u.offsetHeight>ki?n():o()},a=u=>{new ResizeObserver(()=>{r(u)}).observe(u)},l=u=>{r(u),a(u)},c=u=>{try{if(u.contentDocument?.readyState==="complete"){l(u);return}}catch{}u.addEventListener("load",()=>l(u),{once:!0})};if((()=>{const u=s.querySelector("iframe");return u?(c(u),!0):!1})())return;const h=new MutationObserver(u=>{u.some(f=>Array.from(f.addedNodes).some(p=>{if(p instanceof HTMLIFrameElement)return c(p),!0;if(p instanceof HTMLElement){const y=p.querySelector("iframe");if(y)return c(y),!0}return!1}))&&h.disconnect()});h.observe(s,{childList:!0,subtree:!0})},Y="#page-content",J="#text-tooltip",Hi=".tooltip-btn",zt="c-text-tooltip--show",Wi=["#page-content .c-content p","#page-content .c-content h2","#page-content .c-content h3","#page-content .c-content h4","#page-content .c-content h5","#page-content .c-content h6","#page-content .c-content li","#page-content .c-content span","#page-content header span","#page-content header h1","#page-content header h2"],Mt=(s,t)=>s instanceof Element?t.some(e=>s.matches(e)):!1,Vi=(s,t)=>{const e=s.startContainer.nodeType===Node.ELEMENT_NODE?s.startContainer:s.startContainer.parentElement,i=s.endContainer.nodeType===Node.ELEMENT_NODE?s.endContainer:s.endContainer.parentElement;return!!e&&Mt(e,t)||!!i&&Mt(i,t)},ji=s=>{if(!s.focusNode)return null;const t=s.anchorNode?.compareDocumentPosition(s.focusNode);return t?(t&4)>0:s.anchorOffset<s.focusOffset},Gi=(s,t,e)=>{const i=document.querySelector(`${Y} ${J}`),n=document.querySelector(`${Y}`),o=document.querySelectorAll(`${Y} ${J} ${Hi}`);if(!i||!n){console.warn("Text tooltip : Tooltip or it's parent are not found in the DOM");return}Array.from(o).forEach(l=>l.setAttribute("data-selected-text",e));const r=s.getClientRects(),a=r[t?r.length-1:0];i.style.top=`${a.top-n.getBoundingClientRect().top-(i.offsetHeight+10)}px`,a.width<i.offsetWidth?i.style.left=`${a.left-n.getBoundingClientRect().left+a.width/2-i.offsetWidth/2}px`:t?i.style.left=`${a.left-n.getBoundingClientRect().left+a.width-i.offsetWidth}px`:i.style.left=`${a.left-n.getBoundingClientRect().left}px`,i.classList.add(zt)},Ot=()=>{const s=document.querySelector(`${J}`);s&&s.classList.remove(zt)},H=({type:s})=>{const t=window.getSelection();if(s==="selectionchange"){Ot();return}if(!t||!t.rangeCount)return;const e=t.getRangeAt(0),i=t.toString().trim();if(i.length){const n=Vi(e,Wi),o=ji(t)||!1;n&&Gi(e,o,i);return}Ot()},Ui=()=>{if(!window?.getSelection){console.warn("Selection API isn't supported");return}document.addEventListener("mouseup",H),document.addEventListener("selectionchange",H),document.addEventListener("touchend",H),document.addEventListener("touchcancel",H)},Ki=s=>{const{target:t}=s;if(t instanceof Element){const e=t.closest(".c-search-form--button");e&&(s.preventDefault(),e.classList.remove("c-search-form--button"))}},Xi=(s=document.querySelector(".c-search-form--button"))=>{s&&s.addEventListener("click",t=>{Ki(t)})},Yi=({tabsContainerElement:s,event:t})=>{t.preventDefault();const e=t.target;if(!(e instanceof HTMLButtonElement))return;const i=s.querySelectorAll('[role="tab"]'),n=s.querySelectorAll('[role="tabpanel"]'),o=e.getAttribute("aria-controls"),r=Object.values(n).find(a=>a.id===o);i.forEach(a=>{a.setAttribute("aria-selected","false")}),n.forEach(a=>{a.setAttribute("aria-hidden","true")}),e.setAttribute("aria-selected","true"),r&&r.removeAttribute("aria-hidden")},Dt=s=>s.code==="ArrowLeft"||s.keyCode===39,$t=s=>s.code==="ArrowRight"||s.keyCode===37,Ji=(s=document.querySelectorAll(".js-tabs"))=>{s.length>0&&s.forEach(t=>{const e=t.querySelectorAll('[role="tab"]');e.forEach(n=>{n.addEventListener("click",o=>{Yi({tabsContainerElement:t,event:o})})});const i=t.querySelector('[role="tablist"]');if(i&&e.length>0){let n=0;i.addEventListener("keydown",o=>{o instanceof KeyboardEvent&&(Dt(o)||$t(o))&&(e[n].setAttribute("tabindex","-1"),Dt(o)?(n+=1,n>=e.length&&(n=0)):$t(o)&&(n-=1,n<0&&(n=e.length-1)),e[n].setAttribute("tabindex","0"),e[n].focus())})}})},W=s=>{const[t,e]=s.split("h").map(Number);return t*60+e},Rt=()=>{const s=new Date,t=s.getHours(),e=s.getMinutes();return t*60+e},Qi=(s,t)=>{const e=Rt();if(e<s||e>t)return 0;const i=t-s;return(e-s)/i},ts=s=>{const t=Rt();let e=null,i=null,n=-1;return Array.from(s).find((o,r,a)=>{if(r===a.length-1)return!1;const l=o.textContent,c=a[r+1].textContent;if(!l||!c)return!1;const d=W(l),h=W(c);return t>=d&&t<h?(e=l,i=c,n=r,!0):!1}),{currentIntervalStartTime:e,currentIntervalEndTime:i,currentIntervalIndex:n}},es=()=>{const s=document.querySelectorAll(".c-timeline__time");if(!s||s.length<2)return;const t=document.querySelector(".c-timeline__progress-bar"),{currentIntervalStartTime:e,currentIntervalEndTime:i,currentIntervalIndex:n}=ts(s);if(!e||!i)return;const o=W(e),r=W(i),a=Qi(o,r);if(t instanceof HTMLElement){if(t.classList.contains("c-timeline__progress-bar--is-desktop")&&s.length>=5){const l="172px / 2";switch(n){case 0:t.style.width=`calc(${l} + (((${l} + 25% - ${l} / 2) - ${l}) * ${a})`;break;case 1:t.style.width=`calc((${l} + 25% - ${l} / 2) + (((50%) - (${l} + 25% - ${l} / 2)) * ${a})`;break;case 2:t.style.width=`calc((50%) + (((75% - ${l} / 2) - (50%)) * ${a})`;break;case 3:t.style.width=`calc((75% - ${l} / 2) + (((100% - ${l}) - (75% - ${l} / 2)) * ${a}`;break;default:t.style.width="0%"}}if(t.classList.contains("c-timeline__progress-bar--is-mobile")){const l="45px / 2",c="20px";switch(n){case 0:case 1:case 2:case 3:t.style.width=`calc((${c} + ${l}) + (((60% + ${l}) - (${c} + ${l})) * ${a})`;break;default:t.style.width="0%"}if(n===1||n===2||n===3){const d=document.querySelectorAll(".c-timeline__time"),h=document.querySelectorAll(".c-timeline__event");d.length>0&&h.length>0&&(d[0].textContent=e,d[1].textContent=i,h[0].textContent=h[n].textContent,h[1].textContent=h[n+1].textContent)}}}},Q="c-icon-item__container--is-highlighted",is=s=>{s.find(e=>e.classList.contains(Q))?.classList.remove(Q)},ss=()=>{const s=document.querySelector(".c-toolbar");if(s){const t=window.location.origin+window.location.pathname,e=Array.from(s.querySelectorAll(".c-icon-item__container"));is(e),e.find(n=>n.querySelector("a")?.getAttribute("href")===t)?.classList.add(Q)}},tt=s=>{const t=s||document.querySelector(".c-map-towns");if(!t){new MutationObserver((o,r)=>{if(typeof document<"u"){const a=document.querySelector(".c-map-towns");a&&(r.disconnect(),tt(a))}}).observe(document.body,{childList:!0,subtree:!0});return}const e=()=>{const n=document.querySelectorAll(".js-city-marker");if(n.length===0)return!1;const o=()=>{let r=!0;n.forEach(a=>{if(a.getAttribute("aria-hidden")==="false")return;const l=a.querySelector(".js-city-anchor"),c=a.querySelector(".js-city-text"),d=a.querySelector(".js-city-bg");if(!(l instanceof SVGGraphicsElement)||!(c instanceof SVGTextElement)||!(d instanceof SVGRectElement))return;const h=l.getBBox();if(h.width>0){const{x:u,y:m,width:f,height:p}=h,y=a.getAttribute("data-scale"),S=y?` scale(${y})`:"";a.setAttribute("transform",`translate(${u+f/2}, ${m+p/2})${S}`);const L=c.getBBox(),g=8,_=4,w=8,V=L.width+g,it=L.height+_;d.setAttribute("width",`${V}`),d.setAttribute("height",`${it}`),d.setAttribute("x",`${-V/2}`),d.setAttribute("y",`${-it-w}`);const hs=-it/2-w;c.setAttribute("y",`${hs}`),a.setAttribute("aria-hidden","false")}else r=!1}),r||requestAnimationFrame(o)};return requestAnimationFrame(o),!0};if(e())return;new MutationObserver((n,o)=>{e()&&o.disconnect()}).observe(t,{childList:!0,subtree:!0})},ns={10:[{id:"10387",name:"Troyes"},{id:"10323",name:"Romilly-sur-Seine"},{id:"10033",name:"Bar-sur-Aube"}],11:[{id:"11262",name:"Narbonne"},{id:"11069",name:"Carcassonne"},{id:"11076",name:"Castelnaudary"}],12:[{id:"12202",name:"Rodez"},{id:"12145",name:"Millau"},{id:"12300",name:"Villefranche-de-Rouergue"}],13:[{id:"13055",name:"Marseille"},{id:"13001",name:"Aix-en-Provence"},{id:"13004",name:"Arles"}],14:[{id:"14118",name:"Caen"},{id:"14366",name:"Lisieux"},{id:"14762",name:"Vire Normandie"}],15:[{id:"15014",name:"Aurillac"},{id:"15187",name:"Saint-Flour"},{id:"15120",name:"Mauriac"}],16:[{id:"16015",name:"Angoulême"},{id:"16102",name:"Cognac"},{id:"16028",name:"Barbezieux-Saint-Hilaire"}],17:[{id:"17300",name:"La Rochelle"},{id:"17415",name:"Saintes"},{id:"17299",name:"Rochefort"}],18:[{id:"18033",name:"Bourges"},{id:"18279",name:"Vierzon"},{id:"18197",name:"Saint-Amand-Montrond"}],19:[{id:"19031",name:"Brive-la-Gaillarde"},{id:"19272",name:"Tulle"},{id:"19275",name:"Ussel"}],21:[{id:"21231",name:"Dijon"},{id:"21054",name:"Beaune"},{id:"21038",name:"Auxonne"}],22:[{id:"22278",name:"Saint-Brieuc"},{id:"22113",name:"Lannion"},{id:"22093",name:"Lamballe-Armor"}],23:[{id:"23096",name:"Guéret"},{id:"23176",name:"La Souterraine"},{id:"23008",name:"Aubusson"}],24:[{id:"24322",name:"Périgueux"},{id:"24037",name:"Bergerac"},{id:"24520",name:"Sarlat-la-Canéda"}],25:[{id:"25056",name:"Besançon"},{id:"25388",name:"Montbéliard"},{id:"25462",name:"Pontarlier"}],26:[{id:"26362",name:"Valence"},{id:"26198",name:"Montélimar"},{id:"26235",name:"Pierrelatte"}],27:[{id:"27229",name:"Évreux"},{id:"27681",name:"Vernon"},{id:"27375",name:"Louviers"}],28:[{id:"28085",name:"Chartres"},{id:"28134",name:"Dreux"},{id:"28088",name:"Châteaudun"}],29:[{id:"29019",name:"Brest"},{id:"29232",name:"Quimper"},{id:"29039",name:"Concarneau"}],30:[{id:"30189",name:"Nîmes"},{id:"30007",name:"Alès"},{id:"30028",name:"Bagnols-sur-Cèze"}],31:[{id:"31555",name:"Toulouse"},{id:"31483",name:"Saint-Gaudens"},{id:"31033",name:"Auterive"}],32:[{id:"32013",name:"Auch"},{id:"32160",name:"L'Isle-Jourdain"},{id:"32107",name:"Condom"}],33:[{id:"33063",name:"Bordeaux"},{id:"33529",name:"La Teste-de-Buch"},{id:"33243",name:"Libourne"}],34:[{id:"34172",name:"Montpellier"},{id:"34032",name:"Béziers"},{id:"34301",name:"Sète"}],35:[{id:"35238",name:"Rennes"},{id:"35288",name:"Saint-Malo"},{id:"35115",name:"Fougères"}],36:[{id:"36044",name:"Châteauroux"},{id:"36088",name:"Issoudun"},{id:"36018",name:"Le Blanc"}],37:[{id:"37261",name:"Tours"},{id:"37003",name:"Amboise"},{id:"37072",name:"Chinon"}],38:[{id:"38185",name:"Grenoble"},{id:"38544",name:"Vienne"},{id:"38053",name:"Bourgoin-Jallieu"}],39:[{id:"39198",name:"Dole"},{id:"39300",name:"Lons-le-Saunier"},{id:"39478",name:"Saint-Claude"}],40:[{id:"40192",name:"Mont-de-Marsan"},{id:"40088",name:"Dax"},{id:"40046",name:"Biscarrosse"}],41:[{id:"41018",name:"Blois"},{id:"41194",name:"Romorantin-Lanthenay"},{id:"41269",name:"Vendôme"}],42:[{id:"42218",name:"Saint-Étienne"},{id:"42187",name:"Roanne"},{id:"42147",name:"Montbrison"}],43:[{id:"43157",name:"Le Puy-en-Velay"},{id:"43137",name:"Monistrol-sur-Loire"},{id:"43040",name:"Brioude"}],44:[{id:"44109",name:"Nantes"},{id:"44184",name:"Saint-Nazaire"},{id:"44131",name:"Pornic"}],45:[{id:"45234",name:"Orléans"},{id:"45208",name:"Montargis"},{id:"45155",name:"Gien"}],46:[{id:"46042",name:"Cahors"},{id:"46102",name:"Figeac"},{id:"46127",name:"Gourdon"}],47:[{id:"47001",name:"Agen"},{id:"47323",name:"Villeneuve-sur-Lot"},{id:"47157",name:"Marmande"}],48:[{id:"48095",name:"Mende"},{id:"48140",name:"Saint-Chély-d'Apcher"},{id:"48080",name:"Langogne"}],49:[{id:"49007",name:"Angers"},{id:"49099",name:"Cholet"},{id:"49328",name:"Saumur"}],50:[{id:"50129",name:"Cherbourg-en-Cotentin"},{id:"50502",name:"Saint-Lô"},{id:"50218",name:"Granville"}],51:[{id:"51454",name:"Reims"},{id:"51108",name:"Châlons-en-Champagne"},{id:"51230",name:"Épernay"}],52:[{id:"52448",name:"Saint-Dizier"},{id:"52121",name:"Chaumont"},{id:"52269",name:"Langres"}],53:[{id:"53130",name:"Laval"},{id:"53062",name:"Château-Gontier-sur-Mayenne"},{id:"53147",name:"Mayenne"}],54:[{id:"54395",name:"Nancy"},{id:"54329",name:"Lunéville"},{id:"54528",name:"Toul"}],55:[{id:"55545",name:"Verdun"},{id:"55029",name:"Bar-le-Duc"},{id:"55122",name:"Commercy"}],56:[{id:"56121",name:"Lorient"},{id:"56260",name:"Vannes"},{id:"56178",name:"Pontivy"}],57:[{id:"57463",name:"Metz"},{id:"57672",name:"Thionville"},{id:"57227",name:"Forbach"}],58:[{id:"58194",name:"Nevers"},{id:"58086",name:"Cosne-Cours-sur-Loire"},{id:"58095",name:"Decize"}],59:[{id:"59350",name:"Lille"},{id:"59183",name:"Dunkerque"},{id:"59606",name:"Valenciennes"}],60:[{id:"60057",name:"Beauvais"},{id:"60159",name:"Compiègne"},{id:"60175",name:"Creil"}],61:[{id:"61001",name:"Alençon"},{id:"61169",name:"Flers"},{id:"61006",name:"Argentan"}],62:[{id:"62193",name:"Calais"},{id:"62041",name:"Arras"},{id:"62160",name:"Boulogne-sur-Mer"}],63:[{id:"63113",name:"Clermont-Ferrand"},{id:"63178",name:"Issoire"},{id:"63430",name:"Thiers"}],64:[{id:"64445",name:"Pau"},{id:"64102",name:"Bayonne"},{id:"64260",name:"Hendaye"}],65:[{id:"65440",name:"Tarbes"},{id:"65258",name:"Lannemezan"},{id:"65025",name:"Argelès-Gazost"}],66:[{id:"66136",name:"Perpignan"},{id:"66049",name:"Céret"},{id:"66149",name:"Prades"}],67:[{id:"67482",name:"Strasbourg"},{id:"67180",name:"Haguenau"},{id:"67462",name:"Sélestat"}],68:[{id:"68224",name:"Mulhouse"},{id:"68066",name:"Colmar"},{id:"68297",name:"Saint-Louis"}],69:[{id:"69123",name:"Lyon"},{id:"69264",name:"Villefranche-sur-Saône"},{id:"69091",name:"Givors"}],70:[{id:"70550",name:"Vesoul"},{id:"70285",name:"Héricourt"},{id:"70310",name:"Lure"}],71:[{id:"71076",name:"Chalon-sur-Saône"},{id:"71270",name:"Mâcon"},{id:"71153",name:"Le Creusot"}],72:[{id:"72181",name:"Le Mans"},{id:"72154",name:"La Flèche"},{id:"72264",name:"Sablé-sur-Sarthe"}],73:[{id:"73065",name:"Chambéry"},{id:"73011",name:"Albertville"},{id:"73248",name:"Saint-Jean-de-Maurienne"}],74:[{id:"74010",name:"Annecy"},{id:"74281",name:"Thonon-les-Bains"},{id:"74012",name:"Annemasse"}],75:[{id:"75056",name:"Paris"}],76:[{id:"76351",name:"Le Havre"},{id:"76540",name:"Rouen"},{id:"76217",name:"Dieppe"}],77:[{id:"77284",name:"Meaux"},{id:"77108",name:"Chelles"},{id:"77288",name:"Melun"}],78:[{id:"78646",name:"Versailles"},{id:"78361",name:"Mantes-la-Jolie"},{id:"78172",name:"Conflans-Sainte-Honorine"}],79:[{id:"79191",name:"Niort"},{id:"79049",name:"Bressuire"},{id:"79329",name:"Thouars"}],80:[{id:"80021",name:"Amiens"},{id:"80001",name:"Abbeville"},{id:"80016",name:"Albert"}],81:[{id:"81004",name:"Albi"},{id:"81065",name:"Castres"},{id:"81105",name:"Graulhet"}],82:[{id:"82121",name:"Montauban"},{id:"82033",name:"Castelsarrasin"},{id:"82037",name:"Caussade"}],83:[{id:"83137",name:"Toulon"},{id:"83061",name:"Fréjus"},{id:"83050",name:"Draguignan"}],84:[{id:"84007",name:"Avignon"},{id:"84031",name:"Carpentras"},{id:"84087",name:"Orange"}],85:[{id:"85191",name:"La Roche-sur-Yon"},{id:"85194",name:"Les Sables-d'Olonne"},{id:"85047",name:"Challans"}],86:[{id:"86194",name:"Poitiers"},{id:"86066",name:"Châtellerault"},{id:"86070",name:"Chauvigny"}],87:[{id:"87085",name:"Limoges"},{id:"87154",name:"Saint-Junien"},{id:"87187",name:"Saint-Yrieix-la-Perche"}],88:[{id:"88160",name:"Épinal"},{id:"88413",name:"Saint-Dié-des-Vosges"},{id:"88196",name:"Gérardmer"}],89:[{id:"89024",name:"Auxerre"},{id:"89387",name:"Sens"},{id:"89206",name:"Joigny"}],90:[{id:"90010",name:"Belfort"},{id:"90081",name:"Réchésy"}],91:[{id:"91228",name:"Évry-Courcouronnes"},{id:"91223",name:"Étampes"},{id:"91692",name:"Les Ulis"}],92:[{id:"92012",name:"Boulogne-Billancourt"}],93:[{id:"93066",name:"Saint-Denis"}],94:[{id:"94081",name:"Vitry-sur-Seine"}],95:[{id:"95018",name:"Argenteuil"},{id:"95487",name:"Persan"},{id:"95351",name:"Louvres"}],971:[{id:"97101",name:"Les Abymes"},{id:"97128",name:"Sainte-Anne"},{id:"97118",name:"Petit-Bourg"}],972:[{id:"97209",name:"Fort-de-France"},{id:"97224",name:"Saint-Joseph"},{id:"97220",name:"Rivière-Pilote"}],973:[{id:"97311",name:"Saint-Laurent-du-Maroni"},{id:"97304",name:"Kourou"}],974:[{id:"97411",name:"Saint-Denis"},{id:"97416",name:"Saint-Pierre"},{id:"97409",name:"Saint-André"}],"03":[{id:"03185",name:"Montluçon"},{id:"03310",name:"Vichy"},{id:"03190",name:"Moulins"}],"04":[{id:"04112",name:"Manosque"},{id:"04070",name:"Digne-les-Bains"},{id:"04209",name:"Sisteron"}],"09":[{id:"09225",name:"Pamiers"},{id:"09261",name:"Saint-Girons"},{id:"09160",name:"Lavelanet"}],"01":[{id:"01053",name:"Bourg-en-Bresse"},{id:"01283",name:"Oyonnax"},{id:"01033",name:"Valserhône"}],"06":[{id:"06088",name:"Nice"},{id:"06029",name:"Cannes"},{id:"06083",name:"Menton"}],"2B":[{id:"2B033",name:"Bastia"},{id:"2B096",name:"Corte"},{id:"2B050",name:"Calvi"}],"2A":[{id:"2A004",name:"Ajaccio"},{id:"2A247",name:"Porto-Vecchio"},{id:"2A032",name:"Bastelicaccia"}],"02":[{id:"02691",name:"Saint-Quentin"},{id:"02722",name:"Soissons"},{id:"02408",name:"Laon"}],"07":[{id:"07010",name:"Annonay"},{id:"07019",name:"Aubenas"},{id:"07324",name:"Tournon-sur-Rhône"}],"05":[{id:"05061",name:"Gap"},{id:"05023",name:"Briançon"},{id:"05046",name:"Embrun"}],"08":[{id:"08105",name:"Charleville-Mézières"},{id:"08362",name:"Rethel"},{id:"08190",name:"Givet"}]},os=(s,t)=>{if(s.startsWith("97"))return Array.from(document.querySelectorAll(`path[id^="town-${s}"][id$="-drom"]`));const e=`[id^="town-${s}"]`;return t?Array.from(t.querySelectorAll(e)):[]},rs=(s,t,e,i)=>{(i.startsWith("97")?s:document.querySelector(`.c-map-towns__layer-towns [href="#${e}"], .c-map-towns__layer-towns [xlink\\:href="#${e}"]`))?.classList.forEach(o=>{o.includes("--")&&t.classList.add(o)})},as=(s,t)=>{const e=s.getAttribute("id"),i=s.getAttribute("data-url"),n=s.getAttribute("data-name");if(!e||!i)return null;const o=document.createElementNS("http://www.w3.org/2000/svg","a");o.setAttribute("href",i);let r;if(t.startsWith("97")){const a=s.cloneNode(!0);if(!(a instanceof SVGElement))return null;r=a,r.removeAttribute("id")}else r=document.createElementNS("http://www.w3.org/2000/svg","use"),r.setAttribute("href",`#${e}`);if(r.classList.add("c-map-towns__path"),n){const a=document.createElementNS("http://www.w3.org/2000/svg","title");a.textContent=n,r.appendChild(a)}return rs(s,r,e,t),o.appendChild(r),o},ls=(s,t,e)=>{const i=document.createElementNS("http://www.w3.org/2000/svg","g");i.setAttribute("class","js-city-marker c-map-towns__city-marker"),i.setAttribute("aria-hidden","true"),i.setAttribute("data-scale",e.toString());const n=document.createElementNS("http://www.w3.org/2000/svg","use"),r=t.startsWith("97")?`#town-${t}-drom`:`#town-${t}`;n.setAttribute("href",r),n.setAttribute("class","js-city-anchor c-map-towns__city-anchor");const a=document.createElementNS("http://www.w3.org/2000/svg","circle");a.setAttribute("class","c-map-towns__city-circle"),a.setAttribute("r","5"),a.setAttribute("fill","white"),a.setAttribute("stroke","black"),a.setAttribute("strokeWidth","1");const l=document.createElementNS("http://www.w3.org/2000/svg","rect");l.setAttribute("class","js-city-bg"),l.setAttribute("fill","white"),l.setAttribute("rx","4"),l.setAttribute("ry","4");const c=document.createElementNS("http://www.w3.org/2000/svg","text");return c.setAttribute("class","js-city-text c-map-towns__city-text"),c.textContent=s,i.appendChild(n),i.appendChild(a),i.appendChild(l),i.appendChild(c),i},cs=(s,t,e)=>{s.innerHTML="",e.forEach(c=>s.appendChild(c));const i=s.getBBox(),n=5,o=i.width+n*2,r=i.height+n*2;t.setAttribute("viewBox",`${i.x-n} ${i.y-n} ${o} ${r}`);const a=t.clientWidth||800,l=t.clientHeight||600;return Math.max(o/a,r/l)};let Bt=!1;const et=()=>{if(Bt)return;if(!document.querySelector(".c-map-towns")){new MutationObserver((h,u)=>{typeof document<"u"&&document.querySelector(".c-map-towns")&&(u.disconnect(),et())}).observe(document.body,{childList:!0,subtree:!0});return}const t=document.getElementById("js-zoom-overlay"),e=document.getElementById("js-zoom-svg"),i=document.getElementById("js-zoom-group"),n=document.getElementById("js-zoom-close");if(!(t instanceof HTMLElement)||!(e instanceof SVGSVGElement)||!(i instanceof SVGGElement)||!(n instanceof HTMLElement)){requestAnimationFrame(et);return}Bt=!0;const o=document.querySelector(".c-map-towns__map"),r=document.querySelector(".c-map-towns__droms"),a=document.getElementById("js-zoom-label"),l=d=>{const{target:h}=d;if(!(h instanceof Element))return;const u=h?.closest(".c-map-towns__dept-trigger");if(!u)return;const m=u.getAttribute("id")?.replace("out-","")||"",f=u.getAttribute("data-name"),p=document.querySelector(".c-map-towns__sprite"),S=os(m,p).map(w=>as(w,m)).filter(w=>w!==null);a&&f&&(a.textContent=f);const L=cs(i,e,S);(ns[m]||[]).forEach(w=>{const V=ls(w.name,w.id,L);i.appendChild(V)}),tt(i),t.setAttribute("aria-hidden","false")};o?.addEventListener("click",l),r?.addEventListener("click",l),n.addEventListener("click",()=>{t.setAttribute("aria-hidden","true")}),t.addEventListener("click",d=>{d.target===t&&t.setAttribute("aria-hidden","true")})},ds=()=>{ne(),Ji(),jt(),ce(),Qt(),Zi(),Bi(),fe(),Xi(),j("winterOlympicsGames","countdown-winter-olympics-games"),j("eurovision","countdown-eurovision"),j("worldFoot2026","countdown-world-foot-2026"),Ui(),Wt(),re(),Kt(),Ht("localisation-input","https://www.20minutes.fr/elections/resultats/recherche","?searchValue=","text","text"),Ut(),tt(),ss(),qt(),kt(),ae(),et(),we(),Se(),oe(),Zt(),es(),qi(),Ni()};T.initScripts=ds,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})}));
|