@20minutes/hela 2.22.9 → 2.22.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/molecules/Header/HeaderMini/HeaderMini.d.ts +1 -1
- package/dist/components/organisms/Header/Header.d.ts +1 -1
- package/dist/constants/tokenVariables.d.ts +12 -0
- package/dist/index.es.js +1382 -1319
- package/dist/index.umd.cjs +1 -1
- package/dist/js/scripts.es.js +359 -358
- package/dist/js/scripts.umd.cjs +1 -1
- package/dist/scss/abstracts/variables/_token-variables.scss +2 -1
- package/dist/scss/abstracts/variables/_variables.scss +2 -0
- package/dist/style.css +1 -1
- package/package.json +17 -17
package/dist/js/scripts.es.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
const
|
|
1
|
+
const Ut = () => /Android/i.test(navigator.userAgent), Kt = typeof window < "u" && navigator.userAgent.toLowerCase().includes("firefox"), Xt = () => {
|
|
2
2
|
const s = document.getElementById("js-download-band");
|
|
3
|
-
s &&
|
|
3
|
+
s && Ut() && s.setAttribute(
|
|
4
4
|
"href",
|
|
5
5
|
"https://app.adjust.com/15shf6wg?campaign=Bandeau_1&deep_link=20minutes%3A%2F%2Fhome"
|
|
6
6
|
);
|
|
7
|
-
},
|
|
7
|
+
}, Yt = () => {
|
|
8
8
|
const s = document.querySelector("#js-election-selector");
|
|
9
9
|
s && s.addEventListener("change", (t) => {
|
|
10
10
|
window.location.replace(t.target.value);
|
|
11
11
|
});
|
|
12
|
-
},
|
|
12
|
+
}, Jt = () => {
|
|
13
13
|
const s = document.querySelector(".c-search-banner");
|
|
14
14
|
if (!s)
|
|
15
15
|
return;
|
|
@@ -24,7 +24,7 @@ const Kt = () => /Android/i.test(navigator.userAgent), Xt = 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
|
-
},
|
|
27
|
+
}, Qt = [
|
|
28
28
|
{
|
|
29
29
|
text: "Paris",
|
|
30
30
|
_index: "town_1717424751904",
|
|
@@ -55,7 +55,7 @@ const Kt = () => /Android/i.test(navigator.userAgent), Xt = typeof window < "u"
|
|
|
55
55
|
url: "/elections/resultats/paris/paris-75011"
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
],
|
|
58
|
+
], te = (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 Kt = () => /Android/i.test(navigator.userAgent), Xt = 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") ?
|
|
67
|
+
const _ = a && t.includes("20minutes.fr") ? Qt : await fetch(`${c}${e}${encodeURIComponent(g)}`).then(
|
|
68
68
|
(B) => B.json()
|
|
69
69
|
), E = o && typeof _ == "object" && _ !== null ? _[o] : _;
|
|
70
70
|
return Array.isArray(E) ? E : [];
|
|
@@ -98,7 +98,7 @@ const Kt = () => /Android/i.test(navigator.userAgent), Xt = typeof window < "u"
|
|
|
98
98
|
}), l.addEventListener("focusin", () => {
|
|
99
99
|
d.childElementCount > 0 && d.classList.remove("u-hidden");
|
|
100
100
|
});
|
|
101
|
-
},
|
|
101
|
+
}, ee = (s) => {
|
|
102
102
|
s.stopImmediatePropagation(), s.preventDefault();
|
|
103
103
|
const t = s.currentTarget;
|
|
104
104
|
if (t instanceof HTMLButtonElement) {
|
|
@@ -107,15 +107,15 @@ const Kt = () => /Android/i.test(navigator.userAgent), Xt = typeof window < "u"
|
|
|
107
107
|
);
|
|
108
108
|
t.getAttribute("aria-expanded") === "true" ? (t.setAttribute("aria-expanded", "false"), i?.setAttribute("aria-hidden", "true")) : (t.setAttribute("aria-expanded", "true"), i?.setAttribute("aria-hidden", "false"));
|
|
109
109
|
}
|
|
110
|
-
},
|
|
110
|
+
}, ie = (s = document.querySelector(
|
|
111
111
|
".js-collapse__button"
|
|
112
112
|
)) => {
|
|
113
113
|
s && document.querySelectorAll(".c-collapse__button").forEach((e) => {
|
|
114
114
|
e.addEventListener("click", (i) => {
|
|
115
|
-
|
|
115
|
+
ee(i);
|
|
116
116
|
});
|
|
117
117
|
});
|
|
118
|
-
},
|
|
118
|
+
}, se = "[data-countdown][data-countdown-end-date]", ne = (s) => {
|
|
119
119
|
const t = s.querySelector(".js-countdown-days"), e = s.querySelector(".js-countdown-hours"), i = s.querySelector(".js-countdown-minutes"), n = s.querySelector(".js-countdown-seconds");
|
|
120
120
|
return !t || !e || !i || !n ? null : {
|
|
121
121
|
daysElement: t,
|
|
@@ -123,35 +123,35 @@ const Kt = () => /Android/i.test(navigator.userAgent), Xt = typeof window < "u"
|
|
|
123
123
|
minutesElement: i,
|
|
124
124
|
secondsElement: n
|
|
125
125
|
};
|
|
126
|
-
},
|
|
126
|
+
}, ct = (s, t) => {
|
|
127
127
|
const e = s - Date.now();
|
|
128
128
|
if (e <= 0)
|
|
129
129
|
return !1;
|
|
130
130
|
const i = Math.floor(e / (1e3 * 60 * 60 * 24)), n = Math.floor(e % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60)), o = Math.floor(e % (1e3 * 60 * 60) / (1e3 * 60)), r = Math.floor(e % (1e3 * 60) / 1e3);
|
|
131
131
|
return t.daysElement.textContent = i.toString(), t.hoursElement.textContent = n.toString(), t.minutesElement.textContent = o.toString(), t.secondsElement.textContent = r.toString(), !0;
|
|
132
|
-
},
|
|
133
|
-
document.querySelectorAll(
|
|
134
|
-
const e = t.dataset.countdownEndDate, i = e ? new Date(e).getTime() : Number.NaN, n =
|
|
132
|
+
}, oe = () => {
|
|
133
|
+
document.querySelectorAll(se).forEach((t) => {
|
|
134
|
+
const e = t.dataset.countdownEndDate, i = e ? new Date(e).getTime() : Number.NaN, n = ne(t);
|
|
135
135
|
if (!n)
|
|
136
136
|
return;
|
|
137
137
|
if (Number.isNaN(i)) {
|
|
138
138
|
t.remove();
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
|
-
if (!
|
|
141
|
+
if (!ct(i, n)) {
|
|
142
142
|
t.remove();
|
|
143
143
|
return;
|
|
144
144
|
}
|
|
145
145
|
const o = setInterval(() => {
|
|
146
|
-
|
|
146
|
+
ct(i, n) || (clearInterval(o), t.remove());
|
|
147
147
|
}, 1e3);
|
|
148
148
|
});
|
|
149
|
-
},
|
|
149
|
+
}, re = (s) => {
|
|
150
150
|
const t = s.getBBox(), e = t.width / 20;
|
|
151
151
|
return [t.x - e, t.y - e, t.width + e * 2, t.height + e * 2].join(
|
|
152
152
|
" "
|
|
153
153
|
);
|
|
154
|
-
},
|
|
154
|
+
}, ae = () => {
|
|
155
155
|
const s = document.querySelector(".c-map-districts-container"), t = document.querySelector(".c-map-districts");
|
|
156
156
|
if (!s || !t)
|
|
157
157
|
return;
|
|
@@ -202,7 +202,7 @@ const Kt = () => /Android/i.test(navigator.userAgent), Xt = typeof window < "u"
|
|
|
202
202
|
);
|
|
203
203
|
d(
|
|
204
204
|
y || p,
|
|
205
|
-
|
|
205
|
+
re(y || p)
|
|
206
206
|
);
|
|
207
207
|
}
|
|
208
208
|
}, u = () => {
|
|
@@ -211,7 +211,7 @@ const Kt = () => /Android/i.test(navigator.userAgent), Xt = typeof window < "u"
|
|
|
211
211
|
t.addEventListener("click", u), n && n.addEventListener("click", u), document.querySelectorAll(".c-map-districts__zoomable").forEach((m) => {
|
|
212
212
|
m.addEventListener("click", (p) => h(p));
|
|
213
213
|
});
|
|
214
|
-
},
|
|
214
|
+
}, le = () => {
|
|
215
215
|
const s = document.getElementById("elections-form-search"), t = document.querySelector(".c-search-form__autocomplete");
|
|
216
216
|
if (!s || !t)
|
|
217
217
|
return;
|
|
@@ -239,59 +239,59 @@ const Kt = () => /Android/i.test(navigator.userAgent), Xt = typeof window < "u"
|
|
|
239
239
|
}), s.addEventListener("focusin", () => {
|
|
240
240
|
t.childElementCount > 0 && t.classList.remove("u-hidden");
|
|
241
241
|
});
|
|
242
|
-
},
|
|
242
|
+
}, ce = (s, t) => {
|
|
243
243
|
s.setAttribute("aria-expanded", "true"), s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach((n) => {
|
|
244
244
|
n.classList.remove(t);
|
|
245
245
|
});
|
|
246
246
|
const i = s.querySelector(".js-ellipsis-button__label");
|
|
247
247
|
i instanceof HTMLSpanElement && (i.innerHTML = "Voir moins");
|
|
248
|
-
},
|
|
248
|
+
}, de = (s, t) => {
|
|
249
249
|
s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach((n) => {
|
|
250
250
|
n.classList.add(t);
|
|
251
251
|
}), s.setAttribute("aria-expanded", "false");
|
|
252
252
|
const i = s.querySelector(".js-ellipsis-button__label");
|
|
253
253
|
i instanceof HTMLSpanElement && (i.innerHTML = "Voir plus");
|
|
254
|
-
},
|
|
254
|
+
}, he = (s, t) => {
|
|
255
255
|
const e = s.currentTarget;
|
|
256
256
|
if (s.preventDefault(), e instanceof HTMLButtonElement) {
|
|
257
257
|
const i = t ? "u-ellipsis-multiline" : "u-ellipsis";
|
|
258
|
-
return e.getAttribute("aria-expanded") === "true" ?
|
|
258
|
+
return e.getAttribute("aria-expanded") === "true" ? de(e, i) : ce(e, i);
|
|
259
259
|
}
|
|
260
260
|
return null;
|
|
261
|
-
},
|
|
261
|
+
}, ue = (s = document.querySelector(
|
|
262
262
|
".js-ellipsis-button"
|
|
263
263
|
)) => {
|
|
264
264
|
s && document.querySelectorAll(".js-ellipsis-button").forEach((e) => {
|
|
265
265
|
const i = e.getAttribute("data-multiple") === "true";
|
|
266
|
-
e.addEventListener("click", (n) =>
|
|
266
|
+
e.addEventListener("click", (n) => he(n, i));
|
|
267
267
|
});
|
|
268
|
-
},
|
|
268
|
+
}, pe = (s) => {
|
|
269
269
|
s.setAttribute("aria-expanded", "true"), s.parentNode?.querySelectorAll(".js-expand-target")?.forEach((i) => {
|
|
270
270
|
i.setAttribute("aria-hidden", "false");
|
|
271
271
|
});
|
|
272
272
|
const e = s.querySelector(".js-expand-button__label");
|
|
273
273
|
e instanceof HTMLSpanElement && (e.innerHTML = "Voir moins");
|
|
274
|
-
},
|
|
274
|
+
}, me = (s) => {
|
|
275
275
|
s.parentNode?.querySelectorAll(".js-expand-target")?.forEach((i) => {
|
|
276
276
|
i.setAttribute("aria-hidden", "true");
|
|
277
277
|
}), s.setAttribute("aria-expanded", "false");
|
|
278
278
|
const e = s.querySelector(".js-expand-button__label");
|
|
279
279
|
e instanceof HTMLSpanElement && (e.innerHTML = "Voir plus");
|
|
280
|
-
},
|
|
280
|
+
}, fe = (s) => {
|
|
281
281
|
const t = s.currentTarget;
|
|
282
|
-
return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ?
|
|
283
|
-
},
|
|
282
|
+
return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ? me(t) : pe(t) : null;
|
|
283
|
+
}, ge = (s) => {
|
|
284
284
|
const t = s.parentNode?.querySelector(".js-expand-target");
|
|
285
285
|
return !t || t.classList.contains("c-elections-result__members") ? !1 : (t.textContent?.trim().length ?? 0) < 255;
|
|
286
|
-
},
|
|
286
|
+
}, ve = (s = document.querySelector(
|
|
287
287
|
".js-expand-button"
|
|
288
288
|
)) => {
|
|
289
289
|
s && document.querySelectorAll(".js-expand-button").forEach((e) => {
|
|
290
|
-
|
|
290
|
+
ge(e) ? (e.style.display = "none", e.parentNode?.querySelectorAll(".js-expand-target")?.forEach((n) => {
|
|
291
291
|
n.setAttribute("aria-hidden", "false");
|
|
292
|
-
})) : e.addEventListener("click",
|
|
292
|
+
})) : e.addEventListener("click", fe);
|
|
293
293
|
});
|
|
294
|
-
},
|
|
294
|
+
}, It = (s, t) => {
|
|
295
295
|
const e = document.querySelector(".js-content-header"), i = document.querySelector(t), n = document.querySelector(s), o = document.querySelector(".c-header-mobile"), r = o instanceof HTMLElement ? o.offsetHeight : 0;
|
|
296
296
|
if (e && i && n) {
|
|
297
297
|
const a = new IntersectionObserver(
|
|
@@ -305,10 +305,10 @@ const Kt = () => /Android/i.test(navigator.userAgent), Xt = typeof window < "u"
|
|
|
305
305
|
);
|
|
306
306
|
a.observe(e), a.observe(i);
|
|
307
307
|
}
|
|
308
|
-
},
|
|
308
|
+
}, ye = () => It(".js-close-article-btn", ".js-limit-scroll-close-article-btn"), _e = () => It(".js-chatbot-btn", ".js-limit-scroll-chatbot-btn"), we = () => {
|
|
309
309
|
const s = document.querySelector(".js-game-alert");
|
|
310
|
-
|
|
311
|
-
},
|
|
310
|
+
Kt && s && s.classList.remove("u-hidden");
|
|
311
|
+
}, be = () => {
|
|
312
312
|
const s = document.querySelectorAll(".js-half-donut-result");
|
|
313
313
|
for (const t of Array.from(s)) {
|
|
314
314
|
const e = t.querySelector(".c-half-donut"), i = t.querySelector(".c-legend");
|
|
@@ -327,7 +327,7 @@ const Kt = () => /Android/i.test(navigator.userAgent), Xt = typeof window < "u"
|
|
|
327
327
|
});
|
|
328
328
|
});
|
|
329
329
|
}
|
|
330
|
-
},
|
|
330
|
+
}, Se = () => {
|
|
331
331
|
const s = document.querySelector(".c-image-slider__container");
|
|
332
332
|
if (!s)
|
|
333
333
|
return () => {
|
|
@@ -391,19 +391,19 @@ const Kt = () => /Android/i.test(navigator.userAgent), Xt = typeof window < "u"
|
|
|
391
391
|
}), c(!0), h(), () => {
|
|
392
392
|
u();
|
|
393
393
|
};
|
|
394
|
-
},
|
|
394
|
+
}, Le = (s) => {
|
|
395
395
|
s.stopImmediatePropagation(), s.preventDefault();
|
|
396
396
|
const t = s.currentTarget, e = document.getElementById("info-button-content");
|
|
397
397
|
!(t instanceof HTMLButtonElement) || !e || (t.getAttribute("aria-expanded") === "true" ? (t.setAttribute("aria-expanded", "false"), e.setAttribute("aria-hidden", "true")) : (t.setAttribute("aria-expanded", "true"), e.setAttribute("aria-hidden", "false")));
|
|
398
|
-
},
|
|
398
|
+
}, Ee = () => {
|
|
399
399
|
const s = document.querySelector(".js-info-banner__button");
|
|
400
|
-
s instanceof HTMLButtonElement && s.addEventListener("click",
|
|
400
|
+
s instanceof HTMLButtonElement && s.addEventListener("click", Le);
|
|
401
401
|
}, v = {
|
|
402
402
|
inert: ":not([inert]):not([inert] *)",
|
|
403
403
|
negTabIndex: ':not([tabindex^="-"])',
|
|
404
404
|
disabled: ":not(:disabled)"
|
|
405
405
|
};
|
|
406
|
-
var
|
|
406
|
+
var Ae = [
|
|
407
407
|
`a[href]${v.inert}${v.negTabIndex}`,
|
|
408
408
|
`area[href]${v.inert}${v.negTabIndex}`,
|
|
409
409
|
`input:not([type="hidden"]):not([type="radio"])${v.inert}${v.negTabIndex}${v.disabled}`,
|
|
@@ -421,24 +421,24 @@ var Ce = [
|
|
|
421
421
|
`[contenteditable]${v.inert}${v.negTabIndex}`,
|
|
422
422
|
`[tabindex]${v.inert}${v.negTabIndex}`
|
|
423
423
|
];
|
|
424
|
-
function
|
|
424
|
+
function dt(s) {
|
|
425
425
|
(s.querySelector("[autofocus]") || s).focus();
|
|
426
426
|
}
|
|
427
|
-
function
|
|
427
|
+
function Ce(s) {
|
|
428
428
|
const t = W(s, !0), e = t ? W(s, !1) || t : null;
|
|
429
429
|
return [t, e];
|
|
430
430
|
}
|
|
431
431
|
function W(s, t) {
|
|
432
|
-
if (t &&
|
|
432
|
+
if (t && pt(s))
|
|
433
433
|
return s;
|
|
434
|
-
if (
|
|
434
|
+
if (Pe(s))
|
|
435
435
|
if (s.shadowRoot) {
|
|
436
|
-
let e =
|
|
436
|
+
let e = ht(s.shadowRoot, t);
|
|
437
437
|
for (; e; ) {
|
|
438
438
|
const i = W(e, t);
|
|
439
439
|
if (i)
|
|
440
440
|
return i;
|
|
441
|
-
e =
|
|
441
|
+
e = ut(e, t);
|
|
442
442
|
}
|
|
443
443
|
} else if (s.localName === "slot") {
|
|
444
444
|
const e = s.assignedElements({
|
|
@@ -451,32 +451,32 @@ function W(s, t) {
|
|
|
451
451
|
return n;
|
|
452
452
|
}
|
|
453
453
|
} else {
|
|
454
|
-
let e =
|
|
454
|
+
let e = ht(s, t);
|
|
455
455
|
for (; e; ) {
|
|
456
456
|
const i = W(e, t);
|
|
457
457
|
if (i)
|
|
458
458
|
return i;
|
|
459
|
-
e =
|
|
459
|
+
e = ut(e, t);
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
return !t &&
|
|
462
|
+
return !t && pt(s) ? s : null;
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function ht(s, t) {
|
|
465
465
|
return t ? s.firstElementChild : s.lastElementChild;
|
|
466
466
|
}
|
|
467
|
-
function
|
|
467
|
+
function ut(s, t) {
|
|
468
468
|
return t ? s.nextElementSibling : s.previousElementSibling;
|
|
469
469
|
}
|
|
470
|
-
const
|
|
471
|
-
function
|
|
470
|
+
const xe = (s) => s.matches("details:not([open]) *") && !s.matches("details>summary:first-of-type") ? !0 : !(s.offsetWidth || s.offsetHeight || s.getClientRects().length), pt = (s) => s.shadowRoot?.delegatesFocus ? !1 : s.matches(Ae.join(",")) && !xe(s);
|
|
471
|
+
function Pe(s) {
|
|
472
472
|
return s.shadowRoot && s.getAttribute("tabindex") === "-1" ? !1 : !s.matches(":disabled,[hidden],[inert]");
|
|
473
473
|
}
|
|
474
474
|
function V(s = document) {
|
|
475
475
|
const t = s.activeElement;
|
|
476
476
|
return t ? t.shadowRoot ? V(t.shadowRoot) || document.activeElement : t : null;
|
|
477
477
|
}
|
|
478
|
-
function
|
|
479
|
-
const [e, i] =
|
|
478
|
+
function Te(s, t) {
|
|
479
|
+
const [e, i] = Ce(s);
|
|
480
480
|
if (!e)
|
|
481
481
|
return t.preventDefault();
|
|
482
482
|
const n = V();
|
|
@@ -486,16 +486,16 @@ function $(s, t) {
|
|
|
486
486
|
function e(i) {
|
|
487
487
|
if (!i || i === document || i === window)
|
|
488
488
|
return null;
|
|
489
|
-
const n =
|
|
489
|
+
const n = Mt(i);
|
|
490
490
|
return n && (i = n), i.closest(s) || e(i.getRootNode().host);
|
|
491
491
|
}
|
|
492
492
|
return e(t);
|
|
493
493
|
}
|
|
494
|
-
function
|
|
495
|
-
return s.assignedSlot || (s.parentNode ?
|
|
494
|
+
function Mt(s) {
|
|
495
|
+
return s.assignedSlot || (s.parentNode ? Mt(s.parentNode) : null);
|
|
496
496
|
}
|
|
497
497
|
const k = "data-a11y-dialog";
|
|
498
|
-
class
|
|
498
|
+
class zt {
|
|
499
499
|
$el;
|
|
500
500
|
id;
|
|
501
501
|
previouslyFocused;
|
|
@@ -544,7 +544,7 @@ class Dt {
|
|
|
544
544
|
* Returns the instance to allow method chaining.
|
|
545
545
|
*/
|
|
546
546
|
show(t) {
|
|
547
|
-
return this.shown ? this : this.fire("show", t).defaultPrevented ? this : (this.shown = !0, this.$el.removeAttribute("aria-hidden"), this.previouslyFocused = V(), this.previouslyFocused?.tagName === "BODY" && t?.target && (this.previouslyFocused = t.target), t?.type === "focus" ? this.maintainFocus() :
|
|
547
|
+
return this.shown ? this : this.fire("show", t).defaultPrevented ? this : (this.shown = !0, this.$el.removeAttribute("aria-hidden"), this.previouslyFocused = V(), this.previouslyFocused?.tagName === "BODY" && t?.target && (this.previouslyFocused = t.target), t?.type === "focus" ? this.maintainFocus() : dt(this.$el), document.body.addEventListener("focus", this.maintainFocus, !0), this.$el.addEventListener("keydown", this.bindKeypress, !0), this);
|
|
548
548
|
}
|
|
549
549
|
/**
|
|
550
550
|
* Hide the dialog.
|
|
@@ -607,7 +607,7 @@ class Dt {
|
|
|
607
607
|
e = !!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open');
|
|
608
608
|
} catch {
|
|
609
609
|
}
|
|
610
|
-
t.key === "Escape" && this.$el.getAttribute("role") !== "alertdialog" && !e && (t.preventDefault(), this.hide(t)), t.key === "Tab" &&
|
|
610
|
+
t.key === "Escape" && this.$el.getAttribute("role") !== "alertdialog" && !e && (t.preventDefault(), this.hide(t)), t.key === "Tab" && Te(this.$el, t);
|
|
611
611
|
}
|
|
612
612
|
/**
|
|
613
613
|
* If the dialog is shown and the focus is not within a dialog element (either
|
|
@@ -617,18 +617,18 @@ class Dt {
|
|
|
617
617
|
*/
|
|
618
618
|
maintainFocus() {
|
|
619
619
|
const t = V();
|
|
620
|
-
$(`[aria-modal="true"], [${k}-ignore-focus-trap]`, t) ||
|
|
620
|
+
$(`[aria-modal="true"], [${k}-ignore-focus-trap]`, t) || dt(this.$el);
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function mt() {
|
|
624
624
|
for (const s of document.querySelectorAll("[data-a11y-dialog]"))
|
|
625
|
-
new
|
|
625
|
+
new zt(s);
|
|
626
626
|
}
|
|
627
|
-
typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded",
|
|
628
|
-
const
|
|
627
|
+
typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", mt) : mt());
|
|
628
|
+
const Ie = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
629
629
|
if (!(s instanceof HTMLElement))
|
|
630
630
|
return;
|
|
631
|
-
const t = new
|
|
631
|
+
const t = new zt(s);
|
|
632
632
|
if (s.id === "dialog-menu") {
|
|
633
633
|
const e = document.querySelectorAll("button[data-a11y-dialog-show='dialog-menu']"), i = document.querySelectorAll("button[data-a11y-dialog-hide='dialog-menu']");
|
|
634
634
|
e.length > 0 && i.length > 0 && (t.on("show", () => {
|
|
@@ -650,27 +650,27 @@ const Me = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
650
650
|
}).on("hide", () => {
|
|
651
651
|
document.body.classList.remove("noscroll");
|
|
652
652
|
});
|
|
653
|
-
}), J = "50px",
|
|
653
|
+
}), J = "50px", rt = ({
|
|
654
654
|
navigationContainer: s,
|
|
655
655
|
navigatedList: t,
|
|
656
656
|
nextBtn: e,
|
|
657
657
|
prevBtn: i
|
|
658
658
|
}) => {
|
|
659
659
|
e.classList.contains("o-nav-button--visible") && !i.classList.contains("o-nav-button--visible") && (s.style.paddingRight = J, s.style.paddingLeft = ""), i.classList.contains("o-nav-button--visible") && (s.style.paddingLeft = J, e.classList.contains("o-nav-button--visible") && (s.style.paddingRight = J), e.classList.contains("o-nav-button--visible") || (s.style.paddingRight = "")), !e.classList.contains("o-nav-button--visible") && !i.classList.contains("o-nav-button--visible") && (t.style.width = "", s.style.paddingRight = "");
|
|
660
|
-
},
|
|
660
|
+
}, Me = ({
|
|
661
661
|
navigationContainer: s,
|
|
662
662
|
navigatedList: t,
|
|
663
663
|
nextBtn: e,
|
|
664
664
|
prevBtn: i
|
|
665
665
|
}) => {
|
|
666
666
|
const n = t.scrollLeft > 0, o = t.scrollLeft + (t.clientWidth + 0.5) < t.scrollWidth;
|
|
667
|
-
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") &&
|
|
667
|
+
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") && rt({
|
|
668
668
|
navigationContainer: s,
|
|
669
669
|
navigatedList: t,
|
|
670
670
|
nextBtn: e,
|
|
671
671
|
prevBtn: i
|
|
672
672
|
});
|
|
673
|
-
},
|
|
673
|
+
}, ze = ({
|
|
674
674
|
navigationContainer: s,
|
|
675
675
|
navigatedList: t,
|
|
676
676
|
nextBtn: e,
|
|
@@ -715,14 +715,14 @@ const Me = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
715
715
|
behavior: "smooth"
|
|
716
716
|
}), e.classList.remove("o-nav-button--visible"), i.classList.add("o-nav-button--visible");
|
|
717
717
|
}
|
|
718
|
-
e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") &&
|
|
718
|
+
e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && rt({
|
|
719
719
|
navigationContainer: s,
|
|
720
720
|
navigatedList: t,
|
|
721
721
|
nextBtn: e,
|
|
722
722
|
prevBtn: i
|
|
723
723
|
});
|
|
724
724
|
}
|
|
725
|
-
},
|
|
725
|
+
}, Oe = ({
|
|
726
726
|
navigationContainer: s,
|
|
727
727
|
navigatedList: t,
|
|
728
728
|
nextBtn: e,
|
|
@@ -763,26 +763,26 @@ const Me = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
763
763
|
left: 0,
|
|
764
764
|
behavior: "smooth"
|
|
765
765
|
}), i.classList.remove("o-nav-button--visible"), t.clientWidth < t.scrollWidth && e.classList.add("o-nav-button--visible");
|
|
766
|
-
e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") &&
|
|
766
|
+
e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && rt({
|
|
767
767
|
navigationContainer: s,
|
|
768
768
|
navigatedList: t,
|
|
769
769
|
nextBtn: e,
|
|
770
770
|
prevBtn: i
|
|
771
771
|
});
|
|
772
772
|
}
|
|
773
|
-
},
|
|
773
|
+
}, De = ({
|
|
774
774
|
navigationContainer: s,
|
|
775
775
|
navigatedList: t,
|
|
776
776
|
nextBtn: e,
|
|
777
777
|
prevBtn: i
|
|
778
778
|
}) => {
|
|
779
|
-
|
|
779
|
+
Me({
|
|
780
780
|
navigationContainer: s,
|
|
781
781
|
navigatedList: t,
|
|
782
782
|
nextBtn: e,
|
|
783
783
|
prevBtn: i
|
|
784
784
|
});
|
|
785
|
-
},
|
|
785
|
+
}, Re = (s) => {
|
|
786
786
|
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(
|
|
787
787
|
".js-navigation-container__list"
|
|
788
788
|
), c = s.querySelector(".o-nav-button--next-button"), d = s.querySelector(
|
|
@@ -790,7 +790,7 @@ const Me = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
790
790
|
);
|
|
791
791
|
if (!(!l || !c || !d) && (l.clientWidth < l.scrollWidth && (c.classList.add("o-nav-button--visible"), c.classList.contains("c-slider__button-container--has-space-around") && (s.style.paddingRight = J)), c.addEventListener(
|
|
792
792
|
"click",
|
|
793
|
-
|
|
793
|
+
ze.bind(!1, {
|
|
794
794
|
navigationContainer: s,
|
|
795
795
|
navigatedList: l,
|
|
796
796
|
nextBtn: c,
|
|
@@ -799,7 +799,7 @@ const Me = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
799
799
|
})
|
|
800
800
|
), d.addEventListener(
|
|
801
801
|
"click",
|
|
802
|
-
|
|
802
|
+
Oe.bind(!1, {
|
|
803
803
|
navigationContainer: s,
|
|
804
804
|
navigatedList: l,
|
|
805
805
|
nextBtn: c,
|
|
@@ -823,7 +823,7 @@ const Me = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
823
823
|
}, 0)), d.click());
|
|
824
824
|
}, n);
|
|
825
825
|
}
|
|
826
|
-
},
|
|
826
|
+
}, $e = () => {
|
|
827
827
|
const s = document.querySelectorAll(".js-navigation-container");
|
|
828
828
|
Array.from(s).forEach((t) => {
|
|
829
829
|
const e = t.querySelector(
|
|
@@ -833,13 +833,13 @@ const Me = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
833
833
|
const i = new ResizeObserver((n) => {
|
|
834
834
|
n.forEach((o) => {
|
|
835
835
|
const { width: r } = o.contentRect;
|
|
836
|
-
r > 0 && (
|
|
836
|
+
r > 0 && (Re(t), i.disconnect());
|
|
837
837
|
});
|
|
838
838
|
});
|
|
839
839
|
i.observe(e);
|
|
840
840
|
}
|
|
841
841
|
});
|
|
842
|
-
},
|
|
842
|
+
}, Be = () => {
|
|
843
843
|
const s = document.querySelectorAll(".js-navigation-container");
|
|
844
844
|
for (const t of Array.from(s))
|
|
845
845
|
if (t) {
|
|
@@ -852,7 +852,7 @@ const Me = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
852
852
|
);
|
|
853
853
|
e && i && n && window.addEventListener(
|
|
854
854
|
"resize",
|
|
855
|
-
|
|
855
|
+
De.bind(!1, {
|
|
856
856
|
navigationContainer: t,
|
|
857
857
|
navigatedList: e,
|
|
858
858
|
nextBtn: i,
|
|
@@ -868,10 +868,10 @@ function x(s, t, e) {
|
|
|
868
868
|
function S(s, t) {
|
|
869
869
|
return s.x = t.x, s.y = t.y, t.id !== void 0 && (s.id = t.id), s;
|
|
870
870
|
}
|
|
871
|
-
function
|
|
871
|
+
function Ot(s) {
|
|
872
872
|
s.x = Math.round(s.x), s.y = Math.round(s.y);
|
|
873
873
|
}
|
|
874
|
-
function
|
|
874
|
+
function et(s, t) {
|
|
875
875
|
const e = Math.abs(s.x - t.x), i = Math.abs(s.y - t.y);
|
|
876
876
|
return Math.sqrt(e * e + i * i);
|
|
877
877
|
}
|
|
@@ -888,17 +888,17 @@ function G(s, t, e) {
|
|
|
888
888
|
function D(s, t, e, i) {
|
|
889
889
|
s.style.transform = G(t, e, i);
|
|
890
890
|
}
|
|
891
|
-
const
|
|
892
|
-
function
|
|
893
|
-
s.style.transition = t ? `${t} ${e}ms ${i ||
|
|
891
|
+
const Fe = "cubic-bezier(.4,0,.22,1)";
|
|
892
|
+
function Dt(s, t, e, i) {
|
|
893
|
+
s.style.transition = t ? `${t} ${e}ms ${i || Fe}` : "none";
|
|
894
894
|
}
|
|
895
|
-
function
|
|
895
|
+
function it(s, t, e) {
|
|
896
896
|
s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
|
|
897
897
|
}
|
|
898
|
-
function
|
|
899
|
-
|
|
898
|
+
function ke(s) {
|
|
899
|
+
Dt(s);
|
|
900
900
|
}
|
|
901
|
-
function
|
|
901
|
+
function Ze(s) {
|
|
902
902
|
return "decode" in s ? s.decode().catch(() => {
|
|
903
903
|
}) : s.complete ? Promise.resolve(s) : new Promise((t, e) => {
|
|
904
904
|
s.onload = () => t(s), s.onerror = e;
|
|
@@ -910,10 +910,10 @@ const P = {
|
|
|
910
910
|
LOADED: "loaded",
|
|
911
911
|
ERROR: "error"
|
|
912
912
|
};
|
|
913
|
-
function
|
|
913
|
+
function Ne(s) {
|
|
914
914
|
return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
|
|
915
915
|
}
|
|
916
|
-
function
|
|
916
|
+
function qe(s, t, e = document) {
|
|
917
917
|
let i = [];
|
|
918
918
|
if (s instanceof Element)
|
|
919
919
|
i = [s];
|
|
@@ -925,19 +925,19 @@ function He(s, t, e = document) {
|
|
|
925
925
|
}
|
|
926
926
|
return i;
|
|
927
927
|
}
|
|
928
|
-
function
|
|
928
|
+
function ft() {
|
|
929
929
|
return !!(navigator.vendor && navigator.vendor.match(/apple/i));
|
|
930
930
|
}
|
|
931
|
-
let
|
|
931
|
+
let Rt = !1;
|
|
932
932
|
try {
|
|
933
933
|
window.addEventListener("test", null, Object.defineProperty({}, "passive", {
|
|
934
934
|
get: () => {
|
|
935
|
-
|
|
935
|
+
Rt = !0;
|
|
936
936
|
}
|
|
937
937
|
}));
|
|
938
938
|
} catch {
|
|
939
939
|
}
|
|
940
|
-
class
|
|
940
|
+
class He {
|
|
941
941
|
constructor() {
|
|
942
942
|
this._pool = [];
|
|
943
943
|
}
|
|
@@ -994,7 +994,7 @@ class We {
|
|
|
994
994
|
listener: i,
|
|
995
995
|
passive: n
|
|
996
996
|
}));
|
|
997
|
-
const d =
|
|
997
|
+
const d = Rt ? {
|
|
998
998
|
passive: n || !1
|
|
999
999
|
} : !1;
|
|
1000
1000
|
t[a](c, i, d);
|
|
@@ -1002,7 +1002,7 @@ class We {
|
|
|
1002
1002
|
});
|
|
1003
1003
|
}
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1005
|
+
function $t(s, t) {
|
|
1006
1006
|
if (s.getViewportSizeFn) {
|
|
1007
1007
|
const e = s.getViewportSizeFn(s, t);
|
|
1008
1008
|
if (e)
|
|
@@ -1029,13 +1029,13 @@ function N(s, t, e, i, n) {
|
|
|
1029
1029
|
}
|
|
1030
1030
|
return Number(o) || 0;
|
|
1031
1031
|
}
|
|
1032
|
-
function
|
|
1032
|
+
function Bt(s, t, e, i) {
|
|
1033
1033
|
return {
|
|
1034
1034
|
x: t.x - N("left", s, t, e, i) - N("right", s, t, e, i),
|
|
1035
1035
|
y: t.y - N("top", s, t, e, i) - N("bottom", s, t, e, i)
|
|
1036
1036
|
};
|
|
1037
1037
|
}
|
|
1038
|
-
class
|
|
1038
|
+
class We {
|
|
1039
1039
|
/**
|
|
1040
1040
|
* @param {Slide} slide
|
|
1041
1041
|
*/
|
|
@@ -1090,8 +1090,8 @@ class Ve {
|
|
|
1090
1090
|
return U(e, this.max[t], this.min[t]);
|
|
1091
1091
|
}
|
|
1092
1092
|
}
|
|
1093
|
-
const
|
|
1094
|
-
let
|
|
1093
|
+
const gt = 4e3;
|
|
1094
|
+
let Ft = class {
|
|
1095
1095
|
/**
|
|
1096
1096
|
* @param {PhotoSwipeOptions} options PhotoSwipe options
|
|
1097
1097
|
* @param {SlideData} itemData Slide data
|
|
@@ -1148,7 +1148,7 @@ let Zt = class {
|
|
|
1148
1148
|
*/
|
|
1149
1149
|
_getSecondary() {
|
|
1150
1150
|
let t = this._parseZoomLevelOption("secondary");
|
|
1151
|
-
return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x >
|
|
1151
|
+
return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > gt && (t = gt / this.elementSize.x), t);
|
|
1152
1152
|
}
|
|
1153
1153
|
/**
|
|
1154
1154
|
* Get initial image zoom level.
|
|
@@ -1171,7 +1171,7 @@ let Zt = class {
|
|
|
1171
1171
|
return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
|
|
1172
1172
|
}
|
|
1173
1173
|
};
|
|
1174
|
-
class
|
|
1174
|
+
class Ve {
|
|
1175
1175
|
/**
|
|
1176
1176
|
* @param {SlideData} data
|
|
1177
1177
|
* @param {number} index
|
|
@@ -1184,11 +1184,11 @@ class je {
|
|
|
1184
1184
|
}, this.pan = {
|
|
1185
1185
|
x: 0,
|
|
1186
1186
|
y: 0
|
|
1187
|
-
}, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new
|
|
1187
|
+
}, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new Ft(i.options, t, e, i), this.pswp.dispatch("gettingData", {
|
|
1188
1188
|
slide: this,
|
|
1189
1189
|
data: this.data,
|
|
1190
1190
|
index: e
|
|
1191
|
-
}), 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
|
|
1191
|
+
}), 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 We(this), this.prevDisplayedWidth = -1, this.prevDisplayedHeight = -1, this.pswp.dispatch("slideInit", {
|
|
1192
1192
|
slide: this
|
|
1193
1193
|
});
|
|
1194
1194
|
}
|
|
@@ -1312,7 +1312,7 @@ class je {
|
|
|
1312
1312
|
transitionDuration: i
|
|
1313
1313
|
}), o.animations.stopAllPan();
|
|
1314
1314
|
const r = this.currZoomLevel;
|
|
1315
|
-
n || (t = U(t, this.zoomLevels.min, this.zoomLevels.max)), this.setZoomLevel(t), this.pan.x = this.calculateZoomToPanOffset("x", e, r), this.pan.y = this.calculateZoomToPanOffset("y", e, r),
|
|
1315
|
+
n || (t = U(t, this.zoomLevels.min, this.zoomLevels.max)), this.setZoomLevel(t), this.pan.x = this.calculateZoomToPanOffset("x", e, r), this.pan.y = this.calculateZoomToPanOffset("y", e, r), Ot(this.pan);
|
|
1316
1316
|
const a = () => {
|
|
1317
1317
|
this._setResolution(t), this.applyCurrentZoomPan();
|
|
1318
1318
|
};
|
|
@@ -1413,7 +1413,7 @@ class je {
|
|
|
1413
1413
|
const {
|
|
1414
1414
|
pswp: t
|
|
1415
1415
|
} = this;
|
|
1416
|
-
S(this.panAreaSize,
|
|
1416
|
+
S(this.panAreaSize, Bt(t.options, t.viewportSize, this.data, this.index)), this.zoomLevels.update(this.width, this.height, this.panAreaSize), t.dispatch("calcSlideSize", {
|
|
1417
1417
|
slide: this
|
|
1418
1418
|
});
|
|
1419
1419
|
}
|
|
@@ -1441,11 +1441,11 @@ class je {
|
|
|
1441
1441
|
t !== this.currentResolution && (this.currentResolution = t, this.updateContentSize(), this.pswp.dispatch("resolutionChanged"));
|
|
1442
1442
|
}
|
|
1443
1443
|
}
|
|
1444
|
-
const
|
|
1445
|
-
function
|
|
1444
|
+
const je = 0.35, Ge = 0.6, vt = 0.4, yt = 0.5;
|
|
1445
|
+
function Ue(s, t) {
|
|
1446
1446
|
return s * t / (1 - t);
|
|
1447
1447
|
}
|
|
1448
|
-
class
|
|
1448
|
+
class Ke {
|
|
1449
1449
|
/**
|
|
1450
1450
|
* @param {Gestures} gestures
|
|
1451
1451
|
*/
|
|
@@ -1471,12 +1471,12 @@ class Xe {
|
|
|
1471
1471
|
if (!this.pswp.dispatch("verticalDrag", {
|
|
1472
1472
|
panY: o
|
|
1473
1473
|
}).defaultPrevented) {
|
|
1474
|
-
this._setPanWithFriction("y", o,
|
|
1474
|
+
this._setPanWithFriction("y", o, Ge);
|
|
1475
1475
|
const r = 1 - Math.abs(this._getVerticalDragRatio(n.pan.y));
|
|
1476
1476
|
this.pswp.applyBgOpacity(r), n.applyCurrentZoomPan();
|
|
1477
1477
|
}
|
|
1478
1478
|
} else
|
|
1479
|
-
this._panOrMoveMainScroll("x") || (this._panOrMoveMainScroll("y"), n && (
|
|
1479
|
+
this._panOrMoveMainScroll("x") || (this._panOrMoveMainScroll("y"), n && (Ot(n.pan), n.applyCurrentZoomPan()));
|
|
1480
1480
|
}
|
|
1481
1481
|
end() {
|
|
1482
1482
|
const {
|
|
@@ -1488,7 +1488,7 @@ class Xe {
|
|
|
1488
1488
|
let n = 0;
|
|
1489
1489
|
if (this.pswp.animations.stopAll(), e.isShifted()) {
|
|
1490
1490
|
const r = (e.x - e.getCurrSlideX()) / this.pswp.viewportSize.x;
|
|
1491
|
-
t.x < -
|
|
1491
|
+
t.x < -yt && r < 0 || t.x < 0.1 && r < -0.5 ? (n = 1, t.x = Math.min(t.x, 0)) : (t.x > yt && r > 0 || t.x > -0.1 && r > 0.5) && (n = -1, t.x = Math.max(t.x, 0)), e.moveIndexBy(n, !0, t.x);
|
|
1492
1492
|
}
|
|
1493
1493
|
i && i.currZoomLevel > i.zoomLevels.max || this.gestures.isMultitouch ? this.gestures.zoomLevels.correctZoomPan(!0) : (this._finishPanGestureForAxis("x"), this._finishPanGestureForAxis("y"));
|
|
1494
1494
|
}
|
|
@@ -1507,10 +1507,10 @@ class Xe {
|
|
|
1507
1507
|
const {
|
|
1508
1508
|
pan: n,
|
|
1509
1509
|
bounds: o
|
|
1510
|
-
} = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", c = r +
|
|
1510
|
+
} = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", c = r + Ue(e[t], 0.995);
|
|
1511
1511
|
if (a) {
|
|
1512
1512
|
const m = this._getVerticalDragRatio(r), p = this._getVerticalDragRatio(c);
|
|
1513
|
-
if (m < 0 && p < -
|
|
1513
|
+
if (m < 0 && p < -vt || m > 0 && p > vt) {
|
|
1514
1514
|
this.pswp.close();
|
|
1515
1515
|
return;
|
|
1516
1516
|
}
|
|
@@ -1622,16 +1622,16 @@ class Xe {
|
|
|
1622
1622
|
} = n;
|
|
1623
1623
|
if (r.correctPan(t, e) !== e || i) {
|
|
1624
1624
|
const l = Math.round(e - o[t]);
|
|
1625
|
-
o[t] += l * (i ||
|
|
1625
|
+
o[t] += l * (i || je);
|
|
1626
1626
|
} else
|
|
1627
1627
|
o[t] = e;
|
|
1628
1628
|
}
|
|
1629
1629
|
}
|
|
1630
|
-
const
|
|
1631
|
-
function
|
|
1630
|
+
const Xe = 0.05, Ye = 0.15;
|
|
1631
|
+
function _t(s, t, e) {
|
|
1632
1632
|
return s.x = (t.x + e.x) / 2, s.y = (t.y + e.y) / 2, s;
|
|
1633
1633
|
}
|
|
1634
|
-
class
|
|
1634
|
+
class Je {
|
|
1635
1635
|
/**
|
|
1636
1636
|
* @param {Gestures} gestures
|
|
1637
1637
|
*/
|
|
@@ -1668,8 +1668,8 @@ class Qe {
|
|
|
1668
1668
|
const a = r.zoomLevels.min, l = r.zoomLevels.max;
|
|
1669
1669
|
if (!r.isZoomable() || o.mainScroll.isShifted())
|
|
1670
1670
|
return;
|
|
1671
|
-
|
|
1672
|
-
let c = 1 /
|
|
1671
|
+
_t(this._startZoomPoint, e, n), _t(this._zoomPoint, t, i);
|
|
1672
|
+
let c = 1 / et(e, n) * et(t, i) * this._startZoomLevel;
|
|
1673
1673
|
if (c > r.zoomLevels.initial + r.zoomLevels.initial / 15 && (this._wasOverFitZoomLevel = !0), c < a)
|
|
1674
1674
|
if (o.options.pinchToClose && !this._wasOverFitZoomLevel && this._startZoomLevel <= r.zoomLevels.initial) {
|
|
1675
1675
|
const d = 1 - (a - c) / (a / 1.2);
|
|
@@ -1677,8 +1677,8 @@ class Qe {
|
|
|
1677
1677
|
bgOpacity: d
|
|
1678
1678
|
}).defaultPrevented || o.applyBgOpacity(d);
|
|
1679
1679
|
} else
|
|
1680
|
-
c = a - (a - c) *
|
|
1681
|
-
else c > l && (c = l + (c - l) *
|
|
1680
|
+
c = a - (a - c) * Ye;
|
|
1681
|
+
else c > l && (c = l + (c - l) * Xe);
|
|
1682
1682
|
r.pan.x = this._calculatePanForZoomLevel("x", c), r.pan.y = this._calculatePanForZoomLevel("y", c), r.setZoomLevel(c), r.applyCurrentZoomPan();
|
|
1683
1683
|
}
|
|
1684
1684
|
end() {
|
|
@@ -1762,11 +1762,11 @@ class Qe {
|
|
|
1762
1762
|
});
|
|
1763
1763
|
}
|
|
1764
1764
|
}
|
|
1765
|
-
function
|
|
1765
|
+
function wt(s) {
|
|
1766
1766
|
return !!/** @type {HTMLElement} */
|
|
1767
1767
|
s.target.closest(".pswp__container");
|
|
1768
1768
|
}
|
|
1769
|
-
class
|
|
1769
|
+
class Qe {
|
|
1770
1770
|
/**
|
|
1771
1771
|
* @param {Gestures} gestures
|
|
1772
1772
|
*/
|
|
@@ -1789,14 +1789,14 @@ class ti {
|
|
|
1789
1789
|
* @param {PointerEvent} originalEvent
|
|
1790
1790
|
*/
|
|
1791
1791
|
tap(t, e) {
|
|
1792
|
-
|
|
1792
|
+
wt(e) && this._doClickOrTapAction("tap", t, e);
|
|
1793
1793
|
}
|
|
1794
1794
|
/**
|
|
1795
1795
|
* @param {Point} point
|
|
1796
1796
|
* @param {PointerEvent} originalEvent
|
|
1797
1797
|
*/
|
|
1798
1798
|
doubleTap(t, e) {
|
|
1799
|
-
|
|
1799
|
+
wt(e) && this._doClickOrTapAction("doubleTap", t, e);
|
|
1800
1800
|
}
|
|
1801
1801
|
/**
|
|
1802
1802
|
* @private
|
|
@@ -1840,8 +1840,8 @@ class ti {
|
|
|
1840
1840
|
}
|
|
1841
1841
|
}
|
|
1842
1842
|
}
|
|
1843
|
-
const
|
|
1844
|
-
class
|
|
1843
|
+
const ti = 10, ei = 300, ii = 25;
|
|
1844
|
+
class si {
|
|
1845
1845
|
/**
|
|
1846
1846
|
* @param {PhotoSwipe} pswp
|
|
1847
1847
|
*/
|
|
@@ -1873,7 +1873,7 @@ class ni {
|
|
|
1873
1873
|
}, this._intervalP1 = {
|
|
1874
1874
|
x: 0,
|
|
1875
1875
|
y: 0
|
|
1876
|
-
}, 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
|
|
1876
|
+
}, 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 Ke(this), this.zoomLevels = new Je(this), this.tapHandler = new Qe(this), t.on("bindEvents", () => {
|
|
1877
1877
|
t.events.add(
|
|
1878
1878
|
t.scrollWrap,
|
|
1879
1879
|
"click",
|
|
@@ -1993,8 +1993,8 @@ class ni {
|
|
|
1993
1993
|
this.tapHandler.click(this.startP1, t);
|
|
1994
1994
|
return;
|
|
1995
1995
|
}
|
|
1996
|
-
const i = this.pswp.options.doubleTapAction ?
|
|
1997
|
-
this._tapTimer ? (this._clearTapTimer(),
|
|
1996
|
+
const i = this.pswp.options.doubleTapAction ? ei : 0;
|
|
1997
|
+
this._tapTimer ? (this._clearTapTimer(), et(this._lastStartP1, this.startP1) < ii && this.tapHandler.doubleTap(this.startP1, t)) : (S(this._lastStartP1, this.startP1), this._tapTimer = setTimeout(() => {
|
|
1998
1998
|
this.tapHandler.tap(this.startP1, t), this._clearTapTimer();
|
|
1999
1999
|
}, i));
|
|
2000
2000
|
}
|
|
@@ -2080,7 +2080,7 @@ class ni {
|
|
|
2080
2080
|
const t = Math.abs(this.p1.x - this.startP1.x) - Math.abs(this.p1.y - this.startP1.y);
|
|
2081
2081
|
if (t !== 0) {
|
|
2082
2082
|
const e = t > 0 ? "x" : "y";
|
|
2083
|
-
Math.abs(this.p1[e] - this.startP1[e]) >=
|
|
2083
|
+
Math.abs(this.p1[e] - this.startP1[e]) >= ti && (this.dragAxis = e);
|
|
2084
2084
|
}
|
|
2085
2085
|
}
|
|
2086
2086
|
}
|
|
@@ -2104,8 +2104,8 @@ class ni {
|
|
|
2104
2104
|
this.pswp.mainScroll.isShifted() && (t.preventDefault(), t.stopPropagation());
|
|
2105
2105
|
}
|
|
2106
2106
|
}
|
|
2107
|
-
const
|
|
2108
|
-
class
|
|
2107
|
+
const ni = 0.35;
|
|
2108
|
+
class oi {
|
|
2109
2109
|
/**
|
|
2110
2110
|
* @param {PhotoSwipe} pswp
|
|
2111
2111
|
*/
|
|
@@ -2258,7 +2258,7 @@ class ri {
|
|
|
2258
2258
|
let i = (this.slideWidth * this._currPositionIndex - t) / this.slideWidth;
|
|
2259
2259
|
i += this.pswp.currIndex;
|
|
2260
2260
|
const n = Math.round(t - this.x);
|
|
2261
|
-
(i < 0 && n > 0 || i >= this.pswp.getNumItems() - 1 && n < 0) && (t = this.x + n *
|
|
2261
|
+
(i < 0 && n > 0 || i >= this.pswp.getNumItems() - 1 && n < 0) && (t = this.x + n * ni);
|
|
2262
2262
|
}
|
|
2263
2263
|
this.x = t, this.pswp.container && D(this.pswp.container, t), this.pswp.dispatch("moveMainScroll", {
|
|
2264
2264
|
x: t,
|
|
@@ -2266,7 +2266,7 @@ class ri {
|
|
|
2266
2266
|
});
|
|
2267
2267
|
}
|
|
2268
2268
|
}
|
|
2269
|
-
const
|
|
2269
|
+
const ri = {
|
|
2270
2270
|
Escape: 27,
|
|
2271
2271
|
z: 90,
|
|
2272
2272
|
ArrowLeft: 37,
|
|
@@ -2274,8 +2274,8 @@ const ai = {
|
|
|
2274
2274
|
ArrowRight: 39,
|
|
2275
2275
|
ArrowDown: 40,
|
|
2276
2276
|
Tab: 9
|
|
2277
|
-
}, O = (s, t) => t ? s :
|
|
2278
|
-
class
|
|
2277
|
+
}, O = (s, t) => t ? s : ri[s];
|
|
2278
|
+
class ai {
|
|
2279
2279
|
/**
|
|
2280
2280
|
* @param {PhotoSwipe} pswp
|
|
2281
2281
|
*/
|
|
@@ -2315,7 +2315,7 @@ class li {
|
|
|
2315
2315
|
} = this;
|
|
2316
2316
|
if (e.dispatch("keydown", {
|
|
2317
2317
|
originalEvent: t
|
|
2318
|
-
}).defaultPrevented ||
|
|
2318
|
+
}).defaultPrevented || Ne(t))
|
|
2319
2319
|
return;
|
|
2320
2320
|
let i, n, o = !1;
|
|
2321
2321
|
const r = "key" in t;
|
|
@@ -2367,8 +2367,8 @@ class li {
|
|
|
2367
2367
|
) && e.focus();
|
|
2368
2368
|
}
|
|
2369
2369
|
}
|
|
2370
|
-
const
|
|
2371
|
-
class
|
|
2370
|
+
const li = "cubic-bezier(.4,0,.22,1)";
|
|
2371
|
+
class ci {
|
|
2372
2372
|
/**
|
|
2373
2373
|
* onComplete can be unpredictable, be careful about current state
|
|
2374
2374
|
*
|
|
@@ -2384,12 +2384,12 @@ class di {
|
|
|
2384
2384
|
onFinish: r = () => {
|
|
2385
2385
|
},
|
|
2386
2386
|
duration: a = 333,
|
|
2387
|
-
easing: l =
|
|
2387
|
+
easing: l = li
|
|
2388
2388
|
} = t;
|
|
2389
2389
|
this.onFinish = r;
|
|
2390
2390
|
const c = o ? "transform" : "opacity", d = (e = t[c]) !== null && e !== void 0 ? e : "";
|
|
2391
2391
|
this._target = i, this._onComplete = n, this._finished = !1, this._onTransitionEnd = this._onTransitionEnd.bind(this), this._helperTimeout = setTimeout(() => {
|
|
2392
|
-
|
|
2392
|
+
Dt(i, c, a, l), this._helperTimeout = setTimeout(() => {
|
|
2393
2393
|
i.addEventListener("transitionend", this._onTransitionEnd, !1), i.addEventListener("transitioncancel", this._onTransitionEnd, !1), this._helperTimeout = setTimeout(() => {
|
|
2394
2394
|
this._finalizeAnimation();
|
|
2395
2395
|
}, a + 500), i.style[c] = d;
|
|
@@ -2411,11 +2411,11 @@ class di {
|
|
|
2411
2411
|
}
|
|
2412
2412
|
// Destroy is called automatically onFinish
|
|
2413
2413
|
destroy() {
|
|
2414
|
-
this._helperTimeout && clearTimeout(this._helperTimeout),
|
|
2414
|
+
this._helperTimeout && clearTimeout(this._helperTimeout), ke(this._target), this._target.removeEventListener("transitionend", this._onTransitionEnd, !1), this._target.removeEventListener("transitioncancel", this._onTransitionEnd, !1), this._finished || this._finalizeAnimation();
|
|
2415
2415
|
}
|
|
2416
2416
|
}
|
|
2417
|
-
const
|
|
2418
|
-
class
|
|
2417
|
+
const di = 12, hi = 0.75;
|
|
2418
|
+
class ui {
|
|
2419
2419
|
/**
|
|
2420
2420
|
* @param {number} initialVelocity Initial velocity, px per ms.
|
|
2421
2421
|
*
|
|
@@ -2432,7 +2432,7 @@ class pi {
|
|
|
2432
2432
|
* Recommended value from 10 to 50
|
|
2433
2433
|
*/
|
|
2434
2434
|
constructor(t, e, i) {
|
|
2435
|
-
this.velocity = t * 1e3, this._dampingRatio = e ||
|
|
2435
|
+
this.velocity = t * 1e3, this._dampingRatio = e || hi, this._naturalFrequency = i || di, this._dampedFrequency = this._naturalFrequency, this._dampingRatio < 1 && (this._dampedFrequency *= Math.sqrt(1 - this._dampingRatio * this._dampingRatio));
|
|
2436
2436
|
}
|
|
2437
2437
|
/**
|
|
2438
2438
|
* @param {number} deltaPosition Difference between current and end position of the animation
|
|
@@ -2454,7 +2454,7 @@ class pi {
|
|
|
2454
2454
|
return i;
|
|
2455
2455
|
}
|
|
2456
2456
|
}
|
|
2457
|
-
class
|
|
2457
|
+
class pi {
|
|
2458
2458
|
/**
|
|
2459
2459
|
* @param {SpringAnimationProps} props
|
|
2460
2460
|
*/
|
|
@@ -2472,7 +2472,7 @@ class mi {
|
|
|
2472
2472
|
naturalFrequency: c
|
|
2473
2473
|
} = t;
|
|
2474
2474
|
this.onFinish = a;
|
|
2475
|
-
const d = new
|
|
2475
|
+
const d = new ui(n, l, c);
|
|
2476
2476
|
let h = Date.now(), u = e - i;
|
|
2477
2477
|
const f = () => {
|
|
2478
2478
|
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)));
|
|
@@ -2484,7 +2484,7 @@ class mi {
|
|
|
2484
2484
|
this._raf >= 0 && cancelAnimationFrame(this._raf), this._raf = 0;
|
|
2485
2485
|
}
|
|
2486
2486
|
}
|
|
2487
|
-
class
|
|
2487
|
+
class mi {
|
|
2488
2488
|
constructor() {
|
|
2489
2489
|
this.activeAnimations = [];
|
|
2490
2490
|
}
|
|
@@ -2507,10 +2507,10 @@ class fi {
|
|
|
2507
2507
|
* @returns {Animation}
|
|
2508
2508
|
*/
|
|
2509
2509
|
_start(t, e) {
|
|
2510
|
-
const i = e ? new
|
|
2510
|
+
const i = e ? new pi(
|
|
2511
2511
|
/** @type SpringAnimationProps */
|
|
2512
2512
|
t
|
|
2513
|
-
) : new
|
|
2513
|
+
) : new ci(
|
|
2514
2514
|
/** @type CssAnimationProps */
|
|
2515
2515
|
t
|
|
2516
2516
|
);
|
|
@@ -2553,7 +2553,7 @@ class fi {
|
|
|
2553
2553
|
return this.activeAnimations.some((t) => t.props.isPan);
|
|
2554
2554
|
}
|
|
2555
2555
|
}
|
|
2556
|
-
class
|
|
2556
|
+
class fi {
|
|
2557
2557
|
/**
|
|
2558
2558
|
* @param {PhotoSwipe} pswp
|
|
2559
2559
|
*/
|
|
@@ -2595,7 +2595,7 @@ class gi {
|
|
|
2595
2595
|
e.isPannable() && (t.deltaMode === 1 && (i *= 18, n *= 18), e.panTo(e.pan.x - i, e.pan.y - n));
|
|
2596
2596
|
}
|
|
2597
2597
|
}
|
|
2598
|
-
function
|
|
2598
|
+
function gi(s) {
|
|
2599
2599
|
if (typeof s == "string")
|
|
2600
2600
|
return s;
|
|
2601
2601
|
if (!s || !s.isCustomSVG)
|
|
@@ -2607,7 +2607,7 @@ function vi(s) {
|
|
|
2607
2607
|
t.size || 32
|
|
2608
2608
|
), t.outlineID && (e += '<use class="pswp__icn-shadow" xlink:href="#' + t.outlineID + '"/>'), e += t.inner, e += "</svg>", e;
|
|
2609
2609
|
}
|
|
2610
|
-
class
|
|
2610
|
+
class vi {
|
|
2611
2611
|
/**
|
|
2612
2612
|
* @param {PhotoSwipe} pswp
|
|
2613
2613
|
* @param {UIElementData} data
|
|
@@ -2639,7 +2639,7 @@ class yi {
|
|
|
2639
2639
|
const f = u || h;
|
|
2640
2640
|
f && l.setAttribute("aria-label", f);
|
|
2641
2641
|
}
|
|
2642
|
-
l.innerHTML =
|
|
2642
|
+
l.innerHTML = gi(o), e.onInit && e.onInit(l, t), e.onClick && (l.onclick = (h) => {
|
|
2643
2643
|
typeof e.onClick == "string" ? t[e.onClick]() : typeof e.onClick == "function" && e.onClick(h, l, t);
|
|
2644
2644
|
});
|
|
2645
2645
|
const c = e.appendTo || "bar";
|
|
@@ -2647,12 +2647,12 @@ class yi {
|
|
|
2647
2647
|
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));
|
|
2648
2648
|
}
|
|
2649
2649
|
}
|
|
2650
|
-
function
|
|
2650
|
+
function kt(s, t, e) {
|
|
2651
2651
|
s.classList.add("pswp__button--arrow"), s.setAttribute("aria-controls", "pswp__items"), t.on("change", () => {
|
|
2652
2652
|
t.options.loop || (e ? s.disabled = !(t.currIndex < t.getNumItems() - 1) : s.disabled = !(t.currIndex > 0));
|
|
2653
2653
|
});
|
|
2654
2654
|
}
|
|
2655
|
-
const
|
|
2655
|
+
const yi = {
|
|
2656
2656
|
name: "arrowPrev",
|
|
2657
2657
|
className: "pswp__button--arrow--prev",
|
|
2658
2658
|
title: "Previous",
|
|
@@ -2666,8 +2666,8 @@ const _i = {
|
|
|
2666
2666
|
outlineID: "pswp__icn-arrow"
|
|
2667
2667
|
},
|
|
2668
2668
|
onClick: "prev",
|
|
2669
|
-
onInit:
|
|
2670
|
-
},
|
|
2669
|
+
onInit: kt
|
|
2670
|
+
}, _i = {
|
|
2671
2671
|
name: "arrowNext",
|
|
2672
2672
|
className: "pswp__button--arrow--next",
|
|
2673
2673
|
title: "Next",
|
|
@@ -2682,9 +2682,9 @@ const _i = {
|
|
|
2682
2682
|
},
|
|
2683
2683
|
onClick: "next",
|
|
2684
2684
|
onInit: (s, t) => {
|
|
2685
|
-
|
|
2685
|
+
kt(s, t, !0);
|
|
2686
2686
|
}
|
|
2687
|
-
},
|
|
2687
|
+
}, wi = {
|
|
2688
2688
|
name: "close",
|
|
2689
2689
|
title: "Close",
|
|
2690
2690
|
order: 20,
|
|
@@ -2695,7 +2695,7 @@ const _i = {
|
|
|
2695
2695
|
outlineID: "pswp__icn-close"
|
|
2696
2696
|
},
|
|
2697
2697
|
onClick: "close"
|
|
2698
|
-
},
|
|
2698
|
+
}, bi = {
|
|
2699
2699
|
name: "zoom",
|
|
2700
2700
|
title: "Zoom",
|
|
2701
2701
|
order: 10,
|
|
@@ -2707,7 +2707,7 @@ const _i = {
|
|
|
2707
2707
|
outlineID: "pswp__icn-zoom"
|
|
2708
2708
|
},
|
|
2709
2709
|
onClick: "toggleZoom"
|
|
2710
|
-
},
|
|
2710
|
+
}, Si = {
|
|
2711
2711
|
name: "preloader",
|
|
2712
2712
|
appendTo: "bar",
|
|
2713
2713
|
order: 7,
|
|
@@ -2738,7 +2738,7 @@ const _i = {
|
|
|
2738
2738
|
t.currSlide === a.slide && r();
|
|
2739
2739
|
}), t.ui && (t.ui.updatePreloaderVisibility = r);
|
|
2740
2740
|
}
|
|
2741
|
-
},
|
|
2741
|
+
}, Li = {
|
|
2742
2742
|
name: "counter",
|
|
2743
2743
|
order: 5,
|
|
2744
2744
|
onInit: (s, t) => {
|
|
@@ -2747,10 +2747,10 @@ const _i = {
|
|
|
2747
2747
|
});
|
|
2748
2748
|
}
|
|
2749
2749
|
};
|
|
2750
|
-
function
|
|
2750
|
+
function bt(s, t) {
|
|
2751
2751
|
s.classList.toggle("pswp--zoomed-in", t);
|
|
2752
2752
|
}
|
|
2753
|
-
class
|
|
2753
|
+
class Ei {
|
|
2754
2754
|
/**
|
|
2755
2755
|
* @param {PhotoSwipe} pswp
|
|
2756
2756
|
*/
|
|
@@ -2762,7 +2762,7 @@ class Ai {
|
|
|
2762
2762
|
const {
|
|
2763
2763
|
pswp: t
|
|
2764
2764
|
} = this;
|
|
2765
|
-
this.isRegistered = !1, this.uiElementsData = [
|
|
2765
|
+
this.isRegistered = !1, this.uiElementsData = [wi, yi, _i, bi, Si, Li], t.dispatch("uiRegister"), this.uiElementsData.sort((e, i) => (e.order || 0) - (i.order || 0)), this.items = [], this.isRegistered = !0, this.uiElementsData.forEach((e) => {
|
|
2766
2766
|
this.registerElement(e);
|
|
2767
2767
|
}), t.on("change", () => {
|
|
2768
2768
|
var e;
|
|
@@ -2773,7 +2773,7 @@ class Ai {
|
|
|
2773
2773
|
* @param {UIElementData} elementData
|
|
2774
2774
|
*/
|
|
2775
2775
|
registerElement(t) {
|
|
2776
|
-
this.isRegistered ? this.items.push(new
|
|
2776
|
+
this.isRegistered ? this.items.push(new vi(this.pswp, t)) : this.uiElementsData.push(t);
|
|
2777
2777
|
}
|
|
2778
2778
|
/**
|
|
2779
2779
|
* Fired each time zoom or pan position is changed.
|
|
@@ -2797,15 +2797,15 @@ class Ai {
|
|
|
2797
2797
|
this._lastUpdatedZoomLevel = n;
|
|
2798
2798
|
const o = e.zoomLevels.initial - e.zoomLevels.secondary;
|
|
2799
2799
|
if (Math.abs(o) < 0.01 || !e.isZoomable()) {
|
|
2800
|
-
|
|
2800
|
+
bt(t, !1), t.classList.remove("pswp--zoom-allowed");
|
|
2801
2801
|
return;
|
|
2802
2802
|
}
|
|
2803
2803
|
t.classList.add("pswp--zoom-allowed");
|
|
2804
2804
|
const r = n === e.zoomLevels.initial ? e.zoomLevels.secondary : e.zoomLevels.initial;
|
|
2805
|
-
|
|
2805
|
+
bt(t, r <= n), (i.imageClickAction === "zoom" || i.imageClickAction === "zoom-or-close") && t.classList.add("pswp--click-to-zoom");
|
|
2806
2806
|
}
|
|
2807
2807
|
}
|
|
2808
|
-
function
|
|
2808
|
+
function Ai(s) {
|
|
2809
2809
|
const t = s.getBoundingClientRect();
|
|
2810
2810
|
return {
|
|
2811
2811
|
x: t.left,
|
|
@@ -2813,7 +2813,7 @@ function Ci(s) {
|
|
|
2813
2813
|
w: t.width
|
|
2814
2814
|
};
|
|
2815
2815
|
}
|
|
2816
|
-
function
|
|
2816
|
+
function Ci(s, t, e) {
|
|
2817
2817
|
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 = {
|
|
2818
2818
|
x: i.left + a,
|
|
2819
2819
|
y: i.top + l,
|
|
@@ -2826,7 +2826,7 @@ function xi(s, t, e) {
|
|
|
2826
2826
|
y: l
|
|
2827
2827
|
}, c;
|
|
2828
2828
|
}
|
|
2829
|
-
function
|
|
2829
|
+
function xi(s, t, e) {
|
|
2830
2830
|
const i = e.dispatch("thumbBounds", {
|
|
2831
2831
|
index: s,
|
|
2832
2832
|
itemData: t,
|
|
@@ -2845,9 +2845,9 @@ function Pi(s, t, e) {
|
|
|
2845
2845
|
n.querySelector(a)
|
|
2846
2846
|
);
|
|
2847
2847
|
}
|
|
2848
|
-
return r = e.applyFilters("thumbEl", r, t, s), r && (t.thumbCropped ? o =
|
|
2848
|
+
return r = e.applyFilters("thumbEl", r, t, s), r && (t.thumbCropped ? o = Ci(r, t.width || t.w || 0, t.height || t.h || 0) : o = Ai(r)), e.applyFilters("thumbBounds", o, t, s);
|
|
2849
2849
|
}
|
|
2850
|
-
let
|
|
2850
|
+
let Pi = class {
|
|
2851
2851
|
/**
|
|
2852
2852
|
* @param {T} type
|
|
2853
2853
|
* @param {PhotoSwipeEventsMap[T]} [details]
|
|
@@ -2858,7 +2858,7 @@ let Ti = class {
|
|
|
2858
2858
|
preventDefault() {
|
|
2859
2859
|
this.defaultPrevented = !0;
|
|
2860
2860
|
}
|
|
2861
|
-
},
|
|
2861
|
+
}, Ti = class {
|
|
2862
2862
|
constructor() {
|
|
2863
2863
|
this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
|
|
2864
2864
|
}
|
|
@@ -2925,13 +2925,13 @@ let Ti = class {
|
|
|
2925
2925
|
return this.pswp.dispatch(t, e);
|
|
2926
2926
|
const n = (
|
|
2927
2927
|
/** @type {AugmentedEvent<T>} */
|
|
2928
|
-
new
|
|
2928
|
+
new Pi(t, e)
|
|
2929
2929
|
);
|
|
2930
2930
|
return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
|
|
2931
2931
|
o.call(this, n);
|
|
2932
2932
|
}), n;
|
|
2933
2933
|
}
|
|
2934
|
-
},
|
|
2934
|
+
}, Ii = class {
|
|
2935
2935
|
/**
|
|
2936
2936
|
* @param {string | false} imageSrc
|
|
2937
2937
|
* @param {HTMLElement} container
|
|
@@ -2951,13 +2951,13 @@ let Ti = class {
|
|
|
2951
2951
|
* @param {number} height
|
|
2952
2952
|
*/
|
|
2953
2953
|
setDisplayedSize(t, e) {
|
|
2954
|
-
this.element && (this.element.tagName === "IMG" ? (
|
|
2954
|
+
this.element && (this.element.tagName === "IMG" ? (it(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = G(0, 0, t / 250)) : it(this.element, t, e));
|
|
2955
2955
|
}
|
|
2956
2956
|
destroy() {
|
|
2957
2957
|
var t;
|
|
2958
2958
|
(t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
|
|
2959
2959
|
}
|
|
2960
|
-
},
|
|
2960
|
+
}, Mi = class {
|
|
2961
2961
|
/**
|
|
2962
2962
|
* @param {SlideData} itemData Slide data
|
|
2963
2963
|
* @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
|
|
@@ -2992,7 +2992,7 @@ let Ti = class {
|
|
|
2992
2992
|
this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
|
|
2993
2993
|
this
|
|
2994
2994
|
);
|
|
2995
|
-
this.placeholder = new
|
|
2995
|
+
this.placeholder = new Ii(i, this.slide.container);
|
|
2996
2996
|
}
|
|
2997
2997
|
this.element && !e || this.instance.dispatch("contentLoad", {
|
|
2998
2998
|
content: this,
|
|
@@ -3080,7 +3080,7 @@ let Ti = class {
|
|
|
3080
3080
|
content: this,
|
|
3081
3081
|
width: t,
|
|
3082
3082
|
height: e
|
|
3083
|
-
}).defaultPrevented && (
|
|
3083
|
+
}).defaultPrevented && (it(this.element, t, e), this.isImageContent() && !this.isError()))) {
|
|
3084
3084
|
const i = !this.displayedImageWidth && t;
|
|
3085
3085
|
this.displayedImageWidth = t, this.displayedImageHeight = e, i ? this.loadImage(!1) : this.updateSrcsetSizes(), this.slide && this.instance.dispatch("imageSizeChange", {
|
|
3086
3086
|
slide: this.slide,
|
|
@@ -3162,7 +3162,7 @@ let Ti = class {
|
|
|
3162
3162
|
}).defaultPrevented)
|
|
3163
3163
|
return;
|
|
3164
3164
|
const t = "decode" in this.element;
|
|
3165
|
-
this.isImageContent() ? t && this.slide && (!this.slide.isActive ||
|
|
3165
|
+
this.isImageContent() ? t && this.slide && (!this.slide.isActive || ft()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
|
|
3166
3166
|
}).finally(() => {
|
|
3167
3167
|
this.isDecoding = !1, this.appendImage();
|
|
3168
3168
|
})) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element);
|
|
@@ -3175,7 +3175,7 @@ let Ti = class {
|
|
|
3175
3175
|
activate() {
|
|
3176
3176
|
this.instance.dispatch("contentActivate", {
|
|
3177
3177
|
content: this
|
|
3178
|
-
}).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !
|
|
3178
|
+
}).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !ft() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
|
|
3179
3179
|
}
|
|
3180
3180
|
/**
|
|
3181
3181
|
* Deactivate the content
|
|
@@ -3202,36 +3202,36 @@ let Ti = class {
|
|
|
3202
3202
|
}).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === P.LOADED || this.state === P.ERROR) && this.removePlaceholder()));
|
|
3203
3203
|
}
|
|
3204
3204
|
};
|
|
3205
|
-
const
|
|
3206
|
-
function
|
|
3205
|
+
const zi = 5;
|
|
3206
|
+
function Zt(s, t, e) {
|
|
3207
3207
|
const i = t.createContentFromData(s, e);
|
|
3208
3208
|
let n;
|
|
3209
3209
|
const {
|
|
3210
3210
|
options: o
|
|
3211
3211
|
} = t;
|
|
3212
3212
|
if (o) {
|
|
3213
|
-
n = new
|
|
3213
|
+
n = new Ft(o, s, -1);
|
|
3214
3214
|
let r;
|
|
3215
|
-
t.pswp ? r = t.pswp.viewportSize : r =
|
|
3216
|
-
const a =
|
|
3215
|
+
t.pswp ? r = t.pswp.viewportSize : r = $t(o, t);
|
|
3216
|
+
const a = Bt(o, r, s, e);
|
|
3217
3217
|
n.update(i.width, i.height, a);
|
|
3218
3218
|
}
|
|
3219
3219
|
return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
|
|
3220
3220
|
}
|
|
3221
|
-
function
|
|
3221
|
+
function Oi(s, t) {
|
|
3222
3222
|
const e = t.getItemData(s);
|
|
3223
3223
|
if (!t.dispatch("lazyLoadSlide", {
|
|
3224
3224
|
index: s,
|
|
3225
3225
|
itemData: e
|
|
3226
3226
|
}).defaultPrevented)
|
|
3227
|
-
return
|
|
3227
|
+
return Zt(e, t, s);
|
|
3228
3228
|
}
|
|
3229
|
-
class
|
|
3229
|
+
class Di {
|
|
3230
3230
|
/**
|
|
3231
3231
|
* @param {PhotoSwipe} pswp
|
|
3232
3232
|
*/
|
|
3233
3233
|
constructor(t) {
|
|
3234
|
-
this.pswp = t, this.limit = Math.max(t.options.preload[0] + t.options.preload[1] + 1,
|
|
3234
|
+
this.pswp = t, this.limit = Math.max(t.options.preload[0] + t.options.preload[1] + 1, zi), this._cachedItems = [];
|
|
3235
3235
|
}
|
|
3236
3236
|
/**
|
|
3237
3237
|
* Lazy load nearby slides based on `preload` option.
|
|
@@ -3259,7 +3259,7 @@ class Ri {
|
|
|
3259
3259
|
loadSlideByIndex(t) {
|
|
3260
3260
|
const e = this.pswp.getLoopedIndex(t);
|
|
3261
3261
|
let i = this.getContentByIndex(e);
|
|
3262
|
-
i || (i =
|
|
3262
|
+
i || (i = Oi(e, this.pswp), i && this.addToCache(i));
|
|
3263
3263
|
}
|
|
3264
3264
|
/**
|
|
3265
3265
|
* @param {Slide} slide
|
|
@@ -3298,7 +3298,7 @@ class Ri {
|
|
|
3298
3298
|
this._cachedItems.forEach((t) => t.destroy()), this._cachedItems = [];
|
|
3299
3299
|
}
|
|
3300
3300
|
}
|
|
3301
|
-
let
|
|
3301
|
+
let Ri = class extends Ti {
|
|
3302
3302
|
/**
|
|
3303
3303
|
* Get total number of slides
|
|
3304
3304
|
*
|
|
@@ -3321,7 +3321,7 @@ let $i = class extends Ii {
|
|
|
3321
3321
|
* @returns {Content}
|
|
3322
3322
|
*/
|
|
3323
3323
|
createContentFromData(t, e) {
|
|
3324
|
-
return new
|
|
3324
|
+
return new Mi(t, this, e);
|
|
3325
3325
|
}
|
|
3326
3326
|
/**
|
|
3327
3327
|
* Get item data by index.
|
|
@@ -3355,7 +3355,7 @@ let $i = class extends Ii {
|
|
|
3355
3355
|
*/
|
|
3356
3356
|
_getGalleryDOMElements(t) {
|
|
3357
3357
|
var e, i;
|
|
3358
|
-
return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ?
|
|
3358
|
+
return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? qe(this.options.children, this.options.childSelector, t) || [] : [t];
|
|
3359
3359
|
}
|
|
3360
3360
|
/**
|
|
3361
3361
|
* Converts DOM element to item data object.
|
|
@@ -3389,11 +3389,11 @@ let $i = class extends Ii {
|
|
|
3389
3389
|
* @returns {Content} Image that is being decoded or false.
|
|
3390
3390
|
*/
|
|
3391
3391
|
lazyLoadData(t, e) {
|
|
3392
|
-
return
|
|
3392
|
+
return Zt(t, this, e);
|
|
3393
3393
|
}
|
|
3394
3394
|
};
|
|
3395
3395
|
const Z = 3e-3;
|
|
3396
|
-
class
|
|
3396
|
+
class $i {
|
|
3397
3397
|
/**
|
|
3398
3398
|
* @param {PhotoSwipe} pswp
|
|
3399
3399
|
*/
|
|
@@ -3446,7 +3446,7 @@ class Bi {
|
|
|
3446
3446
|
_start() {
|
|
3447
3447
|
this.isOpening && this._useAnimation && this._placeholder && this._placeholder.tagName === "IMG" ? new Promise((t) => {
|
|
3448
3448
|
let e = !1, i = !0;
|
|
3449
|
-
|
|
3449
|
+
Ze(
|
|
3450
3450
|
/** @type {HTMLImageElement} */
|
|
3451
3451
|
this._placeholder
|
|
3452
3452
|
).finally(() => {
|
|
@@ -3537,7 +3537,7 @@ class Bi {
|
|
|
3537
3537
|
o[e] = i, n.startTransition(o);
|
|
3538
3538
|
}
|
|
3539
3539
|
}
|
|
3540
|
-
const
|
|
3540
|
+
const Bi = {
|
|
3541
3541
|
allowPanToNext: !0,
|
|
3542
3542
|
spacing: 0.1,
|
|
3543
3543
|
loop: !0,
|
|
@@ -3564,7 +3564,7 @@ const Fi = {
|
|
|
3564
3564
|
preload: [1, 2],
|
|
3565
3565
|
easing: "cubic-bezier(.4,0,.22,1)"
|
|
3566
3566
|
};
|
|
3567
|
-
class
|
|
3567
|
+
class Fi extends Ri {
|
|
3568
3568
|
/**
|
|
3569
3569
|
* @param {PhotoSwipeOptions} [options]
|
|
3570
3570
|
*/
|
|
@@ -3578,7 +3578,7 @@ class ki extends $i {
|
|
|
3578
3578
|
}, this.viewportSize = {
|
|
3579
3579
|
x: 0,
|
|
3580
3580
|
y: 0
|
|
3581
|
-
}, 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
|
|
3581
|
+
}, 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 He(), this.animations = new mi(), this.mainScroll = new oi(this), this.gestures = new si(this), this.opener = new $i(this), this.keyboard = new ai(this), this.contentLoader = new Di(this);
|
|
3582
3582
|
}
|
|
3583
3583
|
/** @returns {boolean} */
|
|
3584
3584
|
init() {
|
|
@@ -3586,7 +3586,7 @@ class ki extends $i {
|
|
|
3586
3586
|
return !1;
|
|
3587
3587
|
this.isOpen = !0, this.dispatch("init"), this.dispatch("beforeOpen"), this._createMainStructure();
|
|
3588
3588
|
let t = "pswp--open";
|
|
3589
|
-
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
|
|
3589
|
+
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 fi(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", {
|
|
3590
3590
|
index: this.currIndex,
|
|
3591
3591
|
data: this._initialItemData,
|
|
3592
3592
|
slide: void 0
|
|
@@ -3705,7 +3705,7 @@ class ki extends $i {
|
|
|
3705
3705
|
if (!this.canLoop() && (e < 0 || e >= this.getNumItems()))
|
|
3706
3706
|
return;
|
|
3707
3707
|
const n = this.getItemData(e);
|
|
3708
|
-
t.slide = new
|
|
3708
|
+
t.slide = new Ve(n, e, this), e === this.currIndex && (this.currSlide = t.slide), t.slide.append(t.el);
|
|
3709
3709
|
}
|
|
3710
3710
|
/** @returns {Point} */
|
|
3711
3711
|
getViewportCenterPoint() {
|
|
@@ -3723,7 +3723,7 @@ class ki extends $i {
|
|
|
3723
3723
|
updateSize(t) {
|
|
3724
3724
|
if (this.isDestroying)
|
|
3725
3725
|
return;
|
|
3726
|
-
const e =
|
|
3726
|
+
const e = $t(this.options, this);
|
|
3727
3727
|
!t && j(e, this._prevViewportSize) || (S(this._prevViewportSize, e), this.dispatch("beforeResize"), S(this.viewportSize, this._prevViewportSize), this._updatePageScrollOffset(), this.dispatch("viewportSize"), this.mainScroll.resize(this.opener.isOpen), !this.hasMouse && window.matchMedia("(any-hover: hover)").matches && this.mouseDetected(), this.dispatch("resize"));
|
|
3728
3728
|
}
|
|
3729
3729
|
/**
|
|
@@ -3775,7 +3775,7 @@ class ki extends $i {
|
|
|
3775
3775
|
* @private
|
|
3776
3776
|
*/
|
|
3777
3777
|
_createMainStructure() {
|
|
3778
|
-
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
|
|
3778
|
+
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 Ei(this), this.ui.init(), (this.options.appendToEl || document.body).appendChild(this.element);
|
|
3779
3779
|
}
|
|
3780
3780
|
/**
|
|
3781
3781
|
* Get position and dimensions of small thumbnail
|
|
@@ -3786,7 +3786,7 @@ class ki extends $i {
|
|
|
3786
3786
|
* @returns {Bounds | undefined}
|
|
3787
3787
|
*/
|
|
3788
3788
|
getThumbBounds() {
|
|
3789
|
-
return
|
|
3789
|
+
return xi(this.currIndex, this.currSlide ? this.currSlide.data : this._initialItemData, this);
|
|
3790
3790
|
}
|
|
3791
3791
|
/**
|
|
3792
3792
|
* If the PhotoSwipe can have continuous loop
|
|
@@ -3802,7 +3802,7 @@ class ki extends $i {
|
|
|
3802
3802
|
*/
|
|
3803
3803
|
_prepareOptions(t) {
|
|
3804
3804
|
return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches && (t.showHideAnimationType = "none", t.zoomAnimationDuration = 0), {
|
|
3805
|
-
...
|
|
3805
|
+
...Bi,
|
|
3806
3806
|
...t
|
|
3807
3807
|
};
|
|
3808
3808
|
}
|
|
@@ -3811,11 +3811,11 @@ function q(s, t, e) {
|
|
|
3811
3811
|
const i = document.createElement(t);
|
|
3812
3812
|
return s && (i.className = s), e && e.appendChild(i), i;
|
|
3813
3813
|
}
|
|
3814
|
-
function
|
|
3814
|
+
function ki(s, t, e) {
|
|
3815
3815
|
let i = `translate3d(${s}px,0px,0)`;
|
|
3816
3816
|
return e !== void 0 && (i += ` scale3d(${e},${e},1)`), i;
|
|
3817
3817
|
}
|
|
3818
|
-
function
|
|
3818
|
+
function st(s, t, e) {
|
|
3819
3819
|
s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
|
|
3820
3820
|
}
|
|
3821
3821
|
const T = {
|
|
@@ -3824,7 +3824,7 @@ const T = {
|
|
|
3824
3824
|
LOADED: "loaded",
|
|
3825
3825
|
ERROR: "error"
|
|
3826
3826
|
};
|
|
3827
|
-
function
|
|
3827
|
+
function Zi(s) {
|
|
3828
3828
|
return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
|
|
3829
3829
|
}
|
|
3830
3830
|
function H(s, t, e = document) {
|
|
@@ -3839,13 +3839,13 @@ function H(s, t, e = document) {
|
|
|
3839
3839
|
}
|
|
3840
3840
|
return i;
|
|
3841
3841
|
}
|
|
3842
|
-
function
|
|
3842
|
+
function Ni(s) {
|
|
3843
3843
|
return typeof s == "function" && s.prototype && s.prototype.goTo;
|
|
3844
3844
|
}
|
|
3845
|
-
function
|
|
3845
|
+
function St() {
|
|
3846
3846
|
return !!(navigator.vendor && navigator.vendor.match(/apple/i));
|
|
3847
3847
|
}
|
|
3848
|
-
class
|
|
3848
|
+
class qi {
|
|
3849
3849
|
/**
|
|
3850
3850
|
* @param {T} type
|
|
3851
3851
|
* @param {PhotoSwipeEventsMap[T]} [details]
|
|
@@ -3857,7 +3857,7 @@ class Hi {
|
|
|
3857
3857
|
this.defaultPrevented = !0;
|
|
3858
3858
|
}
|
|
3859
3859
|
}
|
|
3860
|
-
class
|
|
3860
|
+
class Hi {
|
|
3861
3861
|
constructor() {
|
|
3862
3862
|
this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
|
|
3863
3863
|
}
|
|
@@ -3924,14 +3924,14 @@ class Wi {
|
|
|
3924
3924
|
return this.pswp.dispatch(t, e);
|
|
3925
3925
|
const n = (
|
|
3926
3926
|
/** @type {AugmentedEvent<T>} */
|
|
3927
|
-
new
|
|
3927
|
+
new qi(t, e)
|
|
3928
3928
|
);
|
|
3929
3929
|
return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
|
|
3930
3930
|
o.call(this, n);
|
|
3931
3931
|
}), n;
|
|
3932
3932
|
}
|
|
3933
3933
|
}
|
|
3934
|
-
class
|
|
3934
|
+
class Wi {
|
|
3935
3935
|
/**
|
|
3936
3936
|
* @param {string | false} imageSrc
|
|
3937
3937
|
* @param {HTMLElement} container
|
|
@@ -3951,14 +3951,14 @@ class Vi {
|
|
|
3951
3951
|
* @param {number} height
|
|
3952
3952
|
*/
|
|
3953
3953
|
setDisplayedSize(t, e) {
|
|
3954
|
-
this.element && (this.element.tagName === "IMG" ? (
|
|
3954
|
+
this.element && (this.element.tagName === "IMG" ? (st(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = ki(0, 0, t / 250)) : st(this.element, t, e));
|
|
3955
3955
|
}
|
|
3956
3956
|
destroy() {
|
|
3957
3957
|
var t;
|
|
3958
3958
|
(t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
|
|
3959
3959
|
}
|
|
3960
3960
|
}
|
|
3961
|
-
class
|
|
3961
|
+
class Vi {
|
|
3962
3962
|
/**
|
|
3963
3963
|
* @param {SlideData} itemData Slide data
|
|
3964
3964
|
* @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
|
|
@@ -3993,7 +3993,7 @@ class ji {
|
|
|
3993
3993
|
this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
|
|
3994
3994
|
this
|
|
3995
3995
|
);
|
|
3996
|
-
this.placeholder = new
|
|
3996
|
+
this.placeholder = new Wi(i, this.slide.container);
|
|
3997
3997
|
}
|
|
3998
3998
|
this.element && !e || this.instance.dispatch("contentLoad", {
|
|
3999
3999
|
content: this,
|
|
@@ -4081,7 +4081,7 @@ class ji {
|
|
|
4081
4081
|
content: this,
|
|
4082
4082
|
width: t,
|
|
4083
4083
|
height: e
|
|
4084
|
-
}).defaultPrevented && (
|
|
4084
|
+
}).defaultPrevented && (st(this.element, t, e), this.isImageContent() && !this.isError()))) {
|
|
4085
4085
|
const i = !this.displayedImageWidth && t;
|
|
4086
4086
|
this.displayedImageWidth = t, this.displayedImageHeight = e, i ? this.loadImage(!1) : this.updateSrcsetSizes(), this.slide && this.instance.dispatch("imageSizeChange", {
|
|
4087
4087
|
slide: this.slide,
|
|
@@ -4163,7 +4163,7 @@ class ji {
|
|
|
4163
4163
|
}).defaultPrevented)
|
|
4164
4164
|
return;
|
|
4165
4165
|
const t = "decode" in this.element;
|
|
4166
|
-
this.isImageContent() ? t && this.slide && (!this.slide.isActive ||
|
|
4166
|
+
this.isImageContent() ? t && this.slide && (!this.slide.isActive || St()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
|
|
4167
4167
|
}).finally(() => {
|
|
4168
4168
|
this.isDecoding = !1, this.appendImage();
|
|
4169
4169
|
})) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element);
|
|
@@ -4176,7 +4176,7 @@ class ji {
|
|
|
4176
4176
|
activate() {
|
|
4177
4177
|
this.instance.dispatch("contentActivate", {
|
|
4178
4178
|
content: this
|
|
4179
|
-
}).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !
|
|
4179
|
+
}).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"));
|
|
4180
4180
|
}
|
|
4181
4181
|
/**
|
|
4182
4182
|
* Deactivate the content
|
|
@@ -4203,7 +4203,7 @@ class ji {
|
|
|
4203
4203
|
}).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === T.LOADED || this.state === T.ERROR) && this.removePlaceholder()));
|
|
4204
4204
|
}
|
|
4205
4205
|
}
|
|
4206
|
-
function
|
|
4206
|
+
function ji(s, t) {
|
|
4207
4207
|
if (s.getViewportSizeFn) {
|
|
4208
4208
|
const e = s.getViewportSizeFn(s, t);
|
|
4209
4209
|
if (e)
|
|
@@ -4230,14 +4230,14 @@ function K(s, t, e, i, n) {
|
|
|
4230
4230
|
}
|
|
4231
4231
|
return Number(o) || 0;
|
|
4232
4232
|
}
|
|
4233
|
-
function
|
|
4233
|
+
function Gi(s, t, e, i) {
|
|
4234
4234
|
return {
|
|
4235
4235
|
x: t.x - K("left", s, t, e, i) - K("right", s, t, e, i),
|
|
4236
4236
|
y: t.y - K("top", s, t, e, i) - K("bottom", s, t, e, i)
|
|
4237
4237
|
};
|
|
4238
4238
|
}
|
|
4239
|
-
const
|
|
4240
|
-
class
|
|
4239
|
+
const Lt = 4e3;
|
|
4240
|
+
class Ui {
|
|
4241
4241
|
/**
|
|
4242
4242
|
* @param {PhotoSwipeOptions} options PhotoSwipe options
|
|
4243
4243
|
* @param {SlideData} itemData Slide data
|
|
@@ -4294,7 +4294,7 @@ class Ki {
|
|
|
4294
4294
|
*/
|
|
4295
4295
|
_getSecondary() {
|
|
4296
4296
|
let t = this._parseZoomLevelOption("secondary");
|
|
4297
|
-
return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x >
|
|
4297
|
+
return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > Lt && (t = Lt / this.elementSize.x), t);
|
|
4298
4298
|
}
|
|
4299
4299
|
/**
|
|
4300
4300
|
* Get initial image zoom level.
|
|
@@ -4317,30 +4317,30 @@ class Ki {
|
|
|
4317
4317
|
return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
|
|
4318
4318
|
}
|
|
4319
4319
|
}
|
|
4320
|
-
function
|
|
4320
|
+
function Nt(s, t, e) {
|
|
4321
4321
|
const i = t.createContentFromData(s, e);
|
|
4322
4322
|
let n;
|
|
4323
4323
|
const {
|
|
4324
4324
|
options: o
|
|
4325
4325
|
} = t;
|
|
4326
4326
|
if (o) {
|
|
4327
|
-
n = new
|
|
4327
|
+
n = new Ui(o, s, -1);
|
|
4328
4328
|
let r;
|
|
4329
|
-
t.pswp ? r = t.pswp.viewportSize : r =
|
|
4330
|
-
const a =
|
|
4329
|
+
t.pswp ? r = t.pswp.viewportSize : r = ji(o, t);
|
|
4330
|
+
const a = Gi(o, r, s, e);
|
|
4331
4331
|
n.update(i.width, i.height, a);
|
|
4332
4332
|
}
|
|
4333
4333
|
return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
|
|
4334
4334
|
}
|
|
4335
|
-
function
|
|
4335
|
+
function Ki(s, t) {
|
|
4336
4336
|
const e = t.getItemData(s);
|
|
4337
4337
|
if (!t.dispatch("lazyLoadSlide", {
|
|
4338
4338
|
index: s,
|
|
4339
4339
|
itemData: e
|
|
4340
4340
|
}).defaultPrevented)
|
|
4341
|
-
return
|
|
4341
|
+
return Nt(e, t, s);
|
|
4342
4342
|
}
|
|
4343
|
-
class
|
|
4343
|
+
class Xi extends Hi {
|
|
4344
4344
|
/**
|
|
4345
4345
|
* Get total number of slides
|
|
4346
4346
|
*
|
|
@@ -4363,7 +4363,7 @@ class Yi extends Wi {
|
|
|
4363
4363
|
* @returns {Content}
|
|
4364
4364
|
*/
|
|
4365
4365
|
createContentFromData(t, e) {
|
|
4366
|
-
return new
|
|
4366
|
+
return new Vi(t, this, e);
|
|
4367
4367
|
}
|
|
4368
4368
|
/**
|
|
4369
4369
|
* Get item data by index.
|
|
@@ -4431,10 +4431,10 @@ class Yi extends Wi {
|
|
|
4431
4431
|
* @returns {Content} Image that is being decoded or false.
|
|
4432
4432
|
*/
|
|
4433
4433
|
lazyLoadData(t, e) {
|
|
4434
|
-
return
|
|
4434
|
+
return Nt(t, this, e);
|
|
4435
4435
|
}
|
|
4436
4436
|
}
|
|
4437
|
-
class
|
|
4437
|
+
class Yi extends Xi {
|
|
4438
4438
|
/**
|
|
4439
4439
|
* @param {PhotoSwipeOptions} [options]
|
|
4440
4440
|
*/
|
|
@@ -4454,7 +4454,7 @@ class Ji extends Yi {
|
|
|
4454
4454
|
* @param {MouseEvent} e
|
|
4455
4455
|
*/
|
|
4456
4456
|
onThumbnailsClick(t) {
|
|
4457
|
-
if (
|
|
4457
|
+
if (Zi(t) || window.pswp)
|
|
4458
4458
|
return;
|
|
4459
4459
|
let e = {
|
|
4460
4460
|
x: t.clientX,
|
|
@@ -4522,7 +4522,7 @@ class Ji extends Yi {
|
|
|
4522
4522
|
} = this;
|
|
4523
4523
|
e && (i.dataSource = e);
|
|
4524
4524
|
const n = [], o = typeof i.pswpModule;
|
|
4525
|
-
if (
|
|
4525
|
+
if (Ni(i.pswpModule))
|
|
4526
4526
|
n.push(Promise.resolve(
|
|
4527
4527
|
/** @type {Type<PhotoSwipe>} */
|
|
4528
4528
|
i.pswpModule
|
|
@@ -4538,7 +4538,7 @@ class Ji extends Yi {
|
|
|
4538
4538
|
else
|
|
4539
4539
|
throw new Error("pswpModule is not valid");
|
|
4540
4540
|
}
|
|
4541
|
-
typeof i.openPromise == "function" && n.push(i.openPromise()), i.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent =
|
|
4541
|
+
typeof i.openPromise == "function" && n.push(i.openPromise()), i.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent = Ki(t, this));
|
|
4542
4542
|
const r = ++this._uid;
|
|
4543
4543
|
Promise.all(n).then((a) => {
|
|
4544
4544
|
if (this.shouldOpen) {
|
|
@@ -4584,12 +4584,12 @@ class Ji extends Yi {
|
|
|
4584
4584
|
});
|
|
4585
4585
|
}
|
|
4586
4586
|
}
|
|
4587
|
-
const
|
|
4587
|
+
const Ji = () => {
|
|
4588
4588
|
let s = null;
|
|
4589
|
-
return s = new
|
|
4589
|
+
return s = new Yi({
|
|
4590
4590
|
gallery: "#photoswipe-gallery",
|
|
4591
4591
|
children: "a",
|
|
4592
|
-
pswpModule:
|
|
4592
|
+
pswpModule: Fi,
|
|
4593
4593
|
zoom: !1,
|
|
4594
4594
|
imageClickAction: "next",
|
|
4595
4595
|
tapAction: "next"
|
|
@@ -4610,12 +4610,12 @@ const Qi = () => {
|
|
|
4610
4610
|
}), s.init(), () => {
|
|
4611
4611
|
s && (s.destroy(), s = null);
|
|
4612
4612
|
};
|
|
4613
|
-
},
|
|
4614
|
-
const s = document.querySelector(
|
|
4613
|
+
}, Qi = "mbrs-game-ranking", ts = ".c-header-page__ranking-button", es = () => {
|
|
4614
|
+
const s = document.querySelector(ts), t = s?.querySelector("button");
|
|
4615
4615
|
!s || !t || t.addEventListener("click", () => {
|
|
4616
|
-
document.getElementById(
|
|
4616
|
+
document.getElementById(Qi)?.scrollIntoView({ behavior: "smooth" });
|
|
4617
4617
|
});
|
|
4618
|
-
},
|
|
4618
|
+
}, Et = (s) => Math.min(100, Math.max(0, Math.round(s))), is = () => {
|
|
4619
4619
|
const s = document.querySelector(".js-limit-scroll-progress-bar"), t = document.querySelector(".c-progress__bar"), e = document.querySelector(".c-btn__close-progress");
|
|
4620
4620
|
if (!t && !e)
|
|
4621
4621
|
return;
|
|
@@ -4624,14 +4624,14 @@ const Qi = () => {
|
|
|
4624
4624
|
let o = i.scrollHeight - i.clientHeight;
|
|
4625
4625
|
if (!o)
|
|
4626
4626
|
return;
|
|
4627
|
-
s && (o = s.scrollHeight - i.clientHeight + (window.pageYOffset + s.getBoundingClientRect().top)), t.style.width = `${
|
|
4627
|
+
s && (o = s.scrollHeight - i.clientHeight + (window.pageYOffset + s.getBoundingClientRect().top)), t.style.width = `${Et(n / o * 100)}%`;
|
|
4628
4628
|
}
|
|
4629
4629
|
if (e) {
|
|
4630
4630
|
const o = document.querySelector(".js-content-header"), r = document.querySelector(".js-limit-scroll-close-article-btn");
|
|
4631
4631
|
if (o && r) {
|
|
4632
4632
|
const a = window.pageYOffset + o.getBoundingClientRect().bottom, c = window.pageYOffset + r.getBoundingClientRect().bottom - i.clientHeight - a;
|
|
4633
4633
|
if (c > 0) {
|
|
4634
|
-
const d =
|
|
4634
|
+
const d = Et((n - a) / c * 100);
|
|
4635
4635
|
e.style.setProperty("--progress", `${d}`), e.parentElement?.classList.toggle(
|
|
4636
4636
|
"c-btn--close-progress-complete",
|
|
4637
4637
|
d >= 100
|
|
@@ -4639,10 +4639,10 @@ const Qi = () => {
|
|
|
4639
4639
|
}
|
|
4640
4640
|
}
|
|
4641
4641
|
}
|
|
4642
|
-
},
|
|
4642
|
+
}, ss = () => {
|
|
4643
4643
|
const s = document.querySelector(".c-progress"), t = document.querySelector(".c-btn__close-progress");
|
|
4644
|
-
(s || t) && window.addEventListener("scroll",
|
|
4645
|
-
},
|
|
4644
|
+
(s || t) && window.addEventListener("scroll", is);
|
|
4645
|
+
}, ns = (s = {}) => {
|
|
4646
4646
|
const { buttonSelector: t = ".c-scroll-to-top" } = s, e = document.querySelector(t), i = e?.querySelector("button");
|
|
4647
4647
|
if (!e || !i)
|
|
4648
4648
|
return;
|
|
@@ -4664,7 +4664,7 @@ const Qi = () => {
|
|
|
4664
4664
|
});
|
|
4665
4665
|
};
|
|
4666
4666
|
window.addEventListener("scroll", r), i.addEventListener("click", a), r();
|
|
4667
|
-
},
|
|
4667
|
+
}, os = 500, rs = () => {
|
|
4668
4668
|
const s = document.querySelector("#mbrs-comments-container"), t = document.querySelector(".c-scroll-to-top-comment");
|
|
4669
4669
|
if (!s || !t)
|
|
4670
4670
|
return;
|
|
@@ -4680,7 +4680,7 @@ const Qi = () => {
|
|
|
4680
4680
|
}, o = () => {
|
|
4681
4681
|
e && (e = !1, window.removeEventListener("scroll", i), t.style.display = "none");
|
|
4682
4682
|
}, r = (u) => {
|
|
4683
|
-
u.offsetHeight >
|
|
4683
|
+
u.offsetHeight > os ? n() : o();
|
|
4684
4684
|
}, a = (u) => {
|
|
4685
4685
|
new ResizeObserver(() => {
|
|
4686
4686
|
r(u);
|
|
@@ -4717,7 +4717,7 @@ const Qi = () => {
|
|
|
4717
4717
|
) && h.disconnect();
|
|
4718
4718
|
});
|
|
4719
4719
|
h.observe(s, { childList: !0, subtree: !0 });
|
|
4720
|
-
},
|
|
4720
|
+
}, as = "#page-content", qt = "#text-tooltip", ls = ".mbrs-social-report-container", Ht = "c-text-tooltip--show", cs = [
|
|
4721
4721
|
"#page-content .c-content p",
|
|
4722
4722
|
"#page-content .c-content h2",
|
|
4723
4723
|
"#page-content .c-content h3",
|
|
@@ -4729,34 +4729,35 @@ const Qi = () => {
|
|
|
4729
4729
|
"#page-content header span",
|
|
4730
4730
|
"#page-content header h1",
|
|
4731
4731
|
"#page-content header h2"
|
|
4732
|
-
],
|
|
4732
|
+
], At = (s, t) => s instanceof Element ? t.some((e) => s.matches(e)) : !1, ds = (s, t) => {
|
|
4733
4733
|
const e = s.startContainer.nodeType === Node.ELEMENT_NODE ? s.startContainer : s.startContainer.parentElement, i = s.endContainer.nodeType === Node.ELEMENT_NODE ? s.endContainer : s.endContainer.parentElement;
|
|
4734
|
-
return !!e &&
|
|
4734
|
+
return !!e && At(e, t) || !!i && At(i, t);
|
|
4735
4735
|
}, hs = (s) => {
|
|
4736
4736
|
if (!s.focusNode)
|
|
4737
4737
|
return null;
|
|
4738
4738
|
const t = s.anchorNode?.compareDocumentPosition(s.focusNode);
|
|
4739
4739
|
return t ? (t & 4) > 0 : s.anchorOffset < s.focusOffset;
|
|
4740
|
-
}, us = (s
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4740
|
+
}, us = (s) => s.offsetParent instanceof HTMLElement ? s.offsetParent.getBoundingClientRect() : {
|
|
4741
|
+
top: -window.scrollY,
|
|
4742
|
+
left: -window.scrollX
|
|
4743
|
+
}, ps = (s, t, e) => {
|
|
4744
|
+
const i = document.querySelector(qt), n = document.querySelector(as), o = document.querySelectorAll(ls);
|
|
4744
4745
|
if (!i || !n) {
|
|
4745
|
-
console.warn("Text tooltip : Tooltip or
|
|
4746
|
+
console.warn("Text tooltip : Tooltip or page content are not found in the DOM");
|
|
4746
4747
|
return;
|
|
4747
4748
|
}
|
|
4748
|
-
Array.from(o).forEach((
|
|
4749
|
-
|
|
4749
|
+
Array.from(o).forEach((c) => {
|
|
4750
|
+
c.setAttribute("data-selected-text", e);
|
|
4750
4751
|
});
|
|
4751
|
-
const r = s.getClientRects(), a = r[t ? r.length - 1 : 0];
|
|
4752
|
-
i.style.top = `${a.top -
|
|
4753
|
-
},
|
|
4754
|
-
const s = document.querySelector(`${
|
|
4755
|
-
s && s.classList.remove(
|
|
4752
|
+
const r = s.getClientRects(), a = r[t ? r.length - 1 : 0], l = us(i);
|
|
4753
|
+
i.style.top = `${a.top - l.top - (i.offsetHeight + 10)}px`, a.width < i.offsetWidth ? i.style.left = `${a.left - l.left + a.width / 2 - i.offsetWidth / 2}px` : t ? i.style.left = `${a.left - l.left + a.width - i.offsetWidth}px` : i.style.left = `${a.left - l.left}px`, i.classList.add(Ht);
|
|
4754
|
+
}, Ct = () => {
|
|
4755
|
+
const s = document.querySelector(`${qt}`);
|
|
4756
|
+
s && s.classList.remove(Ht);
|
|
4756
4757
|
}, X = ({ type: s }) => {
|
|
4757
4758
|
const t = window.getSelection();
|
|
4758
4759
|
if (s === "selectionchange") {
|
|
4759
|
-
|
|
4760
|
+
Ct();
|
|
4760
4761
|
return;
|
|
4761
4762
|
}
|
|
4762
4763
|
if (!t?.rangeCount)
|
|
@@ -4764,49 +4765,49 @@ const Qi = () => {
|
|
|
4764
4765
|
const e = t.getRangeAt(0), i = t.toString().trim();
|
|
4765
4766
|
if (i.length) {
|
|
4766
4767
|
const n = ds(e, cs), o = hs(t) || !1;
|
|
4767
|
-
n &&
|
|
4768
|
+
n && ps(e, o, i);
|
|
4768
4769
|
return;
|
|
4769
4770
|
}
|
|
4770
|
-
|
|
4771
|
-
},
|
|
4771
|
+
Ct();
|
|
4772
|
+
}, ms = () => {
|
|
4772
4773
|
if (!window?.getSelection) {
|
|
4773
4774
|
console.warn("Selection API isn't supported");
|
|
4774
4775
|
return;
|
|
4775
4776
|
}
|
|
4776
4777
|
document.addEventListener("mouseup", X), document.addEventListener("selectionchange", X), document.addEventListener("touchend", X), document.addEventListener("touchcancel", X);
|
|
4777
|
-
},
|
|
4778
|
-
let
|
|
4779
|
-
const
|
|
4780
|
-
s.querySelector(
|
|
4781
|
-
},
|
|
4782
|
-
const t =
|
|
4778
|
+
}, fs = "[data-social-bar-action-row]", at = 'button, a[href], [role="button"], [data-a11y-dialog-show], [data-a11y-dialog-hide], [data-event-name], .js-mobile-share-button';
|
|
4779
|
+
let xt = !1;
|
|
4780
|
+
const Wt = (s) => {
|
|
4781
|
+
s.querySelector(at)?.click();
|
|
4782
|
+
}, Vt = (s) => s instanceof HTMLElement ? s.closest(fs) : null, gs = (s) => {
|
|
4783
|
+
const t = Vt(s.target);
|
|
4783
4784
|
if (!t)
|
|
4784
4785
|
return;
|
|
4785
|
-
const i = s.target.closest(
|
|
4786
|
-
i && i !== t ||
|
|
4787
|
-
},
|
|
4786
|
+
const i = s.target.closest(at);
|
|
4787
|
+
i && i !== t || Wt(t);
|
|
4788
|
+
}, vs = (s) => {
|
|
4788
4789
|
if (s.key !== "Enter" && s.key !== " ")
|
|
4789
4790
|
return;
|
|
4790
|
-
const t = s.target, e =
|
|
4791
|
+
const t = s.target, e = Vt(t);
|
|
4791
4792
|
if (!e || !(t instanceof HTMLElement))
|
|
4792
4793
|
return;
|
|
4793
|
-
const i = t.closest(
|
|
4794
|
-
i && i !== e || (s.key === " " && s.preventDefault(),
|
|
4795
|
-
},
|
|
4796
|
-
|
|
4797
|
-
},
|
|
4794
|
+
const i = t.closest(at);
|
|
4795
|
+
i && i !== e || (s.key === " " && s.preventDefault(), Wt(e));
|
|
4796
|
+
}, ys = () => {
|
|
4797
|
+
xt || (document.addEventListener("click", gs), document.addEventListener("keydown", vs), xt = !0);
|
|
4798
|
+
}, _s = (s) => {
|
|
4798
4799
|
const { target: t } = s;
|
|
4799
4800
|
if (t instanceof Element) {
|
|
4800
4801
|
const e = t.closest(".c-search-form--button");
|
|
4801
4802
|
e && (s.preventDefault(), e.classList.remove("c-search-form--button"));
|
|
4802
4803
|
}
|
|
4803
|
-
},
|
|
4804
|
+
}, ws = (s = document.querySelector(
|
|
4804
4805
|
".c-search-form--button"
|
|
4805
4806
|
)) => {
|
|
4806
4807
|
s && s.addEventListener("click", (t) => {
|
|
4807
|
-
|
|
4808
|
+
_s(t);
|
|
4808
4809
|
});
|
|
4809
|
-
},
|
|
4810
|
+
}, bs = ({
|
|
4810
4811
|
tabsContainerElement: s,
|
|
4811
4812
|
event: t
|
|
4812
4813
|
}) => {
|
|
@@ -4822,38 +4823,38 @@ const Vt = (s) => {
|
|
|
4822
4823
|
}), n.forEach((a) => {
|
|
4823
4824
|
a.setAttribute("aria-hidden", "true");
|
|
4824
4825
|
}), e.setAttribute("aria-selected", "true"), r && r.removeAttribute("aria-hidden");
|
|
4825
|
-
},
|
|
4826
|
+
}, Pt = (s) => s.code === "ArrowLeft" || s.keyCode === 39, Tt = (s) => s.code === "ArrowRight" || s.keyCode === 37, Ss = (s = document.querySelectorAll(
|
|
4826
4827
|
".js-tabs"
|
|
4827
4828
|
)) => {
|
|
4828
4829
|
s.length > 0 && s.forEach((t) => {
|
|
4829
4830
|
const e = t.querySelectorAll('[role="tab"]');
|
|
4830
4831
|
e.forEach((n) => {
|
|
4831
4832
|
n.addEventListener("click", (o) => {
|
|
4832
|
-
|
|
4833
|
+
bs({ tabsContainerElement: t, event: o });
|
|
4833
4834
|
});
|
|
4834
4835
|
});
|
|
4835
4836
|
const i = t.querySelector('[role="tablist"]');
|
|
4836
4837
|
if (i && e.length > 0) {
|
|
4837
4838
|
let n = 0;
|
|
4838
4839
|
i.addEventListener("keydown", (o) => {
|
|
4839
|
-
o instanceof KeyboardEvent && (
|
|
4840
|
+
o instanceof KeyboardEvent && (Pt(o) || Tt(o)) && (e[n].setAttribute("tabindex", "-1"), Pt(o) ? (n += 1, n >= e.length && (n = 0)) : Tt(o) && (n -= 1, n < 0 && (n = e.length - 1)), e[n].setAttribute("tabindex", "0"), e[n].focus());
|
|
4840
4841
|
});
|
|
4841
4842
|
}
|
|
4842
4843
|
});
|
|
4843
4844
|
}, Q = (s) => {
|
|
4844
4845
|
const [t, e] = s.split("h").map(Number);
|
|
4845
4846
|
return t * 60 + e;
|
|
4846
|
-
},
|
|
4847
|
+
}, jt = () => {
|
|
4847
4848
|
const s = /* @__PURE__ */ new Date(), t = s.getHours(), e = s.getMinutes();
|
|
4848
4849
|
return t * 60 + e;
|
|
4849
|
-
},
|
|
4850
|
-
const e =
|
|
4850
|
+
}, Ls = (s, t) => {
|
|
4851
|
+
const e = jt();
|
|
4851
4852
|
if (e < s || e > t)
|
|
4852
4853
|
return 0;
|
|
4853
4854
|
const i = t - s;
|
|
4854
4855
|
return (e - s) / i;
|
|
4855
|
-
},
|
|
4856
|
-
const t =
|
|
4856
|
+
}, Es = (s) => {
|
|
4857
|
+
const t = jt();
|
|
4857
4858
|
let e = null, i = null, n = -1;
|
|
4858
4859
|
return Array.from(s).find((o, r, a) => {
|
|
4859
4860
|
if (r === a.length - 1)
|
|
@@ -4864,14 +4865,14 @@ const Vt = (s) => {
|
|
|
4864
4865
|
const d = Q(l), h = Q(c);
|
|
4865
4866
|
return t >= d && t < h ? (e = l, i = c, n = r, !0) : !1;
|
|
4866
4867
|
}), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n };
|
|
4867
|
-
},
|
|
4868
|
+
}, As = () => {
|
|
4868
4869
|
const s = document.querySelectorAll(".c-timeline__time");
|
|
4869
4870
|
if (!s || s.length < 2)
|
|
4870
4871
|
return;
|
|
4871
|
-
const t = document.querySelector(".c-timeline__progress-bar"), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n } =
|
|
4872
|
+
const t = document.querySelector(".c-timeline__progress-bar"), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n } = Es(s);
|
|
4872
4873
|
if (!e || !i)
|
|
4873
4874
|
return;
|
|
4874
|
-
const o = Q(e), r = Q(i), a =
|
|
4875
|
+
const o = Q(e), r = Q(i), a = Ls(o, r);
|
|
4875
4876
|
if (t instanceof HTMLElement) {
|
|
4876
4877
|
if (t.classList.contains("c-timeline__progress-bar--is-desktop") && s.length >= 5) {
|
|
4877
4878
|
const l = "172px / 2";
|
|
@@ -4910,25 +4911,25 @@ const Vt = (s) => {
|
|
|
4910
4911
|
}
|
|
4911
4912
|
}
|
|
4912
4913
|
}
|
|
4913
|
-
},
|
|
4914
|
+
}, nt = "c-icon-item__container--is-highlighted", Cs = (s) => {
|
|
4914
4915
|
s.find(
|
|
4915
|
-
(e) => e.classList.contains(
|
|
4916
|
-
)?.classList.remove(
|
|
4917
|
-
},
|
|
4916
|
+
(e) => e.classList.contains(nt)
|
|
4917
|
+
)?.classList.remove(nt);
|
|
4918
|
+
}, xs = () => {
|
|
4918
4919
|
const s = document.querySelector(".c-toolbar");
|
|
4919
4920
|
if (s) {
|
|
4920
4921
|
const t = window.location.origin + window.location.pathname, e = Array.from(s.querySelectorAll(".c-icon-item__container"));
|
|
4921
|
-
|
|
4922
|
+
Cs(e), e.find(
|
|
4922
4923
|
(n) => n.querySelector("a")?.getAttribute("href") === t
|
|
4923
|
-
)?.classList.add(
|
|
4924
|
+
)?.classList.add(nt);
|
|
4924
4925
|
}
|
|
4925
|
-
},
|
|
4926
|
+
}, Ps = 12, lt = (s) => {
|
|
4926
4927
|
const t = s || document.querySelector(".c-map-towns");
|
|
4927
4928
|
if (!t) {
|
|
4928
4929
|
new MutationObserver((o, r) => {
|
|
4929
4930
|
if (typeof document < "u") {
|
|
4930
4931
|
const a = document.querySelector(".c-map-towns");
|
|
4931
|
-
a && (r.disconnect(),
|
|
4932
|
+
a && (r.disconnect(), lt(a));
|
|
4932
4933
|
}
|
|
4933
4934
|
}).observe(document.body, { childList: !0, subtree: !0 });
|
|
4934
4935
|
return;
|
|
@@ -4958,7 +4959,7 @@ const Vt = (s) => {
|
|
|
4958
4959
|
d.setAttribute("y", `${A}`), l.setAttribute("aria-hidden", "false");
|
|
4959
4960
|
} else
|
|
4960
4961
|
a = !1;
|
|
4961
|
-
}), !a && r <
|
|
4962
|
+
}), !a && r < Ps && requestAnimationFrame(() => o(r + 1));
|
|
4962
4963
|
};
|
|
4963
4964
|
return requestAnimationFrame(() => o()), !0;
|
|
4964
4965
|
};
|
|
@@ -4970,7 +4971,7 @@ const Vt = (s) => {
|
|
|
4970
4971
|
childList: !0,
|
|
4971
4972
|
subtree: !0
|
|
4972
4973
|
});
|
|
4973
|
-
},
|
|
4974
|
+
}, Ts = {
|
|
4974
4975
|
10: [{ id: "10387", name: "Troyes" }, { id: "10323", name: "Romilly-sur-Seine" }, { id: "10033", name: "Bar-sur-Aube" }],
|
|
4975
4976
|
11: [{ id: "11262", name: "Narbonne" }, { id: "11069", name: "Carcassonne" }, { id: "11076", name: "Castelnaudary" }],
|
|
4976
4977
|
12: [{ id: "12202", name: "Rodez" }, { id: "12145", name: "Millau" }, { id: "12300", name: "Villefranche-de-Rouergue" }],
|
|
@@ -5071,14 +5072,14 @@ const Vt = (s) => {
|
|
|
5071
5072
|
"07": [{ id: "07010", name: "Annonay" }, { id: "07019", name: "Aubenas" }, { id: "07324", name: "Tournon-sur-Rhône" }],
|
|
5072
5073
|
"05": [{ id: "05061", name: "Gap" }, { id: "05023", name: "Briançon" }, { id: "05046", name: "Embrun" }],
|
|
5073
5074
|
"08": [{ id: "08105", name: "Charleville-Mézières" }, { id: "08362", name: "Rethel" }, { id: "08190", name: "Givet" }]
|
|
5074
|
-
},
|
|
5075
|
+
}, Is = /<path\b([^>]*?)\/>/g, Ms = /\b([:\w-]+)="([^"]*)"/g, zs = (s) => {
|
|
5075
5076
|
const t = [];
|
|
5076
|
-
for (const e of s.matchAll(
|
|
5077
|
+
for (const e of s.matchAll(Is)) {
|
|
5077
5078
|
const i = e[1];
|
|
5078
5079
|
if (!i)
|
|
5079
5080
|
continue;
|
|
5080
5081
|
const n = /* @__PURE__ */ new Map();
|
|
5081
|
-
for (const c of i.matchAll(
|
|
5082
|
+
for (const c of i.matchAll(Ms)) {
|
|
5082
5083
|
const [, d, h] = c;
|
|
5083
5084
|
d && n.set(d, h || "");
|
|
5084
5085
|
}
|
|
@@ -5091,11 +5092,11 @@ const Vt = (s) => {
|
|
|
5091
5092
|
});
|
|
5092
5093
|
}
|
|
5093
5094
|
return t;
|
|
5094
|
-
},
|
|
5095
|
-
var
|
|
5095
|
+
}, Os = (s) => new Map(s.map((t) => [t.id, t]));
|
|
5096
|
+
var Gt = /* @__PURE__ */ ((s) => (s.MOBILE = "mobile", s.DESKTOP = "desktop", s))(Gt || {});
|
|
5096
5097
|
const Y = (s) => {
|
|
5097
5098
|
window.location.href = s;
|
|
5098
|
-
},
|
|
5099
|
+
}, Ds = (s, t, e) => {
|
|
5099
5100
|
const i = e.get(s);
|
|
5100
5101
|
if (i)
|
|
5101
5102
|
return i;
|
|
@@ -5110,7 +5111,7 @@ const Y = (s) => {
|
|
|
5110
5111
|
(o) => o.id.startsWith(`town-${s}`)
|
|
5111
5112
|
);
|
|
5112
5113
|
return e.set(s, n), n;
|
|
5113
|
-
},
|
|
5114
|
+
}, Rs = (s, t) => t.get(s), $s = (s) => {
|
|
5114
5115
|
if (s.size > 0)
|
|
5115
5116
|
return;
|
|
5116
5117
|
document.querySelectorAll(
|
|
@@ -5122,13 +5123,13 @@ const Y = (s) => {
|
|
|
5122
5123
|
Array.from(e.classList).filter((n) => n.startsWith("c-map-towns__path--"))
|
|
5123
5124
|
);
|
|
5124
5125
|
});
|
|
5125
|
-
},
|
|
5126
|
+
}, Bs = (s, t) => {
|
|
5126
5127
|
const e = s.id, i = s.url, n = s.name;
|
|
5127
5128
|
if (!e || !i)
|
|
5128
5129
|
return null;
|
|
5129
5130
|
const o = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
5130
5131
|
o.setAttribute("d", s.path), o.setAttribute("class", "c-map-towns__path c-map-towns__zoom-town"), o.setAttribute("data-url", i);
|
|
5131
|
-
const r =
|
|
5132
|
+
const r = Rs(e, t);
|
|
5132
5133
|
if (r && r.forEach((a) => {
|
|
5133
5134
|
o.classList.add(a);
|
|
5134
5135
|
}), n) {
|
|
@@ -5136,15 +5137,15 @@ const Y = (s) => {
|
|
|
5136
5137
|
a.textContent = n, o.appendChild(a);
|
|
5137
5138
|
}
|
|
5138
5139
|
return o;
|
|
5139
|
-
},
|
|
5140
|
+
}, Fs = (s, t) => {
|
|
5140
5141
|
const e = document.createDocumentFragment();
|
|
5141
5142
|
return s.forEach((i) => {
|
|
5142
|
-
const n =
|
|
5143
|
+
const n = Bs(i, t);
|
|
5143
5144
|
n && e.appendChild(n);
|
|
5144
5145
|
}), e;
|
|
5145
|
-
},
|
|
5146
|
+
}, ks = (s, t) => {
|
|
5146
5147
|
s.replaceChildren(t);
|
|
5147
|
-
},
|
|
5148
|
+
}, Zs = (s, t, e) => {
|
|
5148
5149
|
const i = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
5149
5150
|
i.setAttribute("class", "js-city-marker c-map-towns__city-marker"), i.setAttribute("aria-hidden", "true"), i.setAttribute("data-scale", e.toString());
|
|
5150
5151
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
@@ -5155,7 +5156,7 @@ const Y = (s) => {
|
|
|
5155
5156
|
r.setAttribute("class", "js-city-bg"), r.setAttribute("fill", "white"), r.setAttribute("rx", "4"), r.setAttribute("ry", "4");
|
|
5156
5157
|
const a = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
5157
5158
|
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;
|
|
5158
|
-
},
|
|
5159
|
+
}, Ns = (s, t) => {
|
|
5159
5160
|
const e = t.getBBox(), i = 5, n = e.width + i * 2, o = e.height + i * 2;
|
|
5160
5161
|
s.setAttribute(
|
|
5161
5162
|
"viewBox",
|
|
@@ -5164,17 +5165,17 @@ const Y = (s) => {
|
|
|
5164
5165
|
const r = s.clientWidth || 800, a = s.clientHeight || 600;
|
|
5165
5166
|
return Math.max(n / r, o / a);
|
|
5166
5167
|
};
|
|
5167
|
-
let
|
|
5168
|
-
const
|
|
5169
|
-
if (
|
|
5168
|
+
let tt = !1;
|
|
5169
|
+
const ot = () => {
|
|
5170
|
+
if (tt)
|
|
5170
5171
|
return;
|
|
5171
5172
|
if (!document.querySelector(".c-map-towns")) {
|
|
5172
5173
|
new MutationObserver((b, A) => {
|
|
5173
|
-
typeof document < "u" && document.querySelector(".c-map-towns") && (A.disconnect(),
|
|
5174
|
+
typeof document < "u" && document.querySelector(".c-map-towns") && (A.disconnect(), ot());
|
|
5174
5175
|
}).observe(document.body, { childList: !0, subtree: !0 });
|
|
5175
5176
|
return;
|
|
5176
5177
|
}
|
|
5177
|
-
const t = window.layout ===
|
|
5178
|
+
const t = window.layout === Gt.MOBILE, e = document.querySelector(".c-map-towns__map"), i = document.querySelector(".c-map-towns__droms"), n = document.querySelector(".c-map-towns__zooms"), o = (L) => {
|
|
5178
5179
|
const { target: b } = L;
|
|
5179
5180
|
if (!(b instanceof Element))
|
|
5180
5181
|
return;
|
|
@@ -5193,26 +5194,26 @@ const at = () => {
|
|
|
5193
5194
|
z && Y(z);
|
|
5194
5195
|
};
|
|
5195
5196
|
if (t) {
|
|
5196
|
-
e?.addEventListener("click", o), i?.addEventListener("click", o), n?.addEventListener("click", o),
|
|
5197
|
+
e?.addEventListener("click", o), i?.addEventListener("click", o), n?.addEventListener("click", o), tt = !0;
|
|
5197
5198
|
return;
|
|
5198
5199
|
}
|
|
5199
5200
|
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");
|
|
5200
5201
|
if (!(r instanceof HTMLElement) || !(a instanceof SVGSVGElement) || !(l instanceof SVGGElement) || !(c instanceof HTMLElement)) {
|
|
5201
|
-
requestAnimationFrame(
|
|
5202
|
+
requestAnimationFrame(ot);
|
|
5202
5203
|
return;
|
|
5203
5204
|
}
|
|
5204
|
-
|
|
5205
|
+
tt = !0;
|
|
5205
5206
|
const d = document.getElementById("js-zoom-label"), h = document.getElementById("js-zoom-title"), u = document.getElementById("js-town-sprite-data"), f = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map();
|
|
5206
5207
|
let p = null;
|
|
5207
5208
|
const y = () => {
|
|
5208
5209
|
if (p)
|
|
5209
5210
|
return p;
|
|
5210
5211
|
const L = u instanceof HTMLScriptElement ? JSON.parse(u.textContent || '""') : "";
|
|
5211
|
-
return p = zs(
|
|
5212
|
+
return p = Os(zs(L)), p;
|
|
5212
5213
|
}, w = () => {
|
|
5213
5214
|
r.setAttribute("aria-hidden", "true"), l.replaceChildren();
|
|
5214
5215
|
}, 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) => {
|
|
5215
|
-
const I =
|
|
5216
|
+
const I = Ts[L] || [];
|
|
5216
5217
|
if (I.length === 0)
|
|
5217
5218
|
return;
|
|
5218
5219
|
const M = document.createDocumentFragment();
|
|
@@ -5220,10 +5221,10 @@ const at = () => {
|
|
|
5220
5221
|
const z = C(L, F.id);
|
|
5221
5222
|
if (!z)
|
|
5222
5223
|
return;
|
|
5223
|
-
const R =
|
|
5224
|
+
const R = Zs(F.name, z, b);
|
|
5224
5225
|
M.appendChild(R);
|
|
5225
5226
|
}), l.appendChild(M), requestAnimationFrame(() => {
|
|
5226
|
-
|
|
5227
|
+
lt(l);
|
|
5227
5228
|
});
|
|
5228
5229
|
}, _ = (L) => {
|
|
5229
5230
|
const { target: b } = L;
|
|
@@ -5232,13 +5233,13 @@ const at = () => {
|
|
|
5232
5233
|
const A = b?.closest(".c-map-towns__dept-trigger");
|
|
5233
5234
|
if (!A)
|
|
5234
5235
|
return;
|
|
5235
|
-
const I = A.getAttribute("id")?.replace("out-", "") || "", M = A.getAttribute("data-name"), F =
|
|
5236
|
-
|
|
5237
|
-
const z =
|
|
5236
|
+
const I = A.getAttribute("id")?.replace("out-", "") || "", M = A.getAttribute("data-name"), F = Ds(I, y, f);
|
|
5237
|
+
$s(m);
|
|
5238
|
+
const z = Fs(F, m);
|
|
5238
5239
|
if (d && h && M && (d.textContent = M, h.textContent = `Carte détaillée du département : ${M}`), !(A instanceof SVGGraphicsElement))
|
|
5239
5240
|
return;
|
|
5240
|
-
const R =
|
|
5241
|
-
r.setAttribute("aria-hidden", "false"),
|
|
5241
|
+
const R = Ns(a, A);
|
|
5242
|
+
r.setAttribute("aria-hidden", "false"), ks(l, z), g(I, R);
|
|
5242
5243
|
}, E = (L) => {
|
|
5243
5244
|
const { target: b } = L;
|
|
5244
5245
|
if (!(b instanceof Element))
|
|
@@ -5251,15 +5252,15 @@ const at = () => {
|
|
|
5251
5252
|
}), r.addEventListener("click", (L) => {
|
|
5252
5253
|
L.target === r && w();
|
|
5253
5254
|
});
|
|
5254
|
-
},
|
|
5255
|
-
|
|
5255
|
+
}, Us = () => {
|
|
5256
|
+
ve(), Ss(), ie(), Ee(), ue(), ss(), Ji(), Ie(), ws(), ys(), oe(), ms(), ye(), _e(), be(), le(), te(
|
|
5256
5257
|
"localisation-input",
|
|
5257
5258
|
"https://www.20minutes.fr/elections/resultats/recherche",
|
|
5258
5259
|
"?searchValue=",
|
|
5259
5260
|
"text",
|
|
5260
5261
|
"text"
|
|
5261
|
-
),
|
|
5262
|
+
), ae(), lt(), xs(), Yt(), Jt(), Se(), ot(), $e(), Be(), we(), Xt(), As(), ns(), rs(), es();
|
|
5262
5263
|
};
|
|
5263
5264
|
export {
|
|
5264
|
-
|
|
5265
|
+
Us as initScripts
|
|
5265
5266
|
};
|