@20minutes/hela 2.26.3 → 2.26.5

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.
@@ -1,15 +1,15 @@
1
- const ne = () => /Android/i.test(navigator.userAgent), oe = typeof window < "u" && navigator.userAgent.toLowerCase().includes("firefox"), re = () => {
1
+ const ae = () => /Android/i.test(navigator.userAgent), le = typeof window < "u" && navigator.userAgent.toLowerCase().includes("firefox"), ce = () => {
2
2
  const s = document.getElementById("js-download-band");
3
- s && ne() && s.setAttribute(
3
+ s && ae() && s.setAttribute(
4
4
  "href",
5
5
  "https://app.adjust.com/15shf6wg?campaign=Bandeau_1&deep_link=20minutes%3A%2F%2Fhome"
6
6
  );
7
- }, ae = () => {
7
+ }, de = () => {
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
- }, le = () => {
12
+ }, he = () => {
13
13
  const s = document.querySelector(".c-search-banner");
14
14
  if (!s)
15
15
  return;
@@ -24,7 +24,7 @@ const ne = () => /Android/i.test(navigator.userAgent), oe = 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
- }, ce = [
27
+ }, ue = [
28
28
  {
29
29
  text: "Paris",
30
30
  _index: "town_1717424751904",
@@ -55,7 +55,7 @@ const ne = () => /Android/i.test(navigator.userAgent), oe = typeof window < "u"
55
55
  url: "/elections/resultats/paris/paris-75011"
56
56
  }
57
57
  }
58
- ], de = (s, t, e, i, n, o) => {
58
+ ], pe = (s, t, e, i, n, o) => {
59
59
  const r = document.getElementById(s);
60
60
  if (!r)
61
61
  return;
@@ -64,7 +64,7 @@ const ne = () => /Android/i.test(navigator.userAgent), oe = 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") ? ce : await fetch(`${c}${e}${encodeURIComponent(g)}`).then(
67
+ const _ = a && t.includes("20minutes.fr") ? ue : await fetch(`${c}${e}${encodeURIComponent(g)}`).then(
68
68
  (F) => F.json()
69
69
  ), E = o && typeof _ == "object" && _ !== null ? _[o] : _;
70
70
  return Array.isArray(E) ? E : [];
@@ -99,53 +99,83 @@ const ne = () => /Android/i.test(navigator.userAgent), oe = typeof window < "u"
99
99
  d.childElementCount > 0 && d.classList.remove("u-hidden");
100
100
  });
101
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;
102
+ var ht = /* @__PURE__ */ ((s) => (s.MOBILE = "mobile", s.DESKTOP = "desktop", s))(ht || {});
103
+ const ut = ".js-bottom-sheet", Ft = `${ut}:not([aria-hidden='true'])`, me = ".c-bottom-sheet__panel", kt = ".c-bottom-sheet__handle", Zt = `${kt}[data-a11y-dialog-hide]`, fe = "[data-a11y-dialog-show]", ge = "data-bottom-sheet-anchor", ve = 75, qt = "c-bottom-sheet--dragging";
104
+ let gt = !1, U = null, R = null, pt = 0, K = 0;
105
+ const Nt = (s) => {
106
+ const t = s.getAttribute(ge), e = t ? document.querySelector(t) : null;
107
107
  if (!e)
108
108
  return;
109
109
  const i = Math.max(0, window.innerHeight - e.getBoundingClientRect().top);
110
110
  s.style.setProperty("--modal-bottom-offset", `${i}px`);
111
- }, fe = () => {
112
- document.querySelectorAll(Bt).forEach((s) => {
113
- s instanceof HTMLElement && Zt(s);
111
+ }, ye = () => {
112
+ document.querySelectorAll(Ft).forEach((s) => {
113
+ s instanceof HTMLElement && Nt(s);
114
114
  });
115
- }, qt = () => {
116
- U?.classList.remove(kt), B && (B.style.transform = ""), U = null, B = null, ht = 0, K = 0;
117
- }, ge = (s) => {
115
+ }, Ht = () => {
116
+ U?.classList.remove(qt), R && (R.style.transform = ""), U = null, R = null, pt = 0, K = 0;
117
+ }, _e = (s) => {
118
118
  const t = s.target;
119
119
  if (!(t instanceof HTMLElement))
120
120
  return;
121
- const e = t.closest(Rt);
121
+ const e = t.closest(ut);
122
122
  if (!(e instanceof HTMLElement) || e.getAttribute("aria-hidden") === "true")
123
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 = () => {
124
+ const i = e.querySelector(me);
125
+ i instanceof HTMLElement && (!t.closest(kt) && i.scrollTop > 0 || (U = e, R = i, pt = s.touches[0].clientY, K = 0, e.classList.add(qt)));
126
+ }, we = (s) => {
127
+ R && (K = Math.max(0, s.touches[0].clientY - pt), R.style.transform = `translateY(${K}px)`);
128
+ };
129
+ let ot = !1;
130
+ const Wt = (s) => {
131
+ const t = s.target;
132
+ if (!(t instanceof Element))
133
+ return null;
134
+ const e = t.closest(fe);
135
+ if (!(e instanceof HTMLElement))
136
+ return null;
137
+ const i = e.getAttribute("data-a11y-dialog-show"), n = i ? document.getElementById(i) : null;
138
+ return !(n instanceof HTMLElement) || n.contains(e) ? null : n;
139
+ }, be = (s) => {
140
+ ot = !!Wt(s)?.matches(Ft);
141
+ }, Se = (s) => {
142
+ if (!ot)
143
+ return;
144
+ ot = !1;
145
+ const t = Wt(s);
146
+ if (!(t instanceof HTMLElement))
147
+ return;
148
+ const e = t.querySelector(Zt);
149
+ e instanceof HTMLElement && e.click();
150
+ }, Le = () => {
129
151
  if (U) {
130
- if (K > me) {
131
- const s = U.querySelector(ue);
152
+ if (K > ve) {
153
+ const s = U.querySelector(Zt);
132
154
  s instanceof HTMLElement && s.click();
133
155
  }
134
- qt();
156
+ Ht();
135
157
  }
136
- }, _e = () => {
158
+ }, Ee = (s, t) => {
159
+ const e = s.id;
160
+ e && document.querySelectorAll(`[data-a11y-dialog-show="${e}"]`).forEach((i) => {
161
+ !(i instanceof HTMLElement) || s.contains(i) || i.setAttribute("aria-expanded", t ? "true" : "false");
162
+ });
163
+ }, Ae = () => {
137
164
  new MutationObserver((t) => {
138
165
  t.forEach(({ target: e }) => {
139
- e instanceof HTMLElement && e.matches(Bt) && Zt(e);
166
+ if (!(e instanceof HTMLElement) || !e.matches(ut))
167
+ return;
168
+ const i = e.getAttribute("aria-hidden") !== "true";
169
+ i && Nt(e), Ee(e, i);
140
170
  });
141
171
  }).observe(document.body, {
142
172
  attributes: !0,
143
173
  attributeFilter: ["aria-hidden"],
144
174
  subtree: !0
145
175
  });
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) => {
176
+ }, Ce = () => {
177
+ window.layout === ht.MOBILE && (gt || (document.addEventListener("touchstart", _e, { passive: !0 }), document.addEventListener("touchmove", we, { passive: !0 }), document.addEventListener("touchend", Le), document.addEventListener("touchcancel", Ht), document.addEventListener("mousedown", be), document.addEventListener("click", Se), window.addEventListener("resize", ye), Ae(), gt = !0));
178
+ }, xe = (s) => {
149
179
  s.stopImmediatePropagation(), s.preventDefault();
150
180
  const t = s.currentTarget;
151
181
  if (t instanceof HTMLButtonElement) {
@@ -154,15 +184,15 @@ const Zt = (s) => {
154
184
  );
155
185
  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"));
156
186
  }
157
- }, Se = (s = document.querySelector(
187
+ }, Te = (s = document.querySelector(
158
188
  ".js-collapse__button"
159
189
  )) => {
160
190
  s && document.querySelectorAll(".c-collapse__button").forEach((e) => {
161
191
  e.addEventListener("click", (i) => {
162
- be(i);
192
+ xe(i);
163
193
  });
164
194
  });
165
- }, Le = "[data-countdown][data-countdown-end-date]", Ee = (s) => {
195
+ }, Pe = "[data-countdown][data-countdown-end-date]", Ie = (s) => {
166
196
  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");
167
197
  return !t || !e || !i || !n ? null : {
168
198
  daysElement: t,
@@ -170,35 +200,35 @@ const Zt = (s) => {
170
200
  minutesElement: i,
171
201
  secondsElement: n
172
202
  };
173
- }, ft = (s, t) => {
203
+ }, vt = (s, t) => {
174
204
  const e = s - Date.now();
175
205
  if (e <= 0)
176
206
  return !1;
177
207
  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);
178
208
  return t.daysElement.textContent = i.toString(), t.hoursElement.textContent = n.toString(), t.minutesElement.textContent = o.toString(), t.secondsElement.textContent = r.toString(), !0;
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);
209
+ }, Me = () => {
210
+ document.querySelectorAll(Pe).forEach((t) => {
211
+ const e = t.dataset.countdownEndDate, i = e ? new Date(e).getTime() : Number.NaN, n = Ie(t);
182
212
  if (!n)
183
213
  return;
184
214
  if (Number.isNaN(i)) {
185
215
  t.remove();
186
216
  return;
187
217
  }
188
- if (!ft(i, n)) {
218
+ if (!vt(i, n)) {
189
219
  t.remove();
190
220
  return;
191
221
  }
192
222
  const o = setInterval(() => {
193
- ft(i, n) || (clearInterval(o), t.remove());
223
+ vt(i, n) || (clearInterval(o), t.remove());
194
224
  }, 1e3);
195
225
  });
196
- }, Ce = (s) => {
226
+ }, Oe = (s) => {
197
227
  const t = s.getBBox(), e = t.width / 20;
198
228
  return [t.x - e, t.y - e, t.width + e * 2, t.height + e * 2].join(
199
229
  " "
200
230
  );
201
- }, xe = () => {
231
+ }, ze = () => {
202
232
  const s = document.querySelector(".c-map-districts-container"), t = document.querySelector(".c-map-districts");
203
233
  if (!s || !t)
204
234
  return;
@@ -249,7 +279,7 @@ const Zt = (s) => {
249
279
  );
250
280
  d(
251
281
  y || p,
252
- Ce(y || p)
282
+ Oe(y || p)
253
283
  );
254
284
  }
255
285
  }, u = () => {
@@ -258,7 +288,7 @@ const Zt = (s) => {
258
288
  t.addEventListener("click", u), n && n.addEventListener("click", u), document.querySelectorAll(".c-map-districts__zoomable").forEach((m) => {
259
289
  m.addEventListener("click", (p) => h(p));
260
290
  });
261
- }, Te = () => {
291
+ }, De = () => {
262
292
  const s = document.getElementById("elections-form-search"), t = document.querySelector(".c-search-form__autocomplete");
263
293
  if (!s || !t)
264
294
  return;
@@ -286,59 +316,59 @@ const Zt = (s) => {
286
316
  }), s.addEventListener("focusin", () => {
287
317
  t.childElementCount > 0 && t.classList.remove("u-hidden");
288
318
  });
289
- }, Pe = (s, t) => {
319
+ }, $e = (s, t) => {
290
320
  s.setAttribute("aria-expanded", "true"), s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach((n) => {
291
321
  n.classList.remove(t);
292
322
  });
293
323
  const i = s.querySelector(".js-ellipsis-button__label");
294
324
  i instanceof HTMLSpanElement && (i.innerHTML = "Voir moins");
295
- }, Ie = (s, t) => {
325
+ }, Be = (s, t) => {
296
326
  s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach((n) => {
297
327
  n.classList.add(t);
298
328
  }), s.setAttribute("aria-expanded", "false");
299
329
  const i = s.querySelector(".js-ellipsis-button__label");
300
330
  i instanceof HTMLSpanElement && (i.innerHTML = "Voir plus");
301
- }, Me = (s, t) => {
331
+ }, Re = (s, t) => {
302
332
  const e = s.currentTarget;
303
333
  if (s.preventDefault(), e instanceof HTMLButtonElement) {
304
334
  const i = t ? "u-ellipsis-multiline" : "u-ellipsis";
305
- return e.getAttribute("aria-expanded") === "true" ? Ie(e, i) : Pe(e, i);
335
+ return e.getAttribute("aria-expanded") === "true" ? Be(e, i) : $e(e, i);
306
336
  }
307
337
  return null;
308
- }, ze = (s = document.querySelector(
338
+ }, Fe = (s = document.querySelector(
309
339
  ".js-ellipsis-button"
310
340
  )) => {
311
341
  s && document.querySelectorAll(".js-ellipsis-button").forEach((e) => {
312
342
  const i = e.getAttribute("data-multiple") === "true";
313
- e.addEventListener("click", (n) => Me(n, i));
343
+ e.addEventListener("click", (n) => Re(n, i));
314
344
  });
315
- }, Oe = (s) => {
345
+ }, ke = (s) => {
316
346
  s.setAttribute("aria-expanded", "true"), s.parentNode?.querySelectorAll(".js-expand-target")?.forEach((i) => {
317
347
  i.setAttribute("aria-hidden", "false");
318
348
  });
319
349
  const e = s.querySelector(".js-expand-button__label");
320
350
  e instanceof HTMLSpanElement && (e.innerHTML = "Voir moins");
321
- }, De = (s) => {
351
+ }, Ze = (s) => {
322
352
  s.parentNode?.querySelectorAll(".js-expand-target")?.forEach((i) => {
323
353
  i.setAttribute("aria-hidden", "true");
324
354
  }), s.setAttribute("aria-expanded", "false");
325
355
  const e = s.querySelector(".js-expand-button__label");
326
356
  e instanceof HTMLSpanElement && (e.innerHTML = "Voir plus");
327
- }, $e = (s) => {
357
+ }, qe = (s) => {
328
358
  const t = s.currentTarget;
329
- return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ? De(t) : Oe(t) : null;
330
- }, Re = (s) => {
359
+ return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ? Ze(t) : ke(t) : null;
360
+ }, Ne = (s) => {
331
361
  const t = s.parentNode?.querySelector(".js-expand-target");
332
362
  return !t || t.classList.contains("c-elections-result__members") ? !1 : (t.textContent?.trim().length ?? 0) < 255;
333
- }, Be = (s = document.querySelector(
363
+ }, He = (s = document.querySelector(
334
364
  ".js-expand-button"
335
365
  )) => {
336
366
  s && document.querySelectorAll(".js-expand-button").forEach((e) => {
337
- Re(e) ? (e.style.display = "none", e.parentNode?.querySelectorAll(".js-expand-target")?.forEach((n) => {
367
+ Ne(e) ? (e.style.display = "none", e.parentNode?.querySelectorAll(".js-expand-target")?.forEach((n) => {
338
368
  n.setAttribute("aria-hidden", "false");
339
- })) : e.addEventListener("click", $e);
369
+ })) : e.addEventListener("click", qe);
340
370
  });
341
- }, Nt = (s, t) => {
371
+ }, Vt = (s, t) => {
342
372
  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;
343
373
  if (e && i && n) {
344
374
  const a = new IntersectionObserver(
@@ -352,10 +382,10 @@ const Zt = (s) => {
352
382
  );
353
383
  a.observe(e), a.observe(i);
354
384
  }
355
- }, Fe = () => Nt(".js-close-article-btn", ".js-limit-scroll-close-article-btn"), ke = () => Nt(".js-chatbot-btn", ".js-limit-scroll-chatbot-btn"), Ze = () => {
385
+ }, We = () => Vt(".js-close-article-btn", ".js-limit-scroll-close-article-btn"), Ve = () => Vt(".js-chatbot-btn", ".js-limit-scroll-chatbot-btn"), je = () => {
356
386
  const s = document.querySelector(".js-game-alert");
357
- oe && s && s.classList.remove("u-hidden");
358
- }, qe = () => {
387
+ le && s && s.classList.remove("u-hidden");
388
+ }, Ge = () => {
359
389
  const s = document.querySelectorAll(".js-half-donut-result");
360
390
  for (const t of Array.from(s)) {
361
391
  const e = t.querySelector(".c-half-donut"), i = t.querySelector(".c-legend");
@@ -374,7 +404,7 @@ const Zt = (s) => {
374
404
  });
375
405
  });
376
406
  }
377
- }, Ne = () => {
407
+ }, Ue = () => {
378
408
  const s = document.querySelector(".c-image-slider__container");
379
409
  if (!s)
380
410
  return () => {
@@ -438,18 +468,18 @@ const Zt = (s) => {
438
468
  }), c(!0), h(), () => {
439
469
  u();
440
470
  };
441
- }, He = (s) => {
471
+ }, Ke = (s) => {
442
472
  const t = s.currentTarget, e = t instanceof HTMLElement ? t.nextElementSibling : null;
443
473
  !(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")));
444
- }, gt = /* @__PURE__ */ new WeakSet(), Ht = () => {
474
+ }, yt = /* @__PURE__ */ new WeakSet(), jt = () => {
445
475
  if (typeof document > "u")
446
476
  return;
447
477
  document.querySelectorAll(".js-info-button").forEach((t) => {
448
- !(t instanceof HTMLButtonElement) || gt.has(t) || (gt.add(t), t.addEventListener("click", He));
478
+ !(t instanceof HTMLButtonElement) || yt.has(t) || (yt.add(t), t.addEventListener("click", Ke));
449
479
  });
450
480
  };
451
481
  if (typeof document < "u") {
452
- const s = () => Ht();
482
+ const s = () => jt();
453
483
  document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", s, { once: !0 }) : s();
454
484
  }
455
485
  const v = {
@@ -457,7 +487,7 @@ const v = {
457
487
  negTabIndex: ':not([tabindex^="-"])',
458
488
  disabled: ":not(:disabled)"
459
489
  };
460
- var We = [
490
+ var Xe = [
461
491
  `a[href]${v.inert}${v.negTabIndex}`,
462
492
  `area[href]${v.inert}${v.negTabIndex}`,
463
493
  `input:not([type="hidden"]):not([type="radio"])${v.inert}${v.negTabIndex}${v.disabled}`,
@@ -475,24 +505,24 @@ var We = [
475
505
  `[contenteditable]${v.inert}${v.negTabIndex}`,
476
506
  `[tabindex]${v.inert}${v.negTabIndex}`
477
507
  ];
478
- function vt(s) {
508
+ function _t(s) {
479
509
  (s.querySelector("[autofocus]") || s).focus();
480
510
  }
481
- function Ve(s) {
511
+ function Ye(s) {
482
512
  const t = V(s, !0), e = t ? V(s, !1) || t : null;
483
513
  return [t, e];
484
514
  }
485
515
  function V(s, t) {
486
- if (t && wt(s))
516
+ if (t && St(s))
487
517
  return s;
488
- if (Ge(s))
518
+ if (Qe(s))
489
519
  if (s.shadowRoot) {
490
- let e = yt(s.shadowRoot, t);
520
+ let e = wt(s.shadowRoot, t);
491
521
  for (; e; ) {
492
522
  const i = V(e, t);
493
523
  if (i)
494
524
  return i;
495
- e = _t(e, t);
525
+ e = bt(e, t);
496
526
  }
497
527
  } else if (s.localName === "slot") {
498
528
  const e = s.assignedElements({
@@ -505,51 +535,51 @@ function V(s, t) {
505
535
  return n;
506
536
  }
507
537
  } else {
508
- let e = yt(s, t);
538
+ let e = wt(s, t);
509
539
  for (; e; ) {
510
540
  const i = V(e, t);
511
541
  if (i)
512
542
  return i;
513
- e = _t(e, t);
543
+ e = bt(e, t);
514
544
  }
515
545
  }
516
- return !t && wt(s) ? s : null;
546
+ return !t && St(s) ? s : null;
517
547
  }
518
- function yt(s, t) {
548
+ function wt(s, t) {
519
549
  return t ? s.firstElementChild : s.lastElementChild;
520
550
  }
521
- function _t(s, t) {
551
+ function bt(s, t) {
522
552
  return t ? s.nextElementSibling : s.previousElementSibling;
523
553
  }
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) {
554
+ const Je = (s) => s.matches("details:not([open]) *") && !s.matches("details>summary:first-of-type") ? !0 : !(s.offsetWidth || s.offsetHeight || s.getClientRects().length), St = (s) => s.shadowRoot?.delegatesFocus ? !1 : s.matches(Xe.join(",")) && !Je(s);
555
+ function Qe(s) {
526
556
  return s.shadowRoot && s.getAttribute("tabindex") === "-1" ? !1 : !s.matches(":disabled,[hidden],[inert]");
527
557
  }
528
558
  function j(s = document) {
529
559
  const t = s.activeElement;
530
560
  return t ? t.shadowRoot ? j(t.shadowRoot) || document.activeElement : t : null;
531
561
  }
532
- function Ue(s, t) {
533
- const [e, i] = Ve(s);
562
+ function ti(s, t) {
563
+ const [e, i] = Ye(s);
534
564
  if (!e)
535
565
  return t.preventDefault();
536
566
  const n = j();
537
567
  t.shiftKey && n === e ? (i.focus(), t.preventDefault()) : !t.shiftKey && n === i && (e.focus(), t.preventDefault());
538
568
  }
539
- function R(s, t) {
569
+ function B(s, t) {
540
570
  function e(i) {
541
571
  if (!i || i === document || i === window)
542
572
  return null;
543
- const n = Wt(i);
573
+ const n = Gt(i);
544
574
  return n && (i = n), i.closest(s) || e(i.getRootNode().host);
545
575
  }
546
576
  return e(t);
547
577
  }
548
- function Wt(s) {
549
- return s.assignedSlot || (s.parentNode ? Wt(s.parentNode) : null);
578
+ function Gt(s) {
579
+ return s.assignedSlot || (s.parentNode ? Gt(s.parentNode) : null);
550
580
  }
551
581
  const Z = "data-a11y-dialog";
552
- class Vt {
582
+ class Ut {
553
583
  $el;
554
584
  id;
555
585
  previouslyFocused;
@@ -598,7 +628,7 @@ class Vt {
598
628
  * Returns the instance to allow method chaining.
599
629
  */
600
630
  show(t) {
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);
631
+ 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() : _t(this.$el), document.body.addEventListener("focus", this.maintainFocus, !0), this.$el.addEventListener("keydown", this.bindKeypress, !0), this);
602
632
  }
603
633
  /**
604
634
  * Hide the dialog.
@@ -646,7 +676,7 @@ class Vt {
646
676
  * dialog are clicked, and call `show` or `hide`, respectively
647
677
  */
648
678
  handleTriggerClicks(t) {
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;
679
+ const e = t.composedPath()[0], i = B(`[${Z}-show="${this.id}"]`, e), n = B(`[${Z}-hide="${this.id}"]`, e), o = B(`[${Z}-hide]`, e) && B('[aria-modal="true"]', e) === this.$el;
650
680
  i && this.show(t), (n || o) && this.hide(t);
651
681
  }
652
682
  /**
@@ -654,14 +684,14 @@ class Vt {
654
684
  * (namely ESC and TAB)
655
685
  */
656
686
  bindKeypress(t) {
657
- if (R('[aria-modal="true"]', j()) !== this.$el)
687
+ if (B('[aria-modal="true"]', j()) !== this.$el)
658
688
  return;
659
689
  let e = !1;
660
690
  try {
661
691
  e = !!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open');
662
692
  } catch {
663
693
  }
664
- t.key === "Escape" && this.$el.getAttribute("role") !== "alertdialog" && !e && (t.preventDefault(), this.hide(t)), t.key === "Tab" && Ue(this.$el, t);
694
+ t.key === "Escape" && this.$el.getAttribute("role") !== "alertdialog" && !e && (t.preventDefault(), this.hide(t)), t.key === "Tab" && ti(this.$el, t);
665
695
  }
666
696
  /**
667
697
  * If the dialog is shown and the focus is not within a dialog element (either
@@ -671,18 +701,18 @@ class Vt {
671
701
  */
672
702
  maintainFocus() {
673
703
  const t = j();
674
- R(`[aria-modal="true"], [${Z}-ignore-focus-trap]`, t) || vt(this.$el);
704
+ B(`[aria-modal="true"], [${Z}-ignore-focus-trap]`, t) || _t(this.$el);
675
705
  }
676
706
  }
677
- function bt() {
707
+ function Lt() {
678
708
  for (const s of document.querySelectorAll("[data-a11y-dialog]"))
679
- new Vt(s);
709
+ new Ut(s);
680
710
  }
681
- typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", bt) : bt());
682
- const Ke = () => document.querySelectorAll(".js-modal").forEach((s) => {
711
+ typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", Lt) : Lt());
712
+ const ei = () => document.querySelectorAll(".js-modal").forEach((s) => {
683
713
  if (!(s instanceof HTMLElement))
684
714
  return;
685
- const t = new Vt(s);
715
+ const t = new Ut(s);
686
716
  if (s.id === "dialog-menu") {
687
717
  const e = document.querySelectorAll("button[data-a11y-dialog-show='dialog-menu']"), i = document.querySelectorAll("button[data-a11y-dialog-hide='dialog-menu']");
688
718
  e.length > 0 && i.length > 0 && (t.on("show", () => {
@@ -704,27 +734,27 @@ const Ke = () => document.querySelectorAll(".js-modal").forEach((s) => {
704
734
  }).on("hide", () => {
705
735
  document.body.classList.remove("noscroll");
706
736
  });
707
- }), et = "50px", ut = ({
737
+ }), et = "50px", mt = ({
708
738
  navigationContainer: s,
709
739
  navigatedList: t,
710
740
  nextBtn: e,
711
741
  prevBtn: i
712
742
  }) => {
713
743
  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 = ({
744
+ }, ii = ({
715
745
  navigationContainer: s,
716
746
  navigatedList: t,
717
747
  nextBtn: e,
718
748
  prevBtn: i
719
749
  }) => {
720
750
  const n = t.scrollLeft > 0, o = t.scrollLeft + (t.clientWidth + 0.5) < t.scrollWidth;
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({
751
+ 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") && mt({
722
752
  navigationContainer: s,
723
753
  navigatedList: t,
724
754
  nextBtn: e,
725
755
  prevBtn: i
726
756
  });
727
- }, Ye = ({
757
+ }, si = ({
728
758
  navigationContainer: s,
729
759
  navigatedList: t,
730
760
  nextBtn: e,
@@ -769,14 +799,14 @@ const Ke = () => document.querySelectorAll(".js-modal").forEach((s) => {
769
799
  behavior: "smooth"
770
800
  }), e.classList.remove("o-nav-button--visible"), i.classList.add("o-nav-button--visible");
771
801
  }
772
- e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && ut({
802
+ e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && mt({
773
803
  navigationContainer: s,
774
804
  navigatedList: t,
775
805
  nextBtn: e,
776
806
  prevBtn: i
777
807
  });
778
808
  }
779
- }, Je = ({
809
+ }, ni = ({
780
810
  navigationContainer: s,
781
811
  navigatedList: t,
782
812
  nextBtn: e,
@@ -817,26 +847,26 @@ const Ke = () => document.querySelectorAll(".js-modal").forEach((s) => {
817
847
  left: 0,
818
848
  behavior: "smooth"
819
849
  }), i.classList.remove("o-nav-button--visible"), t.clientWidth < t.scrollWidth && e.classList.add("o-nav-button--visible");
820
- e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && ut({
850
+ e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && mt({
821
851
  navigationContainer: s,
822
852
  navigatedList: t,
823
853
  nextBtn: e,
824
854
  prevBtn: i
825
855
  });
826
856
  }
827
- }, Qe = ({
857
+ }, oi = ({
828
858
  navigationContainer: s,
829
859
  navigatedList: t,
830
860
  nextBtn: e,
831
861
  prevBtn: i
832
862
  }) => {
833
- Xe({
863
+ ii({
834
864
  navigationContainer: s,
835
865
  navigatedList: t,
836
866
  nextBtn: e,
837
867
  prevBtn: i
838
868
  });
839
- }, ti = (s) => {
869
+ }, ri = (s) => {
840
870
  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(
841
871
  ".js-navigation-container__list"
842
872
  ), c = s.querySelector(".o-nav-button--next-button"), d = s.querySelector(
@@ -844,7 +874,7 @@ const Ke = () => document.querySelectorAll(".js-modal").forEach((s) => {
844
874
  );
845
875
  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(
846
876
  "click",
847
- Ye.bind(!1, {
877
+ si.bind(!1, {
848
878
  navigationContainer: s,
849
879
  navigatedList: l,
850
880
  nextBtn: c,
@@ -853,7 +883,7 @@ const Ke = () => document.querySelectorAll(".js-modal").forEach((s) => {
853
883
  })
854
884
  ), d.addEventListener(
855
885
  "click",
856
- Je.bind(!1, {
886
+ ni.bind(!1, {
857
887
  navigationContainer: s,
858
888
  navigatedList: l,
859
889
  nextBtn: c,
@@ -877,7 +907,7 @@ const Ke = () => document.querySelectorAll(".js-modal").forEach((s) => {
877
907
  }, 0)), d.click());
878
908
  }, n);
879
909
  }
880
- }, ei = () => {
910
+ }, ai = () => {
881
911
  const s = document.querySelectorAll(".js-navigation-container");
882
912
  Array.from(s).forEach((t) => {
883
913
  const e = t.querySelector(
@@ -887,13 +917,13 @@ const Ke = () => document.querySelectorAll(".js-modal").forEach((s) => {
887
917
  const i = new ResizeObserver((n) => {
888
918
  n.forEach((o) => {
889
919
  const { width: r } = o.contentRect;
890
- r > 0 && (ti(t), i.disconnect());
920
+ r > 0 && (ri(t), i.disconnect());
891
921
  });
892
922
  });
893
923
  i.observe(e);
894
924
  }
895
925
  });
896
- }, ii = () => {
926
+ }, li = () => {
897
927
  const s = document.querySelectorAll(".js-navigation-container");
898
928
  for (const t of Array.from(s))
899
929
  if (t) {
@@ -906,7 +936,7 @@ const Ke = () => document.querySelectorAll(".js-modal").forEach((s) => {
906
936
  );
907
937
  e && i && n && window.addEventListener(
908
938
  "resize",
909
- Qe.bind(!1, {
939
+ oi.bind(!1, {
910
940
  navigationContainer: t,
911
941
  navigatedList: e,
912
942
  nextBtn: i,
@@ -922,10 +952,10 @@ function x(s, t, e) {
922
952
  function S(s, t) {
923
953
  return s.x = t.x, s.y = t.y, t.id !== void 0 && (s.id = t.id), s;
924
954
  }
925
- function jt(s) {
955
+ function Kt(s) {
926
956
  s.x = Math.round(s.x), s.y = Math.round(s.y);
927
957
  }
928
- function ot(s, t) {
958
+ function rt(s, t) {
929
959
  const e = Math.abs(s.x - t.x), i = Math.abs(s.y - t.y);
930
960
  return Math.sqrt(e * e + i * i);
931
961
  }
@@ -942,17 +972,17 @@ function X(s, t, e) {
942
972
  function D(s, t, e, i) {
943
973
  s.style.transform = X(t, e, i);
944
974
  }
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";
975
+ const ci = "cubic-bezier(.4,0,.22,1)";
976
+ function Xt(s, t, e, i) {
977
+ s.style.transition = t ? `${t} ${e}ms ${i || ci}` : "none";
948
978
  }
949
- function rt(s, t, e) {
979
+ function at(s, t, e) {
950
980
  s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
951
981
  }
952
- function ni(s) {
953
- Gt(s);
982
+ function di(s) {
983
+ Xt(s);
954
984
  }
955
- function oi(s) {
985
+ function hi(s) {
956
986
  return "decode" in s ? s.decode().catch(() => {
957
987
  }) : s.complete ? Promise.resolve(s) : new Promise((t, e) => {
958
988
  s.onload = () => t(s), s.onerror = e;
@@ -964,10 +994,10 @@ const T = {
964
994
  LOADED: "loaded",
965
995
  ERROR: "error"
966
996
  };
967
- function ri(s) {
997
+ function ui(s) {
968
998
  return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
969
999
  }
970
- function ai(s, t, e = document) {
1000
+ function pi(s, t, e = document) {
971
1001
  let i = [];
972
1002
  if (s instanceof Element)
973
1003
  i = [s];
@@ -979,19 +1009,19 @@ function ai(s, t, e = document) {
979
1009
  }
980
1010
  return i;
981
1011
  }
982
- function St() {
1012
+ function Et() {
983
1013
  return !!(navigator.vendor && navigator.vendor.match(/apple/i));
984
1014
  }
985
- let Ut = !1;
1015
+ let Yt = !1;
986
1016
  try {
987
1017
  window.addEventListener("test", null, Object.defineProperty({}, "passive", {
988
1018
  get: () => {
989
- Ut = !0;
1019
+ Yt = !0;
990
1020
  }
991
1021
  }));
992
1022
  } catch {
993
1023
  }
994
- class li {
1024
+ class mi {
995
1025
  constructor() {
996
1026
  this._pool = [];
997
1027
  }
@@ -1048,7 +1078,7 @@ class li {
1048
1078
  listener: i,
1049
1079
  passive: n
1050
1080
  }));
1051
- const d = Ut ? {
1081
+ const d = Yt ? {
1052
1082
  passive: n || !1
1053
1083
  } : !1;
1054
1084
  t[a](c, i, d);
@@ -1056,7 +1086,7 @@ class li {
1056
1086
  });
1057
1087
  }
1058
1088
  }
1059
- function Kt(s, t) {
1089
+ function Jt(s, t) {
1060
1090
  if (s.getViewportSizeFn) {
1061
1091
  const e = s.getViewportSizeFn(s, t);
1062
1092
  if (e)
@@ -1083,13 +1113,13 @@ function N(s, t, e, i, n) {
1083
1113
  }
1084
1114
  return Number(o) || 0;
1085
1115
  }
1086
- function Xt(s, t, e, i) {
1116
+ function Qt(s, t, e, i) {
1087
1117
  return {
1088
1118
  x: t.x - N("left", s, t, e, i) - N("right", s, t, e, i),
1089
1119
  y: t.y - N("top", s, t, e, i) - N("bottom", s, t, e, i)
1090
1120
  };
1091
1121
  }
1092
- class ci {
1122
+ class fi {
1093
1123
  /**
1094
1124
  * @param {Slide} slide
1095
1125
  */
@@ -1144,8 +1174,8 @@ class ci {
1144
1174
  return Y(e, this.max[t], this.min[t]);
1145
1175
  }
1146
1176
  }
1147
- const Lt = 4e3;
1148
- let Yt = class {
1177
+ const At = 4e3;
1178
+ let te = class {
1149
1179
  /**
1150
1180
  * @param {PhotoSwipeOptions} options PhotoSwipe options
1151
1181
  * @param {SlideData} itemData Slide data
@@ -1202,7 +1232,7 @@ let Yt = class {
1202
1232
  */
1203
1233
  _getSecondary() {
1204
1234
  let t = this._parseZoomLevelOption("secondary");
1205
- return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > Lt && (t = Lt / this.elementSize.x), t);
1235
+ return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > At && (t = At / this.elementSize.x), t);
1206
1236
  }
1207
1237
  /**
1208
1238
  * Get initial image zoom level.
@@ -1225,7 +1255,7 @@ let Yt = class {
1225
1255
  return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
1226
1256
  }
1227
1257
  };
1228
- class di {
1258
+ class gi {
1229
1259
  /**
1230
1260
  * @param {SlideData} data
1231
1261
  * @param {number} index
@@ -1238,11 +1268,11 @@ class di {
1238
1268
  }, this.pan = {
1239
1269
  x: 0,
1240
1270
  y: 0
1241
- }, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new Yt(i.options, t, e, i), this.pswp.dispatch("gettingData", {
1271
+ }, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new te(i.options, t, e, i), this.pswp.dispatch("gettingData", {
1242
1272
  slide: this,
1243
1273
  data: this.data,
1244
1274
  index: e
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", {
1275
+ }), 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 fi(this), this.prevDisplayedWidth = -1, this.prevDisplayedHeight = -1, this.pswp.dispatch("slideInit", {
1246
1276
  slide: this
1247
1277
  });
1248
1278
  }
@@ -1366,7 +1396,7 @@ class di {
1366
1396
  transitionDuration: i
1367
1397
  }), o.animations.stopAllPan();
1368
1398
  const r = this.currZoomLevel;
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);
1399
+ 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), Kt(this.pan);
1370
1400
  const a = () => {
1371
1401
  this._setResolution(t), this.applyCurrentZoomPan();
1372
1402
  };
@@ -1467,7 +1497,7 @@ class di {
1467
1497
  const {
1468
1498
  pswp: t
1469
1499
  } = this;
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", {
1500
+ S(this.panAreaSize, Qt(t.options, t.viewportSize, this.data, this.index)), this.zoomLevels.update(this.width, this.height, this.panAreaSize), t.dispatch("calcSlideSize", {
1471
1501
  slide: this
1472
1502
  });
1473
1503
  }
@@ -1495,11 +1525,11 @@ class di {
1495
1525
  t !== this.currentResolution && (this.currentResolution = t, this.updateContentSize(), this.pswp.dispatch("resolutionChanged"));
1496
1526
  }
1497
1527
  }
1498
- const hi = 0.35, ui = 0.6, Et = 0.4, At = 0.5;
1499
- function pi(s, t) {
1528
+ const vi = 0.35, yi = 0.6, Ct = 0.4, xt = 0.5;
1529
+ function _i(s, t) {
1500
1530
  return s * t / (1 - t);
1501
1531
  }
1502
- class mi {
1532
+ class wi {
1503
1533
  /**
1504
1534
  * @param {Gestures} gestures
1505
1535
  */
@@ -1525,12 +1555,12 @@ class mi {
1525
1555
  if (!this.pswp.dispatch("verticalDrag", {
1526
1556
  panY: o
1527
1557
  }).defaultPrevented) {
1528
- this._setPanWithFriction("y", o, ui);
1558
+ this._setPanWithFriction("y", o, yi);
1529
1559
  const r = 1 - Math.abs(this._getVerticalDragRatio(n.pan.y));
1530
1560
  this.pswp.applyBgOpacity(r), n.applyCurrentZoomPan();
1531
1561
  }
1532
1562
  } else
1533
- this._panOrMoveMainScroll("x") || (this._panOrMoveMainScroll("y"), n && (jt(n.pan), n.applyCurrentZoomPan()));
1563
+ this._panOrMoveMainScroll("x") || (this._panOrMoveMainScroll("y"), n && (Kt(n.pan), n.applyCurrentZoomPan()));
1534
1564
  }
1535
1565
  end() {
1536
1566
  const {
@@ -1542,7 +1572,7 @@ class mi {
1542
1572
  let n = 0;
1543
1573
  if (this.pswp.animations.stopAll(), e.isShifted()) {
1544
1574
  const r = (e.x - e.getCurrSlideX()) / this.pswp.viewportSize.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);
1575
+ t.x < -xt && r < 0 || t.x < 0.1 && r < -0.5 ? (n = 1, t.x = Math.min(t.x, 0)) : (t.x > xt && r > 0 || t.x > -0.1 && r > 0.5) && (n = -1, t.x = Math.max(t.x, 0)), e.moveIndexBy(n, !0, t.x);
1546
1576
  }
1547
1577
  i && i.currZoomLevel > i.zoomLevels.max || this.gestures.isMultitouch ? this.gestures.zoomLevels.correctZoomPan(!0) : (this._finishPanGestureForAxis("x"), this._finishPanGestureForAxis("y"));
1548
1578
  }
@@ -1561,10 +1591,10 @@ class mi {
1561
1591
  const {
1562
1592
  pan: n,
1563
1593
  bounds: o
1564
- } = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", c = r + pi(e[t], 0.995);
1594
+ } = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", c = r + _i(e[t], 0.995);
1565
1595
  if (a) {
1566
1596
  const m = this._getVerticalDragRatio(r), p = this._getVerticalDragRatio(c);
1567
- if (m < 0 && p < -Et || m > 0 && p > Et) {
1597
+ if (m < 0 && p < -Ct || m > 0 && p > Ct) {
1568
1598
  this.pswp.close();
1569
1599
  return;
1570
1600
  }
@@ -1676,16 +1706,16 @@ class mi {
1676
1706
  } = n;
1677
1707
  if (r.correctPan(t, e) !== e || i) {
1678
1708
  const l = Math.round(e - o[t]);
1679
- o[t] += l * (i || hi);
1709
+ o[t] += l * (i || vi);
1680
1710
  } else
1681
1711
  o[t] = e;
1682
1712
  }
1683
1713
  }
1684
- const fi = 0.05, gi = 0.15;
1685
- function Ct(s, t, e) {
1714
+ const bi = 0.05, Si = 0.15;
1715
+ function Tt(s, t, e) {
1686
1716
  return s.x = (t.x + e.x) / 2, s.y = (t.y + e.y) / 2, s;
1687
1717
  }
1688
- class vi {
1718
+ class Li {
1689
1719
  /**
1690
1720
  * @param {Gestures} gestures
1691
1721
  */
@@ -1722,8 +1752,8 @@ class vi {
1722
1752
  const a = r.zoomLevels.min, l = r.zoomLevels.max;
1723
1753
  if (!r.isZoomable() || o.mainScroll.isShifted())
1724
1754
  return;
1725
- Ct(this._startZoomPoint, e, n), Ct(this._zoomPoint, t, i);
1726
- let c = 1 / ot(e, n) * ot(t, i) * this._startZoomLevel;
1755
+ Tt(this._startZoomPoint, e, n), Tt(this._zoomPoint, t, i);
1756
+ let c = 1 / rt(e, n) * rt(t, i) * this._startZoomLevel;
1727
1757
  if (c > r.zoomLevels.initial + r.zoomLevels.initial / 15 && (this._wasOverFitZoomLevel = !0), c < a)
1728
1758
  if (o.options.pinchToClose && !this._wasOverFitZoomLevel && this._startZoomLevel <= r.zoomLevels.initial) {
1729
1759
  const d = 1 - (a - c) / (a / 1.2);
@@ -1731,8 +1761,8 @@ class vi {
1731
1761
  bgOpacity: d
1732
1762
  }).defaultPrevented || o.applyBgOpacity(d);
1733
1763
  } else
1734
- c = a - (a - c) * gi;
1735
- else c > l && (c = l + (c - l) * fi);
1764
+ c = a - (a - c) * Si;
1765
+ else c > l && (c = l + (c - l) * bi);
1736
1766
  r.pan.x = this._calculatePanForZoomLevel("x", c), r.pan.y = this._calculatePanForZoomLevel("y", c), r.setZoomLevel(c), r.applyCurrentZoomPan();
1737
1767
  }
1738
1768
  end() {
@@ -1816,11 +1846,11 @@ class vi {
1816
1846
  });
1817
1847
  }
1818
1848
  }
1819
- function xt(s) {
1849
+ function Pt(s) {
1820
1850
  return !!/** @type {HTMLElement} */
1821
1851
  s.target.closest(".pswp__container");
1822
1852
  }
1823
- class yi {
1853
+ class Ei {
1824
1854
  /**
1825
1855
  * @param {Gestures} gestures
1826
1856
  */
@@ -1843,14 +1873,14 @@ class yi {
1843
1873
  * @param {PointerEvent} originalEvent
1844
1874
  */
1845
1875
  tap(t, e) {
1846
- xt(e) && this._doClickOrTapAction("tap", t, e);
1876
+ Pt(e) && this._doClickOrTapAction("tap", t, e);
1847
1877
  }
1848
1878
  /**
1849
1879
  * @param {Point} point
1850
1880
  * @param {PointerEvent} originalEvent
1851
1881
  */
1852
1882
  doubleTap(t, e) {
1853
- xt(e) && this._doClickOrTapAction("doubleTap", t, e);
1883
+ Pt(e) && this._doClickOrTapAction("doubleTap", t, e);
1854
1884
  }
1855
1885
  /**
1856
1886
  * @private
@@ -1894,8 +1924,8 @@ class yi {
1894
1924
  }
1895
1925
  }
1896
1926
  }
1897
- const _i = 10, wi = 300, bi = 25;
1898
- class Si {
1927
+ const Ai = 10, Ci = 300, xi = 25;
1928
+ class Ti {
1899
1929
  /**
1900
1930
  * @param {PhotoSwipe} pswp
1901
1931
  */
@@ -1927,7 +1957,7 @@ class Si {
1927
1957
  }, this._intervalP1 = {
1928
1958
  x: 0,
1929
1959
  y: 0
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", () => {
1960
+ }, 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 wi(this), this.zoomLevels = new Li(this), this.tapHandler = new Ei(this), t.on("bindEvents", () => {
1931
1961
  t.events.add(
1932
1962
  t.scrollWrap,
1933
1963
  "click",
@@ -2047,8 +2077,8 @@ class Si {
2047
2077
  this.tapHandler.click(this.startP1, t);
2048
2078
  return;
2049
2079
  }
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(() => {
2080
+ const i = this.pswp.options.doubleTapAction ? Ci : 0;
2081
+ this._tapTimer ? (this._clearTapTimer(), rt(this._lastStartP1, this.startP1) < xi && this.tapHandler.doubleTap(this.startP1, t)) : (S(this._lastStartP1, this.startP1), this._tapTimer = setTimeout(() => {
2052
2082
  this.tapHandler.tap(this.startP1, t), this._clearTapTimer();
2053
2083
  }, i));
2054
2084
  }
@@ -2134,7 +2164,7 @@ class Si {
2134
2164
  const t = Math.abs(this.p1.x - this.startP1.x) - Math.abs(this.p1.y - this.startP1.y);
2135
2165
  if (t !== 0) {
2136
2166
  const e = t > 0 ? "x" : "y";
2137
- Math.abs(this.p1[e] - this.startP1[e]) >= _i && (this.dragAxis = e);
2167
+ Math.abs(this.p1[e] - this.startP1[e]) >= Ai && (this.dragAxis = e);
2138
2168
  }
2139
2169
  }
2140
2170
  }
@@ -2158,8 +2188,8 @@ class Si {
2158
2188
  this.pswp.mainScroll.isShifted() && (t.preventDefault(), t.stopPropagation());
2159
2189
  }
2160
2190
  }
2161
- const Li = 0.35;
2162
- class Ei {
2191
+ const Pi = 0.35;
2192
+ class Ii {
2163
2193
  /**
2164
2194
  * @param {PhotoSwipe} pswp
2165
2195
  */
@@ -2312,7 +2342,7 @@ class Ei {
2312
2342
  let i = (this.slideWidth * this._currPositionIndex - t) / this.slideWidth;
2313
2343
  i += this.pswp.currIndex;
2314
2344
  const n = Math.round(t - this.x);
2315
- (i < 0 && n > 0 || i >= this.pswp.getNumItems() - 1 && n < 0) && (t = this.x + n * Li);
2345
+ (i < 0 && n > 0 || i >= this.pswp.getNumItems() - 1 && n < 0) && (t = this.x + n * Pi);
2316
2346
  }
2317
2347
  this.x = t, this.pswp.container && D(this.pswp.container, t), this.pswp.dispatch("moveMainScroll", {
2318
2348
  x: t,
@@ -2320,7 +2350,7 @@ class Ei {
2320
2350
  });
2321
2351
  }
2322
2352
  }
2323
- const Ai = {
2353
+ const Mi = {
2324
2354
  Escape: 27,
2325
2355
  z: 90,
2326
2356
  ArrowLeft: 37,
@@ -2328,8 +2358,8 @@ const Ai = {
2328
2358
  ArrowRight: 39,
2329
2359
  ArrowDown: 40,
2330
2360
  Tab: 9
2331
- }, O = (s, t) => t ? s : Ai[s];
2332
- class Ci {
2361
+ }, z = (s, t) => t ? s : Mi[s];
2362
+ class Oi {
2333
2363
  /**
2334
2364
  * @param {PhotoSwipe} pswp
2335
2365
  */
@@ -2369,30 +2399,30 @@ class Ci {
2369
2399
  } = this;
2370
2400
  if (e.dispatch("keydown", {
2371
2401
  originalEvent: t
2372
- }).defaultPrevented || ri(t))
2402
+ }).defaultPrevented || ui(t))
2373
2403
  return;
2374
2404
  let i, n, o = !1;
2375
2405
  const r = "key" in t;
2376
2406
  switch (r ? t.key : t.keyCode) {
2377
- case O("Escape", r):
2407
+ case z("Escape", r):
2378
2408
  e.options.escKey && (i = "close");
2379
2409
  break;
2380
- case O("z", r):
2410
+ case z("z", r):
2381
2411
  i = "toggleZoom";
2382
2412
  break;
2383
- case O("ArrowLeft", r):
2413
+ case z("ArrowLeft", r):
2384
2414
  n = "x";
2385
2415
  break;
2386
- case O("ArrowUp", r):
2416
+ case z("ArrowUp", r):
2387
2417
  n = "y";
2388
2418
  break;
2389
- case O("ArrowRight", r):
2419
+ case z("ArrowRight", r):
2390
2420
  n = "x", o = !0;
2391
2421
  break;
2392
- case O("ArrowDown", r):
2422
+ case z("ArrowDown", r):
2393
2423
  o = !0, n = "y";
2394
2424
  break;
2395
- case O("Tab", r):
2425
+ case z("Tab", r):
2396
2426
  this._focusRoot();
2397
2427
  break;
2398
2428
  }
@@ -2421,8 +2451,8 @@ class Ci {
2421
2451
  ) && e.focus();
2422
2452
  }
2423
2453
  }
2424
- const xi = "cubic-bezier(.4,0,.22,1)";
2425
- class Ti {
2454
+ const zi = "cubic-bezier(.4,0,.22,1)";
2455
+ class Di {
2426
2456
  /**
2427
2457
  * onComplete can be unpredictable, be careful about current state
2428
2458
  *
@@ -2438,12 +2468,12 @@ class Ti {
2438
2468
  onFinish: r = () => {
2439
2469
  },
2440
2470
  duration: a = 333,
2441
- easing: l = xi
2471
+ easing: l = zi
2442
2472
  } = t;
2443
2473
  this.onFinish = r;
2444
2474
  const c = o ? "transform" : "opacity", d = (e = t[c]) !== null && e !== void 0 ? e : "";
2445
2475
  this._target = i, this._onComplete = n, this._finished = !1, this._onTransitionEnd = this._onTransitionEnd.bind(this), this._helperTimeout = setTimeout(() => {
2446
- Gt(i, c, a, l), this._helperTimeout = setTimeout(() => {
2476
+ Xt(i, c, a, l), this._helperTimeout = setTimeout(() => {
2447
2477
  i.addEventListener("transitionend", this._onTransitionEnd, !1), i.addEventListener("transitioncancel", this._onTransitionEnd, !1), this._helperTimeout = setTimeout(() => {
2448
2478
  this._finalizeAnimation();
2449
2479
  }, a + 500), i.style[c] = d;
@@ -2465,11 +2495,11 @@ class Ti {
2465
2495
  }
2466
2496
  // Destroy is called automatically onFinish
2467
2497
  destroy() {
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();
2498
+ this._helperTimeout && clearTimeout(this._helperTimeout), di(this._target), this._target.removeEventListener("transitionend", this._onTransitionEnd, !1), this._target.removeEventListener("transitioncancel", this._onTransitionEnd, !1), this._finished || this._finalizeAnimation();
2469
2499
  }
2470
2500
  }
2471
- const Pi = 12, Ii = 0.75;
2472
- class Mi {
2501
+ const $i = 12, Bi = 0.75;
2502
+ class Ri {
2473
2503
  /**
2474
2504
  * @param {number} initialVelocity Initial velocity, px per ms.
2475
2505
  *
@@ -2486,7 +2516,7 @@ class Mi {
2486
2516
  * Recommended value from 10 to 50
2487
2517
  */
2488
2518
  constructor(t, e, i) {
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));
2519
+ this.velocity = t * 1e3, this._dampingRatio = e || Bi, this._naturalFrequency = i || $i, this._dampedFrequency = this._naturalFrequency, this._dampingRatio < 1 && (this._dampedFrequency *= Math.sqrt(1 - this._dampingRatio * this._dampingRatio));
2490
2520
  }
2491
2521
  /**
2492
2522
  * @param {number} deltaPosition Difference between current and end position of the animation
@@ -2508,7 +2538,7 @@ class Mi {
2508
2538
  return i;
2509
2539
  }
2510
2540
  }
2511
- class zi {
2541
+ class Fi {
2512
2542
  /**
2513
2543
  * @param {SpringAnimationProps} props
2514
2544
  */
@@ -2526,7 +2556,7 @@ class zi {
2526
2556
  naturalFrequency: c
2527
2557
  } = t;
2528
2558
  this.onFinish = a;
2529
- const d = new Mi(n, l, c);
2559
+ const d = new Ri(n, l, c);
2530
2560
  let h = Date.now(), u = e - i;
2531
2561
  const f = () => {
2532
2562
  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)));
@@ -2538,7 +2568,7 @@ class zi {
2538
2568
  this._raf >= 0 && cancelAnimationFrame(this._raf), this._raf = 0;
2539
2569
  }
2540
2570
  }
2541
- class Oi {
2571
+ class ki {
2542
2572
  constructor() {
2543
2573
  this.activeAnimations = [];
2544
2574
  }
@@ -2561,10 +2591,10 @@ class Oi {
2561
2591
  * @returns {Animation}
2562
2592
  */
2563
2593
  _start(t, e) {
2564
- const i = e ? new zi(
2594
+ const i = e ? new Fi(
2565
2595
  /** @type SpringAnimationProps */
2566
2596
  t
2567
- ) : new Ti(
2597
+ ) : new Di(
2568
2598
  /** @type CssAnimationProps */
2569
2599
  t
2570
2600
  );
@@ -2607,7 +2637,7 @@ class Oi {
2607
2637
  return this.activeAnimations.some((t) => t.props.isPan);
2608
2638
  }
2609
2639
  }
2610
- class Di {
2640
+ class Zi {
2611
2641
  /**
2612
2642
  * @param {PhotoSwipe} pswp
2613
2643
  */
@@ -2649,7 +2679,7 @@ class Di {
2649
2679
  e.isPannable() && (t.deltaMode === 1 && (i *= 18, n *= 18), e.panTo(e.pan.x - i, e.pan.y - n));
2650
2680
  }
2651
2681
  }
2652
- function $i(s) {
2682
+ function qi(s) {
2653
2683
  if (typeof s == "string")
2654
2684
  return s;
2655
2685
  if (!s || !s.isCustomSVG)
@@ -2661,7 +2691,7 @@ function $i(s) {
2661
2691
  t.size || 32
2662
2692
  ), t.outlineID && (e += '<use class="pswp__icn-shadow" xlink:href="#' + t.outlineID + '"/>'), e += t.inner, e += "</svg>", e;
2663
2693
  }
2664
- class Ri {
2694
+ class Ni {
2665
2695
  /**
2666
2696
  * @param {PhotoSwipe} pswp
2667
2697
  * @param {UIElementData} data
@@ -2693,7 +2723,7 @@ class Ri {
2693
2723
  const f = u || h;
2694
2724
  f && l.setAttribute("aria-label", f);
2695
2725
  }
2696
- l.innerHTML = $i(o), e.onInit && e.onInit(l, t), e.onClick && (l.onclick = (h) => {
2726
+ l.innerHTML = qi(o), e.onInit && e.onInit(l, t), e.onClick && (l.onclick = (h) => {
2697
2727
  typeof e.onClick == "string" ? t[e.onClick]() : typeof e.onClick == "function" && e.onClick(h, l, t);
2698
2728
  });
2699
2729
  const c = e.appendTo || "bar";
@@ -2701,12 +2731,12 @@ class Ri {
2701
2731
  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));
2702
2732
  }
2703
2733
  }
2704
- function Jt(s, t, e) {
2734
+ function ee(s, t, e) {
2705
2735
  s.classList.add("pswp__button--arrow"), s.setAttribute("aria-controls", "pswp__items"), t.on("change", () => {
2706
2736
  t.options.loop || (e ? s.disabled = !(t.currIndex < t.getNumItems() - 1) : s.disabled = !(t.currIndex > 0));
2707
2737
  });
2708
2738
  }
2709
- const Bi = {
2739
+ const Hi = {
2710
2740
  name: "arrowPrev",
2711
2741
  className: "pswp__button--arrow--prev",
2712
2742
  title: "Previous",
@@ -2720,8 +2750,8 @@ const Bi = {
2720
2750
  outlineID: "pswp__icn-arrow"
2721
2751
  },
2722
2752
  onClick: "prev",
2723
- onInit: Jt
2724
- }, Fi = {
2753
+ onInit: ee
2754
+ }, Wi = {
2725
2755
  name: "arrowNext",
2726
2756
  className: "pswp__button--arrow--next",
2727
2757
  title: "Next",
@@ -2736,9 +2766,9 @@ const Bi = {
2736
2766
  },
2737
2767
  onClick: "next",
2738
2768
  onInit: (s, t) => {
2739
- Jt(s, t, !0);
2769
+ ee(s, t, !0);
2740
2770
  }
2741
- }, ki = {
2771
+ }, Vi = {
2742
2772
  name: "close",
2743
2773
  title: "Close",
2744
2774
  order: 20,
@@ -2749,7 +2779,7 @@ const Bi = {
2749
2779
  outlineID: "pswp__icn-close"
2750
2780
  },
2751
2781
  onClick: "close"
2752
- }, Zi = {
2782
+ }, ji = {
2753
2783
  name: "zoom",
2754
2784
  title: "Zoom",
2755
2785
  order: 10,
@@ -2761,7 +2791,7 @@ const Bi = {
2761
2791
  outlineID: "pswp__icn-zoom"
2762
2792
  },
2763
2793
  onClick: "toggleZoom"
2764
- }, qi = {
2794
+ }, Gi = {
2765
2795
  name: "preloader",
2766
2796
  appendTo: "bar",
2767
2797
  order: 7,
@@ -2792,7 +2822,7 @@ const Bi = {
2792
2822
  t.currSlide === a.slide && r();
2793
2823
  }), t.ui && (t.ui.updatePreloaderVisibility = r);
2794
2824
  }
2795
- }, Ni = {
2825
+ }, Ui = {
2796
2826
  name: "counter",
2797
2827
  order: 5,
2798
2828
  onInit: (s, t) => {
@@ -2801,10 +2831,10 @@ const Bi = {
2801
2831
  });
2802
2832
  }
2803
2833
  };
2804
- function Tt(s, t) {
2834
+ function It(s, t) {
2805
2835
  s.classList.toggle("pswp--zoomed-in", t);
2806
2836
  }
2807
- class Hi {
2837
+ class Ki {
2808
2838
  /**
2809
2839
  * @param {PhotoSwipe} pswp
2810
2840
  */
@@ -2816,7 +2846,7 @@ class Hi {
2816
2846
  const {
2817
2847
  pswp: t
2818
2848
  } = this;
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) => {
2849
+ this.isRegistered = !1, this.uiElementsData = [Vi, Hi, Wi, ji, Gi, Ui], t.dispatch("uiRegister"), this.uiElementsData.sort((e, i) => (e.order || 0) - (i.order || 0)), this.items = [], this.isRegistered = !0, this.uiElementsData.forEach((e) => {
2820
2850
  this.registerElement(e);
2821
2851
  }), t.on("change", () => {
2822
2852
  var e;
@@ -2827,7 +2857,7 @@ class Hi {
2827
2857
  * @param {UIElementData} elementData
2828
2858
  */
2829
2859
  registerElement(t) {
2830
- this.isRegistered ? this.items.push(new Ri(this.pswp, t)) : this.uiElementsData.push(t);
2860
+ this.isRegistered ? this.items.push(new Ni(this.pswp, t)) : this.uiElementsData.push(t);
2831
2861
  }
2832
2862
  /**
2833
2863
  * Fired each time zoom or pan position is changed.
@@ -2851,15 +2881,15 @@ class Hi {
2851
2881
  this._lastUpdatedZoomLevel = n;
2852
2882
  const o = e.zoomLevels.initial - e.zoomLevels.secondary;
2853
2883
  if (Math.abs(o) < 0.01 || !e.isZoomable()) {
2854
- Tt(t, !1), t.classList.remove("pswp--zoom-allowed");
2884
+ It(t, !1), t.classList.remove("pswp--zoom-allowed");
2855
2885
  return;
2856
2886
  }
2857
2887
  t.classList.add("pswp--zoom-allowed");
2858
2888
  const r = n === e.zoomLevels.initial ? e.zoomLevels.secondary : e.zoomLevels.initial;
2859
- Tt(t, r <= n), (i.imageClickAction === "zoom" || i.imageClickAction === "zoom-or-close") && t.classList.add("pswp--click-to-zoom");
2889
+ It(t, r <= n), (i.imageClickAction === "zoom" || i.imageClickAction === "zoom-or-close") && t.classList.add("pswp--click-to-zoom");
2860
2890
  }
2861
2891
  }
2862
- function Wi(s) {
2892
+ function Xi(s) {
2863
2893
  const t = s.getBoundingClientRect();
2864
2894
  return {
2865
2895
  x: t.left,
@@ -2867,7 +2897,7 @@ function Wi(s) {
2867
2897
  w: t.width
2868
2898
  };
2869
2899
  }
2870
- function Vi(s, t, e) {
2900
+ function Yi(s, t, e) {
2871
2901
  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 = {
2872
2902
  x: i.left + a,
2873
2903
  y: i.top + l,
@@ -2880,7 +2910,7 @@ function Vi(s, t, e) {
2880
2910
  y: l
2881
2911
  }, c;
2882
2912
  }
2883
- function ji(s, t, e) {
2913
+ function Ji(s, t, e) {
2884
2914
  const i = e.dispatch("thumbBounds", {
2885
2915
  index: s,
2886
2916
  itemData: t,
@@ -2899,9 +2929,9 @@ function ji(s, t, e) {
2899
2929
  n.querySelector(a)
2900
2930
  );
2901
2931
  }
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);
2932
+ return r = e.applyFilters("thumbEl", r, t, s), r && (t.thumbCropped ? o = Yi(r, t.width || t.w || 0, t.height || t.h || 0) : o = Xi(r)), e.applyFilters("thumbBounds", o, t, s);
2903
2933
  }
2904
- let Gi = class {
2934
+ let Qi = class {
2905
2935
  /**
2906
2936
  * @param {T} type
2907
2937
  * @param {PhotoSwipeEventsMap[T]} [details]
@@ -2912,7 +2942,7 @@ let Gi = class {
2912
2942
  preventDefault() {
2913
2943
  this.defaultPrevented = !0;
2914
2944
  }
2915
- }, Ui = class {
2945
+ }, ts = class {
2916
2946
  constructor() {
2917
2947
  this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
2918
2948
  }
@@ -2979,13 +3009,13 @@ let Gi = class {
2979
3009
  return this.pswp.dispatch(t, e);
2980
3010
  const n = (
2981
3011
  /** @type {AugmentedEvent<T>} */
2982
- new Gi(t, e)
3012
+ new Qi(t, e)
2983
3013
  );
2984
3014
  return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
2985
3015
  o.call(this, n);
2986
3016
  }), n;
2987
3017
  }
2988
- }, Ki = class {
3018
+ }, es = class {
2989
3019
  /**
2990
3020
  * @param {string | false} imageSrc
2991
3021
  * @param {HTMLElement} container
@@ -3005,13 +3035,13 @@ let Gi = class {
3005
3035
  * @param {number} height
3006
3036
  */
3007
3037
  setDisplayedSize(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));
3038
+ this.element && (this.element.tagName === "IMG" ? (at(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = X(0, 0, t / 250)) : at(this.element, t, e));
3009
3039
  }
3010
3040
  destroy() {
3011
3041
  var t;
3012
3042
  (t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
3013
3043
  }
3014
- }, Xi = class {
3044
+ }, is = class {
3015
3045
  /**
3016
3046
  * @param {SlideData} itemData Slide data
3017
3047
  * @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
@@ -3046,7 +3076,7 @@ let Gi = class {
3046
3076
  this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
3047
3077
  this
3048
3078
  );
3049
- this.placeholder = new Ki(i, this.slide.container);
3079
+ this.placeholder = new es(i, this.slide.container);
3050
3080
  }
3051
3081
  this.element && !e || this.instance.dispatch("contentLoad", {
3052
3082
  content: this,
@@ -3134,7 +3164,7 @@ let Gi = class {
3134
3164
  content: this,
3135
3165
  width: t,
3136
3166
  height: e
3137
- }).defaultPrevented && (rt(this.element, t, e), this.isImageContent() && !this.isError()))) {
3167
+ }).defaultPrevented && (at(this.element, t, e), this.isImageContent() && !this.isError()))) {
3138
3168
  const i = !this.displayedImageWidth && t;
3139
3169
  this.displayedImageWidth = t, this.displayedImageHeight = e, i ? this.loadImage(!1) : this.updateSrcsetSizes(), this.slide && this.instance.dispatch("imageSizeChange", {
3140
3170
  slide: this.slide,
@@ -3216,7 +3246,7 @@ let Gi = class {
3216
3246
  }).defaultPrevented)
3217
3247
  return;
3218
3248
  const t = "decode" in this.element;
3219
- this.isImageContent() ? t && this.slide && (!this.slide.isActive || St()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
3249
+ this.isImageContent() ? t && this.slide && (!this.slide.isActive || Et()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
3220
3250
  }).finally(() => {
3221
3251
  this.isDecoding = !1, this.appendImage();
3222
3252
  })) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element);
@@ -3229,7 +3259,7 @@ let Gi = class {
3229
3259
  activate() {
3230
3260
  this.instance.dispatch("contentActivate", {
3231
3261
  content: this
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"));
3262
+ }).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"));
3233
3263
  }
3234
3264
  /**
3235
3265
  * Deactivate the content
@@ -3256,36 +3286,36 @@ let Gi = class {
3256
3286
  }).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === T.LOADED || this.state === T.ERROR) && this.removePlaceholder()));
3257
3287
  }
3258
3288
  };
3259
- const Yi = 5;
3260
- function Qt(s, t, e) {
3289
+ const ss = 5;
3290
+ function ie(s, t, e) {
3261
3291
  const i = t.createContentFromData(s, e);
3262
3292
  let n;
3263
3293
  const {
3264
3294
  options: o
3265
3295
  } = t;
3266
3296
  if (o) {
3267
- n = new Yt(o, s, -1);
3297
+ n = new te(o, s, -1);
3268
3298
  let r;
3269
- t.pswp ? r = t.pswp.viewportSize : r = Kt(o, t);
3270
- const a = Xt(o, r, s, e);
3299
+ t.pswp ? r = t.pswp.viewportSize : r = Jt(o, t);
3300
+ const a = Qt(o, r, s, e);
3271
3301
  n.update(i.width, i.height, a);
3272
3302
  }
3273
3303
  return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
3274
3304
  }
3275
- function Ji(s, t) {
3305
+ function ns(s, t) {
3276
3306
  const e = t.getItemData(s);
3277
3307
  if (!t.dispatch("lazyLoadSlide", {
3278
3308
  index: s,
3279
3309
  itemData: e
3280
3310
  }).defaultPrevented)
3281
- return Qt(e, t, s);
3311
+ return ie(e, t, s);
3282
3312
  }
3283
- class Qi {
3313
+ class os {
3284
3314
  /**
3285
3315
  * @param {PhotoSwipe} pswp
3286
3316
  */
3287
3317
  constructor(t) {
3288
- this.pswp = t, this.limit = Math.max(t.options.preload[0] + t.options.preload[1] + 1, Yi), this._cachedItems = [];
3318
+ this.pswp = t, this.limit = Math.max(t.options.preload[0] + t.options.preload[1] + 1, ss), this._cachedItems = [];
3289
3319
  }
3290
3320
  /**
3291
3321
  * Lazy load nearby slides based on `preload` option.
@@ -3313,7 +3343,7 @@ class Qi {
3313
3343
  loadSlideByIndex(t) {
3314
3344
  const e = this.pswp.getLoopedIndex(t);
3315
3345
  let i = this.getContentByIndex(e);
3316
- i || (i = Ji(e, this.pswp), i && this.addToCache(i));
3346
+ i || (i = ns(e, this.pswp), i && this.addToCache(i));
3317
3347
  }
3318
3348
  /**
3319
3349
  * @param {Slide} slide
@@ -3352,7 +3382,7 @@ class Qi {
3352
3382
  this._cachedItems.forEach((t) => t.destroy()), this._cachedItems = [];
3353
3383
  }
3354
3384
  }
3355
- let ts = class extends Ui {
3385
+ let rs = class extends ts {
3356
3386
  /**
3357
3387
  * Get total number of slides
3358
3388
  *
@@ -3375,7 +3405,7 @@ let ts = class extends Ui {
3375
3405
  * @returns {Content}
3376
3406
  */
3377
3407
  createContentFromData(t, e) {
3378
- return new Xi(t, this, e);
3408
+ return new is(t, this, e);
3379
3409
  }
3380
3410
  /**
3381
3411
  * Get item data by index.
@@ -3409,7 +3439,7 @@ let ts = class extends Ui {
3409
3439
  */
3410
3440
  _getGalleryDOMElements(t) {
3411
3441
  var e, i;
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];
3442
+ return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? pi(this.options.children, this.options.childSelector, t) || [] : [t];
3413
3443
  }
3414
3444
  /**
3415
3445
  * Converts DOM element to item data object.
@@ -3443,11 +3473,11 @@ let ts = class extends Ui {
3443
3473
  * @returns {Content} Image that is being decoded or false.
3444
3474
  */
3445
3475
  lazyLoadData(t, e) {
3446
- return Qt(t, this, e);
3476
+ return ie(t, this, e);
3447
3477
  }
3448
3478
  };
3449
3479
  const q = 3e-3;
3450
- class es {
3480
+ class as {
3451
3481
  /**
3452
3482
  * @param {PhotoSwipe} pswp
3453
3483
  */
@@ -3500,7 +3530,7 @@ class es {
3500
3530
  _start() {
3501
3531
  this.isOpening && this._useAnimation && this._placeholder && this._placeholder.tagName === "IMG" ? new Promise((t) => {
3502
3532
  let e = !1, i = !0;
3503
- oi(
3533
+ hi(
3504
3534
  /** @type {HTMLImageElement} */
3505
3535
  this._placeholder
3506
3536
  ).finally(() => {
@@ -3591,7 +3621,7 @@ class es {
3591
3621
  o[e] = i, n.startTransition(o);
3592
3622
  }
3593
3623
  }
3594
- const is = {
3624
+ const ls = {
3595
3625
  allowPanToNext: !0,
3596
3626
  spacing: 0.1,
3597
3627
  loop: !0,
@@ -3618,7 +3648,7 @@ const is = {
3618
3648
  preload: [1, 2],
3619
3649
  easing: "cubic-bezier(.4,0,.22,1)"
3620
3650
  };
3621
- class ss extends ts {
3651
+ class cs extends rs {
3622
3652
  /**
3623
3653
  * @param {PhotoSwipeOptions} [options]
3624
3654
  */
@@ -3632,7 +3662,7 @@ class ss extends ts {
3632
3662
  }, this.viewportSize = {
3633
3663
  x: 0,
3634
3664
  y: 0
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);
3665
+ }, 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 mi(), this.animations = new ki(), this.mainScroll = new Ii(this), this.gestures = new Ti(this), this.opener = new as(this), this.keyboard = new Oi(this), this.contentLoader = new os(this);
3636
3666
  }
3637
3667
  /** @returns {boolean} */
3638
3668
  init() {
@@ -3640,7 +3670,7 @@ class ss extends ts {
3640
3670
  return !1;
3641
3671
  this.isOpen = !0, this.dispatch("init"), this.dispatch("beforeOpen"), this._createMainStructure();
3642
3672
  let t = "pswp--open";
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", {
3673
+ 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 Zi(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", {
3644
3674
  index: this.currIndex,
3645
3675
  data: this._initialItemData,
3646
3676
  slide: void 0
@@ -3759,7 +3789,7 @@ class ss extends ts {
3759
3789
  if (!this.canLoop() && (e < 0 || e >= this.getNumItems()))
3760
3790
  return;
3761
3791
  const n = this.getItemData(e);
3762
- t.slide = new di(n, e, this), e === this.currIndex && (this.currSlide = t.slide), t.slide.append(t.el);
3792
+ t.slide = new gi(n, e, this), e === this.currIndex && (this.currSlide = t.slide), t.slide.append(t.el);
3763
3793
  }
3764
3794
  /** @returns {Point} */
3765
3795
  getViewportCenterPoint() {
@@ -3777,7 +3807,7 @@ class ss extends ts {
3777
3807
  updateSize(t) {
3778
3808
  if (this.isDestroying)
3779
3809
  return;
3780
- const e = Kt(this.options, this);
3810
+ const e = Jt(this.options, this);
3781
3811
  !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"));
3782
3812
  }
3783
3813
  /**
@@ -3829,7 +3859,7 @@ class ss extends ts {
3829
3859
  * @private
3830
3860
  */
3831
3861
  _createMainStructure() {
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);
3862
+ 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 Ki(this), this.ui.init(), (this.options.appendToEl || document.body).appendChild(this.element);
3833
3863
  }
3834
3864
  /**
3835
3865
  * Get position and dimensions of small thumbnail
@@ -3840,7 +3870,7 @@ class ss extends ts {
3840
3870
  * @returns {Bounds | undefined}
3841
3871
  */
3842
3872
  getThumbBounds() {
3843
- return ji(this.currIndex, this.currSlide ? this.currSlide.data : this._initialItemData, this);
3873
+ return Ji(this.currIndex, this.currSlide ? this.currSlide.data : this._initialItemData, this);
3844
3874
  }
3845
3875
  /**
3846
3876
  * If the PhotoSwipe can have continuous loop
@@ -3856,7 +3886,7 @@ class ss extends ts {
3856
3886
  */
3857
3887
  _prepareOptions(t) {
3858
3888
  return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches && (t.showHideAnimationType = "none", t.zoomAnimationDuration = 0), {
3859
- ...is,
3889
+ ...ls,
3860
3890
  ...t
3861
3891
  };
3862
3892
  }
@@ -3865,11 +3895,11 @@ function H(s, t, e) {
3865
3895
  const i = document.createElement(t);
3866
3896
  return s && (i.className = s), e && e.appendChild(i), i;
3867
3897
  }
3868
- function ns(s, t, e) {
3898
+ function ds(s, t, e) {
3869
3899
  let i = `translate3d(${s}px,0px,0)`;
3870
3900
  return e !== void 0 && (i += ` scale3d(${e},${e},1)`), i;
3871
3901
  }
3872
- function at(s, t, e) {
3902
+ function lt(s, t, e) {
3873
3903
  s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
3874
3904
  }
3875
3905
  const P = {
@@ -3878,7 +3908,7 @@ const P = {
3878
3908
  LOADED: "loaded",
3879
3909
  ERROR: "error"
3880
3910
  };
3881
- function os(s) {
3911
+ function hs(s) {
3882
3912
  return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
3883
3913
  }
3884
3914
  function W(s, t, e = document) {
@@ -3893,13 +3923,13 @@ function W(s, t, e = document) {
3893
3923
  }
3894
3924
  return i;
3895
3925
  }
3896
- function rs(s) {
3926
+ function us(s) {
3897
3927
  return typeof s == "function" && s.prototype && s.prototype.goTo;
3898
3928
  }
3899
- function Pt() {
3929
+ function Mt() {
3900
3930
  return !!(navigator.vendor && navigator.vendor.match(/apple/i));
3901
3931
  }
3902
- class as {
3932
+ class ps {
3903
3933
  /**
3904
3934
  * @param {T} type
3905
3935
  * @param {PhotoSwipeEventsMap[T]} [details]
@@ -3911,7 +3941,7 @@ class as {
3911
3941
  this.defaultPrevented = !0;
3912
3942
  }
3913
3943
  }
3914
- class ls {
3944
+ class ms {
3915
3945
  constructor() {
3916
3946
  this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
3917
3947
  }
@@ -3978,14 +4008,14 @@ class ls {
3978
4008
  return this.pswp.dispatch(t, e);
3979
4009
  const n = (
3980
4010
  /** @type {AugmentedEvent<T>} */
3981
- new as(t, e)
4011
+ new ps(t, e)
3982
4012
  );
3983
4013
  return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
3984
4014
  o.call(this, n);
3985
4015
  }), n;
3986
4016
  }
3987
4017
  }
3988
- class cs {
4018
+ class fs {
3989
4019
  /**
3990
4020
  * @param {string | false} imageSrc
3991
4021
  * @param {HTMLElement} container
@@ -4005,14 +4035,14 @@ class cs {
4005
4035
  * @param {number} height
4006
4036
  */
4007
4037
  setDisplayedSize(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));
4038
+ this.element && (this.element.tagName === "IMG" ? (lt(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = ds(0, 0, t / 250)) : lt(this.element, t, e));
4009
4039
  }
4010
4040
  destroy() {
4011
4041
  var t;
4012
4042
  (t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
4013
4043
  }
4014
4044
  }
4015
- class ds {
4045
+ class gs {
4016
4046
  /**
4017
4047
  * @param {SlideData} itemData Slide data
4018
4048
  * @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
@@ -4047,7 +4077,7 @@ class ds {
4047
4077
  this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
4048
4078
  this
4049
4079
  );
4050
- this.placeholder = new cs(i, this.slide.container);
4080
+ this.placeholder = new fs(i, this.slide.container);
4051
4081
  }
4052
4082
  this.element && !e || this.instance.dispatch("contentLoad", {
4053
4083
  content: this,
@@ -4135,7 +4165,7 @@ class ds {
4135
4165
  content: this,
4136
4166
  width: t,
4137
4167
  height: e
4138
- }).defaultPrevented && (at(this.element, t, e), this.isImageContent() && !this.isError()))) {
4168
+ }).defaultPrevented && (lt(this.element, t, e), this.isImageContent() && !this.isError()))) {
4139
4169
  const i = !this.displayedImageWidth && t;
4140
4170
  this.displayedImageWidth = t, this.displayedImageHeight = e, i ? this.loadImage(!1) : this.updateSrcsetSizes(), this.slide && this.instance.dispatch("imageSizeChange", {
4141
4171
  slide: this.slide,
@@ -4217,7 +4247,7 @@ class ds {
4217
4247
  }).defaultPrevented)
4218
4248
  return;
4219
4249
  const t = "decode" in this.element;
4220
- this.isImageContent() ? t && this.slide && (!this.slide.isActive || Pt()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
4250
+ this.isImageContent() ? t && this.slide && (!this.slide.isActive || Mt()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
4221
4251
  }).finally(() => {
4222
4252
  this.isDecoding = !1, this.appendImage();
4223
4253
  })) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element);
@@ -4230,7 +4260,7 @@ class ds {
4230
4260
  activate() {
4231
4261
  this.instance.dispatch("contentActivate", {
4232
4262
  content: this
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"));
4263
+ }).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !Mt() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
4234
4264
  }
4235
4265
  /**
4236
4266
  * Deactivate the content
@@ -4257,7 +4287,7 @@ class ds {
4257
4287
  }).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === P.LOADED || this.state === P.ERROR) && this.removePlaceholder()));
4258
4288
  }
4259
4289
  }
4260
- function hs(s, t) {
4290
+ function vs(s, t) {
4261
4291
  if (s.getViewportSizeFn) {
4262
4292
  const e = s.getViewportSizeFn(s, t);
4263
4293
  if (e)
@@ -4284,14 +4314,14 @@ function J(s, t, e, i, n) {
4284
4314
  }
4285
4315
  return Number(o) || 0;
4286
4316
  }
4287
- function us(s, t, e, i) {
4317
+ function ys(s, t, e, i) {
4288
4318
  return {
4289
4319
  x: t.x - J("left", s, t, e, i) - J("right", s, t, e, i),
4290
4320
  y: t.y - J("top", s, t, e, i) - J("bottom", s, t, e, i)
4291
4321
  };
4292
4322
  }
4293
- const It = 4e3;
4294
- class ps {
4323
+ const Ot = 4e3;
4324
+ class _s {
4295
4325
  /**
4296
4326
  * @param {PhotoSwipeOptions} options PhotoSwipe options
4297
4327
  * @param {SlideData} itemData Slide data
@@ -4348,7 +4378,7 @@ class ps {
4348
4378
  */
4349
4379
  _getSecondary() {
4350
4380
  let t = this._parseZoomLevelOption("secondary");
4351
- return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > It && (t = It / this.elementSize.x), t);
4381
+ return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > Ot && (t = Ot / this.elementSize.x), t);
4352
4382
  }
4353
4383
  /**
4354
4384
  * Get initial image zoom level.
@@ -4371,30 +4401,30 @@ class ps {
4371
4401
  return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
4372
4402
  }
4373
4403
  }
4374
- function te(s, t, e) {
4404
+ function se(s, t, e) {
4375
4405
  const i = t.createContentFromData(s, e);
4376
4406
  let n;
4377
4407
  const {
4378
4408
  options: o
4379
4409
  } = t;
4380
4410
  if (o) {
4381
- n = new ps(o, s, -1);
4411
+ n = new _s(o, s, -1);
4382
4412
  let r;
4383
- t.pswp ? r = t.pswp.viewportSize : r = hs(o, t);
4384
- const a = us(o, r, s, e);
4413
+ t.pswp ? r = t.pswp.viewportSize : r = vs(o, t);
4414
+ const a = ys(o, r, s, e);
4385
4415
  n.update(i.width, i.height, a);
4386
4416
  }
4387
4417
  return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
4388
4418
  }
4389
- function ms(s, t) {
4419
+ function ws(s, t) {
4390
4420
  const e = t.getItemData(s);
4391
4421
  if (!t.dispatch("lazyLoadSlide", {
4392
4422
  index: s,
4393
4423
  itemData: e
4394
4424
  }).defaultPrevented)
4395
- return te(e, t, s);
4425
+ return se(e, t, s);
4396
4426
  }
4397
- class fs extends ls {
4427
+ class bs extends ms {
4398
4428
  /**
4399
4429
  * Get total number of slides
4400
4430
  *
@@ -4417,7 +4447,7 @@ class fs extends ls {
4417
4447
  * @returns {Content}
4418
4448
  */
4419
4449
  createContentFromData(t, e) {
4420
- return new ds(t, this, e);
4450
+ return new gs(t, this, e);
4421
4451
  }
4422
4452
  /**
4423
4453
  * Get item data by index.
@@ -4485,10 +4515,10 @@ class fs extends ls {
4485
4515
  * @returns {Content} Image that is being decoded or false.
4486
4516
  */
4487
4517
  lazyLoadData(t, e) {
4488
- return te(t, this, e);
4518
+ return se(t, this, e);
4489
4519
  }
4490
4520
  }
4491
- class gs extends fs {
4521
+ class Ss extends bs {
4492
4522
  /**
4493
4523
  * @param {PhotoSwipeOptions} [options]
4494
4524
  */
@@ -4508,7 +4538,7 @@ class gs extends fs {
4508
4538
  * @param {MouseEvent} e
4509
4539
  */
4510
4540
  onThumbnailsClick(t) {
4511
- if (os(t) || window.pswp)
4541
+ if (hs(t) || window.pswp)
4512
4542
  return;
4513
4543
  let e = {
4514
4544
  x: t.clientX,
@@ -4576,7 +4606,7 @@ class gs extends fs {
4576
4606
  } = this;
4577
4607
  e && (i.dataSource = e);
4578
4608
  const n = [], o = typeof i.pswpModule;
4579
- if (rs(i.pswpModule))
4609
+ if (us(i.pswpModule))
4580
4610
  n.push(Promise.resolve(
4581
4611
  /** @type {Type<PhotoSwipe>} */
4582
4612
  i.pswpModule
@@ -4592,7 +4622,7 @@ class gs extends fs {
4592
4622
  else
4593
4623
  throw new Error("pswpModule is not valid");
4594
4624
  }
4595
- typeof i.openPromise == "function" && n.push(i.openPromise()), i.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent = ms(t, this));
4625
+ typeof i.openPromise == "function" && n.push(i.openPromise()), i.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent = ws(t, this));
4596
4626
  const r = ++this._uid;
4597
4627
  Promise.all(n).then((a) => {
4598
4628
  if (this.shouldOpen) {
@@ -4638,12 +4668,12 @@ class gs extends fs {
4638
4668
  });
4639
4669
  }
4640
4670
  }
4641
- const vs = () => {
4671
+ const Ls = () => {
4642
4672
  let s = null;
4643
- return s = new gs({
4673
+ return s = new Ss({
4644
4674
  gallery: "#photoswipe-gallery",
4645
4675
  children: "a",
4646
- pswpModule: ss,
4676
+ pswpModule: cs,
4647
4677
  zoom: !1,
4648
4678
  imageClickAction: "next",
4649
4679
  tapAction: "next"
@@ -4664,12 +4694,12 @@ const vs = () => {
4664
4694
  }), s.init(), () => {
4665
4695
  s && (s.destroy(), s = null);
4666
4696
  };
4667
- }, ys = "mbrs-game-ranking", _s = ".c-header-page__ranking-button", ws = () => {
4668
- const s = document.querySelector(_s), t = s?.querySelector("button");
4697
+ }, Es = "mbrs-game-ranking", As = ".c-header-page__ranking-button", Cs = () => {
4698
+ const s = document.querySelector(As), t = s?.querySelector("button");
4669
4699
  !s || !t || t.addEventListener("click", () => {
4670
- document.getElementById(ys)?.scrollIntoView({ behavior: "smooth" });
4700
+ document.getElementById(Es)?.scrollIntoView({ behavior: "smooth" });
4671
4701
  });
4672
- }, Mt = (s) => Math.min(100, Math.max(0, Math.round(s))), bs = ({
4702
+ }, zt = (s) => Math.min(100, Math.max(0, Math.round(s))), xs = ({
4673
4703
  limitElement: s,
4674
4704
  progressBar: t,
4675
4705
  closeProgress: e,
@@ -4683,19 +4713,19 @@ const vs = () => {
4683
4713
  let a = o.scrollHeight - o.clientHeight;
4684
4714
  if (!a)
4685
4715
  return;
4686
- s && (a = s.scrollHeight - o.clientHeight + (window.pageYOffset + s.getBoundingClientRect().top)), t.style.width = `${Mt(r / a * 100)}%`;
4716
+ s && (a = s.scrollHeight - o.clientHeight + (window.pageYOffset + s.getBoundingClientRect().top)), t.style.width = `${zt(r / a * 100)}%`;
4687
4717
  }
4688
4718
  if (e && i && n) {
4689
4719
  const a = window.pageYOffset + i.getBoundingClientRect().bottom, c = window.pageYOffset + n.getBoundingClientRect().bottom - o.clientHeight - a;
4690
4720
  if (c > 0) {
4691
- const d = Mt((r - a) / c * 100);
4721
+ const d = zt((r - a) / c * 100);
4692
4722
  e.style.setProperty("--progress", `${d}`), e.parentElement?.classList.toggle(
4693
4723
  "c-btn--close-progress-complete",
4694
4724
  d >= 100
4695
4725
  );
4696
4726
  }
4697
4727
  }
4698
- }, Ss = () => {
4728
+ }, Ts = () => {
4699
4729
  const s = {
4700
4730
  limitElement: document.querySelector(".js-limit-scroll-progress-bar"),
4701
4731
  progressBar: document.querySelector(".c-progress__bar"),
@@ -4703,8 +4733,8 @@ const vs = () => {
4703
4733
  startElement: document.querySelector(".js-content-header"),
4704
4734
  endElement: document.querySelector(".js-limit-scroll-close-article-btn")
4705
4735
  };
4706
- (s.progressBar || s.closeProgress) && window.addEventListener("scroll", () => bs(s));
4707
- }, Ls = (s = {}) => {
4736
+ (s.progressBar || s.closeProgress) && window.addEventListener("scroll", () => xs(s));
4737
+ }, Ps = (s = {}) => {
4708
4738
  const { buttonSelector: t = ".c-scroll-to-top" } = s, e = document.querySelector(t), i = e?.querySelector("button");
4709
4739
  if (!e || !i)
4710
4740
  return;
@@ -4726,7 +4756,7 @@ const vs = () => {
4726
4756
  });
4727
4757
  };
4728
4758
  window.addEventListener("scroll", r), i.addEventListener("click", a), r();
4729
- }, Es = 500, As = () => {
4759
+ }, Is = 500, Ms = () => {
4730
4760
  const s = document.getElementById("mbrs-comments-container"), t = document.querySelector(".c-scroll-to-top-comment");
4731
4761
  if (!s || !t)
4732
4762
  return;
@@ -4742,7 +4772,7 @@ const vs = () => {
4742
4772
  }, o = () => {
4743
4773
  e && (e = !1, window.removeEventListener("scroll", i), t.style.display = "none");
4744
4774
  }, r = (u) => {
4745
- u.offsetHeight > Es ? n() : o();
4775
+ u.offsetHeight > Is ? n() : o();
4746
4776
  }, a = (u) => {
4747
4777
  new ResizeObserver(() => {
4748
4778
  r(u);
@@ -4779,7 +4809,7 @@ const vs = () => {
4779
4809
  ) && h.disconnect();
4780
4810
  });
4781
4811
  h.observe(s, { childList: !0, subtree: !0 });
4782
- }, Cs = "#page-content", ee = "#text-tooltip", xs = ".mbrs-social-report-container", ie = "c-text-tooltip--show", Ts = [
4812
+ }, Os = "#page-content", ne = "#text-tooltip", zs = ".mbrs-social-report-container", oe = "c-text-tooltip--show", Ds = [
4783
4813
  "#page-content .c-content",
4784
4814
  "#page-content .c-content p",
4785
4815
  "#page-content .c-content h2",
@@ -4792,16 +4822,16 @@ const vs = () => {
4792
4822
  "#page-content header span",
4793
4823
  "#page-content header h1",
4794
4824
  "#page-content header h2"
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) => {
4825
+ ], Dt = (s) => s instanceof Element ? s : s.parentElement, $t = (s, t) => s ? t.some((e) => !!s.closest(e)) : !1, $s = (s, t) => {
4826
+ const e = Dt(s.startContainer), i = Dt(s.endContainer);
4827
+ return $t(e, t) || $t(i, t);
4828
+ }, Bs = (s) => {
4799
4829
  if (!s.focusNode)
4800
4830
  return null;
4801
4831
  const t = s.anchorNode?.compareDocumentPosition(s.focusNode);
4802
4832
  return t ? (t & 4) > 0 : s.anchorOffset < s.focusOffset;
4803
- }, Ms = (s, t, e) => {
4804
- const i = document.querySelector(ee), n = document.querySelector(Cs), o = document.querySelectorAll(xs);
4833
+ }, Rs = (s, t, e) => {
4834
+ const i = document.querySelector(ne), n = document.querySelector(Os), o = document.querySelectorAll(zs);
4805
4835
  if (!i || !n) {
4806
4836
  console.warn("Text tooltip : Tooltip or page content are not found in the DOM");
4807
4837
  return;
@@ -4819,11 +4849,11 @@ const vs = () => {
4819
4849
  i.style.top = `${Math.max(l, c)}px`, i.style.left = `${Math.min(
4820
4850
  Math.max(l, d),
4821
4851
  window.innerWidth - i.offsetWidth - l
4822
- )}px`, i.classList.add(ie);
4852
+ )}px`, i.classList.add(oe);
4823
4853
  }, it = () => {
4824
- const s = document.querySelector(`${ee}`);
4825
- s && s.classList.remove(ie);
4826
- }, zs = () => {
4854
+ const s = document.querySelector(`${ne}`);
4855
+ s && s.classList.remove(oe);
4856
+ }, Fs = () => {
4827
4857
  const s = window.getSelection();
4828
4858
  if (!s?.rangeCount) {
4829
4859
  it();
@@ -4831,8 +4861,8 @@ const vs = () => {
4831
4861
  }
4832
4862
  const t = s.getRangeAt(0), e = s.toString().trim();
4833
4863
  if (e.length) {
4834
- const i = Ps(t, Ts), n = Is(s) || !1;
4835
- i && Ms(t, n, e);
4864
+ const i = $s(t, Ds), n = Bs(s) || !1;
4865
+ i && Rs(t, n, e);
4836
4866
  return;
4837
4867
  }
4838
4868
  it();
@@ -4841,26 +4871,26 @@ const vs = () => {
4841
4871
  window.getSelection()?.toString().trim().length || it();
4842
4872
  return;
4843
4873
  }
4844
- zs();
4845
- }, Os = () => {
4874
+ Fs();
4875
+ }, ks = () => {
4846
4876
  if (!window?.getSelection) {
4847
4877
  console.warn("Selection API isn't supported");
4848
4878
  return;
4849
4879
  }
4850
4880
  document.addEventListener("mouseup", Q), document.addEventListener("selectionchange", Q), document.addEventListener("touchend", Q), document.addEventListener("touchcancel", Q);
4851
- }, Ds = (s) => {
4881
+ }, Zs = (s) => {
4852
4882
  const { target: t } = s;
4853
4883
  if (t instanceof Element) {
4854
4884
  const e = t.closest(".c-search-form--button");
4855
4885
  e && (s.preventDefault(), e.classList.remove("c-search-form--button"));
4856
4886
  }
4857
- }, $s = (s = document.querySelector(
4887
+ }, qs = (s = document.querySelector(
4858
4888
  ".c-search-form--button"
4859
4889
  )) => {
4860
4890
  s && s.addEventListener("click", (t) => {
4861
- Ds(t);
4891
+ Zs(t);
4862
4892
  });
4863
- }, Rs = ({
4893
+ }, Ns = ({
4864
4894
  tabsContainerElement: s,
4865
4895
  event: t
4866
4896
  }) => {
@@ -4876,38 +4906,38 @@ const vs = () => {
4876
4906
  }), n.forEach((a) => {
4877
4907
  a.setAttribute("aria-hidden", "true");
4878
4908
  }), e.setAttribute("aria-selected", "true"), r && r.removeAttribute("aria-hidden");
4879
- }, Dt = (s) => s.code === "ArrowLeft" || s.keyCode === 39, $t = (s) => s.code === "ArrowRight" || s.keyCode === 37, Bs = (s = document.querySelectorAll(
4909
+ }, Bt = (s) => s.code === "ArrowLeft" || s.keyCode === 39, Rt = (s) => s.code === "ArrowRight" || s.keyCode === 37, Hs = (s = document.querySelectorAll(
4880
4910
  ".js-tabs"
4881
4911
  )) => {
4882
4912
  s.length > 0 && s.forEach((t) => {
4883
4913
  const e = t.querySelectorAll('[role="tab"]');
4884
4914
  e.forEach((n) => {
4885
4915
  n.addEventListener("click", (o) => {
4886
- Rs({ tabsContainerElement: t, event: o });
4916
+ Ns({ tabsContainerElement: t, event: o });
4887
4917
  });
4888
4918
  });
4889
4919
  const i = t.querySelector('[role="tablist"]');
4890
4920
  if (i && e.length > 0) {
4891
4921
  let n = 0;
4892
4922
  i.addEventListener("keydown", (o) => {
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());
4923
+ o instanceof KeyboardEvent && (Bt(o) || Rt(o)) && (e[n].setAttribute("tabindex", "-1"), Bt(o) ? (n += 1, n >= e.length && (n = 0)) : Rt(o) && (n -= 1, n < 0 && (n = e.length - 1)), e[n].setAttribute("tabindex", "0"), e[n].focus());
4894
4924
  });
4895
4925
  }
4896
4926
  });
4897
4927
  }, st = (s) => {
4898
4928
  const [t, e] = s.split("h").map(Number);
4899
4929
  return t * 60 + e;
4900
- }, se = () => {
4930
+ }, re = () => {
4901
4931
  const s = /* @__PURE__ */ new Date(), t = s.getHours(), e = s.getMinutes();
4902
4932
  return t * 60 + e;
4903
- }, Fs = (s, t) => {
4904
- const e = se();
4933
+ }, Ws = (s, t) => {
4934
+ const e = re();
4905
4935
  if (e < s || e > t)
4906
4936
  return 0;
4907
4937
  const i = t - s;
4908
4938
  return (e - s) / i;
4909
- }, ks = (s) => {
4910
- const t = se();
4939
+ }, Vs = (s) => {
4940
+ const t = re();
4911
4941
  let e = null, i = null, n = -1;
4912
4942
  return Array.from(s).find((o, r, a) => {
4913
4943
  if (r === a.length - 1)
@@ -4918,14 +4948,14 @@ const vs = () => {
4918
4948
  const d = st(l), h = st(c);
4919
4949
  return t >= d && t < h ? (e = l, i = c, n = r, !0) : !1;
4920
4950
  }), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n };
4921
- }, Zs = () => {
4951
+ }, js = () => {
4922
4952
  const s = document.querySelectorAll(".c-timeline__time");
4923
4953
  if (!s || s.length < 2)
4924
4954
  return;
4925
- const t = document.querySelector(".c-timeline__progress-bar"), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n } = ks(s);
4955
+ const t = document.querySelector(".c-timeline__progress-bar"), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n } = Vs(s);
4926
4956
  if (!e || !i)
4927
4957
  return;
4928
- const o = st(e), r = st(i), a = Fs(o, r);
4958
+ const o = st(e), r = st(i), a = Ws(o, r);
4929
4959
  if (t instanceof HTMLElement) {
4930
4960
  if (t.classList.contains("c-timeline__progress-bar--is-desktop") && s.length >= 5) {
4931
4961
  const l = "172px / 2";
@@ -4964,25 +4994,25 @@ const vs = () => {
4964
4994
  }
4965
4995
  }
4966
4996
  }
4967
- }, lt = "c-icon-item__container--is-highlighted", qs = (s) => {
4997
+ }, ct = "c-icon-item__container--is-highlighted", Gs = (s) => {
4968
4998
  s.find(
4969
- (e) => e.classList.contains(lt)
4970
- )?.classList.remove(lt);
4971
- }, Ns = () => {
4999
+ (e) => e.classList.contains(ct)
5000
+ )?.classList.remove(ct);
5001
+ }, Us = () => {
4972
5002
  const s = document.querySelector(".c-toolbar");
4973
5003
  if (s) {
4974
5004
  const t = window.location.origin + window.location.pathname, e = Array.from(s.querySelectorAll(".c-icon-item__container"));
4975
- qs(e), e.find(
5005
+ Gs(e), e.find(
4976
5006
  (n) => n.querySelector("a")?.getAttribute("href") === t
4977
- )?.classList.add(lt);
5007
+ )?.classList.add(ct);
4978
5008
  }
4979
- }, Hs = 12, pt = (s) => {
5009
+ }, Ks = 12, ft = (s) => {
4980
5010
  const t = s || document.querySelector(".c-map-towns");
4981
5011
  if (!t) {
4982
5012
  new MutationObserver((o, r) => {
4983
5013
  if (typeof document < "u") {
4984
5014
  const a = document.querySelector(".c-map-towns");
4985
- a && (r.disconnect(), pt(a));
5015
+ a && (r.disconnect(), ft(a));
4986
5016
  }
4987
5017
  }).observe(document.body, { childList: !0, subtree: !0 });
4988
5018
  return;
@@ -5012,7 +5042,7 @@ const vs = () => {
5012
5042
  d.setAttribute("y", `${A}`), l.setAttribute("aria-hidden", "false");
5013
5043
  } else
5014
5044
  a = !1;
5015
- }), !a && r < Hs && requestAnimationFrame(() => o(r + 1));
5045
+ }), !a && r < Ks && requestAnimationFrame(() => o(r + 1));
5016
5046
  };
5017
5047
  return requestAnimationFrame(() => o()), !0;
5018
5048
  };
@@ -5024,7 +5054,7 @@ const vs = () => {
5024
5054
  childList: !0,
5025
5055
  subtree: !0
5026
5056
  });
5027
- }, Ws = {
5057
+ }, Xs = {
5028
5058
  10: [{ id: "10387", name: "Troyes" }, { id: "10323", name: "Romilly-sur-Seine" }, { id: "10033", name: "Bar-sur-Aube" }],
5029
5059
  11: [{ id: "11262", name: "Narbonne" }, { id: "11069", name: "Carcassonne" }, { id: "11076", name: "Castelnaudary" }],
5030
5060
  12: [{ id: "12202", name: "Rodez" }, { id: "12145", name: "Millau" }, { id: "12300", name: "Villefranche-de-Rouergue" }],
@@ -5125,14 +5155,14 @@ const vs = () => {
5125
5155
  "07": [{ id: "07010", name: "Annonay" }, { id: "07019", name: "Aubenas" }, { id: "07324", name: "Tournon-sur-Rhône" }],
5126
5156
  "05": [{ id: "05061", name: "Gap" }, { id: "05023", name: "Briançon" }, { id: "05046", name: "Embrun" }],
5127
5157
  "08": [{ id: "08105", name: "Charleville-Mézières" }, { id: "08362", name: "Rethel" }, { id: "08190", name: "Givet" }]
5128
- }, Vs = /<path\b([^>]*?)\/>/g, js = /\b([:\w-]+)="([^"]*)"/g, Gs = (s) => {
5158
+ }, Ys = /<path\b([^>]*?)\/>/g, Js = /\b([:\w-]+)="([^"]*)"/g, Qs = (s) => {
5129
5159
  const t = [];
5130
- for (const e of s.matchAll(Vs)) {
5160
+ for (const e of s.matchAll(Ys)) {
5131
5161
  const i = e[1];
5132
5162
  if (!i)
5133
5163
  continue;
5134
5164
  const n = /* @__PURE__ */ new Map();
5135
- for (const c of i.matchAll(js)) {
5165
+ for (const c of i.matchAll(Js)) {
5136
5166
  const [, d, h] = c;
5137
5167
  d && n.set(d, h || "");
5138
5168
  }
@@ -5145,9 +5175,9 @@ const vs = () => {
5145
5175
  });
5146
5176
  }
5147
5177
  return t;
5148
- }, Us = (s) => new Map(s.map((t) => [t.id, t])), tt = (s) => {
5178
+ }, tn = (s) => new Map(s.map((t) => [t.id, t])), tt = (s) => {
5149
5179
  window.location.href = s;
5150
- }, Ks = (s, t, e) => {
5180
+ }, en = (s, t, e) => {
5151
5181
  const i = e.get(s);
5152
5182
  if (i)
5153
5183
  return i;
@@ -5162,7 +5192,7 @@ const vs = () => {
5162
5192
  (o) => o.id.startsWith(`town-${s}`)
5163
5193
  );
5164
5194
  return e.set(s, n), n;
5165
- }, Xs = (s, t) => t.get(s), Ys = (s) => {
5195
+ }, sn = (s, t) => t.get(s), nn = (s) => {
5166
5196
  if (s.size > 0)
5167
5197
  return;
5168
5198
  document.querySelectorAll(
@@ -5174,13 +5204,13 @@ const vs = () => {
5174
5204
  Array.from(e.classList).filter((n) => n.startsWith("c-map-towns__path--"))
5175
5205
  );
5176
5206
  });
5177
- }, Js = (s, t) => {
5207
+ }, on = (s, t) => {
5178
5208
  const e = s.id, i = s.url, n = s.name;
5179
5209
  if (!e || !i)
5180
5210
  return null;
5181
5211
  const o = document.createElementNS("http://www.w3.org/2000/svg", "path");
5182
5212
  o.setAttribute("d", s.path), o.setAttribute("class", "c-map-towns__path c-map-towns__zoom-town"), o.setAttribute("data-url", i);
5183
- const r = Xs(e, t);
5213
+ const r = sn(e, t);
5184
5214
  if (r && r.forEach((a) => {
5185
5215
  o.classList.add(a);
5186
5216
  }), n) {
@@ -5188,15 +5218,15 @@ const vs = () => {
5188
5218
  a.textContent = n, o.appendChild(a);
5189
5219
  }
5190
5220
  return o;
5191
- }, Qs = (s, t) => {
5221
+ }, rn = (s, t) => {
5192
5222
  const e = document.createDocumentFragment();
5193
5223
  return s.forEach((i) => {
5194
- const n = Js(i, t);
5224
+ const n = on(i, t);
5195
5225
  n && e.appendChild(n);
5196
5226
  }), e;
5197
- }, tn = (s, t) => {
5227
+ }, an = (s, t) => {
5198
5228
  s.replaceChildren(t);
5199
- }, en = (s, t, e) => {
5229
+ }, ln = (s, t, e) => {
5200
5230
  const i = document.createElementNS("http://www.w3.org/2000/svg", "g");
5201
5231
  i.setAttribute("class", "js-city-marker c-map-towns__city-marker"), i.setAttribute("aria-hidden", "true"), i.setAttribute("data-scale", e.toString());
5202
5232
  const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
@@ -5207,7 +5237,7 @@ const vs = () => {
5207
5237
  r.setAttribute("class", "js-city-bg"), r.setAttribute("fill", "white"), r.setAttribute("rx", "4"), r.setAttribute("ry", "4");
5208
5238
  const a = document.createElementNS("http://www.w3.org/2000/svg", "text");
5209
5239
  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;
5210
- }, sn = (s, t) => {
5240
+ }, cn = (s, t) => {
5211
5241
  const e = t.getBBox(), i = 5, n = e.width + i * 2, o = e.height + i * 2;
5212
5242
  s.setAttribute(
5213
5243
  "viewBox",
@@ -5217,16 +5247,16 @@ const vs = () => {
5217
5247
  return Math.max(n / r, o / a);
5218
5248
  };
5219
5249
  let nt = !1;
5220
- const ct = () => {
5250
+ const dt = () => {
5221
5251
  if (nt)
5222
5252
  return;
5223
5253
  if (!document.querySelector(".c-map-towns")) {
5224
5254
  new MutationObserver((b, A) => {
5225
- typeof document < "u" && document.querySelector(".c-map-towns") && (A.disconnect(), ct());
5255
+ typeof document < "u" && document.querySelector(".c-map-towns") && (A.disconnect(), dt());
5226
5256
  }).observe(document.body, { childList: !0, subtree: !0 });
5227
5257
  return;
5228
5258
  }
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) => {
5259
+ const t = window.layout === ht.MOBILE, e = document.querySelector(".c-map-towns__map"), i = document.querySelector(".c-map-towns__droms"), n = document.querySelector(".c-map-towns__zooms"), o = (L) => {
5230
5260
  const { target: b } = L;
5231
5261
  if (!(b instanceof Element))
5232
5262
  return;
@@ -5241,8 +5271,8 @@ const ct = () => {
5241
5271
  tt(M);
5242
5272
  return;
5243
5273
  }
5244
- const z = b.closest(".c-map-towns__dept-trigger")?.getAttribute("data-url");
5245
- z && tt(z);
5274
+ const O = b.closest(".c-map-towns__dept-trigger")?.getAttribute("data-url");
5275
+ O && tt(O);
5246
5276
  };
5247
5277
  if (t) {
5248
5278
  e?.addEventListener("click", o), i?.addEventListener("click", o), n?.addEventListener("click", o), nt = !0;
@@ -5250,7 +5280,7 @@ const ct = () => {
5250
5280
  }
5251
5281
  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");
5252
5282
  if (!(r instanceof HTMLElement) || !(a instanceof SVGSVGElement) || !(l instanceof SVGGElement) || !(c instanceof HTMLElement)) {
5253
- requestAnimationFrame(ct);
5283
+ requestAnimationFrame(dt);
5254
5284
  return;
5255
5285
  }
5256
5286
  nt = !0;
@@ -5260,22 +5290,22 @@ const ct = () => {
5260
5290
  if (p)
5261
5291
  return p;
5262
5292
  const L = u instanceof HTMLScriptElement ? JSON.parse(u.textContent || '""') : "";
5263
- return p = Us(Gs(L)), p;
5293
+ return p = tn(Qs(L)), p;
5264
5294
  }, w = () => {
5265
5295
  r.setAttribute("aria-hidden", "true"), l.replaceChildren();
5266
5296
  }, 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) => {
5267
- const I = Ws[L] || [];
5297
+ const I = Xs[L] || [];
5268
5298
  if (I.length === 0)
5269
5299
  return;
5270
5300
  const M = document.createDocumentFragment();
5271
5301
  I.forEach((k) => {
5272
- const z = C(L, k.id);
5273
- if (!z)
5302
+ const O = C(L, k.id);
5303
+ if (!O)
5274
5304
  return;
5275
- const $ = en(k.name, z, b);
5305
+ const $ = ln(k.name, O, b);
5276
5306
  M.appendChild($);
5277
5307
  }), l.appendChild(M), requestAnimationFrame(() => {
5278
- pt(l);
5308
+ ft(l);
5279
5309
  });
5280
5310
  }, _ = (L) => {
5281
5311
  const { target: b } = L;
@@ -5284,13 +5314,13 @@ const ct = () => {
5284
5314
  const A = b?.closest(".c-map-towns__dept-trigger");
5285
5315
  if (!A)
5286
5316
  return;
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);
5317
+ const I = A.getAttribute("id")?.replace("out-", "") || "", M = A.getAttribute("data-name"), k = en(I, y, f);
5318
+ nn(m);
5319
+ const O = rn(k, m);
5290
5320
  if (d && h && M && (d.textContent = M, h.textContent = `Carte détaillée du département : ${M}`), !(A instanceof SVGGraphicsElement))
5291
5321
  return;
5292
- const $ = sn(a, A);
5293
- r.setAttribute("aria-hidden", "false"), tn(l, z), g(I, $);
5322
+ const $ = cn(a, A);
5323
+ r.setAttribute("aria-hidden", "false"), an(l, O), g(I, $);
5294
5324
  }, E = (L) => {
5295
5325
  const { target: b } = L;
5296
5326
  if (!(b instanceof Element))
@@ -5303,15 +5333,15 @@ const ct = () => {
5303
5333
  }), r.addEventListener("click", (L) => {
5304
5334
  L.target === r && w();
5305
5335
  });
5306
- }, dn = () => {
5307
- Be(), Bs(), Se(), Ht(), ze(), Ss(), vs(), Ke(), we(), $s(), Ae(), Os(), Fe(), ke(), qe(), Te(), de(
5336
+ }, gn = () => {
5337
+ He(), Hs(), Te(), jt(), Fe(), Ts(), Ls(), ei(), Ce(), qs(), Me(), ks(), We(), Ve(), Ge(), De(), pe(
5308
5338
  "localisation-input",
5309
5339
  "https://www.20minutes.fr/elections/resultats/recherche",
5310
5340
  "?searchValue=",
5311
5341
  "text",
5312
5342
  "text"
5313
- ), xe(), pt(), Ns(), ae(), le(), Ne(), ct(), ei(), ii(), Ze(), re(), Zs(), Ls(), As(), ws();
5343
+ ), ze(), ft(), Us(), de(), he(), Ue(), dt(), ai(), li(), je(), ce(), js(), Ps(), Ms(), Cs();
5314
5344
  };
5315
5345
  export {
5316
- dn as initScripts
5346
+ gn as initScripts
5317
5347
  };