@20minutes/hela 2.24.2 → 2.26.0

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.
Files changed (177) hide show
  1. package/dist/assets/scripts/bottomSheet.d.ts +1 -0
  2. package/dist/components/atoms/Icon/generated/AppleIcon.d.ts +7 -0
  3. package/dist/components/atoms/Icon/generated/ArrowIcon.d.ts +7 -0
  4. package/dist/components/atoms/Icon/generated/BallotBoxIcon.d.ts +7 -0
  5. package/dist/components/atoms/Icon/generated/BirthdayCakeIcon.d.ts +8 -0
  6. package/dist/components/atoms/Icon/generated/BookmarkActiveIcon.d.ts +7 -0
  7. package/dist/components/atoms/Icon/generated/BookmarkIcon.d.ts +7 -0
  8. package/dist/components/atoms/Icon/generated/CheckIcon.d.ts +7 -0
  9. package/dist/components/atoms/Icon/generated/ChevronIcon.d.ts +7 -0
  10. package/dist/components/atoms/Icon/generated/ChevronLeftIcon.d.ts +7 -0
  11. package/dist/components/atoms/Icon/generated/ChevronUpIcon.d.ts +7 -0
  12. package/dist/components/atoms/Icon/generated/CinemaIcon.d.ts +7 -0
  13. package/dist/components/atoms/Icon/generated/ClockIcon.d.ts +8 -0
  14. package/dist/components/atoms/Icon/generated/CloseCircleIcon.d.ts +7 -0
  15. package/dist/components/atoms/Icon/generated/CloseIcon.d.ts +7 -0
  16. package/dist/components/atoms/Icon/generated/CloverIcon.d.ts +7 -0
  17. package/dist/components/atoms/Icon/generated/CommentIcon.d.ts +7 -0
  18. package/dist/components/atoms/Icon/generated/ConnectFilledIcon.d.ts +8 -0
  19. package/dist/components/atoms/Icon/generated/ConnectIcon.d.ts +7 -0
  20. package/dist/components/atoms/Icon/generated/ConnectedIcon.d.ts +7 -0
  21. package/dist/components/atoms/Icon/generated/DailymotionIcon.d.ts +7 -0
  22. package/dist/components/atoms/Icon/generated/DarkmodeIcon.d.ts +7 -0
  23. package/dist/components/atoms/Icon/generated/DiaporamaIcon.d.ts +7 -0
  24. package/dist/components/atoms/Icon/generated/DiaporamaOutlinedIcon.d.ts +7 -0
  25. package/dist/components/atoms/Icon/generated/DiodeIcon.d.ts +7 -0
  26. package/dist/components/atoms/Icon/generated/DotIcon.d.ts +7 -0
  27. package/dist/components/atoms/Icon/generated/DotsIcon.d.ts +7 -0
  28. package/dist/components/atoms/Icon/generated/EditIcon.d.ts +7 -0
  29. package/dist/components/atoms/Icon/generated/EmailIcon.d.ts +7 -0
  30. package/dist/components/atoms/Icon/generated/EmbedIcon.d.ts +7 -0
  31. package/dist/components/atoms/Icon/generated/ErrorIcon.d.ts +8 -0
  32. package/dist/components/atoms/Icon/generated/EuroIcon.d.ts +8 -0
  33. package/dist/components/atoms/Icon/generated/EurovisionIcon.d.ts +7 -0
  34. package/dist/components/atoms/Icon/generated/ExternalLinkIcon.d.ts +7 -0
  35. package/dist/components/atoms/Icon/generated/FacebookIcon.d.ts +7 -0
  36. package/dist/components/atoms/Icon/generated/FlipboardIcon.d.ts +7 -0
  37. package/dist/components/atoms/Icon/generated/GameIcon.d.ts +7 -0
  38. package/dist/components/atoms/Icon/generated/GamingIcon.d.ts +7 -0
  39. package/dist/components/atoms/Icon/generated/GhostIcon.d.ts +8 -0
  40. package/dist/components/atoms/Icon/generated/GoogleplayIcon.d.ts +7 -0
  41. package/dist/components/atoms/Icon/generated/HalfstarIcon.d.ts +8 -0
  42. package/dist/components/atoms/Icon/generated/HealthIcon.d.ts +7 -0
  43. package/dist/components/atoms/Icon/generated/HeartIcon.d.ts +7 -0
  44. package/dist/components/atoms/Icon/generated/HeatFillIcon.d.ts +7 -0
  45. package/dist/components/atoms/Icon/generated/HeatIcon.d.ts +7 -0
  46. package/dist/components/atoms/Icon/generated/HomeIcon.d.ts +7 -0
  47. package/dist/components/atoms/Icon/generated/HoroscopeBalanceIcon.d.ts +7 -0
  48. package/dist/components/atoms/Icon/generated/HoroscopeBelierIcon.d.ts +7 -0
  49. package/dist/components/atoms/Icon/generated/HoroscopeBuffleIcon.d.ts +7 -0
  50. package/dist/components/atoms/Icon/generated/HoroscopeCancerIcon.d.ts +7 -0
  51. package/dist/components/atoms/Icon/generated/HoroscopeCapricorneIcon.d.ts +7 -0
  52. package/dist/components/atoms/Icon/generated/HoroscopeChevalIcon.d.ts +7 -0
  53. package/dist/components/atoms/Icon/generated/HoroscopeChevreIcon.d.ts +7 -0
  54. package/dist/components/atoms/Icon/generated/HoroscopeChienIcon.d.ts +7 -0
  55. package/dist/components/atoms/Icon/generated/HoroscopeCochonIcon.d.ts +7 -0
  56. package/dist/components/atoms/Icon/generated/HoroscopeCoqIcon.d.ts +7 -0
  57. package/dist/components/atoms/Icon/generated/HoroscopeDragonIcon.d.ts +7 -0
  58. package/dist/components/atoms/Icon/generated/HoroscopeGemeauxIcon.d.ts +7 -0
  59. package/dist/components/atoms/Icon/generated/HoroscopeIcon.d.ts +7 -0
  60. package/dist/components/atoms/Icon/generated/HoroscopeLapinIcon.d.ts +7 -0
  61. package/dist/components/atoms/Icon/generated/HoroscopeLionIcon.d.ts +7 -0
  62. package/dist/components/atoms/Icon/generated/HoroscopePoissonsIcon.d.ts +7 -0
  63. package/dist/components/atoms/Icon/generated/HoroscopeRatIcon.d.ts +7 -0
  64. package/dist/components/atoms/Icon/generated/HoroscopeSagittaireIcon.d.ts +7 -0
  65. package/dist/components/atoms/Icon/generated/HoroscopeScorpionIcon.d.ts +7 -0
  66. package/dist/components/atoms/Icon/generated/HoroscopeSerpentIcon.d.ts +7 -0
  67. package/dist/components/atoms/Icon/generated/HoroscopeSingeIcon.d.ts +7 -0
  68. package/dist/components/atoms/Icon/generated/HoroscopeTaureauIcon.d.ts +7 -0
  69. package/dist/components/atoms/Icon/generated/HoroscopeTigreIcon.d.ts +7 -0
  70. package/dist/components/atoms/Icon/generated/HoroscopeVerseauIcon.d.ts +7 -0
  71. package/dist/components/atoms/Icon/generated/HoroscopeViergeIcon.d.ts +7 -0
  72. package/dist/components/atoms/Icon/generated/IaIcon.d.ts +8 -0
  73. package/dist/components/atoms/Icon/generated/IaLoaderIcon.d.ts +8 -0
  74. package/dist/components/atoms/Icon/generated/InfoIcon.d.ts +7 -0
  75. package/dist/components/atoms/Icon/generated/InstagramIcon.d.ts +7 -0
  76. package/dist/components/atoms/Icon/generated/LinkedinIcon.d.ts +7 -0
  77. package/dist/components/atoms/Icon/generated/LiveIcon.d.ts +7 -0
  78. package/dist/components/atoms/Icon/generated/LocalIcon.d.ts +7 -0
  79. package/dist/components/atoms/Icon/generated/LockIcon.d.ts +7 -0
  80. package/dist/components/atoms/Icon/generated/LogoAnimauxIcon.d.ts +8 -0
  81. package/dist/components/atoms/Icon/generated/LogoGamesIcon.d.ts +8 -0
  82. package/dist/components/atoms/Icon/generated/LogoIcon.d.ts +7 -0
  83. package/dist/components/atoms/Icon/generated/LogoInstantIcon.d.ts +7 -0
  84. package/dist/components/atoms/Icon/generated/LogoMiniIcon.d.ts +7 -0
  85. package/dist/components/atoms/Icon/generated/LogoTvIcon.d.ts +8 -0
  86. package/dist/components/atoms/Icon/generated/MenuIcon.d.ts +7 -0
  87. package/dist/components/atoms/Icon/generated/MessengerIcon.d.ts +7 -0
  88. package/dist/components/atoms/Icon/generated/MoodIcon.d.ts +7 -0
  89. package/dist/components/atoms/Icon/generated/NewslettersIcon.d.ts +7 -0
  90. package/dist/components/atoms/Icon/generated/NotFoundIcon.d.ts +7 -0
  91. package/dist/components/atoms/Icon/generated/NotificationBellActiveIcon.d.ts +8 -0
  92. package/dist/components/atoms/Icon/generated/NotificationBellIcon.d.ts +8 -0
  93. package/dist/components/atoms/Icon/generated/NotificationIcon.d.ts +7 -0
  94. package/dist/components/atoms/Icon/generated/NourritureIcon.d.ts +7 -0
  95. package/dist/components/atoms/Icon/generated/NumCinqIcon.d.ts +8 -0
  96. package/dist/components/atoms/Icon/generated/NumDeuxIcon.d.ts +8 -0
  97. package/dist/components/atoms/Icon/generated/NumHuitIcon.d.ts +8 -0
  98. package/dist/components/atoms/Icon/generated/NumNeufIcon.d.ts +8 -0
  99. package/dist/components/atoms/Icon/generated/NumQuatreIcon.d.ts +8 -0
  100. package/dist/components/atoms/Icon/generated/NumSeptIcon.d.ts +8 -0
  101. package/dist/components/atoms/Icon/generated/NumSixIcon.d.ts +8 -0
  102. package/dist/components/atoms/Icon/generated/NumTroisIcon.d.ts +8 -0
  103. package/dist/components/atoms/Icon/generated/NumUnIcon.d.ts +8 -0
  104. package/dist/components/atoms/Icon/generated/OlympicFlameIcon.d.ts +7 -0
  105. package/dist/components/atoms/Icon/generated/OlympicMedalIcon.d.ts +7 -0
  106. package/dist/components/atoms/Icon/generated/PinterestIcon.d.ts +7 -0
  107. package/dist/components/atoms/Icon/generated/PodcastIcon.d.ts +7 -0
  108. package/dist/components/atoms/Icon/generated/PodcastOutlinedIcon.d.ts +7 -0
  109. package/dist/components/atoms/Icon/generated/PowerIcon.d.ts +7 -0
  110. package/dist/components/atoms/Icon/generated/PrinterIcon.d.ts +7 -0
  111. package/dist/components/atoms/Icon/generated/ProfileIcon.d.ts +7 -0
  112. package/dist/components/atoms/Icon/generated/Pub20mnIcon.d.ts +8 -0
  113. package/dist/components/atoms/Icon/generated/PuzzleIcon.d.ts +7 -0
  114. package/dist/components/atoms/Icon/generated/RandomIcon.d.ts +7 -0
  115. package/dist/components/atoms/Icon/generated/RefreshIcon.d.ts +7 -0
  116. package/dist/components/atoms/Icon/generated/ReportIcon.d.ts +7 -0
  117. package/dist/components/atoms/Icon/generated/RewindIcon.d.ts +8 -0
  118. package/dist/components/atoms/Icon/generated/RubricAnimauxIcon.d.ts +8 -0
  119. package/dist/components/atoms/Icon/generated/RubricC2cIcon.d.ts +8 -0
  120. package/dist/components/atoms/Icon/generated/RubricConsoIcon.d.ts +8 -0
  121. package/dist/components/atoms/Icon/generated/RubricEntertainmentIcon.d.ts +7 -0
  122. package/dist/components/atoms/Icon/generated/RubricGamingIcon.d.ts +8 -0
  123. package/dist/components/atoms/Icon/generated/RubricHighTechIcon.d.ts +8 -0
  124. package/dist/components/atoms/Icon/generated/RubricJeuxIcon.d.ts +7 -0
  125. package/dist/components/atoms/Icon/generated/RubricNewsIcon.d.ts +8 -0
  126. package/dist/components/atoms/Icon/generated/RubricPlanetIcon.d.ts +8 -0
  127. package/dist/components/atoms/Icon/generated/RubricSportIcon.d.ts +8 -0
  128. package/dist/components/atoms/Icon/generated/RubricTempoIcon.d.ts +8 -0
  129. package/dist/components/atoms/Icon/generated/RubricVieProIcon.d.ts +8 -0
  130. package/dist/components/atoms/Icon/generated/SearchIcon.d.ts +7 -0
  131. package/dist/components/atoms/Icon/generated/SendIcon.d.ts +7 -0
  132. package/dist/components/atoms/Icon/generated/ServerErrorIcon.d.ts +7 -0
  133. package/dist/components/atoms/Icon/generated/ShareIcon.d.ts +7 -0
  134. package/dist/components/atoms/Icon/generated/SigninFacebookIcon.d.ts +7 -0
  135. package/dist/components/atoms/Icon/generated/SigninGoogleIcon.d.ts +7 -0
  136. package/dist/components/atoms/Icon/generated/SnapchatIcon.d.ts +7 -0
  137. package/dist/components/atoms/Icon/generated/SportIcon.d.ts +7 -0
  138. package/dist/components/atoms/Icon/generated/StarIcon.d.ts +7 -0
  139. package/dist/components/atoms/Icon/generated/StarOutlinedIcon.d.ts +7 -0
  140. package/dist/components/atoms/Icon/generated/StatsIcon.d.ts +7 -0
  141. package/dist/components/atoms/Icon/generated/SubscriptionIcon.d.ts +7 -0
  142. package/dist/components/atoms/Icon/generated/ThumbIcon.d.ts +7 -0
  143. package/dist/components/atoms/Icon/generated/TiktokIcon.d.ts +7 -0
  144. package/dist/components/atoms/Icon/generated/TriangleIcon.d.ts +7 -0
  145. package/dist/components/atoms/Icon/generated/TrophyIcon.d.ts +7 -0
  146. package/dist/components/atoms/Icon/generated/TwitterIcon.d.ts +7 -0
  147. package/dist/components/atoms/Icon/generated/ValideIcon.d.ts +7 -0
  148. package/dist/components/atoms/Icon/generated/VideoHollowIcon.d.ts +7 -0
  149. package/dist/components/atoms/Icon/generated/VideoIcon.d.ts +7 -0
  150. package/dist/components/atoms/Icon/generated/VideoOutlinedIcon.d.ts +7 -0
  151. package/dist/components/atoms/Icon/generated/ViewCloseIcon.d.ts +7 -0
  152. package/dist/components/atoms/Icon/generated/ViewIcon.d.ts +7 -0
  153. package/dist/components/atoms/Icon/generated/WhatsappIcon.d.ts +7 -0
  154. package/dist/components/atoms/Icon/generated/WorkIcon.d.ts +7 -0
  155. package/dist/components/atoms/Icon/generated/WorldFoot2026Icon.d.ts +8 -0
  156. package/dist/components/atoms/Icon/generated/YoutubeIcon.d.ts +7 -0
  157. package/dist/components/atoms/Icon/generated/iconRegistry.d.ts +7 -0
  158. package/dist/components/atoms/Icon/generated/iconTypes.d.ts +1 -0
  159. package/dist/components/atoms/Icon/index.d.ts +0 -1
  160. package/dist/components/atoms/Modal/Modal.d.ts +1 -1
  161. package/dist/components/molecules/BottomSheet/BottomSheet.d.ts +7 -0
  162. package/dist/components/molecules/BottomSheet/index.d.ts +1 -0
  163. package/dist/components/molecules/SocialBar/SocialBarActionsSheet.d.ts +13 -0
  164. package/dist/components/molecules/SocialBar/index.d.ts +2 -1
  165. package/dist/components/molecules/index.d.ts +1 -0
  166. package/dist/constants/tokenVariables.d.ts +8 -0
  167. package/dist/index.es.js +6680 -4513
  168. package/dist/index.umd.cjs +1 -1
  169. package/dist/js/scripts.es.js +477 -452
  170. package/dist/js/scripts.umd.cjs +1 -1
  171. package/dist/scss/abstracts/variables/_token-variables.scss +3 -1
  172. package/dist/scss/abstracts/variables/_variables.scss +4 -0
  173. package/dist/style.css +1 -1
  174. package/package.json +3 -4
  175. package/dist/assets/scripts/socialBarActionsModal.d.ts +0 -1
  176. package/dist/components/atoms/Icon/SvgSprite.d.ts +0 -3
  177. package/dist/components/molecules/SocialBar/SocialBarActionsModal.d.ts +0 -12
@@ -1,15 +1,15 @@
1
- const Yt = () => /Android/i.test(navigator.userAgent), Jt = typeof window < "u" && navigator.userAgent.toLowerCase().includes("firefox"), Qt = () => {
1
+ const ne = () => /Android/i.test(navigator.userAgent), oe = typeof window < "u" && navigator.userAgent.toLowerCase().includes("firefox"), re = () => {
2
2
  const s = document.getElementById("js-download-band");
3
- s && Yt() && s.setAttribute(
3
+ s && ne() && s.setAttribute(
4
4
  "href",
5
5
  "https://app.adjust.com/15shf6wg?campaign=Bandeau_1&deep_link=20minutes%3A%2F%2Fhome"
6
6
  );
7
- }, te = () => {
7
+ }, ae = () => {
8
8
  const s = document.getElementById("js-election-selector");
9
9
  s instanceof HTMLSelectElement && s.addEventListener("change", (t) => {
10
10
  window.location.replace(t.target.value);
11
11
  });
12
- }, ee = () => {
12
+ }, le = () => {
13
13
  const s = document.querySelector(".c-search-banner");
14
14
  if (!s)
15
15
  return;
@@ -24,7 +24,7 @@ const Yt = () => /Android/i.test(navigator.userAgent), Jt = typeof window < "u"
24
24
  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"));
25
25
  });
26
26
  }
27
- }, ie = [
27
+ }, ce = [
28
28
  {
29
29
  text: "Paris",
30
30
  _index: "town_1717424751904",
@@ -55,7 +55,7 @@ const Yt = () => /Android/i.test(navigator.userAgent), Jt = typeof window < "u"
55
55
  url: "/elections/resultats/paris/paris-75011"
56
56
  }
57
57
  }
58
- ], se = (s, t, e, i, n, o) => {
58
+ ], de = (s, t, e, i, n, o) => {
59
59
  const r = document.getElementById(s);
60
60
  if (!r)
61
61
  return;
@@ -64,8 +64,8 @@ const Yt = () => /Android/i.test(navigator.userAgent), Jt = typeof window < "u"
64
64
  return;
65
65
  const h = r.querySelector(".c-autocomplete__input-spinner"), u = l.getAttribute("data-trigger-message"), f = async (g) => {
66
66
  try {
67
- const _ = a && t.includes("20minutes.fr") ? ie : await fetch(`${c}${e}${encodeURIComponent(g)}`).then(
68
- (B) => B.json()
67
+ const _ = a && t.includes("20minutes.fr") ? ce : await fetch(`${c}${e}${encodeURIComponent(g)}`).then(
68
+ (F) => F.json()
69
69
  ), E = o && typeof _ == "object" && _ !== null ? _[o] : _;
70
70
  return Array.isArray(E) ? E : [];
71
71
  } catch (_) {
@@ -98,7 +98,54 @@ const Yt = () => /Android/i.test(navigator.userAgent), Jt = typeof window < "u"
98
98
  }), l.addEventListener("focusin", () => {
99
99
  d.childElementCount > 0 && d.classList.remove("u-hidden");
100
100
  });
101
- }, ne = (s) => {
101
+ };
102
+ var dt = /* @__PURE__ */ ((s) => (s.MOBILE = "mobile", s.DESKTOP = "desktop", s))(dt || {});
103
+ const Rt = ".js-bottom-sheet", Bt = `${Rt}:not([aria-hidden='true'])`, he = ".c-bottom-sheet__panel", Ft = ".c-bottom-sheet__handle", ue = `${Ft}[data-a11y-dialog-hide]`, pe = "data-bottom-sheet-anchor", me = 75, kt = "c-bottom-sheet--dragging";
104
+ let mt = !1, U = null, B = null, ht = 0, K = 0;
105
+ const Zt = (s) => {
106
+ const t = s.getAttribute(pe), e = t ? document.querySelector(t) : null;
107
+ if (!e)
108
+ return;
109
+ const i = Math.max(0, window.innerHeight - e.getBoundingClientRect().top);
110
+ s.style.setProperty("--modal-bottom-offset", `${i}px`);
111
+ }, fe = () => {
112
+ document.querySelectorAll(Bt).forEach((s) => {
113
+ s instanceof HTMLElement && Zt(s);
114
+ });
115
+ }, qt = () => {
116
+ U?.classList.remove(kt), B && (B.style.transform = ""), U = null, B = null, ht = 0, K = 0;
117
+ }, ge = (s) => {
118
+ const t = s.target;
119
+ if (!(t instanceof HTMLElement))
120
+ return;
121
+ const e = t.closest(Rt);
122
+ if (!(e instanceof HTMLElement) || e.getAttribute("aria-hidden") === "true")
123
+ return;
124
+ const i = e.querySelector(he);
125
+ i instanceof HTMLElement && (!t.closest(Ft) && i.scrollTop > 0 || (U = e, B = i, ht = s.touches[0].clientY, K = 0, e.classList.add(kt)));
126
+ }, ve = (s) => {
127
+ B && (K = Math.max(0, s.touches[0].clientY - ht), B.style.transform = `translateY(${K}px)`);
128
+ }, ye = () => {
129
+ if (U) {
130
+ if (K > me) {
131
+ const s = U.querySelector(ue);
132
+ s instanceof HTMLElement && s.click();
133
+ }
134
+ qt();
135
+ }
136
+ }, _e = () => {
137
+ new MutationObserver((t) => {
138
+ t.forEach(({ target: e }) => {
139
+ e instanceof HTMLElement && e.matches(Bt) && Zt(e);
140
+ });
141
+ }).observe(document.body, {
142
+ attributes: !0,
143
+ attributeFilter: ["aria-hidden"],
144
+ subtree: !0
145
+ });
146
+ }, we = () => {
147
+ window.layout === dt.MOBILE && (mt || (document.addEventListener("touchstart", ge, { passive: !0 }), document.addEventListener("touchmove", ve, { passive: !0 }), document.addEventListener("touchend", ye), document.addEventListener("touchcancel", qt), window.addEventListener("resize", fe), _e(), mt = !0));
148
+ }, be = (s) => {
102
149
  s.stopImmediatePropagation(), s.preventDefault();
103
150
  const t = s.currentTarget;
104
151
  if (t instanceof HTMLButtonElement) {
@@ -107,15 +154,15 @@ const Yt = () => /Android/i.test(navigator.userAgent), Jt = typeof window < "u"
107
154
  );
108
155
  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"));
109
156
  }
110
- }, oe = (s = document.querySelector(
157
+ }, Se = (s = document.querySelector(
111
158
  ".js-collapse__button"
112
159
  )) => {
113
160
  s && document.querySelectorAll(".c-collapse__button").forEach((e) => {
114
161
  e.addEventListener("click", (i) => {
115
- ne(i);
162
+ be(i);
116
163
  });
117
164
  });
118
- }, re = "[data-countdown][data-countdown-end-date]", ae = (s) => {
165
+ }, Le = "[data-countdown][data-countdown-end-date]", Ee = (s) => {
119
166
  const t = s.querySelector(".js-countdown-days"), e = s.querySelector(".js-countdown-hours"), i = s.querySelector(".js-countdown-minutes"), n = s.querySelector(".js-countdown-seconds");
120
167
  return !t || !e || !i || !n ? null : {
121
168
  daysElement: t,
@@ -123,35 +170,35 @@ const Yt = () => /Android/i.test(navigator.userAgent), Jt = typeof window < "u"
123
170
  minutesElement: i,
124
171
  secondsElement: n
125
172
  };
126
- }, dt = (s, t) => {
173
+ }, ft = (s, t) => {
127
174
  const e = s - Date.now();
128
175
  if (e <= 0)
129
176
  return !1;
130
177
  const i = Math.floor(e / (1e3 * 60 * 60 * 24)), n = Math.floor(e % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60)), o = Math.floor(e % (1e3 * 60 * 60) / (1e3 * 60)), r = Math.floor(e % (1e3 * 60) / 1e3);
131
178
  return t.daysElement.textContent = i.toString(), t.hoursElement.textContent = n.toString(), t.minutesElement.textContent = o.toString(), t.secondsElement.textContent = r.toString(), !0;
132
- }, le = () => {
133
- document.querySelectorAll(re).forEach((t) => {
134
- const e = t.dataset.countdownEndDate, i = e ? new Date(e).getTime() : Number.NaN, n = ae(t);
179
+ }, Ae = () => {
180
+ document.querySelectorAll(Le).forEach((t) => {
181
+ const e = t.dataset.countdownEndDate, i = e ? new Date(e).getTime() : Number.NaN, n = Ee(t);
135
182
  if (!n)
136
183
  return;
137
184
  if (Number.isNaN(i)) {
138
185
  t.remove();
139
186
  return;
140
187
  }
141
- if (!dt(i, n)) {
188
+ if (!ft(i, n)) {
142
189
  t.remove();
143
190
  return;
144
191
  }
145
192
  const o = setInterval(() => {
146
- dt(i, n) || (clearInterval(o), t.remove());
193
+ ft(i, n) || (clearInterval(o), t.remove());
147
194
  }, 1e3);
148
195
  });
149
- }, ce = (s) => {
196
+ }, Ce = (s) => {
150
197
  const t = s.getBBox(), e = t.width / 20;
151
198
  return [t.x - e, t.y - e, t.width + e * 2, t.height + e * 2].join(
152
199
  " "
153
200
  );
154
- }, de = () => {
201
+ }, xe = () => {
155
202
  const s = document.querySelector(".c-map-districts-container"), t = document.querySelector(".c-map-districts");
156
203
  if (!s || !t)
157
204
  return;
@@ -202,7 +249,7 @@ const Yt = () => /Android/i.test(navigator.userAgent), Jt = typeof window < "u"
202
249
  );
203
250
  d(
204
251
  y || p,
205
- ce(y || p)
252
+ Ce(y || p)
206
253
  );
207
254
  }
208
255
  }, u = () => {
@@ -211,7 +258,7 @@ const Yt = () => /Android/i.test(navigator.userAgent), Jt = typeof window < "u"
211
258
  t.addEventListener("click", u), n && n.addEventListener("click", u), document.querySelectorAll(".c-map-districts__zoomable").forEach((m) => {
212
259
  m.addEventListener("click", (p) => h(p));
213
260
  });
214
- }, he = () => {
261
+ }, Te = () => {
215
262
  const s = document.getElementById("elections-form-search"), t = document.querySelector(".c-search-form__autocomplete");
216
263
  if (!s || !t)
217
264
  return;
@@ -239,59 +286,59 @@ const Yt = () => /Android/i.test(navigator.userAgent), Jt = typeof window < "u"
239
286
  }), s.addEventListener("focusin", () => {
240
287
  t.childElementCount > 0 && t.classList.remove("u-hidden");
241
288
  });
242
- }, ue = (s, t) => {
289
+ }, Pe = (s, t) => {
243
290
  s.setAttribute("aria-expanded", "true"), s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach((n) => {
244
291
  n.classList.remove(t);
245
292
  });
246
293
  const i = s.querySelector(".js-ellipsis-button__label");
247
294
  i instanceof HTMLSpanElement && (i.innerHTML = "Voir moins");
248
- }, pe = (s, t) => {
295
+ }, Ie = (s, t) => {
249
296
  s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach((n) => {
250
297
  n.classList.add(t);
251
298
  }), s.setAttribute("aria-expanded", "false");
252
299
  const i = s.querySelector(".js-ellipsis-button__label");
253
300
  i instanceof HTMLSpanElement && (i.innerHTML = "Voir plus");
254
- }, me = (s, t) => {
301
+ }, Me = (s, t) => {
255
302
  const e = s.currentTarget;
256
303
  if (s.preventDefault(), e instanceof HTMLButtonElement) {
257
304
  const i = t ? "u-ellipsis-multiline" : "u-ellipsis";
258
- return e.getAttribute("aria-expanded") === "true" ? pe(e, i) : ue(e, i);
305
+ return e.getAttribute("aria-expanded") === "true" ? Ie(e, i) : Pe(e, i);
259
306
  }
260
307
  return null;
261
- }, fe = (s = document.querySelector(
308
+ }, ze = (s = document.querySelector(
262
309
  ".js-ellipsis-button"
263
310
  )) => {
264
311
  s && document.querySelectorAll(".js-ellipsis-button").forEach((e) => {
265
312
  const i = e.getAttribute("data-multiple") === "true";
266
- e.addEventListener("click", (n) => me(n, i));
313
+ e.addEventListener("click", (n) => Me(n, i));
267
314
  });
268
- }, ge = (s) => {
315
+ }, Oe = (s) => {
269
316
  s.setAttribute("aria-expanded", "true"), s.parentNode?.querySelectorAll(".js-expand-target")?.forEach((i) => {
270
317
  i.setAttribute("aria-hidden", "false");
271
318
  });
272
319
  const e = s.querySelector(".js-expand-button__label");
273
320
  e instanceof HTMLSpanElement && (e.innerHTML = "Voir moins");
274
- }, ve = (s) => {
321
+ }, De = (s) => {
275
322
  s.parentNode?.querySelectorAll(".js-expand-target")?.forEach((i) => {
276
323
  i.setAttribute("aria-hidden", "true");
277
324
  }), s.setAttribute("aria-expanded", "false");
278
325
  const e = s.querySelector(".js-expand-button__label");
279
326
  e instanceof HTMLSpanElement && (e.innerHTML = "Voir plus");
280
- }, ye = (s) => {
327
+ }, $e = (s) => {
281
328
  const t = s.currentTarget;
282
- return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ? ve(t) : ge(t) : null;
283
- }, _e = (s) => {
329
+ return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ? De(t) : Oe(t) : null;
330
+ }, Re = (s) => {
284
331
  const t = s.parentNode?.querySelector(".js-expand-target");
285
332
  return !t || t.classList.contains("c-elections-result__members") ? !1 : (t.textContent?.trim().length ?? 0) < 255;
286
- }, we = (s = document.querySelector(
333
+ }, Be = (s = document.querySelector(
287
334
  ".js-expand-button"
288
335
  )) => {
289
336
  s && document.querySelectorAll(".js-expand-button").forEach((e) => {
290
- _e(e) ? (e.style.display = "none", e.parentNode?.querySelectorAll(".js-expand-target")?.forEach((n) => {
337
+ Re(e) ? (e.style.display = "none", e.parentNode?.querySelectorAll(".js-expand-target")?.forEach((n) => {
291
338
  n.setAttribute("aria-hidden", "false");
292
- })) : e.addEventListener("click", ye);
339
+ })) : e.addEventListener("click", $e);
293
340
  });
294
- }, zt = (s, t) => {
341
+ }, Nt = (s, t) => {
295
342
  const e = document.querySelector(".js-content-header"), i = document.querySelector(t), n = document.querySelector(s), o = document.querySelector(".c-header-mobile"), r = o instanceof HTMLElement ? o.offsetHeight : 0;
296
343
  if (e && i && n) {
297
344
  const a = new IntersectionObserver(
@@ -305,10 +352,10 @@ const Yt = () => /Android/i.test(navigator.userAgent), Jt = typeof window < "u"
305
352
  );
306
353
  a.observe(e), a.observe(i);
307
354
  }
308
- }, be = () => zt(".js-close-article-btn", ".js-limit-scroll-close-article-btn"), Se = () => zt(".js-chatbot-btn", ".js-limit-scroll-chatbot-btn"), Le = () => {
355
+ }, Fe = () => Nt(".js-close-article-btn", ".js-limit-scroll-close-article-btn"), ke = () => Nt(".js-chatbot-btn", ".js-limit-scroll-chatbot-btn"), Ze = () => {
309
356
  const s = document.querySelector(".js-game-alert");
310
- Jt && s && s.classList.remove("u-hidden");
311
- }, Ee = () => {
357
+ oe && s && s.classList.remove("u-hidden");
358
+ }, qe = () => {
312
359
  const s = document.querySelectorAll(".js-half-donut-result");
313
360
  for (const t of Array.from(s)) {
314
361
  const e = t.querySelector(".c-half-donut"), i = t.querySelector(".c-legend");
@@ -327,7 +374,7 @@ const Yt = () => /Android/i.test(navigator.userAgent), Jt = typeof window < "u"
327
374
  });
328
375
  });
329
376
  }
330
- }, Ae = () => {
377
+ }, Ne = () => {
331
378
  const s = document.querySelector(".c-image-slider__container");
332
379
  if (!s)
333
380
  return () => {
@@ -391,18 +438,18 @@ const Yt = () => /Android/i.test(navigator.userAgent), Jt = typeof window < "u"
391
438
  }), c(!0), h(), () => {
392
439
  u();
393
440
  };
394
- }, Ce = (s) => {
441
+ }, He = (s) => {
395
442
  const t = s.currentTarget, e = t instanceof HTMLElement ? t.nextElementSibling : null;
396
443
  !(t instanceof HTMLButtonElement) || !(e instanceof HTMLElement) || (s.stopImmediatePropagation(), s.preventDefault(), 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")));
397
- }, ht = /* @__PURE__ */ new WeakSet(), Ot = () => {
444
+ }, gt = /* @__PURE__ */ new WeakSet(), Ht = () => {
398
445
  if (typeof document > "u")
399
446
  return;
400
447
  document.querySelectorAll(".js-info-button").forEach((t) => {
401
- !(t instanceof HTMLButtonElement) || ht.has(t) || (ht.add(t), t.addEventListener("click", Ce));
448
+ !(t instanceof HTMLButtonElement) || gt.has(t) || (gt.add(t), t.addEventListener("click", He));
402
449
  });
403
450
  };
404
451
  if (typeof document < "u") {
405
- const s = () => Ot();
452
+ const s = () => Ht();
406
453
  document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", s, { once: !0 }) : s();
407
454
  }
408
455
  const v = {
@@ -410,7 +457,7 @@ const v = {
410
457
  negTabIndex: ':not([tabindex^="-"])',
411
458
  disabled: ":not(:disabled)"
412
459
  };
413
- var xe = [
460
+ var We = [
414
461
  `a[href]${v.inert}${v.negTabIndex}`,
415
462
  `area[href]${v.inert}${v.negTabIndex}`,
416
463
  `input:not([type="hidden"]):not([type="radio"])${v.inert}${v.negTabIndex}${v.disabled}`,
@@ -428,24 +475,24 @@ var xe = [
428
475
  `[contenteditable]${v.inert}${v.negTabIndex}`,
429
476
  `[tabindex]${v.inert}${v.negTabIndex}`
430
477
  ];
431
- function ut(s) {
478
+ function vt(s) {
432
479
  (s.querySelector("[autofocus]") || s).focus();
433
480
  }
434
- function Pe(s) {
435
- const t = W(s, !0), e = t ? W(s, !1) || t : null;
481
+ function Ve(s) {
482
+ const t = V(s, !0), e = t ? V(s, !1) || t : null;
436
483
  return [t, e];
437
484
  }
438
- function W(s, t) {
439
- if (t && ft(s))
485
+ function V(s, t) {
486
+ if (t && wt(s))
440
487
  return s;
441
- if (Ie(s))
488
+ if (Ge(s))
442
489
  if (s.shadowRoot) {
443
- let e = pt(s.shadowRoot, t);
490
+ let e = yt(s.shadowRoot, t);
444
491
  for (; e; ) {
445
- const i = W(e, t);
492
+ const i = V(e, t);
446
493
  if (i)
447
494
  return i;
448
- e = mt(e, t);
495
+ e = _t(e, t);
449
496
  }
450
497
  } else if (s.localName === "slot") {
451
498
  const e = s.assignedElements({
@@ -453,56 +500,56 @@ function W(s, t) {
453
500
  });
454
501
  t || e.reverse();
455
502
  for (const i of e) {
456
- const n = W(i, t);
503
+ const n = V(i, t);
457
504
  if (n)
458
505
  return n;
459
506
  }
460
507
  } else {
461
- let e = pt(s, t);
508
+ let e = yt(s, t);
462
509
  for (; e; ) {
463
- const i = W(e, t);
510
+ const i = V(e, t);
464
511
  if (i)
465
512
  return i;
466
- e = mt(e, t);
513
+ e = _t(e, t);
467
514
  }
468
515
  }
469
- return !t && ft(s) ? s : null;
516
+ return !t && wt(s) ? s : null;
470
517
  }
471
- function pt(s, t) {
518
+ function yt(s, t) {
472
519
  return t ? s.firstElementChild : s.lastElementChild;
473
520
  }
474
- function mt(s, t) {
521
+ function _t(s, t) {
475
522
  return t ? s.nextElementSibling : s.previousElementSibling;
476
523
  }
477
- const Te = (s) => s.matches("details:not([open]) *") && !s.matches("details>summary:first-of-type") ? !0 : !(s.offsetWidth || s.offsetHeight || s.getClientRects().length), ft = (s) => s.shadowRoot?.delegatesFocus ? !1 : s.matches(xe.join(",")) && !Te(s);
478
- function Ie(s) {
524
+ const je = (s) => s.matches("details:not([open]) *") && !s.matches("details>summary:first-of-type") ? !0 : !(s.offsetWidth || s.offsetHeight || s.getClientRects().length), wt = (s) => s.shadowRoot?.delegatesFocus ? !1 : s.matches(We.join(",")) && !je(s);
525
+ function Ge(s) {
479
526
  return s.shadowRoot && s.getAttribute("tabindex") === "-1" ? !1 : !s.matches(":disabled,[hidden],[inert]");
480
527
  }
481
- function V(s = document) {
528
+ function j(s = document) {
482
529
  const t = s.activeElement;
483
- return t ? t.shadowRoot ? V(t.shadowRoot) || document.activeElement : t : null;
530
+ return t ? t.shadowRoot ? j(t.shadowRoot) || document.activeElement : t : null;
484
531
  }
485
- function Me(s, t) {
486
- const [e, i] = Pe(s);
532
+ function Ue(s, t) {
533
+ const [e, i] = Ve(s);
487
534
  if (!e)
488
535
  return t.preventDefault();
489
- const n = V();
536
+ const n = j();
490
537
  t.shiftKey && n === e ? (i.focus(), t.preventDefault()) : !t.shiftKey && n === i && (e.focus(), t.preventDefault());
491
538
  }
492
- function $(s, t) {
539
+ function R(s, t) {
493
540
  function e(i) {
494
541
  if (!i || i === document || i === window)
495
542
  return null;
496
- const n = Dt(i);
543
+ const n = Wt(i);
497
544
  return n && (i = n), i.closest(s) || e(i.getRootNode().host);
498
545
  }
499
546
  return e(t);
500
547
  }
501
- function Dt(s) {
502
- return s.assignedSlot || (s.parentNode ? Dt(s.parentNode) : null);
548
+ function Wt(s) {
549
+ return s.assignedSlot || (s.parentNode ? Wt(s.parentNode) : null);
503
550
  }
504
- const k = "data-a11y-dialog";
505
- class Rt {
551
+ const Z = "data-a11y-dialog";
552
+ class Vt {
506
553
  $el;
507
554
  id;
508
555
  previouslyFocused;
@@ -525,7 +572,7 @@ class Rt {
525
572
  * `[data-a11y-dialog-show="<id>"]` and `[data-a11y-dialog-hide="<id>"]`.
526
573
  */
527
574
  constructor(t) {
528
- this.$el = t, this.id = this.$el.getAttribute(k) || 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);
575
+ this.$el = t, this.id = this.$el.getAttribute(Z) || 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);
529
576
  }
530
577
  /**
531
578
  * Destroy the current instance (after making sure the dialog has been hidden)
@@ -551,7 +598,7 @@ class Rt {
551
598
  * Returns the instance to allow method chaining.
552
599
  */
553
600
  show(t) {
554
- return this.shown ? this : this.fire("show", t).defaultPrevented ? this : (this.shown = !0, this.$el.removeAttribute("aria-hidden"), this.previouslyFocused = V(), this.previouslyFocused?.tagName === "BODY" && t?.target && (this.previouslyFocused = t.target), t?.type === "focus" ? this.maintainFocus() : ut(this.$el), document.body.addEventListener("focus", this.maintainFocus, !0), this.$el.addEventListener("keydown", this.bindKeypress, !0), this);
601
+ return this.shown ? this : this.fire("show", t).defaultPrevented ? this : (this.shown = !0, this.$el.removeAttribute("aria-hidden"), this.previouslyFocused = j(), this.previouslyFocused?.tagName === "BODY" && t?.target && (this.previouslyFocused = t.target), t?.type === "focus" ? this.maintainFocus() : vt(this.$el), document.body.addEventListener("focus", this.maintainFocus, !0), this.$el.addEventListener("keydown", this.bindKeypress, !0), this);
555
602
  }
556
603
  /**
557
604
  * Hide the dialog.
@@ -599,7 +646,7 @@ class Rt {
599
646
  * dialog are clicked, and call `show` or `hide`, respectively
600
647
  */
601
648
  handleTriggerClicks(t) {
602
- const e = t.composedPath()[0], i = $(`[${k}-show="${this.id}"]`, e), n = $(`[${k}-hide="${this.id}"]`, e), o = $(`[${k}-hide]`, e) && $('[aria-modal="true"]', e) === this.$el;
649
+ const e = t.composedPath()[0], i = R(`[${Z}-show="${this.id}"]`, e), n = R(`[${Z}-hide="${this.id}"]`, e), o = R(`[${Z}-hide]`, e) && R('[aria-modal="true"]', e) === this.$el;
603
650
  i && this.show(t), (n || o) && this.hide(t);
604
651
  }
605
652
  /**
@@ -607,14 +654,14 @@ class Rt {
607
654
  * (namely ESC and TAB)
608
655
  */
609
656
  bindKeypress(t) {
610
- if ($('[aria-modal="true"]', V()) !== this.$el)
657
+ if (R('[aria-modal="true"]', j()) !== this.$el)
611
658
  return;
612
659
  let e = !1;
613
660
  try {
614
661
  e = !!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open');
615
662
  } catch {
616
663
  }
617
- t.key === "Escape" && this.$el.getAttribute("role") !== "alertdialog" && !e && (t.preventDefault(), this.hide(t)), t.key === "Tab" && Me(this.$el, t);
664
+ t.key === "Escape" && this.$el.getAttribute("role") !== "alertdialog" && !e && (t.preventDefault(), this.hide(t)), t.key === "Tab" && Ue(this.$el, t);
618
665
  }
619
666
  /**
620
667
  * If the dialog is shown and the focus is not within a dialog element (either
@@ -623,19 +670,19 @@ class Rt {
623
670
  * See: https://github.com/KittyGiraudel/a11y-dialog/issues/177
624
671
  */
625
672
  maintainFocus() {
626
- const t = V();
627
- $(`[aria-modal="true"], [${k}-ignore-focus-trap]`, t) || ut(this.$el);
673
+ const t = j();
674
+ R(`[aria-modal="true"], [${Z}-ignore-focus-trap]`, t) || vt(this.$el);
628
675
  }
629
676
  }
630
- function gt() {
677
+ function bt() {
631
678
  for (const s of document.querySelectorAll("[data-a11y-dialog]"))
632
- new Rt(s);
679
+ new Vt(s);
633
680
  }
634
- typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", gt) : gt());
635
- const ze = () => document.querySelectorAll(".js-modal").forEach((s) => {
681
+ typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", bt) : bt());
682
+ const Ke = () => document.querySelectorAll(".js-modal").forEach((s) => {
636
683
  if (!(s instanceof HTMLElement))
637
684
  return;
638
- const t = new Rt(s);
685
+ const t = new Vt(s);
639
686
  if (s.id === "dialog-menu") {
640
687
  const e = document.querySelectorAll("button[data-a11y-dialog-show='dialog-menu']"), i = document.querySelectorAll("button[data-a11y-dialog-hide='dialog-menu']");
641
688
  e.length > 0 && i.length > 0 && (t.on("show", () => {
@@ -657,27 +704,27 @@ const ze = () => document.querySelectorAll(".js-modal").forEach((s) => {
657
704
  }).on("hide", () => {
658
705
  document.body.classList.remove("noscroll");
659
706
  });
660
- }), J = "50px", at = ({
707
+ }), et = "50px", ut = ({
661
708
  navigationContainer: s,
662
709
  navigatedList: t,
663
710
  nextBtn: e,
664
711
  prevBtn: i
665
712
  }) => {
666
- e.classList.contains("o-nav-button--visible") && !i.classList.contains("o-nav-button--visible") && (s.style.paddingRight = J, s.style.paddingLeft = ""), i.classList.contains("o-nav-button--visible") && (s.style.paddingLeft = J, e.classList.contains("o-nav-button--visible") && (s.style.paddingRight = J), 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 = "");
667
- }, Oe = ({
713
+ e.classList.contains("o-nav-button--visible") && !i.classList.contains("o-nav-button--visible") && (s.style.paddingRight = et, s.style.paddingLeft = ""), i.classList.contains("o-nav-button--visible") && (s.style.paddingLeft = et, e.classList.contains("o-nav-button--visible") && (s.style.paddingRight = et), 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 = "");
714
+ }, Xe = ({
668
715
  navigationContainer: s,
669
716
  navigatedList: t,
670
717
  nextBtn: e,
671
718
  prevBtn: i
672
719
  }) => {
673
720
  const n = t.scrollLeft > 0, o = t.scrollLeft + (t.clientWidth + 0.5) < t.scrollWidth;
674
- 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") && at({
721
+ 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") && ut({
675
722
  navigationContainer: s,
676
723
  navigatedList: t,
677
724
  nextBtn: e,
678
725
  prevBtn: i
679
726
  });
680
- }, De = ({
727
+ }, Ye = ({
681
728
  navigationContainer: s,
682
729
  navigatedList: t,
683
730
  nextBtn: e,
@@ -722,14 +769,14 @@ const ze = () => document.querySelectorAll(".js-modal").forEach((s) => {
722
769
  behavior: "smooth"
723
770
  }), e.classList.remove("o-nav-button--visible"), i.classList.add("o-nav-button--visible");
724
771
  }
725
- e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && at({
772
+ e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && ut({
726
773
  navigationContainer: s,
727
774
  navigatedList: t,
728
775
  nextBtn: e,
729
776
  prevBtn: i
730
777
  });
731
778
  }
732
- }, Re = ({
779
+ }, Je = ({
733
780
  navigationContainer: s,
734
781
  navigatedList: t,
735
782
  nextBtn: e,
@@ -770,34 +817,34 @@ const ze = () => document.querySelectorAll(".js-modal").forEach((s) => {
770
817
  left: 0,
771
818
  behavior: "smooth"
772
819
  }), i.classList.remove("o-nav-button--visible"), t.clientWidth < t.scrollWidth && e.classList.add("o-nav-button--visible");
773
- e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && at({
820
+ e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && ut({
774
821
  navigationContainer: s,
775
822
  navigatedList: t,
776
823
  nextBtn: e,
777
824
  prevBtn: i
778
825
  });
779
826
  }
780
- }, $e = ({
827
+ }, Qe = ({
781
828
  navigationContainer: s,
782
829
  navigatedList: t,
783
830
  nextBtn: e,
784
831
  prevBtn: i
785
832
  }) => {
786
- Oe({
833
+ Xe({
787
834
  navigationContainer: s,
788
835
  navigatedList: t,
789
836
  nextBtn: e,
790
837
  prevBtn: i
791
838
  });
792
- }, Be = (s) => {
839
+ }, ti = (s) => {
793
840
  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(
794
841
  ".js-navigation-container__list"
795
842
  ), c = s.querySelector(".o-nav-button--next-button"), d = s.querySelector(
796
843
  ".o-nav-button--previous-button"
797
844
  );
798
- if (!(!l || !c || !d) && (l.clientWidth < l.scrollWidth && (c.classList.add("o-nav-button--visible"), c.classList.contains("c-slider__button-container--has-space-around") && (s.style.paddingRight = J)), c.addEventListener(
845
+ if (!(!l || !c || !d) && (l.clientWidth < l.scrollWidth && (c.classList.add("o-nav-button--visible"), c.classList.contains("c-slider__button-container--has-space-around") && (s.style.paddingRight = et)), c.addEventListener(
799
846
  "click",
800
- De.bind(!1, {
847
+ Ye.bind(!1, {
801
848
  navigationContainer: s,
802
849
  navigatedList: l,
803
850
  nextBtn: c,
@@ -806,7 +853,7 @@ const ze = () => document.querySelectorAll(".js-modal").forEach((s) => {
806
853
  })
807
854
  ), d.addEventListener(
808
855
  "click",
809
- Re.bind(!1, {
856
+ Je.bind(!1, {
810
857
  navigationContainer: s,
811
858
  navigatedList: l,
812
859
  nextBtn: c,
@@ -830,7 +877,7 @@ const ze = () => document.querySelectorAll(".js-modal").forEach((s) => {
830
877
  }, 0)), d.click());
831
878
  }, n);
832
879
  }
833
- }, Fe = () => {
880
+ }, ei = () => {
834
881
  const s = document.querySelectorAll(".js-navigation-container");
835
882
  Array.from(s).forEach((t) => {
836
883
  const e = t.querySelector(
@@ -840,13 +887,13 @@ const ze = () => document.querySelectorAll(".js-modal").forEach((s) => {
840
887
  const i = new ResizeObserver((n) => {
841
888
  n.forEach((o) => {
842
889
  const { width: r } = o.contentRect;
843
- r > 0 && (Be(t), i.disconnect());
890
+ r > 0 && (ti(t), i.disconnect());
844
891
  });
845
892
  });
846
893
  i.observe(e);
847
894
  }
848
895
  });
849
- }, ke = () => {
896
+ }, ii = () => {
850
897
  const s = document.querySelectorAll(".js-navigation-container");
851
898
  for (const t of Array.from(s))
852
899
  if (t) {
@@ -859,7 +906,7 @@ const ze = () => document.querySelectorAll(".js-modal").forEach((s) => {
859
906
  );
860
907
  e && i && n && window.addEventListener(
861
908
  "resize",
862
- $e.bind(!1, {
909
+ Qe.bind(!1, {
863
910
  navigationContainer: t,
864
911
  navigatedList: e,
865
912
  nextBtn: i,
@@ -875,52 +922,52 @@ function x(s, t, e) {
875
922
  function S(s, t) {
876
923
  return s.x = t.x, s.y = t.y, t.id !== void 0 && (s.id = t.id), s;
877
924
  }
878
- function $t(s) {
925
+ function jt(s) {
879
926
  s.x = Math.round(s.x), s.y = Math.round(s.y);
880
927
  }
881
- function it(s, t) {
928
+ function ot(s, t) {
882
929
  const e = Math.abs(s.x - t.x), i = Math.abs(s.y - t.y);
883
930
  return Math.sqrt(e * e + i * i);
884
931
  }
885
- function j(s, t) {
932
+ function G(s, t) {
886
933
  return s.x === t.x && s.y === t.y;
887
934
  }
888
- function U(s, t, e) {
935
+ function Y(s, t, e) {
889
936
  return Math.min(Math.max(s, t), e);
890
937
  }
891
- function G(s, t, e) {
938
+ function X(s, t, e) {
892
939
  let i = `translate3d(${s}px,${t || 0}px,0)`;
893
940
  return e !== void 0 && (i += ` scale3d(${e},${e},1)`), i;
894
941
  }
895
942
  function D(s, t, e, i) {
896
- s.style.transform = G(t, e, i);
943
+ s.style.transform = X(t, e, i);
897
944
  }
898
- const Ze = "cubic-bezier(.4,0,.22,1)";
899
- function Bt(s, t, e, i) {
900
- s.style.transition = t ? `${t} ${e}ms ${i || Ze}` : "none";
945
+ const si = "cubic-bezier(.4,0,.22,1)";
946
+ function Gt(s, t, e, i) {
947
+ s.style.transition = t ? `${t} ${e}ms ${i || si}` : "none";
901
948
  }
902
- function st(s, t, e) {
949
+ function rt(s, t, e) {
903
950
  s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
904
951
  }
905
- function Ne(s) {
906
- Bt(s);
952
+ function ni(s) {
953
+ Gt(s);
907
954
  }
908
- function qe(s) {
955
+ function oi(s) {
909
956
  return "decode" in s ? s.decode().catch(() => {
910
957
  }) : s.complete ? Promise.resolve(s) : new Promise((t, e) => {
911
958
  s.onload = () => t(s), s.onerror = e;
912
959
  });
913
960
  }
914
- const P = {
961
+ const T = {
915
962
  IDLE: "idle",
916
963
  LOADING: "loading",
917
964
  LOADED: "loaded",
918
965
  ERROR: "error"
919
966
  };
920
- function He(s) {
967
+ function ri(s) {
921
968
  return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
922
969
  }
923
- function We(s, t, e = document) {
970
+ function ai(s, t, e = document) {
924
971
  let i = [];
925
972
  if (s instanceof Element)
926
973
  i = [s];
@@ -932,19 +979,19 @@ function We(s, t, e = document) {
932
979
  }
933
980
  return i;
934
981
  }
935
- function vt() {
982
+ function St() {
936
983
  return !!(navigator.vendor && navigator.vendor.match(/apple/i));
937
984
  }
938
- let Ft = !1;
985
+ let Ut = !1;
939
986
  try {
940
987
  window.addEventListener("test", null, Object.defineProperty({}, "passive", {
941
988
  get: () => {
942
- Ft = !0;
989
+ Ut = !0;
943
990
  }
944
991
  }));
945
992
  } catch {
946
993
  }
947
- class Ve {
994
+ class li {
948
995
  constructor() {
949
996
  this._pool = [];
950
997
  }
@@ -1001,7 +1048,7 @@ class Ve {
1001
1048
  listener: i,
1002
1049
  passive: n
1003
1050
  }));
1004
- const d = Ft ? {
1051
+ const d = Ut ? {
1005
1052
  passive: n || !1
1006
1053
  } : !1;
1007
1054
  t[a](c, i, d);
@@ -1009,7 +1056,7 @@ class Ve {
1009
1056
  });
1010
1057
  }
1011
1058
  }
1012
- function kt(s, t) {
1059
+ function Kt(s, t) {
1013
1060
  if (s.getViewportSizeFn) {
1014
1061
  const e = s.getViewportSizeFn(s, t);
1015
1062
  if (e)
@@ -1036,13 +1083,13 @@ function N(s, t, e, i, n) {
1036
1083
  }
1037
1084
  return Number(o) || 0;
1038
1085
  }
1039
- function Zt(s, t, e, i) {
1086
+ function Xt(s, t, e, i) {
1040
1087
  return {
1041
1088
  x: t.x - N("left", s, t, e, i) - N("right", s, t, e, i),
1042
1089
  y: t.y - N("top", s, t, e, i) - N("bottom", s, t, e, i)
1043
1090
  };
1044
1091
  }
1045
- class je {
1092
+ class ci {
1046
1093
  /**
1047
1094
  * @param {Slide} slide
1048
1095
  */
@@ -1094,11 +1141,11 @@ class je {
1094
1141
  * @returns {number}
1095
1142
  */
1096
1143
  correctPan(t, e) {
1097
- return U(e, this.max[t], this.min[t]);
1144
+ return Y(e, this.max[t], this.min[t]);
1098
1145
  }
1099
1146
  }
1100
- const yt = 4e3;
1101
- let Nt = class {
1147
+ const Lt = 4e3;
1148
+ let Yt = class {
1102
1149
  /**
1103
1150
  * @param {PhotoSwipeOptions} options PhotoSwipe options
1104
1151
  * @param {SlideData} itemData Slide data
@@ -1155,7 +1202,7 @@ let Nt = class {
1155
1202
  */
1156
1203
  _getSecondary() {
1157
1204
  let t = this._parseZoomLevelOption("secondary");
1158
- return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > yt && (t = yt / this.elementSize.x), t);
1205
+ return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > Lt && (t = Lt / this.elementSize.x), t);
1159
1206
  }
1160
1207
  /**
1161
1208
  * Get initial image zoom level.
@@ -1178,7 +1225,7 @@ let Nt = class {
1178
1225
  return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
1179
1226
  }
1180
1227
  };
1181
- class Ge {
1228
+ class di {
1182
1229
  /**
1183
1230
  * @param {SlideData} data
1184
1231
  * @param {number} index
@@ -1191,11 +1238,11 @@ class Ge {
1191
1238
  }, this.pan = {
1192
1239
  x: 0,
1193
1240
  y: 0
1194
- }, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new Nt(i.options, t, e, i), this.pswp.dispatch("gettingData", {
1241
+ }, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new Yt(i.options, t, e, i), this.pswp.dispatch("gettingData", {
1195
1242
  slide: this,
1196
1243
  data: this.data,
1197
1244
  index: e
1198
- }), this.content = this.pswp.contentLoader.getContentBySlide(this), this.container = x("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 je(this), this.prevDisplayedWidth = -1, this.prevDisplayedHeight = -1, this.pswp.dispatch("slideInit", {
1245
+ }), this.content = this.pswp.contentLoader.getContentBySlide(this), this.container = x("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 ci(this), this.prevDisplayedWidth = -1, this.prevDisplayedHeight = -1, this.pswp.dispatch("slideInit", {
1199
1246
  slide: this
1200
1247
  });
1201
1248
  }
@@ -1319,7 +1366,7 @@ class Ge {
1319
1366
  transitionDuration: i
1320
1367
  }), o.animations.stopAllPan();
1321
1368
  const r = this.currZoomLevel;
1322
- n || (t = U(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), $t(this.pan);
1369
+ n || (t = Y(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), jt(this.pan);
1323
1370
  const a = () => {
1324
1371
  this._setResolution(t), this.applyCurrentZoomPan();
1325
1372
  };
@@ -1420,14 +1467,14 @@ class Ge {
1420
1467
  const {
1421
1468
  pswp: t
1422
1469
  } = this;
1423
- S(this.panAreaSize, Zt(t.options, t.viewportSize, this.data, this.index)), this.zoomLevels.update(this.width, this.height, this.panAreaSize), t.dispatch("calcSlideSize", {
1470
+ S(this.panAreaSize, Xt(t.options, t.viewportSize, this.data, this.index)), this.zoomLevels.update(this.width, this.height, this.panAreaSize), t.dispatch("calcSlideSize", {
1424
1471
  slide: this
1425
1472
  });
1426
1473
  }
1427
1474
  /** @returns {string} */
1428
1475
  getCurrentTransform() {
1429
1476
  const t = this.currZoomLevel / (this.currentResolution || this.zoomLevels.initial);
1430
- return G(this.pan.x, this.pan.y, t);
1477
+ return X(this.pan.x, this.pan.y, t);
1431
1478
  }
1432
1479
  /**
1433
1480
  * Set resolution and re-render the image.
@@ -1448,11 +1495,11 @@ class Ge {
1448
1495
  t !== this.currentResolution && (this.currentResolution = t, this.updateContentSize(), this.pswp.dispatch("resolutionChanged"));
1449
1496
  }
1450
1497
  }
1451
- const Ue = 0.35, Ke = 0.6, _t = 0.4, wt = 0.5;
1452
- function Xe(s, t) {
1498
+ const hi = 0.35, ui = 0.6, Et = 0.4, At = 0.5;
1499
+ function pi(s, t) {
1453
1500
  return s * t / (1 - t);
1454
1501
  }
1455
- class Ye {
1502
+ class mi {
1456
1503
  /**
1457
1504
  * @param {Gestures} gestures
1458
1505
  */
@@ -1478,12 +1525,12 @@ class Ye {
1478
1525
  if (!this.pswp.dispatch("verticalDrag", {
1479
1526
  panY: o
1480
1527
  }).defaultPrevented) {
1481
- this._setPanWithFriction("y", o, Ke);
1528
+ this._setPanWithFriction("y", o, ui);
1482
1529
  const r = 1 - Math.abs(this._getVerticalDragRatio(n.pan.y));
1483
1530
  this.pswp.applyBgOpacity(r), n.applyCurrentZoomPan();
1484
1531
  }
1485
1532
  } else
1486
- this._panOrMoveMainScroll("x") || (this._panOrMoveMainScroll("y"), n && ($t(n.pan), n.applyCurrentZoomPan()));
1533
+ this._panOrMoveMainScroll("x") || (this._panOrMoveMainScroll("y"), n && (jt(n.pan), n.applyCurrentZoomPan()));
1487
1534
  }
1488
1535
  end() {
1489
1536
  const {
@@ -1495,7 +1542,7 @@ class Ye {
1495
1542
  let n = 0;
1496
1543
  if (this.pswp.animations.stopAll(), e.isShifted()) {
1497
1544
  const r = (e.x - e.getCurrSlideX()) / this.pswp.viewportSize.x;
1498
- t.x < -wt && r < 0 || t.x < 0.1 && r < -0.5 ? (n = 1, t.x = Math.min(t.x, 0)) : (t.x > wt && r > 0 || t.x > -0.1 && r > 0.5) && (n = -1, t.x = Math.max(t.x, 0)), e.moveIndexBy(n, !0, t.x);
1545
+ t.x < -At && r < 0 || t.x < 0.1 && r < -0.5 ? (n = 1, t.x = Math.min(t.x, 0)) : (t.x > At && r > 0 || t.x > -0.1 && r > 0.5) && (n = -1, t.x = Math.max(t.x, 0)), e.moveIndexBy(n, !0, t.x);
1499
1546
  }
1500
1547
  i && i.currZoomLevel > i.zoomLevels.max || this.gestures.isMultitouch ? this.gestures.zoomLevels.correctZoomPan(!0) : (this._finishPanGestureForAxis("x"), this._finishPanGestureForAxis("y"));
1501
1548
  }
@@ -1514,10 +1561,10 @@ class Ye {
1514
1561
  const {
1515
1562
  pan: n,
1516
1563
  bounds: o
1517
- } = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", c = r + Xe(e[t], 0.995);
1564
+ } = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", c = r + pi(e[t], 0.995);
1518
1565
  if (a) {
1519
1566
  const m = this._getVerticalDragRatio(r), p = this._getVerticalDragRatio(c);
1520
- if (m < 0 && p < -_t || m > 0 && p > _t) {
1567
+ if (m < 0 && p < -Et || m > 0 && p > Et) {
1521
1568
  this.pswp.close();
1522
1569
  return;
1523
1570
  }
@@ -1536,7 +1583,7 @@ class Ye {
1536
1583
  onUpdate: (m) => {
1537
1584
  if (a && this.pswp.bgOpacity < 1) {
1538
1585
  const p = 1 - (d - m) / f;
1539
- this.pswp.applyBgOpacity(U(u + (1 - u) * p, 0, 1));
1586
+ this.pswp.applyBgOpacity(Y(u + (1 - u) * p, 0, 1));
1540
1587
  }
1541
1588
  n[t] = Math.floor(m), i.applyCurrentZoomPan();
1542
1589
  }
@@ -1629,16 +1676,16 @@ class Ye {
1629
1676
  } = n;
1630
1677
  if (r.correctPan(t, e) !== e || i) {
1631
1678
  const l = Math.round(e - o[t]);
1632
- o[t] += l * (i || Ue);
1679
+ o[t] += l * (i || hi);
1633
1680
  } else
1634
1681
  o[t] = e;
1635
1682
  }
1636
1683
  }
1637
- const Je = 0.05, Qe = 0.15;
1638
- function bt(s, t, e) {
1684
+ const fi = 0.05, gi = 0.15;
1685
+ function Ct(s, t, e) {
1639
1686
  return s.x = (t.x + e.x) / 2, s.y = (t.y + e.y) / 2, s;
1640
1687
  }
1641
- class ti {
1688
+ class vi {
1642
1689
  /**
1643
1690
  * @param {Gestures} gestures
1644
1691
  */
@@ -1675,8 +1722,8 @@ class ti {
1675
1722
  const a = r.zoomLevels.min, l = r.zoomLevels.max;
1676
1723
  if (!r.isZoomable() || o.mainScroll.isShifted())
1677
1724
  return;
1678
- bt(this._startZoomPoint, e, n), bt(this._zoomPoint, t, i);
1679
- let c = 1 / it(e, n) * it(t, i) * this._startZoomLevel;
1725
+ Ct(this._startZoomPoint, e, n), Ct(this._zoomPoint, t, i);
1726
+ let c = 1 / ot(e, n) * ot(t, i) * this._startZoomLevel;
1680
1727
  if (c > r.zoomLevels.initial + r.zoomLevels.initial / 15 && (this._wasOverFitZoomLevel = !0), c < a)
1681
1728
  if (o.options.pinchToClose && !this._wasOverFitZoomLevel && this._startZoomLevel <= r.zoomLevels.initial) {
1682
1729
  const d = 1 - (a - c) / (a / 1.2);
@@ -1684,8 +1731,8 @@ class ti {
1684
1731
  bgOpacity: d
1685
1732
  }).defaultPrevented || o.applyBgOpacity(d);
1686
1733
  } else
1687
- c = a - (a - c) * Qe;
1688
- else c > l && (c = l + (c - l) * Je);
1734
+ c = a - (a - c) * gi;
1735
+ else c > l && (c = l + (c - l) * fi);
1689
1736
  r.pan.x = this._calculatePanForZoomLevel("x", c), r.pan.y = this._calculatePanForZoomLevel("y", c), r.setZoomLevel(c), r.applyCurrentZoomPan();
1690
1737
  }
1691
1738
  end() {
@@ -1741,7 +1788,7 @@ class ti {
1741
1788
  x: i.bounds.correctPan("x", d.x),
1742
1789
  y: i.bounds.correctPan("y", d.y)
1743
1790
  }, i.setZoomLevel(n);
1744
- const h = !j(d, c);
1791
+ const h = !G(d, c);
1745
1792
  if (!h && !r && !l) {
1746
1793
  i._setResolution(o), i.applyCurrentZoomPan();
1747
1794
  return;
@@ -1761,7 +1808,7 @@ class ti {
1761
1808
  }
1762
1809
  i.applyCurrentZoomPan();
1763
1810
  }
1764
- l && e.bgOpacity < 1 && e.applyBgOpacity(U(a + (1 - a) * u, 0, 1));
1811
+ l && e.bgOpacity < 1 && e.applyBgOpacity(Y(a + (1 - a) * u, 0, 1));
1765
1812
  },
1766
1813
  onComplete: () => {
1767
1814
  i._setResolution(o), i.applyCurrentZoomPan();
@@ -1769,11 +1816,11 @@ class ti {
1769
1816
  });
1770
1817
  }
1771
1818
  }
1772
- function St(s) {
1819
+ function xt(s) {
1773
1820
  return !!/** @type {HTMLElement} */
1774
1821
  s.target.closest(".pswp__container");
1775
1822
  }
1776
- class ei {
1823
+ class yi {
1777
1824
  /**
1778
1825
  * @param {Gestures} gestures
1779
1826
  */
@@ -1796,14 +1843,14 @@ class ei {
1796
1843
  * @param {PointerEvent} originalEvent
1797
1844
  */
1798
1845
  tap(t, e) {
1799
- St(e) && this._doClickOrTapAction("tap", t, e);
1846
+ xt(e) && this._doClickOrTapAction("tap", t, e);
1800
1847
  }
1801
1848
  /**
1802
1849
  * @param {Point} point
1803
1850
  * @param {PointerEvent} originalEvent
1804
1851
  */
1805
1852
  doubleTap(t, e) {
1806
- St(e) && this._doClickOrTapAction("doubleTap", t, e);
1853
+ xt(e) && this._doClickOrTapAction("doubleTap", t, e);
1807
1854
  }
1808
1855
  /**
1809
1856
  * @private
@@ -1847,8 +1894,8 @@ class ei {
1847
1894
  }
1848
1895
  }
1849
1896
  }
1850
- const ii = 10, si = 300, ni = 25;
1851
- class oi {
1897
+ const _i = 10, wi = 300, bi = 25;
1898
+ class Si {
1852
1899
  /**
1853
1900
  * @param {PhotoSwipe} pswp
1854
1901
  */
@@ -1880,7 +1927,7 @@ class oi {
1880
1927
  }, this._intervalP1 = {
1881
1928
  x: 0,
1882
1929
  y: 0
1883
- }, 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 Ye(this), this.zoomLevels = new ti(this), this.tapHandler = new ei(this), t.on("bindEvents", () => {
1930
+ }, 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 mi(this), this.zoomLevels = new vi(this), this.tapHandler = new yi(this), t.on("bindEvents", () => {
1884
1931
  t.events.add(
1885
1932
  t.scrollWrap,
1886
1933
  "click",
@@ -1970,7 +2017,7 @@ class oi {
1970
2017
  * @private
1971
2018
  */
1972
2019
  _rafRenderLoop() {
1973
- (this.isDragging || this.isZooming) && (this._updateVelocity(), this.isDragging ? j(this.p1, this.prevP1) || this.drag.change() : (!j(this.p1, this.prevP1) || !j(this.p2, this.prevP2)) && this.zoomLevels.change(), this._updatePrevPoints(), this.raf = requestAnimationFrame(this._rafRenderLoop.bind(this)));
2020
+ (this.isDragging || this.isZooming) && (this._updateVelocity(), this.isDragging ? G(this.p1, this.prevP1) || this.drag.change() : (!G(this.p1, this.prevP1) || !G(this.p2, this.prevP2)) && this.zoomLevels.change(), this._updatePrevPoints(), this.raf = requestAnimationFrame(this._rafRenderLoop.bind(this)));
1974
2021
  }
1975
2022
  /**
1976
2023
  * Update velocity at 50ms interval
@@ -2000,8 +2047,8 @@ class oi {
2000
2047
  this.tapHandler.click(this.startP1, t);
2001
2048
  return;
2002
2049
  }
2003
- const i = this.pswp.options.doubleTapAction ? si : 0;
2004
- this._tapTimer ? (this._clearTapTimer(), it(this._lastStartP1, this.startP1) < ni && this.tapHandler.doubleTap(this.startP1, t)) : (S(this._lastStartP1, this.startP1), this._tapTimer = setTimeout(() => {
2050
+ const i = this.pswp.options.doubleTapAction ? wi : 0;
2051
+ this._tapTimer ? (this._clearTapTimer(), ot(this._lastStartP1, this.startP1) < bi && this.tapHandler.doubleTap(this.startP1, t)) : (S(this._lastStartP1, this.startP1), this._tapTimer = setTimeout(() => {
2005
2052
  this.tapHandler.tap(this.startP1, t), this._clearTapTimer();
2006
2053
  }, i));
2007
2054
  }
@@ -2087,7 +2134,7 @@ class oi {
2087
2134
  const t = Math.abs(this.p1.x - this.startP1.x) - Math.abs(this.p1.y - this.startP1.y);
2088
2135
  if (t !== 0) {
2089
2136
  const e = t > 0 ? "x" : "y";
2090
- Math.abs(this.p1[e] - this.startP1[e]) >= ii && (this.dragAxis = e);
2137
+ Math.abs(this.p1[e] - this.startP1[e]) >= _i && (this.dragAxis = e);
2091
2138
  }
2092
2139
  }
2093
2140
  }
@@ -2111,8 +2158,8 @@ class oi {
2111
2158
  this.pswp.mainScroll.isShifted() && (t.preventDefault(), t.stopPropagation());
2112
2159
  }
2113
2160
  }
2114
- const ri = 0.35;
2115
- class ai {
2161
+ const Li = 0.35;
2162
+ class Ei {
2116
2163
  /**
2117
2164
  * @param {PhotoSwipe} pswp
2118
2165
  */
@@ -2265,7 +2312,7 @@ class ai {
2265
2312
  let i = (this.slideWidth * this._currPositionIndex - t) / this.slideWidth;
2266
2313
  i += this.pswp.currIndex;
2267
2314
  const n = Math.round(t - this.x);
2268
- (i < 0 && n > 0 || i >= this.pswp.getNumItems() - 1 && n < 0) && (t = this.x + n * ri);
2315
+ (i < 0 && n > 0 || i >= this.pswp.getNumItems() - 1 && n < 0) && (t = this.x + n * Li);
2269
2316
  }
2270
2317
  this.x = t, this.pswp.container && D(this.pswp.container, t), this.pswp.dispatch("moveMainScroll", {
2271
2318
  x: t,
@@ -2273,7 +2320,7 @@ class ai {
2273
2320
  });
2274
2321
  }
2275
2322
  }
2276
- const li = {
2323
+ const Ai = {
2277
2324
  Escape: 27,
2278
2325
  z: 90,
2279
2326
  ArrowLeft: 37,
@@ -2281,8 +2328,8 @@ const li = {
2281
2328
  ArrowRight: 39,
2282
2329
  ArrowDown: 40,
2283
2330
  Tab: 9
2284
- }, O = (s, t) => t ? s : li[s];
2285
- class ci {
2331
+ }, O = (s, t) => t ? s : Ai[s];
2332
+ class Ci {
2286
2333
  /**
2287
2334
  * @param {PhotoSwipe} pswp
2288
2335
  */
@@ -2322,7 +2369,7 @@ class ci {
2322
2369
  } = this;
2323
2370
  if (e.dispatch("keydown", {
2324
2371
  originalEvent: t
2325
- }).defaultPrevented || He(t))
2372
+ }).defaultPrevented || ri(t))
2326
2373
  return;
2327
2374
  let i, n, o = !1;
2328
2375
  const r = "key" in t;
@@ -2374,8 +2421,8 @@ class ci {
2374
2421
  ) && e.focus();
2375
2422
  }
2376
2423
  }
2377
- const di = "cubic-bezier(.4,0,.22,1)";
2378
- class hi {
2424
+ const xi = "cubic-bezier(.4,0,.22,1)";
2425
+ class Ti {
2379
2426
  /**
2380
2427
  * onComplete can be unpredictable, be careful about current state
2381
2428
  *
@@ -2391,12 +2438,12 @@ class hi {
2391
2438
  onFinish: r = () => {
2392
2439
  },
2393
2440
  duration: a = 333,
2394
- easing: l = di
2441
+ easing: l = xi
2395
2442
  } = t;
2396
2443
  this.onFinish = r;
2397
2444
  const c = o ? "transform" : "opacity", d = (e = t[c]) !== null && e !== void 0 ? e : "";
2398
2445
  this._target = i, this._onComplete = n, this._finished = !1, this._onTransitionEnd = this._onTransitionEnd.bind(this), this._helperTimeout = setTimeout(() => {
2399
- Bt(i, c, a, l), this._helperTimeout = setTimeout(() => {
2446
+ Gt(i, c, a, l), this._helperTimeout = setTimeout(() => {
2400
2447
  i.addEventListener("transitionend", this._onTransitionEnd, !1), i.addEventListener("transitioncancel", this._onTransitionEnd, !1), this._helperTimeout = setTimeout(() => {
2401
2448
  this._finalizeAnimation();
2402
2449
  }, a + 500), i.style[c] = d;
@@ -2418,11 +2465,11 @@ class hi {
2418
2465
  }
2419
2466
  // Destroy is called automatically onFinish
2420
2467
  destroy() {
2421
- this._helperTimeout && clearTimeout(this._helperTimeout), Ne(this._target), this._target.removeEventListener("transitionend", this._onTransitionEnd, !1), this._target.removeEventListener("transitioncancel", this._onTransitionEnd, !1), this._finished || this._finalizeAnimation();
2468
+ this._helperTimeout && clearTimeout(this._helperTimeout), ni(this._target), this._target.removeEventListener("transitionend", this._onTransitionEnd, !1), this._target.removeEventListener("transitioncancel", this._onTransitionEnd, !1), this._finished || this._finalizeAnimation();
2422
2469
  }
2423
2470
  }
2424
- const ui = 12, pi = 0.75;
2425
- class mi {
2471
+ const Pi = 12, Ii = 0.75;
2472
+ class Mi {
2426
2473
  /**
2427
2474
  * @param {number} initialVelocity Initial velocity, px per ms.
2428
2475
  *
@@ -2439,7 +2486,7 @@ class mi {
2439
2486
  * Recommended value from 10 to 50
2440
2487
  */
2441
2488
  constructor(t, e, i) {
2442
- this.velocity = t * 1e3, this._dampingRatio = e || pi, this._naturalFrequency = i || ui, this._dampedFrequency = this._naturalFrequency, this._dampingRatio < 1 && (this._dampedFrequency *= Math.sqrt(1 - this._dampingRatio * this._dampingRatio));
2489
+ this.velocity = t * 1e3, this._dampingRatio = e || Ii, this._naturalFrequency = i || Pi, this._dampedFrequency = this._naturalFrequency, this._dampingRatio < 1 && (this._dampedFrequency *= Math.sqrt(1 - this._dampingRatio * this._dampingRatio));
2443
2490
  }
2444
2491
  /**
2445
2492
  * @param {number} deltaPosition Difference between current and end position of the animation
@@ -2461,7 +2508,7 @@ class mi {
2461
2508
  return i;
2462
2509
  }
2463
2510
  }
2464
- class fi {
2511
+ class zi {
2465
2512
  /**
2466
2513
  * @param {SpringAnimationProps} props
2467
2514
  */
@@ -2479,7 +2526,7 @@ class fi {
2479
2526
  naturalFrequency: c
2480
2527
  } = t;
2481
2528
  this.onFinish = a;
2482
- const d = new mi(n, l, c);
2529
+ const d = new Mi(n, l, c);
2483
2530
  let h = Date.now(), u = e - i;
2484
2531
  const f = () => {
2485
2532
  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(f)));
@@ -2491,7 +2538,7 @@ class fi {
2491
2538
  this._raf >= 0 && cancelAnimationFrame(this._raf), this._raf = 0;
2492
2539
  }
2493
2540
  }
2494
- class gi {
2541
+ class Oi {
2495
2542
  constructor() {
2496
2543
  this.activeAnimations = [];
2497
2544
  }
@@ -2514,10 +2561,10 @@ class gi {
2514
2561
  * @returns {Animation}
2515
2562
  */
2516
2563
  _start(t, e) {
2517
- const i = e ? new fi(
2564
+ const i = e ? new zi(
2518
2565
  /** @type SpringAnimationProps */
2519
2566
  t
2520
- ) : new hi(
2567
+ ) : new Ti(
2521
2568
  /** @type CssAnimationProps */
2522
2569
  t
2523
2570
  );
@@ -2560,7 +2607,7 @@ class gi {
2560
2607
  return this.activeAnimations.some((t) => t.props.isPan);
2561
2608
  }
2562
2609
  }
2563
- class vi {
2610
+ class Di {
2564
2611
  /**
2565
2612
  * @param {PhotoSwipe} pswp
2566
2613
  */
@@ -2602,7 +2649,7 @@ class vi {
2602
2649
  e.isPannable() && (t.deltaMode === 1 && (i *= 18, n *= 18), e.panTo(e.pan.x - i, e.pan.y - n));
2603
2650
  }
2604
2651
  }
2605
- function yi(s) {
2652
+ function $i(s) {
2606
2653
  if (typeof s == "string")
2607
2654
  return s;
2608
2655
  if (!s || !s.isCustomSVG)
@@ -2614,7 +2661,7 @@ function yi(s) {
2614
2661
  t.size || 32
2615
2662
  ), t.outlineID && (e += '<use class="pswp__icn-shadow" xlink:href="#' + t.outlineID + '"/>'), e += t.inner, e += "</svg>", e;
2616
2663
  }
2617
- class _i {
2664
+ class Ri {
2618
2665
  /**
2619
2666
  * @param {PhotoSwipe} pswp
2620
2667
  * @param {UIElementData} data
@@ -2646,7 +2693,7 @@ class _i {
2646
2693
  const f = u || h;
2647
2694
  f && l.setAttribute("aria-label", f);
2648
2695
  }
2649
- l.innerHTML = yi(o), e.onInit && e.onInit(l, t), e.onClick && (l.onclick = (h) => {
2696
+ l.innerHTML = $i(o), e.onInit && e.onInit(l, t), e.onClick && (l.onclick = (h) => {
2650
2697
  typeof e.onClick == "string" ? t[e.onClick]() : typeof e.onClick == "function" && e.onClick(h, l, t);
2651
2698
  });
2652
2699
  const c = e.appendTo || "bar";
@@ -2654,12 +2701,12 @@ class _i {
2654
2701
  c === "bar" ? (t.topBar || (t.topBar = x("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));
2655
2702
  }
2656
2703
  }
2657
- function qt(s, t, e) {
2704
+ function Jt(s, t, e) {
2658
2705
  s.classList.add("pswp__button--arrow"), s.setAttribute("aria-controls", "pswp__items"), t.on("change", () => {
2659
2706
  t.options.loop || (e ? s.disabled = !(t.currIndex < t.getNumItems() - 1) : s.disabled = !(t.currIndex > 0));
2660
2707
  });
2661
2708
  }
2662
- const wi = {
2709
+ const Bi = {
2663
2710
  name: "arrowPrev",
2664
2711
  className: "pswp__button--arrow--prev",
2665
2712
  title: "Previous",
@@ -2673,8 +2720,8 @@ const wi = {
2673
2720
  outlineID: "pswp__icn-arrow"
2674
2721
  },
2675
2722
  onClick: "prev",
2676
- onInit: qt
2677
- }, bi = {
2723
+ onInit: Jt
2724
+ }, Fi = {
2678
2725
  name: "arrowNext",
2679
2726
  className: "pswp__button--arrow--next",
2680
2727
  title: "Next",
@@ -2689,9 +2736,9 @@ const wi = {
2689
2736
  },
2690
2737
  onClick: "next",
2691
2738
  onInit: (s, t) => {
2692
- qt(s, t, !0);
2739
+ Jt(s, t, !0);
2693
2740
  }
2694
- }, Si = {
2741
+ }, ki = {
2695
2742
  name: "close",
2696
2743
  title: "Close",
2697
2744
  order: 20,
@@ -2702,7 +2749,7 @@ const wi = {
2702
2749
  outlineID: "pswp__icn-close"
2703
2750
  },
2704
2751
  onClick: "close"
2705
- }, Li = {
2752
+ }, Zi = {
2706
2753
  name: "zoom",
2707
2754
  title: "Zoom",
2708
2755
  order: 10,
@@ -2714,7 +2761,7 @@ const wi = {
2714
2761
  outlineID: "pswp__icn-zoom"
2715
2762
  },
2716
2763
  onClick: "toggleZoom"
2717
- }, Ei = {
2764
+ }, qi = {
2718
2765
  name: "preloader",
2719
2766
  appendTo: "bar",
2720
2767
  order: 7,
@@ -2745,7 +2792,7 @@ const wi = {
2745
2792
  t.currSlide === a.slide && r();
2746
2793
  }), t.ui && (t.ui.updatePreloaderVisibility = r);
2747
2794
  }
2748
- }, Ai = {
2795
+ }, Ni = {
2749
2796
  name: "counter",
2750
2797
  order: 5,
2751
2798
  onInit: (s, t) => {
@@ -2754,10 +2801,10 @@ const wi = {
2754
2801
  });
2755
2802
  }
2756
2803
  };
2757
- function Lt(s, t) {
2804
+ function Tt(s, t) {
2758
2805
  s.classList.toggle("pswp--zoomed-in", t);
2759
2806
  }
2760
- class Ci {
2807
+ class Hi {
2761
2808
  /**
2762
2809
  * @param {PhotoSwipe} pswp
2763
2810
  */
@@ -2769,7 +2816,7 @@ class Ci {
2769
2816
  const {
2770
2817
  pswp: t
2771
2818
  } = this;
2772
- this.isRegistered = !1, this.uiElementsData = [Si, wi, bi, Li, Ei, Ai], t.dispatch("uiRegister"), this.uiElementsData.sort((e, i) => (e.order || 0) - (i.order || 0)), this.items = [], this.isRegistered = !0, this.uiElementsData.forEach((e) => {
2819
+ this.isRegistered = !1, this.uiElementsData = [ki, Bi, Fi, Zi, qi, Ni], t.dispatch("uiRegister"), this.uiElementsData.sort((e, i) => (e.order || 0) - (i.order || 0)), this.items = [], this.isRegistered = !0, this.uiElementsData.forEach((e) => {
2773
2820
  this.registerElement(e);
2774
2821
  }), t.on("change", () => {
2775
2822
  var e;
@@ -2780,7 +2827,7 @@ class Ci {
2780
2827
  * @param {UIElementData} elementData
2781
2828
  */
2782
2829
  registerElement(t) {
2783
- this.isRegistered ? this.items.push(new _i(this.pswp, t)) : this.uiElementsData.push(t);
2830
+ this.isRegistered ? this.items.push(new Ri(this.pswp, t)) : this.uiElementsData.push(t);
2784
2831
  }
2785
2832
  /**
2786
2833
  * Fired each time zoom or pan position is changed.
@@ -2804,15 +2851,15 @@ class Ci {
2804
2851
  this._lastUpdatedZoomLevel = n;
2805
2852
  const o = e.zoomLevels.initial - e.zoomLevels.secondary;
2806
2853
  if (Math.abs(o) < 0.01 || !e.isZoomable()) {
2807
- Lt(t, !1), t.classList.remove("pswp--zoom-allowed");
2854
+ Tt(t, !1), t.classList.remove("pswp--zoom-allowed");
2808
2855
  return;
2809
2856
  }
2810
2857
  t.classList.add("pswp--zoom-allowed");
2811
2858
  const r = n === e.zoomLevels.initial ? e.zoomLevels.secondary : e.zoomLevels.initial;
2812
- Lt(t, r <= n), (i.imageClickAction === "zoom" || i.imageClickAction === "zoom-or-close") && t.classList.add("pswp--click-to-zoom");
2859
+ Tt(t, r <= n), (i.imageClickAction === "zoom" || i.imageClickAction === "zoom-or-close") && t.classList.add("pswp--click-to-zoom");
2813
2860
  }
2814
2861
  }
2815
- function xi(s) {
2862
+ function Wi(s) {
2816
2863
  const t = s.getBoundingClientRect();
2817
2864
  return {
2818
2865
  x: t.left,
@@ -2820,7 +2867,7 @@ function xi(s) {
2820
2867
  w: t.width
2821
2868
  };
2822
2869
  }
2823
- function Pi(s, t, e) {
2870
+ function Vi(s, t, e) {
2824
2871
  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 = {
2825
2872
  x: i.left + a,
2826
2873
  y: i.top + l,
@@ -2833,7 +2880,7 @@ function Pi(s, t, e) {
2833
2880
  y: l
2834
2881
  }, c;
2835
2882
  }
2836
- function Ti(s, t, e) {
2883
+ function ji(s, t, e) {
2837
2884
  const i = e.dispatch("thumbBounds", {
2838
2885
  index: s,
2839
2886
  itemData: t,
@@ -2852,9 +2899,9 @@ function Ti(s, t, e) {
2852
2899
  n.querySelector(a)
2853
2900
  );
2854
2901
  }
2855
- return r = e.applyFilters("thumbEl", r, t, s), r && (t.thumbCropped ? o = Pi(r, t.width || t.w || 0, t.height || t.h || 0) : o = xi(r)), e.applyFilters("thumbBounds", o, t, s);
2902
+ return r = e.applyFilters("thumbEl", r, t, s), r && (t.thumbCropped ? o = Vi(r, t.width || t.w || 0, t.height || t.h || 0) : o = Wi(r)), e.applyFilters("thumbBounds", o, t, s);
2856
2903
  }
2857
- let Ii = class {
2904
+ let Gi = class {
2858
2905
  /**
2859
2906
  * @param {T} type
2860
2907
  * @param {PhotoSwipeEventsMap[T]} [details]
@@ -2865,7 +2912,7 @@ let Ii = class {
2865
2912
  preventDefault() {
2866
2913
  this.defaultPrevented = !0;
2867
2914
  }
2868
- }, Mi = class {
2915
+ }, Ui = class {
2869
2916
  constructor() {
2870
2917
  this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
2871
2918
  }
@@ -2932,13 +2979,13 @@ let Ii = class {
2932
2979
  return this.pswp.dispatch(t, e);
2933
2980
  const n = (
2934
2981
  /** @type {AugmentedEvent<T>} */
2935
- new Ii(t, e)
2982
+ new Gi(t, e)
2936
2983
  );
2937
2984
  return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
2938
2985
  o.call(this, n);
2939
2986
  }), n;
2940
2987
  }
2941
- }, zi = class {
2988
+ }, Ki = class {
2942
2989
  /**
2943
2990
  * @param {string | false} imageSrc
2944
2991
  * @param {HTMLElement} container
@@ -2958,20 +3005,20 @@ let Ii = class {
2958
3005
  * @param {number} height
2959
3006
  */
2960
3007
  setDisplayedSize(t, e) {
2961
- this.element && (this.element.tagName === "IMG" ? (st(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = G(0, 0, t / 250)) : st(this.element, t, e));
3008
+ this.element && (this.element.tagName === "IMG" ? (rt(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = X(0, 0, t / 250)) : rt(this.element, t, e));
2962
3009
  }
2963
3010
  destroy() {
2964
3011
  var t;
2965
3012
  (t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
2966
3013
  }
2967
- }, Oi = class {
3014
+ }, Xi = class {
2968
3015
  /**
2969
3016
  * @param {SlideData} itemData Slide data
2970
3017
  * @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
2971
3018
  * @param {number} index
2972
3019
  */
2973
3020
  constructor(t, e, i) {
2974
- 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 = P.IDLE, this.data.type ? this.type = this.data.type : this.data.src ? this.type = "image" : this.type = "html", this.instance.dispatch("contentInit", {
3021
+ 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 = T.IDLE, this.data.type ? this.type = this.data.type : this.data.src ? this.type = "image" : this.type = "html", this.instance.dispatch("contentInit", {
2975
3022
  content: this
2976
3023
  });
2977
3024
  }
@@ -2999,7 +3046,7 @@ let Ii = class {
2999
3046
  this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
3000
3047
  this
3001
3048
  );
3002
- this.placeholder = new zi(i, this.slide.container);
3049
+ this.placeholder = new Ki(i, this.slide.container);
3003
3050
  }
3004
3051
  this.element && !e || this.instance.dispatch("contentLoad", {
3005
3052
  content: this,
@@ -3022,7 +3069,7 @@ let Ii = class {
3022
3069
  /** @type HTMLImageElement */
3023
3070
  this.element
3024
3071
  );
3025
- 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 = P.LOADING, n.complete ? this.onLoaded() : (n.onload = () => {
3072
+ 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 = T.LOADING, n.complete ? this.onLoaded() : (n.onload = () => {
3026
3073
  this.onLoaded();
3027
3074
  }, n.onerror = () => {
3028
3075
  this.onError();
@@ -3040,16 +3087,16 @@ let Ii = class {
3040
3087
  * Content load success handler
3041
3088
  */
3042
3089
  onLoaded() {
3043
- this.state = P.LOADED, this.slide && this.element && (this.instance.dispatch("loadComplete", {
3090
+ this.state = T.LOADED, this.slide && this.element && (this.instance.dispatch("loadComplete", {
3044
3091
  slide: this.slide,
3045
3092
  content: this
3046
- }), this.slide.isActive && this.slide.heavyAppended && !this.element.parentNode && (this.append(), this.slide.updateContentSize(!0)), (this.state === P.LOADED || this.state === P.ERROR) && this.removePlaceholder());
3093
+ }), this.slide.isActive && this.slide.heavyAppended && !this.element.parentNode && (this.append(), this.slide.updateContentSize(!0)), (this.state === T.LOADED || this.state === T.ERROR) && this.removePlaceholder());
3047
3094
  }
3048
3095
  /**
3049
3096
  * Content load error handler
3050
3097
  */
3051
3098
  onError() {
3052
- this.state = P.ERROR, this.slide && (this.displayError(), this.instance.dispatch("loadComplete", {
3099
+ this.state = T.ERROR, this.slide && (this.displayError(), this.instance.dispatch("loadComplete", {
3053
3100
  slide: this.slide,
3054
3101
  isError: !0,
3055
3102
  content: this
@@ -3062,13 +3109,13 @@ let Ii = class {
3062
3109
  * @returns {Boolean} If the content is currently loading
3063
3110
  */
3064
3111
  isLoading() {
3065
- return this.instance.applyFilters("isContentLoading", this.state === P.LOADING, this);
3112
+ return this.instance.applyFilters("isContentLoading", this.state === T.LOADING, this);
3066
3113
  }
3067
3114
  /**
3068
3115
  * @returns {Boolean} If the content is in error state
3069
3116
  */
3070
3117
  isError() {
3071
- return this.state === P.ERROR;
3118
+ return this.state === T.ERROR;
3072
3119
  }
3073
3120
  /**
3074
3121
  * @returns {boolean} If the content is image
@@ -3087,7 +3134,7 @@ let Ii = class {
3087
3134
  content: this,
3088
3135
  width: t,
3089
3136
  height: e
3090
- }).defaultPrevented && (st(this.element, t, e), this.isImageContent() && !this.isError()))) {
3137
+ }).defaultPrevented && (rt(this.element, t, e), this.isImageContent() && !this.isError()))) {
3091
3138
  const i = !this.displayedImageWidth && t;
3092
3139
  this.displayedImageWidth = t, this.displayedImageHeight = e, i ? this.loadImage(!1) : this.updateSrcsetSizes(), this.slide && this.instance.dispatch("imageSizeChange", {
3093
3140
  slide: this.slide,
@@ -3101,7 +3148,7 @@ let Ii = class {
3101
3148
  * @returns {boolean} If the content can be zoomed
3102
3149
  */
3103
3150
  isZoomable() {
3104
- return this.instance.applyFilters("isContentZoomable", this.isImageContent() && this.state !== P.ERROR, this);
3151
+ return this.instance.applyFilters("isContentZoomable", this.isImageContent() && this.state !== T.ERROR, this);
3105
3152
  }
3106
3153
  /**
3107
3154
  * Update image srcset sizes attribute based on width and height
@@ -3160,7 +3207,7 @@ let Ii = class {
3160
3207
  append() {
3161
3208
  if (this.isAttached || !this.element)
3162
3209
  return;
3163
- if (this.isAttached = !0, this.state === P.ERROR) {
3210
+ if (this.isAttached = !0, this.state === T.ERROR) {
3164
3211
  this.displayError();
3165
3212
  return;
3166
3213
  }
@@ -3169,7 +3216,7 @@ let Ii = class {
3169
3216
  }).defaultPrevented)
3170
3217
  return;
3171
3218
  const t = "decode" in this.element;
3172
- this.isImageContent() ? t && this.slide && (!this.slide.isActive || vt()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
3219
+ this.isImageContent() ? t && this.slide && (!this.slide.isActive || St()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
3173
3220
  }).finally(() => {
3174
3221
  this.isDecoding = !1, this.appendImage();
3175
3222
  })) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element);
@@ -3182,7 +3229,7 @@ let Ii = class {
3182
3229
  activate() {
3183
3230
  this.instance.dispatch("contentActivate", {
3184
3231
  content: this
3185
- }).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !vt() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
3232
+ }).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !St() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
3186
3233
  }
3187
3234
  /**
3188
3235
  * Deactivate the content
@@ -3206,39 +3253,39 @@ let Ii = class {
3206
3253
  appendImage() {
3207
3254
  this.isAttached && (this.instance.dispatch("contentAppendImage", {
3208
3255
  content: this
3209
- }).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === P.LOADED || this.state === P.ERROR) && this.removePlaceholder()));
3256
+ }).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === T.LOADED || this.state === T.ERROR) && this.removePlaceholder()));
3210
3257
  }
3211
3258
  };
3212
- const Di = 5;
3213
- function Ht(s, t, e) {
3259
+ const Yi = 5;
3260
+ function Qt(s, t, e) {
3214
3261
  const i = t.createContentFromData(s, e);
3215
3262
  let n;
3216
3263
  const {
3217
3264
  options: o
3218
3265
  } = t;
3219
3266
  if (o) {
3220
- n = new Nt(o, s, -1);
3267
+ n = new Yt(o, s, -1);
3221
3268
  let r;
3222
- t.pswp ? r = t.pswp.viewportSize : r = kt(o, t);
3223
- const a = Zt(o, r, s, e);
3269
+ t.pswp ? r = t.pswp.viewportSize : r = Kt(o, t);
3270
+ const a = Xt(o, r, s, e);
3224
3271
  n.update(i.width, i.height, a);
3225
3272
  }
3226
3273
  return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
3227
3274
  }
3228
- function Ri(s, t) {
3275
+ function Ji(s, t) {
3229
3276
  const e = t.getItemData(s);
3230
3277
  if (!t.dispatch("lazyLoadSlide", {
3231
3278
  index: s,
3232
3279
  itemData: e
3233
3280
  }).defaultPrevented)
3234
- return Ht(e, t, s);
3281
+ return Qt(e, t, s);
3235
3282
  }
3236
- class $i {
3283
+ class Qi {
3237
3284
  /**
3238
3285
  * @param {PhotoSwipe} pswp
3239
3286
  */
3240
3287
  constructor(t) {
3241
- this.pswp = t, this.limit = Math.max(t.options.preload[0] + t.options.preload[1] + 1, Di), this._cachedItems = [];
3288
+ this.pswp = t, this.limit = Math.max(t.options.preload[0] + t.options.preload[1] + 1, Yi), this._cachedItems = [];
3242
3289
  }
3243
3290
  /**
3244
3291
  * Lazy load nearby slides based on `preload` option.
@@ -3266,7 +3313,7 @@ class $i {
3266
3313
  loadSlideByIndex(t) {
3267
3314
  const e = this.pswp.getLoopedIndex(t);
3268
3315
  let i = this.getContentByIndex(e);
3269
- i || (i = Ri(e, this.pswp), i && this.addToCache(i));
3316
+ i || (i = Ji(e, this.pswp), i && this.addToCache(i));
3270
3317
  }
3271
3318
  /**
3272
3319
  * @param {Slide} slide
@@ -3305,7 +3352,7 @@ class $i {
3305
3352
  this._cachedItems.forEach((t) => t.destroy()), this._cachedItems = [];
3306
3353
  }
3307
3354
  }
3308
- let Bi = class extends Mi {
3355
+ let ts = class extends Ui {
3309
3356
  /**
3310
3357
  * Get total number of slides
3311
3358
  *
@@ -3328,7 +3375,7 @@ let Bi = class extends Mi {
3328
3375
  * @returns {Content}
3329
3376
  */
3330
3377
  createContentFromData(t, e) {
3331
- return new Oi(t, this, e);
3378
+ return new Xi(t, this, e);
3332
3379
  }
3333
3380
  /**
3334
3381
  * Get item data by index.
@@ -3362,7 +3409,7 @@ let Bi = class extends Mi {
3362
3409
  */
3363
3410
  _getGalleryDOMElements(t) {
3364
3411
  var e, i;
3365
- return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? We(this.options.children, this.options.childSelector, t) || [] : [t];
3412
+ return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? ai(this.options.children, this.options.childSelector, t) || [] : [t];
3366
3413
  }
3367
3414
  /**
3368
3415
  * Converts DOM element to item data object.
@@ -3396,11 +3443,11 @@ let Bi = class extends Mi {
3396
3443
  * @returns {Content} Image that is being decoded or false.
3397
3444
  */
3398
3445
  lazyLoadData(t, e) {
3399
- return Ht(t, this, e);
3446
+ return Qt(t, this, e);
3400
3447
  }
3401
3448
  };
3402
- const Z = 3e-3;
3403
- class Fi {
3449
+ const q = 3e-3;
3450
+ class es {
3404
3451
  /**
3405
3452
  * @param {PhotoSwipe} pswp
3406
3453
  */
@@ -3438,8 +3485,8 @@ class Fi {
3438
3485
  var n;
3439
3486
  this._animateRootOpacity = (n = i.showHideOpacity) !== null && n !== void 0 ? n : !1;
3440
3487
  }
3441
- if (this._animateBgOpacity = !this._animateRootOpacity && this.pswp.options.bgOpacity > Z, this._opacityElement = this._animateRootOpacity ? t.element : t.bg, !this._useAnimation) {
3442
- 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));
3488
+ if (this._animateBgOpacity = !this._animateRootOpacity && this.pswp.options.bgOpacity > q, this._opacityElement = this._animateRootOpacity ? t.element : t.bg, !this._useAnimation) {
3489
+ this._duration = 0, this._animateZoom = !1, this._animateBgOpacity = !1, this._animateRootOpacity = !0, this.isOpening && (t.element && (t.element.style.opacity = String(q)), t.applyBgOpacity(1));
3443
3490
  return;
3444
3491
  }
3445
3492
  if (this._animateZoom && this._thumbBounds && this._thumbBounds.innerRect) {
@@ -3447,13 +3494,13 @@ class Fi {
3447
3494
  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");
3448
3495
  } else
3449
3496
  this._croppedZoom = !1;
3450
- 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()));
3497
+ this.isOpening ? (this._animateRootOpacity ? (t.element && (t.element.style.opacity = String(q)), t.applyBgOpacity(1)) : (this._animateBgOpacity && t.bg && (t.bg.style.opacity = String(q)), t.element && (t.element.style.opacity = "1")), this._animateZoom && (this._setClosedStateZoomPan(), this._placeholder && (this._placeholder.style.willChange = "transform", this._placeholder.style.opacity = String(q)))) : 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()));
3451
3498
  }
3452
3499
  /** @private */
3453
3500
  _start() {
3454
3501
  this.isOpening && this._useAnimation && this._placeholder && this._placeholder.tagName === "IMG" ? new Promise((t) => {
3455
3502
  let e = !1, i = !0;
3456
- qe(
3503
+ oi(
3457
3504
  /** @type {HTMLImageElement} */
3458
3505
  this._placeholder
3459
3506
  ).finally(() => {
@@ -3516,7 +3563,7 @@ class Fi {
3516
3563
  } = e;
3517
3564
  if (this._croppedZoom && i && this._cropContainer1 && this._cropContainer2) {
3518
3565
  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;
3519
- t ? (this._animateTo(this._cropContainer1, "transform", G(r, a)), this._animateTo(this._cropContainer2, "transform", G(l, c))) : (D(this._cropContainer1, r, a), D(this._cropContainer2, l, c));
3566
+ t ? (this._animateTo(this._cropContainer1, "transform", X(r, a)), this._animateTo(this._cropContainer2, "transform", X(l, c))) : (D(this._cropContainer1, r, a), D(this._cropContainer2, l, c));
3520
3567
  }
3521
3568
  n && (S(n.pan, i || this._thumbBounds), n.currZoomLevel = this._thumbBounds.w / n.width, t ? this._animateTo(n.container, "transform", n.getCurrentTransform()) : n.applyCurrentZoomPan());
3522
3569
  }
@@ -3544,7 +3591,7 @@ class Fi {
3544
3591
  o[e] = i, n.startTransition(o);
3545
3592
  }
3546
3593
  }
3547
- const ki = {
3594
+ const is = {
3548
3595
  allowPanToNext: !0,
3549
3596
  spacing: 0.1,
3550
3597
  loop: !0,
@@ -3571,7 +3618,7 @@ const ki = {
3571
3618
  preload: [1, 2],
3572
3619
  easing: "cubic-bezier(.4,0,.22,1)"
3573
3620
  };
3574
- class Zi extends Bi {
3621
+ class ss extends ts {
3575
3622
  /**
3576
3623
  * @param {PhotoSwipeOptions} [options]
3577
3624
  */
@@ -3585,7 +3632,7 @@ class Zi extends Bi {
3585
3632
  }, this.viewportSize = {
3586
3633
  x: 0,
3587
3634
  y: 0
3588
- }, 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 Ve(), this.animations = new gi(), this.mainScroll = new ai(this), this.gestures = new oi(this), this.opener = new Fi(this), this.keyboard = new ci(this), this.contentLoader = new $i(this);
3635
+ }, 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 li(), this.animations = new Oi(), this.mainScroll = new Ei(this), this.gestures = new Si(this), this.opener = new es(this), this.keyboard = new Ci(this), this.contentLoader = new Qi(this);
3589
3636
  }
3590
3637
  /** @returns {boolean} */
3591
3638
  init() {
@@ -3593,7 +3640,7 @@ class Zi extends Bi {
3593
3640
  return !1;
3594
3641
  this.isOpen = !0, this.dispatch("init"), this.dispatch("beforeOpen"), this._createMainStructure();
3595
3642
  let t = "pswp--open";
3596
- 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 vi(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", {
3643
+ 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 Di(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", {
3597
3644
  index: this.currIndex,
3598
3645
  data: this._initialItemData,
3599
3646
  slide: void 0
@@ -3613,7 +3660,7 @@ class Zi extends Bi {
3613
3660
  */
3614
3661
  getLoopedIndex(t) {
3615
3662
  const e = this.getNumItems();
3616
- return this.options.loop && (t > e - 1 && (t -= e), t < 0 && (t += e)), U(t, 0, e - 1);
3663
+ return this.options.loop && (t > e - 1 && (t -= e), t < 0 && (t += e)), Y(t, 0, e - 1);
3617
3664
  }
3618
3665
  appendHeavy() {
3619
3666
  this.mainScroll.itemHolders.forEach((t) => {
@@ -3712,7 +3759,7 @@ class Zi extends Bi {
3712
3759
  if (!this.canLoop() && (e < 0 || e >= this.getNumItems()))
3713
3760
  return;
3714
3761
  const n = this.getItemData(e);
3715
- t.slide = new Ge(n, e, this), e === this.currIndex && (this.currSlide = t.slide), t.slide.append(t.el);
3762
+ t.slide = new di(n, e, this), e === this.currIndex && (this.currSlide = t.slide), t.slide.append(t.el);
3716
3763
  }
3717
3764
  /** @returns {Point} */
3718
3765
  getViewportCenterPoint() {
@@ -3730,8 +3777,8 @@ class Zi extends Bi {
3730
3777
  updateSize(t) {
3731
3778
  if (this.isDestroying)
3732
3779
  return;
3733
- const e = kt(this.options, this);
3734
- !t && j(e, this._prevViewportSize) || (S(this._prevViewportSize, e), this.dispatch("beforeResize"), S(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"));
3780
+ const e = Kt(this.options, this);
3781
+ !t && G(e, this._prevViewportSize) || (S(this._prevViewportSize, e), this.dispatch("beforeResize"), S(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"));
3735
3782
  }
3736
3783
  /**
3737
3784
  * @param {number} opacity
@@ -3782,7 +3829,7 @@ class Zi extends Bi {
3782
3829
  * @private
3783
3830
  */
3784
3831
  _createMainStructure() {
3785
- this.element = x("pswp", "div"), this.element.setAttribute("tabindex", "-1"), this.element.setAttribute("role", "dialog"), this.template = this.element, this.bg = x("pswp__bg", "div", this.element), this.scrollWrap = x("pswp__scroll-wrap", "section", this.element), this.container = x("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);
3832
+ this.element = x("pswp", "div"), this.element.setAttribute("tabindex", "-1"), this.element.setAttribute("role", "dialog"), this.template = this.element, this.bg = x("pswp__bg", "div", this.element), this.scrollWrap = x("pswp__scroll-wrap", "section", this.element), this.container = x("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 Hi(this), this.ui.init(), (this.options.appendToEl || document.body).appendChild(this.element);
3786
3833
  }
3787
3834
  /**
3788
3835
  * Get position and dimensions of small thumbnail
@@ -3793,7 +3840,7 @@ class Zi extends Bi {
3793
3840
  * @returns {Bounds | undefined}
3794
3841
  */
3795
3842
  getThumbBounds() {
3796
- return Ti(this.currIndex, this.currSlide ? this.currSlide.data : this._initialItemData, this);
3843
+ return ji(this.currIndex, this.currSlide ? this.currSlide.data : this._initialItemData, this);
3797
3844
  }
3798
3845
  /**
3799
3846
  * If the PhotoSwipe can have continuous loop
@@ -3809,32 +3856,32 @@ class Zi extends Bi {
3809
3856
  */
3810
3857
  _prepareOptions(t) {
3811
3858
  return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches && (t.showHideAnimationType = "none", t.zoomAnimationDuration = 0), {
3812
- ...ki,
3859
+ ...is,
3813
3860
  ...t
3814
3861
  };
3815
3862
  }
3816
3863
  }
3817
- function q(s, t, e) {
3864
+ function H(s, t, e) {
3818
3865
  const i = document.createElement(t);
3819
3866
  return s && (i.className = s), e && e.appendChild(i), i;
3820
3867
  }
3821
- function Ni(s, t, e) {
3868
+ function ns(s, t, e) {
3822
3869
  let i = `translate3d(${s}px,0px,0)`;
3823
3870
  return e !== void 0 && (i += ` scale3d(${e},${e},1)`), i;
3824
3871
  }
3825
- function nt(s, t, e) {
3872
+ function at(s, t, e) {
3826
3873
  s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
3827
3874
  }
3828
- const T = {
3875
+ const P = {
3829
3876
  IDLE: "idle",
3830
3877
  LOADING: "loading",
3831
3878
  LOADED: "loaded",
3832
3879
  ERROR: "error"
3833
3880
  };
3834
- function qi(s) {
3881
+ function os(s) {
3835
3882
  return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
3836
3883
  }
3837
- function H(s, t, e = document) {
3884
+ function W(s, t, e = document) {
3838
3885
  let i = [];
3839
3886
  if (s instanceof Element)
3840
3887
  i = [s];
@@ -3846,13 +3893,13 @@ function H(s, t, e = document) {
3846
3893
  }
3847
3894
  return i;
3848
3895
  }
3849
- function Hi(s) {
3896
+ function rs(s) {
3850
3897
  return typeof s == "function" && s.prototype && s.prototype.goTo;
3851
3898
  }
3852
- function Et() {
3899
+ function Pt() {
3853
3900
  return !!(navigator.vendor && navigator.vendor.match(/apple/i));
3854
3901
  }
3855
- class Wi {
3902
+ class as {
3856
3903
  /**
3857
3904
  * @param {T} type
3858
3905
  * @param {PhotoSwipeEventsMap[T]} [details]
@@ -3864,7 +3911,7 @@ class Wi {
3864
3911
  this.defaultPrevented = !0;
3865
3912
  }
3866
3913
  }
3867
- class Vi {
3914
+ class ls {
3868
3915
  constructor() {
3869
3916
  this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
3870
3917
  }
@@ -3931,20 +3978,20 @@ class Vi {
3931
3978
  return this.pswp.dispatch(t, e);
3932
3979
  const n = (
3933
3980
  /** @type {AugmentedEvent<T>} */
3934
- new Wi(t, e)
3981
+ new as(t, e)
3935
3982
  );
3936
3983
  return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
3937
3984
  o.call(this, n);
3938
3985
  }), n;
3939
3986
  }
3940
3987
  }
3941
- class ji {
3988
+ class cs {
3942
3989
  /**
3943
3990
  * @param {string | false} imageSrc
3944
3991
  * @param {HTMLElement} container
3945
3992
  */
3946
3993
  constructor(t, e) {
3947
- if (this.element = q("pswp__img pswp__img--placeholder", t ? "img" : "div", e), t) {
3994
+ if (this.element = H("pswp__img pswp__img--placeholder", t ? "img" : "div", e), t) {
3948
3995
  const i = (
3949
3996
  /** @type {HTMLImageElement} */
3950
3997
  this.element
@@ -3958,21 +4005,21 @@ class ji {
3958
4005
  * @param {number} height
3959
4006
  */
3960
4007
  setDisplayedSize(t, e) {
3961
- this.element && (this.element.tagName === "IMG" ? (nt(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = Ni(0, 0, t / 250)) : nt(this.element, t, e));
4008
+ this.element && (this.element.tagName === "IMG" ? (at(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = ns(0, 0, t / 250)) : at(this.element, t, e));
3962
4009
  }
3963
4010
  destroy() {
3964
4011
  var t;
3965
4012
  (t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
3966
4013
  }
3967
4014
  }
3968
- class Gi {
4015
+ class ds {
3969
4016
  /**
3970
4017
  * @param {SlideData} itemData Slide data
3971
4018
  * @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
3972
4019
  * @param {number} index
3973
4020
  */
3974
4021
  constructor(t, e, i) {
3975
- 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 = T.IDLE, this.data.type ? this.type = this.data.type : this.data.src ? this.type = "image" : this.type = "html", this.instance.dispatch("contentInit", {
4022
+ 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 = P.IDLE, this.data.type ? this.type = this.data.type : this.data.src ? this.type = "image" : this.type = "html", this.instance.dispatch("contentInit", {
3976
4023
  content: this
3977
4024
  });
3978
4025
  }
@@ -4000,12 +4047,12 @@ class Gi {
4000
4047
  this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
4001
4048
  this
4002
4049
  );
4003
- this.placeholder = new ji(i, this.slide.container);
4050
+ this.placeholder = new cs(i, this.slide.container);
4004
4051
  }
4005
4052
  this.element && !e || this.instance.dispatch("contentLoad", {
4006
4053
  content: this,
4007
4054
  isLazy: t
4008
- }).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));
4055
+ }).defaultPrevented || (this.isImageContent() ? (this.element = H("pswp__img", "img"), this.displayedImageWidth && this.loadImage(t)) : (this.element = H("pswp__content", "div"), this.element.innerHTML = this.data.html || ""), e && this.slide && this.slide.updateContentSize(!0));
4009
4056
  }
4010
4057
  /**
4011
4058
  * Preload image
@@ -4023,7 +4070,7 @@ class Gi {
4023
4070
  /** @type HTMLImageElement */
4024
4071
  this.element
4025
4072
  );
4026
- 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 = T.LOADING, n.complete ? this.onLoaded() : (n.onload = () => {
4073
+ 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 = P.LOADING, n.complete ? this.onLoaded() : (n.onload = () => {
4027
4074
  this.onLoaded();
4028
4075
  }, n.onerror = () => {
4029
4076
  this.onError();
@@ -4041,16 +4088,16 @@ class Gi {
4041
4088
  * Content load success handler
4042
4089
  */
4043
4090
  onLoaded() {
4044
- this.state = T.LOADED, this.slide && this.element && (this.instance.dispatch("loadComplete", {
4091
+ this.state = P.LOADED, this.slide && this.element && (this.instance.dispatch("loadComplete", {
4045
4092
  slide: this.slide,
4046
4093
  content: this
4047
- }), this.slide.isActive && this.slide.heavyAppended && !this.element.parentNode && (this.append(), this.slide.updateContentSize(!0)), (this.state === T.LOADED || this.state === T.ERROR) && this.removePlaceholder());
4094
+ }), this.slide.isActive && this.slide.heavyAppended && !this.element.parentNode && (this.append(), this.slide.updateContentSize(!0)), (this.state === P.LOADED || this.state === P.ERROR) && this.removePlaceholder());
4048
4095
  }
4049
4096
  /**
4050
4097
  * Content load error handler
4051
4098
  */
4052
4099
  onError() {
4053
- this.state = T.ERROR, this.slide && (this.displayError(), this.instance.dispatch("loadComplete", {
4100
+ this.state = P.ERROR, this.slide && (this.displayError(), this.instance.dispatch("loadComplete", {
4054
4101
  slide: this.slide,
4055
4102
  isError: !0,
4056
4103
  content: this
@@ -4063,13 +4110,13 @@ class Gi {
4063
4110
  * @returns {Boolean} If the content is currently loading
4064
4111
  */
4065
4112
  isLoading() {
4066
- return this.instance.applyFilters("isContentLoading", this.state === T.LOADING, this);
4113
+ return this.instance.applyFilters("isContentLoading", this.state === P.LOADING, this);
4067
4114
  }
4068
4115
  /**
4069
4116
  * @returns {Boolean} If the content is in error state
4070
4117
  */
4071
4118
  isError() {
4072
- return this.state === T.ERROR;
4119
+ return this.state === P.ERROR;
4073
4120
  }
4074
4121
  /**
4075
4122
  * @returns {boolean} If the content is image
@@ -4088,7 +4135,7 @@ class Gi {
4088
4135
  content: this,
4089
4136
  width: t,
4090
4137
  height: e
4091
- }).defaultPrevented && (nt(this.element, t, e), this.isImageContent() && !this.isError()))) {
4138
+ }).defaultPrevented && (at(this.element, t, e), this.isImageContent() && !this.isError()))) {
4092
4139
  const i = !this.displayedImageWidth && t;
4093
4140
  this.displayedImageWidth = t, this.displayedImageHeight = e, i ? this.loadImage(!1) : this.updateSrcsetSizes(), this.slide && this.instance.dispatch("imageSizeChange", {
4094
4141
  slide: this.slide,
@@ -4102,7 +4149,7 @@ class Gi {
4102
4149
  * @returns {boolean} If the content can be zoomed
4103
4150
  */
4104
4151
  isZoomable() {
4105
- return this.instance.applyFilters("isContentZoomable", this.isImageContent() && this.state !== T.ERROR, this);
4152
+ return this.instance.applyFilters("isContentZoomable", this.isImageContent() && this.state !== P.ERROR, this);
4106
4153
  }
4107
4154
  /**
4108
4155
  * Update image srcset sizes attribute based on width and height
@@ -4150,9 +4197,9 @@ class Gi {
4150
4197
  displayError() {
4151
4198
  if (this.slide) {
4152
4199
  var t, e;
4153
- let i = q("pswp__error-msg", "div");
4200
+ let i = H("pswp__error-msg", "div");
4154
4201
  i.innerText = (t = (e = this.instance.options) === null || e === void 0 ? void 0 : e.errorMsg) !== null && t !== void 0 ? t : "", i = /** @type {HTMLDivElement} */
4155
- 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();
4202
+ this.instance.applyFilters("contentErrorElement", i, this), this.element = H("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();
4156
4203
  }
4157
4204
  }
4158
4205
  /**
@@ -4161,7 +4208,7 @@ class Gi {
4161
4208
  append() {
4162
4209
  if (this.isAttached || !this.element)
4163
4210
  return;
4164
- if (this.isAttached = !0, this.state === T.ERROR) {
4211
+ if (this.isAttached = !0, this.state === P.ERROR) {
4165
4212
  this.displayError();
4166
4213
  return;
4167
4214
  }
@@ -4170,7 +4217,7 @@ class Gi {
4170
4217
  }).defaultPrevented)
4171
4218
  return;
4172
4219
  const t = "decode" in this.element;
4173
- this.isImageContent() ? t && this.slide && (!this.slide.isActive || Et()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
4220
+ this.isImageContent() ? t && this.slide && (!this.slide.isActive || Pt()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
4174
4221
  }).finally(() => {
4175
4222
  this.isDecoding = !1, this.appendImage();
4176
4223
  })) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element);
@@ -4183,7 +4230,7 @@ class Gi {
4183
4230
  activate() {
4184
4231
  this.instance.dispatch("contentActivate", {
4185
4232
  content: this
4186
- }).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !Et() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
4233
+ }).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !Pt() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
4187
4234
  }
4188
4235
  /**
4189
4236
  * Deactivate the content
@@ -4207,10 +4254,10 @@ class Gi {
4207
4254
  appendImage() {
4208
4255
  this.isAttached && (this.instance.dispatch("contentAppendImage", {
4209
4256
  content: this
4210
- }).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === T.LOADED || this.state === T.ERROR) && this.removePlaceholder()));
4257
+ }).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === P.LOADED || this.state === P.ERROR) && this.removePlaceholder()));
4211
4258
  }
4212
4259
  }
4213
- function Ui(s, t) {
4260
+ function hs(s, t) {
4214
4261
  if (s.getViewportSizeFn) {
4215
4262
  const e = s.getViewportSizeFn(s, t);
4216
4263
  if (e)
@@ -4225,7 +4272,7 @@ function Ui(s, t) {
4225
4272
  y: window.innerHeight
4226
4273
  };
4227
4274
  }
4228
- function K(s, t, e, i, n) {
4275
+ function J(s, t, e, i, n) {
4229
4276
  let o = 0;
4230
4277
  if (t.paddingFn)
4231
4278
  o = t.paddingFn(e, i, n)[s];
@@ -4237,14 +4284,14 @@ function K(s, t, e, i, n) {
4237
4284
  }
4238
4285
  return Number(o) || 0;
4239
4286
  }
4240
- function Ki(s, t, e, i) {
4287
+ function us(s, t, e, i) {
4241
4288
  return {
4242
- x: t.x - K("left", s, t, e, i) - K("right", s, t, e, i),
4243
- y: t.y - K("top", s, t, e, i) - K("bottom", s, t, e, i)
4289
+ x: t.x - J("left", s, t, e, i) - J("right", s, t, e, i),
4290
+ y: t.y - J("top", s, t, e, i) - J("bottom", s, t, e, i)
4244
4291
  };
4245
4292
  }
4246
- const At = 4e3;
4247
- class Xi {
4293
+ const It = 4e3;
4294
+ class ps {
4248
4295
  /**
4249
4296
  * @param {PhotoSwipeOptions} options PhotoSwipe options
4250
4297
  * @param {SlideData} itemData Slide data
@@ -4301,7 +4348,7 @@ class Xi {
4301
4348
  */
4302
4349
  _getSecondary() {
4303
4350
  let t = this._parseZoomLevelOption("secondary");
4304
- return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > At && (t = At / this.elementSize.x), t);
4351
+ return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > It && (t = It / this.elementSize.x), t);
4305
4352
  }
4306
4353
  /**
4307
4354
  * Get initial image zoom level.
@@ -4324,30 +4371,30 @@ class Xi {
4324
4371
  return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
4325
4372
  }
4326
4373
  }
4327
- function Wt(s, t, e) {
4374
+ function te(s, t, e) {
4328
4375
  const i = t.createContentFromData(s, e);
4329
4376
  let n;
4330
4377
  const {
4331
4378
  options: o
4332
4379
  } = t;
4333
4380
  if (o) {
4334
- n = new Xi(o, s, -1);
4381
+ n = new ps(o, s, -1);
4335
4382
  let r;
4336
- t.pswp ? r = t.pswp.viewportSize : r = Ui(o, t);
4337
- const a = Ki(o, r, s, e);
4383
+ t.pswp ? r = t.pswp.viewportSize : r = hs(o, t);
4384
+ const a = us(o, r, s, e);
4338
4385
  n.update(i.width, i.height, a);
4339
4386
  }
4340
4387
  return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
4341
4388
  }
4342
- function Yi(s, t) {
4389
+ function ms(s, t) {
4343
4390
  const e = t.getItemData(s);
4344
4391
  if (!t.dispatch("lazyLoadSlide", {
4345
4392
  index: s,
4346
4393
  itemData: e
4347
4394
  }).defaultPrevented)
4348
- return Wt(e, t, s);
4395
+ return te(e, t, s);
4349
4396
  }
4350
- class Ji extends Vi {
4397
+ class fs extends ls {
4351
4398
  /**
4352
4399
  * Get total number of slides
4353
4400
  *
@@ -4370,7 +4417,7 @@ class Ji extends Vi {
4370
4417
  * @returns {Content}
4371
4418
  */
4372
4419
  createContentFromData(t, e) {
4373
- return new Gi(t, this, e);
4420
+ return new ds(t, this, e);
4374
4421
  }
4375
4422
  /**
4376
4423
  * Get item data by index.
@@ -4404,7 +4451,7 @@ class Ji extends Vi {
4404
4451
  */
4405
4452
  _getGalleryDOMElements(t) {
4406
4453
  var e, i;
4407
- return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? H(this.options.children, this.options.childSelector, t) || [] : [t];
4454
+ return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? W(this.options.children, this.options.childSelector, t) || [] : [t];
4408
4455
  }
4409
4456
  /**
4410
4457
  * Converts DOM element to item data object.
@@ -4438,10 +4485,10 @@ class Ji extends Vi {
4438
4485
  * @returns {Content} Image that is being decoded or false.
4439
4486
  */
4440
4487
  lazyLoadData(t, e) {
4441
- return Wt(t, this, e);
4488
+ return te(t, this, e);
4442
4489
  }
4443
4490
  }
4444
- class Qi extends Ji {
4491
+ class gs extends fs {
4445
4492
  /**
4446
4493
  * @param {PhotoSwipeOptions} [options]
4447
4494
  */
@@ -4453,7 +4500,7 @@ class Qi extends Ji {
4453
4500
  * It's not included in the main constructor, so you may bind events before it.
4454
4501
  */
4455
4502
  init() {
4456
- H(this.options.gallery, this.options.gallerySelector).forEach((t) => {
4503
+ W(this.options.gallery, this.options.gallerySelector).forEach((t) => {
4457
4504
  t.addEventListener("click", this.onThumbnailsClick, !1);
4458
4505
  });
4459
4506
  }
@@ -4461,7 +4508,7 @@ class Qi extends Ji {
4461
4508
  * @param {MouseEvent} e
4462
4509
  */
4463
4510
  onThumbnailsClick(t) {
4464
- if (qi(t) || window.pswp)
4511
+ if (os(t) || window.pswp)
4465
4512
  return;
4466
4513
  let e = {
4467
4514
  x: t.clientX,
@@ -4490,7 +4537,7 @@ class Qi extends Ji {
4490
4537
  const e = (
4491
4538
  /** @type {HTMLElement} */
4492
4539
  t.target
4493
- ), n = H(
4540
+ ), n = W(
4494
4541
  this.options.children,
4495
4542
  this.options.childSelector,
4496
4543
  /** @type {HTMLElement} */
@@ -4510,7 +4557,7 @@ class Qi extends Ji {
4510
4557
  if (window.pswp || !this.options)
4511
4558
  return !1;
4512
4559
  if (!e && this.options.gallery && this.options.children) {
4513
- const n = H(this.options.gallery);
4560
+ const n = W(this.options.gallery);
4514
4561
  n[0] && (e = {
4515
4562
  gallery: n[0]
4516
4563
  });
@@ -4529,7 +4576,7 @@ class Qi extends Ji {
4529
4576
  } = this;
4530
4577
  e && (i.dataSource = e);
4531
4578
  const n = [], o = typeof i.pswpModule;
4532
- if (Hi(i.pswpModule))
4579
+ if (rs(i.pswpModule))
4533
4580
  n.push(Promise.resolve(
4534
4581
  /** @type {Type<PhotoSwipe>} */
4535
4582
  i.pswpModule
@@ -4545,7 +4592,7 @@ class Qi extends Ji {
4545
4592
  else
4546
4593
  throw new Error("pswpModule is not valid");
4547
4594
  }
4548
- typeof i.openPromise == "function" && n.push(i.openPromise()), i.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent = Yi(t, this));
4595
+ typeof i.openPromise == "function" && n.push(i.openPromise()), i.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent = ms(t, this));
4549
4596
  const r = ++this._uid;
4550
4597
  Promise.all(n).then((a) => {
4551
4598
  if (this.shouldOpen) {
@@ -4586,17 +4633,17 @@ class Qi extends Ji {
4586
4633
  */
4587
4634
  destroy() {
4588
4635
  var t;
4589
- (t = this.pswp) === null || t === void 0 || t.destroy(), this.shouldOpen = !1, this._listeners = {}, H(this.options.gallery, this.options.gallerySelector).forEach((e) => {
4636
+ (t = this.pswp) === null || t === void 0 || t.destroy(), this.shouldOpen = !1, this._listeners = {}, W(this.options.gallery, this.options.gallerySelector).forEach((e) => {
4590
4637
  e.removeEventListener("click", this.onThumbnailsClick, !1);
4591
4638
  });
4592
4639
  }
4593
4640
  }
4594
- const ts = () => {
4641
+ const vs = () => {
4595
4642
  let s = null;
4596
- return s = new Qi({
4643
+ return s = new gs({
4597
4644
  gallery: "#photoswipe-gallery",
4598
4645
  children: "a",
4599
- pswpModule: Zi,
4646
+ pswpModule: ss,
4600
4647
  zoom: !1,
4601
4648
  imageClickAction: "next",
4602
4649
  tapAction: "next"
@@ -4617,12 +4664,12 @@ const ts = () => {
4617
4664
  }), s.init(), () => {
4618
4665
  s && (s.destroy(), s = null);
4619
4666
  };
4620
- }, es = "mbrs-game-ranking", is = ".c-header-page__ranking-button", ss = () => {
4621
- const s = document.querySelector(is), t = s?.querySelector("button");
4667
+ }, ys = "mbrs-game-ranking", _s = ".c-header-page__ranking-button", ws = () => {
4668
+ const s = document.querySelector(_s), t = s?.querySelector("button");
4622
4669
  !s || !t || t.addEventListener("click", () => {
4623
- document.getElementById(es)?.scrollIntoView({ behavior: "smooth" });
4670
+ document.getElementById(ys)?.scrollIntoView({ behavior: "smooth" });
4624
4671
  });
4625
- }, Ct = (s) => Math.min(100, Math.max(0, Math.round(s))), ns = ({
4672
+ }, Mt = (s) => Math.min(100, Math.max(0, Math.round(s))), bs = ({
4626
4673
  limitElement: s,
4627
4674
  progressBar: t,
4628
4675
  closeProgress: e,
@@ -4636,19 +4683,19 @@ const ts = () => {
4636
4683
  let a = o.scrollHeight - o.clientHeight;
4637
4684
  if (!a)
4638
4685
  return;
4639
- s && (a = s.scrollHeight - o.clientHeight + (window.pageYOffset + s.getBoundingClientRect().top)), t.style.width = `${Ct(r / a * 100)}%`;
4686
+ s && (a = s.scrollHeight - o.clientHeight + (window.pageYOffset + s.getBoundingClientRect().top)), t.style.width = `${Mt(r / a * 100)}%`;
4640
4687
  }
4641
4688
  if (e && i && n) {
4642
4689
  const a = window.pageYOffset + i.getBoundingClientRect().bottom, c = window.pageYOffset + n.getBoundingClientRect().bottom - o.clientHeight - a;
4643
4690
  if (c > 0) {
4644
- const d = Ct((r - a) / c * 100);
4691
+ const d = Mt((r - a) / c * 100);
4645
4692
  e.style.setProperty("--progress", `${d}`), e.parentElement?.classList.toggle(
4646
4693
  "c-btn--close-progress-complete",
4647
4694
  d >= 100
4648
4695
  );
4649
4696
  }
4650
4697
  }
4651
- }, os = () => {
4698
+ }, Ss = () => {
4652
4699
  const s = {
4653
4700
  limitElement: document.querySelector(".js-limit-scroll-progress-bar"),
4654
4701
  progressBar: document.querySelector(".c-progress__bar"),
@@ -4656,8 +4703,8 @@ const ts = () => {
4656
4703
  startElement: document.querySelector(".js-content-header"),
4657
4704
  endElement: document.querySelector(".js-limit-scroll-close-article-btn")
4658
4705
  };
4659
- (s.progressBar || s.closeProgress) && window.addEventListener("scroll", () => ns(s));
4660
- }, rs = (s = {}) => {
4706
+ (s.progressBar || s.closeProgress) && window.addEventListener("scroll", () => bs(s));
4707
+ }, Ls = (s = {}) => {
4661
4708
  const { buttonSelector: t = ".c-scroll-to-top" } = s, e = document.querySelector(t), i = e?.querySelector("button");
4662
4709
  if (!e || !i)
4663
4710
  return;
@@ -4679,7 +4726,7 @@ const ts = () => {
4679
4726
  });
4680
4727
  };
4681
4728
  window.addEventListener("scroll", r), i.addEventListener("click", a), r();
4682
- }, as = 500, ls = () => {
4729
+ }, Es = 500, As = () => {
4683
4730
  const s = document.getElementById("mbrs-comments-container"), t = document.querySelector(".c-scroll-to-top-comment");
4684
4731
  if (!s || !t)
4685
4732
  return;
@@ -4695,7 +4742,7 @@ const ts = () => {
4695
4742
  }, o = () => {
4696
4743
  e && (e = !1, window.removeEventListener("scroll", i), t.style.display = "none");
4697
4744
  }, r = (u) => {
4698
- u.offsetHeight > as ? n() : o();
4745
+ u.offsetHeight > Es ? n() : o();
4699
4746
  }, a = (u) => {
4700
4747
  new ResizeObserver(() => {
4701
4748
  r(u);
@@ -4732,7 +4779,7 @@ const ts = () => {
4732
4779
  ) && h.disconnect();
4733
4780
  });
4734
4781
  h.observe(s, { childList: !0, subtree: !0 });
4735
- }, cs = "#page-content", Vt = "#text-tooltip", ds = ".mbrs-social-report-container", jt = "c-text-tooltip--show", hs = [
4782
+ }, Cs = "#page-content", ee = "#text-tooltip", xs = ".mbrs-social-report-container", ie = "c-text-tooltip--show", Ts = [
4736
4783
  "#page-content .c-content",
4737
4784
  "#page-content .c-content p",
4738
4785
  "#page-content .c-content h2",
@@ -4745,16 +4792,16 @@ const ts = () => {
4745
4792
  "#page-content header span",
4746
4793
  "#page-content header h1",
4747
4794
  "#page-content header h2"
4748
- ], xt = (s) => s instanceof Element ? s : s.parentElement, Pt = (s, t) => s ? t.some((e) => !!s.closest(e)) : !1, us = (s, t) => {
4749
- const e = xt(s.startContainer), i = xt(s.endContainer);
4750
- return Pt(e, t) || Pt(i, t);
4751
- }, ps = (s) => {
4795
+ ], zt = (s) => s instanceof Element ? s : s.parentElement, Ot = (s, t) => s ? t.some((e) => !!s.closest(e)) : !1, Ps = (s, t) => {
4796
+ const e = zt(s.startContainer), i = zt(s.endContainer);
4797
+ return Ot(e, t) || Ot(i, t);
4798
+ }, Is = (s) => {
4752
4799
  if (!s.focusNode)
4753
4800
  return null;
4754
4801
  const t = s.anchorNode?.compareDocumentPosition(s.focusNode);
4755
4802
  return t ? (t & 4) > 0 : s.anchorOffset < s.focusOffset;
4756
- }, ms = (s, t, e) => {
4757
- const i = document.querySelector(Vt), n = document.querySelector(cs), o = document.querySelectorAll(ds);
4803
+ }, Ms = (s, t, e) => {
4804
+ const i = document.querySelector(ee), n = document.querySelector(Cs), o = document.querySelectorAll(xs);
4758
4805
  if (!i || !n) {
4759
4806
  console.warn("Text tooltip : Tooltip or page content are not found in the DOM");
4760
4807
  return;
@@ -4764,7 +4811,7 @@ const ts = () => {
4764
4811
  });
4765
4812
  const r = s.getClientRects(), a = r[t ? r.length - 1 : 0];
4766
4813
  if (!a) {
4767
- Q();
4814
+ it();
4768
4815
  return;
4769
4816
  }
4770
4817
  i.style.position = "fixed", i.style.zIndex = "100";
@@ -4772,68 +4819,48 @@ const ts = () => {
4772
4819
  i.style.top = `${Math.max(l, c)}px`, i.style.left = `${Math.min(
4773
4820
  Math.max(l, d),
4774
4821
  window.innerWidth - i.offsetWidth - l
4775
- )}px`, i.classList.add(jt);
4776
- }, Q = () => {
4777
- const s = document.querySelector(`${Vt}`);
4778
- s && s.classList.remove(jt);
4779
- }, fs = () => {
4822
+ )}px`, i.classList.add(ie);
4823
+ }, it = () => {
4824
+ const s = document.querySelector(`${ee}`);
4825
+ s && s.classList.remove(ie);
4826
+ }, zs = () => {
4780
4827
  const s = window.getSelection();
4781
4828
  if (!s?.rangeCount) {
4782
- Q();
4829
+ it();
4783
4830
  return;
4784
4831
  }
4785
4832
  const t = s.getRangeAt(0), e = s.toString().trim();
4786
4833
  if (e.length) {
4787
- const i = us(t, hs), n = ps(s) || !1;
4788
- i && ms(t, n, e);
4834
+ const i = Ps(t, Ts), n = Is(s) || !1;
4835
+ i && Ms(t, n, e);
4789
4836
  return;
4790
4837
  }
4791
- Q();
4792
- }, X = ({ type: s }) => {
4838
+ it();
4839
+ }, Q = ({ type: s }) => {
4793
4840
  if (s === "selectionchange") {
4794
- window.getSelection()?.toString().trim().length || Q();
4841
+ window.getSelection()?.toString().trim().length || it();
4795
4842
  return;
4796
4843
  }
4797
- fs();
4798
- }, gs = () => {
4844
+ zs();
4845
+ }, Os = () => {
4799
4846
  if (!window?.getSelection) {
4800
4847
  console.warn("Selection API isn't supported");
4801
4848
  return;
4802
4849
  }
4803
- document.addEventListener("mouseup", X), document.addEventListener("selectionchange", X), document.addEventListener("touchend", X), document.addEventListener("touchcancel", X);
4804
- }, vs = "[data-social-bar-action-row]", lt = 'button, a[href], [role="button"], [data-a11y-dialog-show], [data-a11y-dialog-hide], [data-event-name], .js-mobile-share-button';
4805
- let Tt = !1;
4806
- const Gt = (s) => {
4807
- s.querySelector(lt)?.click();
4808
- }, Ut = (s) => s instanceof HTMLElement ? s.closest(vs) : null, ys = (s) => {
4809
- const t = Ut(s.target);
4810
- if (!t)
4811
- return;
4812
- const i = s.target.closest(lt);
4813
- i && i !== t || Gt(t);
4814
- }, _s = (s) => {
4815
- if (s.key !== "Enter" && s.key !== " ")
4816
- return;
4817
- const t = s.target, e = Ut(t);
4818
- if (!e || !(t instanceof HTMLElement))
4819
- return;
4820
- const i = t.closest(lt);
4821
- i && i !== e || (s.key === " " && s.preventDefault(), Gt(e));
4822
- }, ws = () => {
4823
- Tt || (document.addEventListener("click", ys), document.addEventListener("keydown", _s), Tt = !0);
4824
- }, bs = (s) => {
4850
+ document.addEventListener("mouseup", Q), document.addEventListener("selectionchange", Q), document.addEventListener("touchend", Q), document.addEventListener("touchcancel", Q);
4851
+ }, Ds = (s) => {
4825
4852
  const { target: t } = s;
4826
4853
  if (t instanceof Element) {
4827
4854
  const e = t.closest(".c-search-form--button");
4828
4855
  e && (s.preventDefault(), e.classList.remove("c-search-form--button"));
4829
4856
  }
4830
- }, Ss = (s = document.querySelector(
4857
+ }, $s = (s = document.querySelector(
4831
4858
  ".c-search-form--button"
4832
4859
  )) => {
4833
4860
  s && s.addEventListener("click", (t) => {
4834
- bs(t);
4861
+ Ds(t);
4835
4862
  });
4836
- }, Ls = ({
4863
+ }, Rs = ({
4837
4864
  tabsContainerElement: s,
4838
4865
  event: t
4839
4866
  }) => {
@@ -4849,38 +4876,38 @@ const Gt = (s) => {
4849
4876
  }), n.forEach((a) => {
4850
4877
  a.setAttribute("aria-hidden", "true");
4851
4878
  }), e.setAttribute("aria-selected", "true"), r && r.removeAttribute("aria-hidden");
4852
- }, It = (s) => s.code === "ArrowLeft" || s.keyCode === 39, Mt = (s) => s.code === "ArrowRight" || s.keyCode === 37, Es = (s = document.querySelectorAll(
4879
+ }, Dt = (s) => s.code === "ArrowLeft" || s.keyCode === 39, $t = (s) => s.code === "ArrowRight" || s.keyCode === 37, Bs = (s = document.querySelectorAll(
4853
4880
  ".js-tabs"
4854
4881
  )) => {
4855
4882
  s.length > 0 && s.forEach((t) => {
4856
4883
  const e = t.querySelectorAll('[role="tab"]');
4857
4884
  e.forEach((n) => {
4858
4885
  n.addEventListener("click", (o) => {
4859
- Ls({ tabsContainerElement: t, event: o });
4886
+ Rs({ tabsContainerElement: t, event: o });
4860
4887
  });
4861
4888
  });
4862
4889
  const i = t.querySelector('[role="tablist"]');
4863
4890
  if (i && e.length > 0) {
4864
4891
  let n = 0;
4865
4892
  i.addEventListener("keydown", (o) => {
4866
- o instanceof KeyboardEvent && (It(o) || Mt(o)) && (e[n].setAttribute("tabindex", "-1"), It(o) ? (n += 1, n >= e.length && (n = 0)) : Mt(o) && (n -= 1, n < 0 && (n = e.length - 1)), e[n].setAttribute("tabindex", "0"), e[n].focus());
4893
+ 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());
4867
4894
  });
4868
4895
  }
4869
4896
  });
4870
- }, tt = (s) => {
4897
+ }, st = (s) => {
4871
4898
  const [t, e] = s.split("h").map(Number);
4872
4899
  return t * 60 + e;
4873
- }, Kt = () => {
4900
+ }, se = () => {
4874
4901
  const s = /* @__PURE__ */ new Date(), t = s.getHours(), e = s.getMinutes();
4875
4902
  return t * 60 + e;
4876
- }, As = (s, t) => {
4877
- const e = Kt();
4903
+ }, Fs = (s, t) => {
4904
+ const e = se();
4878
4905
  if (e < s || e > t)
4879
4906
  return 0;
4880
4907
  const i = t - s;
4881
4908
  return (e - s) / i;
4882
- }, Cs = (s) => {
4883
- const t = Kt();
4909
+ }, ks = (s) => {
4910
+ const t = se();
4884
4911
  let e = null, i = null, n = -1;
4885
4912
  return Array.from(s).find((o, r, a) => {
4886
4913
  if (r === a.length - 1)
@@ -4888,17 +4915,17 @@ const Gt = (s) => {
4888
4915
  const l = o.textContent, c = a[r + 1].textContent;
4889
4916
  if (!l || !c)
4890
4917
  return !1;
4891
- const d = tt(l), h = tt(c);
4918
+ const d = st(l), h = st(c);
4892
4919
  return t >= d && t < h ? (e = l, i = c, n = r, !0) : !1;
4893
4920
  }), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n };
4894
- }, xs = () => {
4921
+ }, Zs = () => {
4895
4922
  const s = document.querySelectorAll(".c-timeline__time");
4896
4923
  if (!s || s.length < 2)
4897
4924
  return;
4898
- const t = document.querySelector(".c-timeline__progress-bar"), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n } = Cs(s);
4925
+ const t = document.querySelector(".c-timeline__progress-bar"), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n } = ks(s);
4899
4926
  if (!e || !i)
4900
4927
  return;
4901
- const o = tt(e), r = tt(i), a = As(o, r);
4928
+ const o = st(e), r = st(i), a = Fs(o, r);
4902
4929
  if (t instanceof HTMLElement) {
4903
4930
  if (t.classList.contains("c-timeline__progress-bar--is-desktop") && s.length >= 5) {
4904
4931
  const l = "172px / 2";
@@ -4937,25 +4964,25 @@ const Gt = (s) => {
4937
4964
  }
4938
4965
  }
4939
4966
  }
4940
- }, ot = "c-icon-item__container--is-highlighted", Ps = (s) => {
4967
+ }, lt = "c-icon-item__container--is-highlighted", qs = (s) => {
4941
4968
  s.find(
4942
- (e) => e.classList.contains(ot)
4943
- )?.classList.remove(ot);
4944
- }, Ts = () => {
4969
+ (e) => e.classList.contains(lt)
4970
+ )?.classList.remove(lt);
4971
+ }, Ns = () => {
4945
4972
  const s = document.querySelector(".c-toolbar");
4946
4973
  if (s) {
4947
4974
  const t = window.location.origin + window.location.pathname, e = Array.from(s.querySelectorAll(".c-icon-item__container"));
4948
- Ps(e), e.find(
4975
+ qs(e), e.find(
4949
4976
  (n) => n.querySelector("a")?.getAttribute("href") === t
4950
- )?.classList.add(ot);
4977
+ )?.classList.add(lt);
4951
4978
  }
4952
- }, Is = 12, ct = (s) => {
4979
+ }, Hs = 12, pt = (s) => {
4953
4980
  const t = s || document.querySelector(".c-map-towns");
4954
4981
  if (!t) {
4955
4982
  new MutationObserver((o, r) => {
4956
4983
  if (typeof document < "u") {
4957
4984
  const a = document.querySelector(".c-map-towns");
4958
- a && (r.disconnect(), ct(a));
4985
+ a && (r.disconnect(), pt(a));
4959
4986
  }
4960
4987
  }).observe(document.body, { childList: !0, subtree: !0 });
4961
4988
  return;
@@ -4979,13 +5006,13 @@ const Gt = (s) => {
4979
5006
  "transform",
4980
5007
  `translate(${f + p / 2}, ${m + y / 2})${C}`
4981
5008
  );
4982
- const g = d.getBBox(), _ = 8, E = 4, B = 8, L = g.width + _, b = g.height + E;
4983
- h.setAttribute("width", `${L}`), h.setAttribute("height", `${b}`), h.setAttribute("x", `${-L / 2}`), h.setAttribute("y", `${-b - B}`);
4984
- const A = -b / 2 - B;
5009
+ const g = d.getBBox(), _ = 8, E = 4, F = 8, L = g.width + _, b = g.height + E;
5010
+ h.setAttribute("width", `${L}`), h.setAttribute("height", `${b}`), h.setAttribute("x", `${-L / 2}`), h.setAttribute("y", `${-b - F}`);
5011
+ const A = -b / 2 - F;
4985
5012
  d.setAttribute("y", `${A}`), l.setAttribute("aria-hidden", "false");
4986
5013
  } else
4987
5014
  a = !1;
4988
- }), !a && r < Is && requestAnimationFrame(() => o(r + 1));
5015
+ }), !a && r < Hs && requestAnimationFrame(() => o(r + 1));
4989
5016
  };
4990
5017
  return requestAnimationFrame(() => o()), !0;
4991
5018
  };
@@ -4997,7 +5024,7 @@ const Gt = (s) => {
4997
5024
  childList: !0,
4998
5025
  subtree: !0
4999
5026
  });
5000
- }, Ms = {
5027
+ }, Ws = {
5001
5028
  10: [{ id: "10387", name: "Troyes" }, { id: "10323", name: "Romilly-sur-Seine" }, { id: "10033", name: "Bar-sur-Aube" }],
5002
5029
  11: [{ id: "11262", name: "Narbonne" }, { id: "11069", name: "Carcassonne" }, { id: "11076", name: "Castelnaudary" }],
5003
5030
  12: [{ id: "12202", name: "Rodez" }, { id: "12145", name: "Millau" }, { id: "12300", name: "Villefranche-de-Rouergue" }],
@@ -5098,14 +5125,14 @@ const Gt = (s) => {
5098
5125
  "07": [{ id: "07010", name: "Annonay" }, { id: "07019", name: "Aubenas" }, { id: "07324", name: "Tournon-sur-Rhône" }],
5099
5126
  "05": [{ id: "05061", name: "Gap" }, { id: "05023", name: "Briançon" }, { id: "05046", name: "Embrun" }],
5100
5127
  "08": [{ id: "08105", name: "Charleville-Mézières" }, { id: "08362", name: "Rethel" }, { id: "08190", name: "Givet" }]
5101
- }, zs = /<path\b([^>]*?)\/>/g, Os = /\b([:\w-]+)="([^"]*)"/g, Ds = (s) => {
5128
+ }, Vs = /<path\b([^>]*?)\/>/g, js = /\b([:\w-]+)="([^"]*)"/g, Gs = (s) => {
5102
5129
  const t = [];
5103
- for (const e of s.matchAll(zs)) {
5130
+ for (const e of s.matchAll(Vs)) {
5104
5131
  const i = e[1];
5105
5132
  if (!i)
5106
5133
  continue;
5107
5134
  const n = /* @__PURE__ */ new Map();
5108
- for (const c of i.matchAll(Os)) {
5135
+ for (const c of i.matchAll(js)) {
5109
5136
  const [, d, h] = c;
5110
5137
  d && n.set(d, h || "");
5111
5138
  }
@@ -5118,11 +5145,9 @@ const Gt = (s) => {
5118
5145
  });
5119
5146
  }
5120
5147
  return t;
5121
- }, Rs = (s) => new Map(s.map((t) => [t.id, t]));
5122
- var Xt = /* @__PURE__ */ ((s) => (s.MOBILE = "mobile", s.DESKTOP = "desktop", s))(Xt || {});
5123
- const Y = (s) => {
5148
+ }, Us = (s) => new Map(s.map((t) => [t.id, t])), tt = (s) => {
5124
5149
  window.location.href = s;
5125
- }, $s = (s, t, e) => {
5150
+ }, Ks = (s, t, e) => {
5126
5151
  const i = e.get(s);
5127
5152
  if (i)
5128
5153
  return i;
@@ -5137,7 +5162,7 @@ const Y = (s) => {
5137
5162
  (o) => o.id.startsWith(`town-${s}`)
5138
5163
  );
5139
5164
  return e.set(s, n), n;
5140
- }, Bs = (s, t) => t.get(s), Fs = (s) => {
5165
+ }, Xs = (s, t) => t.get(s), Ys = (s) => {
5141
5166
  if (s.size > 0)
5142
5167
  return;
5143
5168
  document.querySelectorAll(
@@ -5149,13 +5174,13 @@ const Y = (s) => {
5149
5174
  Array.from(e.classList).filter((n) => n.startsWith("c-map-towns__path--"))
5150
5175
  );
5151
5176
  });
5152
- }, ks = (s, t) => {
5177
+ }, Js = (s, t) => {
5153
5178
  const e = s.id, i = s.url, n = s.name;
5154
5179
  if (!e || !i)
5155
5180
  return null;
5156
5181
  const o = document.createElementNS("http://www.w3.org/2000/svg", "path");
5157
5182
  o.setAttribute("d", s.path), o.setAttribute("class", "c-map-towns__path c-map-towns__zoom-town"), o.setAttribute("data-url", i);
5158
- const r = Bs(e, t);
5183
+ const r = Xs(e, t);
5159
5184
  if (r && r.forEach((a) => {
5160
5185
  o.classList.add(a);
5161
5186
  }), n) {
@@ -5163,15 +5188,15 @@ const Y = (s) => {
5163
5188
  a.textContent = n, o.appendChild(a);
5164
5189
  }
5165
5190
  return o;
5166
- }, Zs = (s, t) => {
5191
+ }, Qs = (s, t) => {
5167
5192
  const e = document.createDocumentFragment();
5168
5193
  return s.forEach((i) => {
5169
- const n = ks(i, t);
5194
+ const n = Js(i, t);
5170
5195
  n && e.appendChild(n);
5171
5196
  }), e;
5172
- }, Ns = (s, t) => {
5197
+ }, tn = (s, t) => {
5173
5198
  s.replaceChildren(t);
5174
- }, qs = (s, t, e) => {
5199
+ }, en = (s, t, e) => {
5175
5200
  const i = document.createElementNS("http://www.w3.org/2000/svg", "g");
5176
5201
  i.setAttribute("class", "js-city-marker c-map-towns__city-marker"), i.setAttribute("aria-hidden", "true"), i.setAttribute("data-scale", e.toString());
5177
5202
  const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
@@ -5182,7 +5207,7 @@ const Y = (s) => {
5182
5207
  r.setAttribute("class", "js-city-bg"), r.setAttribute("fill", "white"), r.setAttribute("rx", "4"), r.setAttribute("ry", "4");
5183
5208
  const a = document.createElementNS("http://www.w3.org/2000/svg", "text");
5184
5209
  return a.setAttribute("class", "js-city-text c-map-towns__city-text"), a.textContent = s, i.appendChild(n), i.appendChild(o), i.appendChild(r), i.appendChild(a), i;
5185
- }, Hs = (s, t) => {
5210
+ }, sn = (s, t) => {
5186
5211
  const e = t.getBBox(), i = 5, n = e.width + i * 2, o = e.height + i * 2;
5187
5212
  s.setAttribute(
5188
5213
  "viewBox",
@@ -5191,66 +5216,66 @@ const Y = (s) => {
5191
5216
  const r = s.clientWidth || 800, a = s.clientHeight || 600;
5192
5217
  return Math.max(n / r, o / a);
5193
5218
  };
5194
- let et = !1;
5195
- const rt = () => {
5196
- if (et)
5219
+ let nt = !1;
5220
+ const ct = () => {
5221
+ if (nt)
5197
5222
  return;
5198
5223
  if (!document.querySelector(".c-map-towns")) {
5199
5224
  new MutationObserver((b, A) => {
5200
- typeof document < "u" && document.querySelector(".c-map-towns") && (A.disconnect(), rt());
5225
+ typeof document < "u" && document.querySelector(".c-map-towns") && (A.disconnect(), ct());
5201
5226
  }).observe(document.body, { childList: !0, subtree: !0 });
5202
5227
  return;
5203
5228
  }
5204
- const t = window.layout === Xt.MOBILE, e = document.querySelector(".c-map-towns__map"), i = document.querySelector(".c-map-towns__droms"), n = document.querySelector(".c-map-towns__zooms"), o = (L) => {
5229
+ const t = window.layout === dt.MOBILE, e = document.querySelector(".c-map-towns__map"), i = document.querySelector(".c-map-towns__droms"), n = document.querySelector(".c-map-towns__zooms"), o = (L) => {
5205
5230
  const { target: b } = L;
5206
5231
  if (!(b instanceof Element))
5207
5232
  return;
5208
5233
  const A = b.closest(".js-city-marker");
5209
5234
  if (A) {
5210
- const R = A.getAttribute("data-url");
5211
- R && Y(R);
5235
+ const $ = A.getAttribute("data-url");
5236
+ $ && tt($);
5212
5237
  return;
5213
5238
  }
5214
5239
  const M = b.closest(".c-map-towns__zoom-item")?.getAttribute("data-city-url");
5215
5240
  if (M) {
5216
- Y(M);
5241
+ tt(M);
5217
5242
  return;
5218
5243
  }
5219
5244
  const z = b.closest(".c-map-towns__dept-trigger")?.getAttribute("data-url");
5220
- z && Y(z);
5245
+ z && tt(z);
5221
5246
  };
5222
5247
  if (t) {
5223
- e?.addEventListener("click", o), i?.addEventListener("click", o), n?.addEventListener("click", o), et = !0;
5248
+ e?.addEventListener("click", o), i?.addEventListener("click", o), n?.addEventListener("click", o), nt = !0;
5224
5249
  return;
5225
5250
  }
5226
5251
  const r = document.getElementById("js-zoom-overlay"), a = document.getElementById("js-zoom-svg"), l = document.getElementById("js-zoom-group"), c = document.getElementById("js-zoom-close");
5227
5252
  if (!(r instanceof HTMLElement) || !(a instanceof SVGSVGElement) || !(l instanceof SVGGElement) || !(c instanceof HTMLElement)) {
5228
- requestAnimationFrame(rt);
5253
+ requestAnimationFrame(ct);
5229
5254
  return;
5230
5255
  }
5231
- et = !0;
5256
+ nt = !0;
5232
5257
  const d = document.getElementById("js-zoom-label"), h = document.getElementById("js-zoom-title"), u = document.getElementById("js-town-sprite-data"), f = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map();
5233
5258
  let p = null;
5234
5259
  const y = () => {
5235
5260
  if (p)
5236
5261
  return p;
5237
5262
  const L = u instanceof HTMLScriptElement ? JSON.parse(u.textContent || '""') : "";
5238
- return p = Rs(Ds(L)), p;
5263
+ return p = Us(Gs(L)), p;
5239
5264
  }, w = () => {
5240
5265
  r.setAttribute("aria-hidden", "true"), l.replaceChildren();
5241
5266
  }, C = (L, b) => L.startsWith("97") ? document.querySelector(`path[id="town-${b}-drom"]`)?.getAttribute("d") || null : y().get(`town-${b}`)?.path || null, g = (L, b) => {
5242
- const I = Ms[L] || [];
5267
+ const I = Ws[L] || [];
5243
5268
  if (I.length === 0)
5244
5269
  return;
5245
5270
  const M = document.createDocumentFragment();
5246
- I.forEach((F) => {
5247
- const z = C(L, F.id);
5271
+ I.forEach((k) => {
5272
+ const z = C(L, k.id);
5248
5273
  if (!z)
5249
5274
  return;
5250
- const R = qs(F.name, z, b);
5251
- M.appendChild(R);
5275
+ const $ = en(k.name, z, b);
5276
+ M.appendChild($);
5252
5277
  }), l.appendChild(M), requestAnimationFrame(() => {
5253
- ct(l);
5278
+ pt(l);
5254
5279
  });
5255
5280
  }, _ = (L) => {
5256
5281
  const { target: b } = L;
@@ -5259,34 +5284,34 @@ const rt = () => {
5259
5284
  const A = b?.closest(".c-map-towns__dept-trigger");
5260
5285
  if (!A)
5261
5286
  return;
5262
- const I = A.getAttribute("id")?.replace("out-", "") || "", M = A.getAttribute("data-name"), F = $s(I, y, f);
5263
- Fs(m);
5264
- const z = Zs(F, m);
5287
+ const I = A.getAttribute("id")?.replace("out-", "") || "", M = A.getAttribute("data-name"), k = Ks(I, y, f);
5288
+ Ys(m);
5289
+ const z = Qs(k, m);
5265
5290
  if (d && h && M && (d.textContent = M, h.textContent = `Carte détaillée du département : ${M}`), !(A instanceof SVGGraphicsElement))
5266
5291
  return;
5267
- const R = Hs(a, A);
5268
- r.setAttribute("aria-hidden", "false"), Ns(l, z), g(I, R);
5292
+ const $ = sn(a, A);
5293
+ r.setAttribute("aria-hidden", "false"), tn(l, z), g(I, $);
5269
5294
  }, E = (L) => {
5270
5295
  const { target: b } = L;
5271
5296
  if (!(b instanceof Element))
5272
5297
  return;
5273
5298
  const I = b.closest(".c-map-towns__zoom-town")?.getAttribute("data-url");
5274
- I && Y(I);
5299
+ I && tt(I);
5275
5300
  };
5276
5301
  e?.addEventListener("click", _), i?.addEventListener("click", _), l.addEventListener("click", E), c.addEventListener("click", () => {
5277
5302
  w();
5278
5303
  }), r.addEventListener("click", (L) => {
5279
5304
  L.target === r && w();
5280
5305
  });
5281
- }, Xs = () => {
5282
- we(), Es(), oe(), Ot(), fe(), os(), ts(), ze(), Ss(), ws(), le(), gs(), be(), Se(), Ee(), he(), se(
5306
+ }, dn = () => {
5307
+ Be(), Bs(), Se(), Ht(), ze(), Ss(), vs(), Ke(), we(), $s(), Ae(), Os(), Fe(), ke(), qe(), Te(), de(
5283
5308
  "localisation-input",
5284
5309
  "https://www.20minutes.fr/elections/resultats/recherche",
5285
5310
  "?searchValue=",
5286
5311
  "text",
5287
5312
  "text"
5288
- ), de(), ct(), Ts(), te(), ee(), Ae(), rt(), Fe(), ke(), Le(), Qt(), xs(), rs(), ls(), ss();
5313
+ ), xe(), pt(), Ns(), ae(), le(), Ne(), ct(), ei(), ii(), Ze(), re(), Zs(), Ls(), As(), ws();
5289
5314
  };
5290
5315
  export {
5291
- Xs as initScripts
5316
+ dn as initScripts
5292
5317
  };