@20minutes/hela 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +214 -193
- package/dist/index.umd.js +1 -1
- package/dist/js/scripts.es.js +298 -330
- package/dist/js/scripts.umd.js +3 -3
- package/dist/scss/abstracts/variables/_token-variables.scss +1 -1
- package/dist/scss/abstracts/variables/_variables.scss +1 -1
- package/dist/src/components/molecules/ReadAlsoBanner/ReadAlsoBanner.d.ts +1 -1
- package/dist/src/components/molecules/ReadAlsoBanner/ReadAlsoBanner.stories.d.ts +9 -2
- package/dist/src/components/organisms/Header/Header.d.ts +1 -0
- package/dist/src/components/organisms/Header/HeaderMobile.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/src/assets/scripts/scrollDirectionDetection.d.ts +0 -2
package/dist/js/scripts.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var C = (s, t, e) =>
|
|
4
|
-
const
|
|
1
|
+
var Lt = Object.defineProperty;
|
|
2
|
+
var Et = (s, t, e) => t in s ? Lt(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
3
|
+
var C = (s, t, e) => Et(s, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
const Pt = () => {
|
|
5
5
|
const s = document.querySelector("#js-election-selector");
|
|
6
6
|
s && s.addEventListener("change", (t) => {
|
|
7
7
|
window.location.replace(t.target.value);
|
|
8
8
|
});
|
|
9
|
-
},
|
|
9
|
+
}, At = () => {
|
|
10
10
|
const s = document.querySelector(".c-search-banner");
|
|
11
11
|
if (s) {
|
|
12
12
|
const t = document.querySelector("#js-search-banner-to-hide"), e = s.querySelector("#js-search-banner-dropdown-btn");
|
|
@@ -23,7 +23,7 @@ const xt = () => {
|
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
function
|
|
26
|
+
function xt(s) {
|
|
27
27
|
var c, d, p;
|
|
28
28
|
if (!(s.target instanceof HTMLFormElement))
|
|
29
29
|
return;
|
|
@@ -37,10 +37,10 @@ function Ct(s) {
|
|
|
37
37
|
const a = "https://offres-emploi.20minutes.fr/offre-emploi", l = new URLSearchParams(i).toString(), h = `${a}?${l}`;
|
|
38
38
|
window.open(h, "_blank");
|
|
39
39
|
}
|
|
40
|
-
const
|
|
40
|
+
const It = () => {
|
|
41
41
|
const s = document.querySelector("form#actual-search-form");
|
|
42
|
-
s instanceof HTMLFormElement && s.addEventListener("submit",
|
|
43
|
-
},
|
|
42
|
+
s instanceof HTMLFormElement && s.addEventListener("submit", xt);
|
|
43
|
+
}, Ct = [
|
|
44
44
|
{
|
|
45
45
|
text: "Paris",
|
|
46
46
|
_index: "town_1717424751904",
|
|
@@ -71,7 +71,7 @@ const Tt = () => {
|
|
|
71
71
|
url: "/elections/resultats/paris/paris-75011"
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
],
|
|
74
|
+
], K = (s, t, e, i, n, o) => {
|
|
75
75
|
const r = document.getElementById(s);
|
|
76
76
|
if (!r)
|
|
77
77
|
return;
|
|
@@ -81,7 +81,7 @@ const Tt = () => {
|
|
|
81
81
|
const d = r.querySelector(".c-autocomplete__input-spinner"), p = l.getAttribute("data-trigger-message"), g = async (L) => {
|
|
82
82
|
try {
|
|
83
83
|
let v;
|
|
84
|
-
return a && t.includes("20minutes.fr") ? v =
|
|
84
|
+
return a && t.includes("20minutes.fr") ? v = Ct : v = await (await fetch(`${h}${e}${encodeURIComponent(L)}`)).json(), o ? v[o] : v;
|
|
85
85
|
} catch (v) {
|
|
86
86
|
return console.error("Error fetching autocomplete results:", v), [];
|
|
87
87
|
}
|
|
@@ -112,8 +112,8 @@ const Tt = () => {
|
|
|
112
112
|
}), l.addEventListener("focusin", () => {
|
|
113
113
|
c.childElementCount > 0 && c.classList.remove("u-hidden");
|
|
114
114
|
});
|
|
115
|
-
},
|
|
116
|
-
const s = document.querySelector("header"), t = document.querySelector(".js-limit-scroll-close-article-btn"), e = document.querySelector(".
|
|
115
|
+
}, Tt = () => {
|
|
116
|
+
const s = document.querySelector("header"), t = document.querySelector(".js-limit-scroll-close-article-btn"), e = document.querySelector(".js-close-article-btn"), i = document.querySelector(".c-header-mobile"), n = i instanceof HTMLElement ? i.offsetHeight : 0;
|
|
117
117
|
if (s && t && e) {
|
|
118
118
|
const o = new IntersectionObserver(
|
|
119
119
|
() => {
|
|
@@ -125,7 +125,7 @@ const Tt = () => {
|
|
|
125
125
|
);
|
|
126
126
|
o.observe(s), o.observe(t);
|
|
127
127
|
}
|
|
128
|
-
},
|
|
128
|
+
}, zt = (s) => {
|
|
129
129
|
s.stopImmediatePropagation(), s.preventDefault();
|
|
130
130
|
const t = s.currentTarget;
|
|
131
131
|
if (t instanceof HTMLButtonElement) {
|
|
@@ -134,15 +134,15 @@ const Tt = () => {
|
|
|
134
134
|
);
|
|
135
135
|
t.getAttribute("aria-expanded") === "true" ? (t.setAttribute("aria-expanded", "false"), i == null || i.setAttribute("aria-hidden", "true")) : (t.setAttribute("aria-expanded", "true"), i == null || i.setAttribute("aria-hidden", "false"));
|
|
136
136
|
}
|
|
137
|
-
},
|
|
137
|
+
}, Ot = (s = document.querySelector(
|
|
138
138
|
".js-collapse__button"
|
|
139
139
|
)) => {
|
|
140
140
|
s && document.querySelectorAll(".c-collapse__button").forEach((e) => {
|
|
141
141
|
e.addEventListener("click", (i) => {
|
|
142
|
-
|
|
142
|
+
zt(i);
|
|
143
143
|
});
|
|
144
144
|
});
|
|
145
|
-
},
|
|
145
|
+
}, Dt = (s, t) => {
|
|
146
146
|
const e = document.querySelector(
|
|
147
147
|
`#${t}`
|
|
148
148
|
);
|
|
@@ -163,12 +163,12 @@ const Tt = () => {
|
|
|
163
163
|
}
|
|
164
164
|
}, 1e3);
|
|
165
165
|
}
|
|
166
|
-
},
|
|
166
|
+
}, Mt = (s) => {
|
|
167
167
|
const t = s.getBBox(), e = t.width / 20;
|
|
168
168
|
return [t.x - e, t.y - e, t.width + e * 2, t.height + e * 2].join(
|
|
169
169
|
" "
|
|
170
170
|
);
|
|
171
|
-
},
|
|
171
|
+
}, Zt = () => {
|
|
172
172
|
const s = document.querySelector(".c-map-districts-container"), t = document.querySelector(".c-map-districts");
|
|
173
173
|
if (!s || !t)
|
|
174
174
|
return;
|
|
@@ -222,7 +222,7 @@ const Tt = () => {
|
|
|
222
222
|
);
|
|
223
223
|
c(
|
|
224
224
|
y || f,
|
|
225
|
-
|
|
225
|
+
Mt(y || f)
|
|
226
226
|
);
|
|
227
227
|
}
|
|
228
228
|
}, p = () => {
|
|
@@ -231,7 +231,7 @@ const Tt = () => {
|
|
|
231
231
|
t.addEventListener("click", p), n && n.addEventListener("click", p), document.querySelectorAll(".c-map-districts__zoomable").forEach((u) => {
|
|
232
232
|
u.addEventListener("click", (f) => d(f));
|
|
233
233
|
});
|
|
234
|
-
},
|
|
234
|
+
}, $t = () => {
|
|
235
235
|
const s = document.getElementById("elections-form-search"), t = document.querySelector(".c-search-form__autocomplete");
|
|
236
236
|
if (!s || !t)
|
|
237
237
|
return;
|
|
@@ -260,57 +260,57 @@ const Tt = () => {
|
|
|
260
260
|
}), s.addEventListener("focusin", () => {
|
|
261
261
|
t.childElementCount > 0 && t.classList.remove("u-hidden");
|
|
262
262
|
});
|
|
263
|
-
},
|
|
263
|
+
}, Ft = (s, t) => {
|
|
264
264
|
var n;
|
|
265
265
|
s.setAttribute("aria-expanded", "true");
|
|
266
266
|
const e = (n = s.parentNode) == null ? void 0 : n.querySelectorAll(".js-ellipsis-target");
|
|
267
267
|
e == null || e.forEach((o) => o.classList.remove(t));
|
|
268
268
|
const i = s.querySelector(".js-ellipsis-button__label");
|
|
269
269
|
i instanceof HTMLSpanElement && (i.innerHTML = "Voir moins");
|
|
270
|
-
},
|
|
270
|
+
}, Rt = (s, t) => {
|
|
271
271
|
var n;
|
|
272
272
|
const e = (n = s.parentNode) == null ? void 0 : n.querySelectorAll(".js-ellipsis-target");
|
|
273
273
|
e == null || e.forEach((o) => o.classList.add(t)), s.setAttribute("aria-expanded", "false");
|
|
274
274
|
const i = s.querySelector(".js-ellipsis-button__label");
|
|
275
275
|
i instanceof HTMLSpanElement && (i.innerHTML = "Voir plus");
|
|
276
|
-
},
|
|
276
|
+
}, kt = (s, t) => {
|
|
277
277
|
const e = s.currentTarget;
|
|
278
278
|
if (s.preventDefault(), e instanceof HTMLButtonElement) {
|
|
279
279
|
const i = t ? "u-ellipsis-multiline" : "u-ellipsis";
|
|
280
|
-
return e.getAttribute("aria-expanded") === "true" ?
|
|
280
|
+
return e.getAttribute("aria-expanded") === "true" ? Rt(e, i) : Ft(e, i);
|
|
281
281
|
}
|
|
282
282
|
return null;
|
|
283
|
-
},
|
|
283
|
+
}, qt = (s = document.querySelector(
|
|
284
284
|
".js-ellipsis-button"
|
|
285
285
|
)) => {
|
|
286
286
|
s && document.querySelectorAll(".js-ellipsis-button").forEach((e) => {
|
|
287
287
|
const i = e.getAttribute("data-multiple") === "true";
|
|
288
|
-
e.addEventListener("click", (n) =>
|
|
288
|
+
e.addEventListener("click", (n) => kt(n, i));
|
|
289
289
|
});
|
|
290
|
-
},
|
|
290
|
+
}, Nt = (s) => {
|
|
291
291
|
var i;
|
|
292
292
|
s.setAttribute("aria-expanded", "true");
|
|
293
293
|
const t = (i = s.parentNode) == null ? void 0 : i.querySelectorAll(".js-expand-target");
|
|
294
294
|
t == null || t.forEach((n) => n.setAttribute("aria-hidden", "false"));
|
|
295
295
|
const e = s.querySelector(".js-expand-button__label");
|
|
296
296
|
e instanceof HTMLSpanElement && (e.innerHTML = "Voir moins");
|
|
297
|
-
},
|
|
297
|
+
}, Bt = (s) => {
|
|
298
298
|
var i;
|
|
299
299
|
const t = (i = s.parentNode) == null ? void 0 : i.querySelectorAll(".js-expand-target");
|
|
300
300
|
t == null || t.forEach((n) => n.setAttribute("aria-hidden", "true")), s.setAttribute("aria-expanded", "false");
|
|
301
301
|
const e = s.querySelector(".js-expand-button__label");
|
|
302
302
|
e instanceof HTMLSpanElement && (e.innerHTML = "Voir plus");
|
|
303
|
-
},
|
|
303
|
+
}, Ht = (s) => {
|
|
304
304
|
const t = s.currentTarget;
|
|
305
|
-
return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ?
|
|
306
|
-
},
|
|
305
|
+
return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ? Bt(t) : Nt(t) : null;
|
|
306
|
+
}, Wt = (s = document.querySelector(
|
|
307
307
|
".js-expand-button"
|
|
308
308
|
)) => {
|
|
309
|
-
s && document.querySelectorAll(".js-expand-button").forEach((e) => e.addEventListener("click",
|
|
310
|
-
},
|
|
309
|
+
s && document.querySelectorAll(".js-expand-button").forEach((e) => e.addEventListener("click", Ht));
|
|
310
|
+
}, Vt = typeof window < "u" && navigator.userAgent.toLowerCase().includes("firefox"), jt = () => {
|
|
311
311
|
const s = document.querySelector(".js-game-alert");
|
|
312
|
-
|
|
313
|
-
},
|
|
312
|
+
Vt && s && s.classList.remove("u-hidden");
|
|
313
|
+
}, Ut = () => {
|
|
314
314
|
const s = document.querySelectorAll(".js-half-donut-result");
|
|
315
315
|
for (const t of Array.from(s)) {
|
|
316
316
|
const e = t.querySelector(".c-half-donut"), i = t.querySelector(".c-legend");
|
|
@@ -334,7 +334,7 @@ const Tt = () => {
|
|
|
334
334
|
negTabIndex: ':not([tabindex^="-"])',
|
|
335
335
|
disabled: ":not(:disabled)"
|
|
336
336
|
};
|
|
337
|
-
var
|
|
337
|
+
var Gt = [
|
|
338
338
|
`a[href]${m.inert}${m.negTabIndex}`,
|
|
339
339
|
`area[href]${m.inert}${m.negTabIndex}`,
|
|
340
340
|
`input:not([type="hidden"]):not([type="radio"])${m.inert}${m.negTabIndex}${m.disabled}`,
|
|
@@ -352,24 +352,24 @@ var Xt = [
|
|
|
352
352
|
`[contenteditable]${m.inert}${m.negTabIndex}`,
|
|
353
353
|
`[tabindex]${m.inert}${m.negTabIndex}`
|
|
354
354
|
];
|
|
355
|
-
function
|
|
355
|
+
function X(s) {
|
|
356
356
|
(s.querySelector("[autofocus]") || s).focus();
|
|
357
357
|
}
|
|
358
|
-
function
|
|
358
|
+
function Kt(s) {
|
|
359
359
|
const t = $(s, !0), e = t ? $(s, !1) || t : null;
|
|
360
360
|
return [t, e];
|
|
361
361
|
}
|
|
362
362
|
function $(s, t) {
|
|
363
|
-
if (t &&
|
|
363
|
+
if (t && J(s))
|
|
364
364
|
return s;
|
|
365
|
-
if (
|
|
365
|
+
if (Yt(s))
|
|
366
366
|
if (s.shadowRoot) {
|
|
367
|
-
let e =
|
|
367
|
+
let e = Y(s.shadowRoot, t);
|
|
368
368
|
for (; e; ) {
|
|
369
369
|
const i = $(e, t);
|
|
370
370
|
if (i)
|
|
371
371
|
return i;
|
|
372
|
-
e =
|
|
372
|
+
e = Q(e, t);
|
|
373
373
|
}
|
|
374
374
|
} else if (s.localName === "slot") {
|
|
375
375
|
const e = s.assignedElements({
|
|
@@ -382,38 +382,38 @@ function $(s, t) {
|
|
|
382
382
|
return n;
|
|
383
383
|
}
|
|
384
384
|
} else {
|
|
385
|
-
let e =
|
|
385
|
+
let e = Y(s, t);
|
|
386
386
|
for (; e; ) {
|
|
387
387
|
const i = $(e, t);
|
|
388
388
|
if (i)
|
|
389
389
|
return i;
|
|
390
|
-
e =
|
|
390
|
+
e = Q(e, t);
|
|
391
391
|
}
|
|
392
392
|
}
|
|
393
|
-
return !t &&
|
|
393
|
+
return !t && J(s) ? s : null;
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function Y(s, t) {
|
|
396
396
|
return t ? s.firstElementChild : s.lastElementChild;
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function Q(s, t) {
|
|
399
399
|
return t ? s.nextElementSibling : s.previousElementSibling;
|
|
400
400
|
}
|
|
401
|
-
const
|
|
401
|
+
const Xt = (s) => s.matches("details:not([open]) *") && !s.matches("details>summary:first-of-type") ? !0 : !(s.offsetWidth || s.offsetHeight || s.getClientRects().length), J = (s) => {
|
|
402
402
|
var t;
|
|
403
|
-
return (t = s.shadowRoot) != null && t.delegatesFocus ? !1 : s.matches(
|
|
403
|
+
return (t = s.shadowRoot) != null && t.delegatesFocus ? !1 : s.matches(Gt.join(",")) && !Xt(s);
|
|
404
404
|
};
|
|
405
|
-
function
|
|
405
|
+
function Yt(s) {
|
|
406
406
|
return s.shadowRoot && s.getAttribute("tabindex") === "-1" ? !1 : !s.matches(":disabled,[hidden],[inert]");
|
|
407
407
|
}
|
|
408
|
-
function
|
|
408
|
+
function B(s = document) {
|
|
409
409
|
const t = s.activeElement;
|
|
410
|
-
return t ? t.shadowRoot ?
|
|
410
|
+
return t ? t.shadowRoot ? B(t.shadowRoot) || document.activeElement : t : null;
|
|
411
411
|
}
|
|
412
|
-
function
|
|
413
|
-
const [e, i] =
|
|
412
|
+
function Qt(s, t) {
|
|
413
|
+
const [e, i] = Kt(s);
|
|
414
414
|
if (!e)
|
|
415
415
|
return t.preventDefault();
|
|
416
|
-
const n =
|
|
416
|
+
const n = B();
|
|
417
417
|
t.shiftKey && n === e ? (i.focus(), t.preventDefault()) : !t.shiftKey && n === i && (e.focus(), t.preventDefault());
|
|
418
418
|
}
|
|
419
419
|
function T(s, t) {
|
|
@@ -423,7 +423,7 @@ function T(s, t) {
|
|
|
423
423
|
return e(t);
|
|
424
424
|
}
|
|
425
425
|
const z = "data-a11y-dialog";
|
|
426
|
-
class
|
|
426
|
+
class ut {
|
|
427
427
|
constructor(t) {
|
|
428
428
|
C(this, "$el");
|
|
429
429
|
C(this, "id");
|
|
@@ -444,7 +444,7 @@ class ft {
|
|
|
444
444
|
*/
|
|
445
445
|
show(t) {
|
|
446
446
|
var i;
|
|
447
|
-
return this.shown ? this : this.fire("show", t).defaultPrevented ? this : (this.shown = !0, this.$el.removeAttribute("aria-hidden"), this.previouslyFocused =
|
|
447
|
+
return this.shown ? this : this.fire("show", t).defaultPrevented ? this : (this.shown = !0, this.$el.removeAttribute("aria-hidden"), this.previouslyFocused = B(), ((i = this.previouslyFocused) == null ? void 0 : i.tagName) === "BODY" && (t != null && t.target) && (this.previouslyFocused = t.target), (t == null ? void 0 : t.type) === "focus" ? this.maintainFocus(t) : X(this.$el), document.body.addEventListener("focus", this.maintainFocus, !0), this.$el.addEventListener("keydown", this.bindKeypress, !0), this);
|
|
448
448
|
}
|
|
449
449
|
/**
|
|
450
450
|
* Hide the dialog element, restore the focus to the previously active
|
|
@@ -492,14 +492,14 @@ class ft {
|
|
|
492
492
|
* (namely ESC and TAB)
|
|
493
493
|
*/
|
|
494
494
|
bindKeypress(t) {
|
|
495
|
-
if (T('[aria-modal="true"]',
|
|
495
|
+
if (T('[aria-modal="true"]', B()) !== this.$el)
|
|
496
496
|
return;
|
|
497
497
|
let e = !1;
|
|
498
498
|
try {
|
|
499
499
|
e = !!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open');
|
|
500
500
|
} catch {
|
|
501
501
|
}
|
|
502
|
-
t.key === "Escape" && this.$el.getAttribute("role") !== "alertdialog" && !e && (t.preventDefault(), this.hide(t)), t.key === "Tab" &&
|
|
502
|
+
t.key === "Escape" && this.$el.getAttribute("role") !== "alertdialog" && !e && (t.preventDefault(), this.hide(t)), t.key === "Tab" && Qt(this.$el, t);
|
|
503
503
|
}
|
|
504
504
|
/**
|
|
505
505
|
* If the dialog is shown and the focus is not within a dialog element (either
|
|
@@ -508,18 +508,18 @@ class ft {
|
|
|
508
508
|
* See: https://github.com/KittyGiraudel/a11y-dialog/issues/177
|
|
509
509
|
*/
|
|
510
510
|
maintainFocus(t) {
|
|
511
|
-
t.target.closest(`[aria-modal="true"], [${z}-ignore-focus-trap]`) ||
|
|
511
|
+
t.target.closest(`[aria-modal="true"], [${z}-ignore-focus-trap]`) || X(this.$el);
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
|
-
function
|
|
514
|
+
function tt() {
|
|
515
515
|
for (const s of document.querySelectorAll("[data-a11y-dialog]"))
|
|
516
|
-
new
|
|
516
|
+
new ut(s);
|
|
517
517
|
}
|
|
518
|
-
typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded",
|
|
519
|
-
const
|
|
518
|
+
typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", tt) : tt());
|
|
519
|
+
const Jt = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
520
520
|
if (!(s instanceof HTMLElement))
|
|
521
521
|
return;
|
|
522
|
-
const t = new
|
|
522
|
+
const t = new ut(s);
|
|
523
523
|
if (s.id === "dialog-menu") {
|
|
524
524
|
const e = document.querySelectorAll("button[data-a11y-dialog-show='dialog-menu']"), i = document.querySelectorAll("button[data-a11y-dialog-hide='dialog-menu']");
|
|
525
525
|
e.length > 0 && i.length > 0 && (t.on("show", () => {
|
|
@@ -533,11 +533,11 @@ const ee = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
533
533
|
}).on("hide", () => {
|
|
534
534
|
document.body.classList.remove("noscroll");
|
|
535
535
|
});
|
|
536
|
-
}),
|
|
536
|
+
}), te = ({ navigatedList: s, nextBtn: t, prevBtn: e }) => {
|
|
537
537
|
var o, r, a, l, h, c, d, p;
|
|
538
538
|
const i = s.scrollLeft > 0, n = s.scrollLeft + s.clientWidth < s.scrollWidth;
|
|
539
539
|
i && n ? ((o = t.classList) == null || o.add("o-nav-button--visible"), (r = e.classList) == null || r.add("o-nav-button--visible")) : i ? ((a = t.classList) == null || a.remove("o-nav-button--visible"), (l = e.classList) == null || l.add("o-nav-button--visible")) : n ? ((h = t.classList) == null || h.add("o-nav-button--visible"), (c = e.classList) == null || c.remove("o-nav-button--visible")) : ((d = t.classList) == null || d.remove("o-nav-button--visible"), (p = e.classList) == null || p.remove("o-nav-button--visible"));
|
|
540
|
-
},
|
|
540
|
+
}, ee = ({
|
|
541
541
|
navigatedList: s,
|
|
542
542
|
nextBtn: t,
|
|
543
543
|
prevBtn: e,
|
|
@@ -582,7 +582,7 @@ const ee = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
582
582
|
}), t.classList.remove("o-nav-button--visible"), e.classList.add("o-nav-button--visible");
|
|
583
583
|
}
|
|
584
584
|
}
|
|
585
|
-
},
|
|
585
|
+
}, ie = ({
|
|
586
586
|
navigatedList: s,
|
|
587
587
|
nextBtn: t,
|
|
588
588
|
prevBtn: e,
|
|
@@ -623,13 +623,13 @@ const ee = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
623
623
|
behavior: "smooth"
|
|
624
624
|
}), e.classList.remove("o-nav-button--visible"), s.clientWidth < s.scrollWidth && t.classList.add("o-nav-button--visible");
|
|
625
625
|
}
|
|
626
|
-
},
|
|
627
|
-
|
|
626
|
+
}, se = ({ navigatedList: s, nextBtn: t, prevBtn: e }) => {
|
|
627
|
+
te({
|
|
628
628
|
navigatedList: s,
|
|
629
629
|
nextBtn: t,
|
|
630
630
|
prevBtn: e
|
|
631
631
|
});
|
|
632
|
-
},
|
|
632
|
+
}, ne = () => {
|
|
633
633
|
const s = document.querySelectorAll(".js-navigation-container");
|
|
634
634
|
for (const t of Array.from(s)) {
|
|
635
635
|
const { sliderVariant: e } = t.dataset, { sliderAuto: i } = t.dataset, { sliderDelay: n } = t.dataset, o = n ? parseInt(n, 10) : 3e3, r = t.closest(".js-overview-bar-container"), a = r == null ? void 0 : r.querySelector(".c-stepper"), l = a == null ? void 0 : a.querySelectorAll(".c-stepper__item");
|
|
@@ -643,7 +643,7 @@ const ee = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
643
643
|
);
|
|
644
644
|
if (h && h.clientWidth < h.scrollWidth && (c == null || c.classList.add("o-nav-button--visible")), h && c && d && (c == null || c.addEventListener(
|
|
645
645
|
"click",
|
|
646
|
-
|
|
646
|
+
ee.bind(!1, {
|
|
647
647
|
navigatedList: h,
|
|
648
648
|
nextBtn: c,
|
|
649
649
|
prevBtn: d,
|
|
@@ -651,7 +651,7 @@ const ee = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
651
651
|
})
|
|
652
652
|
), d == null || d.addEventListener(
|
|
653
653
|
"click",
|
|
654
|
-
|
|
654
|
+
ie.bind(!1, {
|
|
655
655
|
navigatedList: h,
|
|
656
656
|
nextBtn: c,
|
|
657
657
|
prevBtn: d,
|
|
@@ -676,7 +676,7 @@ const ee = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
676
676
|
}
|
|
677
677
|
}
|
|
678
678
|
}
|
|
679
|
-
},
|
|
679
|
+
}, oe = () => {
|
|
680
680
|
const s = document.querySelectorAll(".js-navigation-container");
|
|
681
681
|
for (const t of Array.from(s))
|
|
682
682
|
if (t) {
|
|
@@ -689,7 +689,7 @@ const ee = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
689
689
|
);
|
|
690
690
|
e && i && n && window.addEventListener(
|
|
691
691
|
"resize",
|
|
692
|
-
|
|
692
|
+
se.bind(!1, {
|
|
693
693
|
navigatedList: e,
|
|
694
694
|
nextBtn: i,
|
|
695
695
|
prevBtn: n
|
|
@@ -708,37 +708,37 @@ function w(s, t, e) {
|
|
|
708
708
|
function _(s, t) {
|
|
709
709
|
return s.x = t.x, s.y = t.y, t.id !== void 0 && (s.id = t.id), s;
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function pt(s) {
|
|
712
712
|
s.x = Math.round(s.x), s.y = Math.round(s.y);
|
|
713
713
|
}
|
|
714
|
-
function
|
|
714
|
+
function W(s, t) {
|
|
715
715
|
const e = Math.abs(s.x - t.x), i = Math.abs(s.y - t.y);
|
|
716
716
|
return Math.sqrt(e * e + i * i);
|
|
717
717
|
}
|
|
718
718
|
function F(s, t) {
|
|
719
719
|
return s.x === t.x && s.y === t.y;
|
|
720
720
|
}
|
|
721
|
-
function
|
|
721
|
+
function k(s, t, e) {
|
|
722
722
|
return Math.min(Math.max(s, t), e);
|
|
723
723
|
}
|
|
724
|
-
function
|
|
724
|
+
function R(s, t, e) {
|
|
725
725
|
let i = `translate3d(${s}px,${t || 0}px,0)`;
|
|
726
726
|
return e !== void 0 && (i += ` scale3d(${e},${e},1)`), i;
|
|
727
727
|
}
|
|
728
728
|
function I(s, t, e, i) {
|
|
729
|
-
s.style.transform =
|
|
729
|
+
s.style.transform = R(t, e, i);
|
|
730
730
|
}
|
|
731
|
-
const
|
|
732
|
-
function
|
|
733
|
-
s.style.transition = t ? `${t} ${e}ms ${i ||
|
|
731
|
+
const re = "cubic-bezier(.4,0,.22,1)";
|
|
732
|
+
function ft(s, t, e, i) {
|
|
733
|
+
s.style.transition = t ? `${t} ${e}ms ${i || re}` : "none";
|
|
734
734
|
}
|
|
735
|
-
function
|
|
735
|
+
function V(s, t, e) {
|
|
736
736
|
s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
|
|
737
737
|
}
|
|
738
|
-
function
|
|
739
|
-
|
|
738
|
+
function ae(s) {
|
|
739
|
+
ft(s);
|
|
740
740
|
}
|
|
741
|
-
function
|
|
741
|
+
function le(s) {
|
|
742
742
|
return "decode" in s ? s.decode().catch(() => {
|
|
743
743
|
}) : s.complete ? Promise.resolve(s) : new Promise((t, e) => {
|
|
744
744
|
s.onload = () => t(s), s.onerror = e;
|
|
@@ -750,10 +750,10 @@ const S = {
|
|
|
750
750
|
LOADED: "loaded",
|
|
751
751
|
ERROR: "error"
|
|
752
752
|
};
|
|
753
|
-
function
|
|
753
|
+
function he(s) {
|
|
754
754
|
return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
|
|
755
755
|
}
|
|
756
|
-
function
|
|
756
|
+
function ce(s, t, e = document) {
|
|
757
757
|
let i = [];
|
|
758
758
|
if (s instanceof Element)
|
|
759
759
|
i = [s];
|
|
@@ -765,19 +765,19 @@ function ue(s, t, e = document) {
|
|
|
765
765
|
}
|
|
766
766
|
return i;
|
|
767
767
|
}
|
|
768
|
-
function
|
|
768
|
+
function et() {
|
|
769
769
|
return !!(navigator.vendor && navigator.vendor.match(/apple/i));
|
|
770
770
|
}
|
|
771
|
-
let
|
|
771
|
+
let mt = !1;
|
|
772
772
|
try {
|
|
773
773
|
window.addEventListener("test", null, Object.defineProperty({}, "passive", {
|
|
774
774
|
get: () => {
|
|
775
|
-
|
|
775
|
+
mt = !0;
|
|
776
776
|
}
|
|
777
777
|
}));
|
|
778
778
|
} catch {
|
|
779
779
|
}
|
|
780
|
-
class
|
|
780
|
+
class de {
|
|
781
781
|
constructor() {
|
|
782
782
|
this._pool = [];
|
|
783
783
|
}
|
|
@@ -834,7 +834,7 @@ class pe {
|
|
|
834
834
|
listener: i,
|
|
835
835
|
passive: n
|
|
836
836
|
}));
|
|
837
|
-
const c =
|
|
837
|
+
const c = mt ? {
|
|
838
838
|
passive: n || !1
|
|
839
839
|
} : !1;
|
|
840
840
|
t[a](h, i, c);
|
|
@@ -842,7 +842,7 @@ class pe {
|
|
|
842
842
|
});
|
|
843
843
|
}
|
|
844
844
|
}
|
|
845
|
-
function
|
|
845
|
+
function gt(s, t) {
|
|
846
846
|
if (s.getViewportSizeFn) {
|
|
847
847
|
const e = s.getViewportSizeFn(s, t);
|
|
848
848
|
if (e)
|
|
@@ -857,7 +857,7 @@ function yt(s, t) {
|
|
|
857
857
|
y: window.innerHeight
|
|
858
858
|
};
|
|
859
859
|
}
|
|
860
|
-
function
|
|
860
|
+
function D(s, t, e, i, n) {
|
|
861
861
|
let o = 0;
|
|
862
862
|
if (t.paddingFn)
|
|
863
863
|
o = t.paddingFn(e, i, n)[s];
|
|
@@ -869,13 +869,13 @@ function M(s, t, e, i, n) {
|
|
|
869
869
|
}
|
|
870
870
|
return Number(o) || 0;
|
|
871
871
|
}
|
|
872
|
-
function
|
|
872
|
+
function _t(s, t, e, i) {
|
|
873
873
|
return {
|
|
874
|
-
x: t.x -
|
|
875
|
-
y: t.y -
|
|
874
|
+
x: t.x - D("left", s, t, e, i) - D("right", s, t, e, i),
|
|
875
|
+
y: t.y - D("top", s, t, e, i) - D("bottom", s, t, e, i)
|
|
876
876
|
};
|
|
877
877
|
}
|
|
878
|
-
class
|
|
878
|
+
class ue {
|
|
879
879
|
/**
|
|
880
880
|
* @param {Slide} slide
|
|
881
881
|
*/
|
|
@@ -912,7 +912,7 @@ class fe {
|
|
|
912
912
|
_updateAxis(t) {
|
|
913
913
|
const {
|
|
914
914
|
pswp: e
|
|
915
|
-
} = this.slide, i = this.slide[t === "x" ? "width" : "height"] * this.currZoomLevel, o =
|
|
915
|
+
} = this.slide, i = this.slide[t === "x" ? "width" : "height"] * this.currZoomLevel, o = D(t === "x" ? "left" : "top", e.options, e.viewportSize, this.slide.data, this.slide.index), r = this.slide.panAreaSize[t];
|
|
916
916
|
this.center[t] = Math.round((r - i) / 2) + o, this.max[t] = i > r ? Math.round(r - i) + o : this.center[t], this.min[t] = i > r ? o : this.center[t];
|
|
917
917
|
}
|
|
918
918
|
// _getZeroBounds
|
|
@@ -927,11 +927,11 @@ class fe {
|
|
|
927
927
|
* @returns {number}
|
|
928
928
|
*/
|
|
929
929
|
correctPan(t, e) {
|
|
930
|
-
return
|
|
930
|
+
return k(e, this.max[t], this.min[t]);
|
|
931
931
|
}
|
|
932
932
|
}
|
|
933
|
-
const
|
|
934
|
-
let
|
|
933
|
+
const it = 4e3;
|
|
934
|
+
let yt = class {
|
|
935
935
|
/**
|
|
936
936
|
* @param {PhotoSwipeOptions} options PhotoSwipe options
|
|
937
937
|
* @param {SlideData} itemData Slide data
|
|
@@ -988,7 +988,7 @@ let wt = class {
|
|
|
988
988
|
*/
|
|
989
989
|
_getSecondary() {
|
|
990
990
|
let t = this._parseZoomLevelOption("secondary");
|
|
991
|
-
return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x >
|
|
991
|
+
return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > it && (t = it / this.elementSize.x), t);
|
|
992
992
|
}
|
|
993
993
|
/**
|
|
994
994
|
* Get initial image zoom level.
|
|
@@ -1011,7 +1011,7 @@ let wt = class {
|
|
|
1011
1011
|
return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
|
|
1012
1012
|
}
|
|
1013
1013
|
};
|
|
1014
|
-
class
|
|
1014
|
+
class pe {
|
|
1015
1015
|
/**
|
|
1016
1016
|
* @param {SlideData} data
|
|
1017
1017
|
* @param {number} index
|
|
@@ -1024,11 +1024,11 @@ class me {
|
|
|
1024
1024
|
}, this.pan = {
|
|
1025
1025
|
x: 0,
|
|
1026
1026
|
y: 0
|
|
1027
|
-
}, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new
|
|
1027
|
+
}, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new yt(i.options, t, e, i), this.pswp.dispatch("gettingData", {
|
|
1028
1028
|
slide: this,
|
|
1029
1029
|
data: this.data,
|
|
1030
1030
|
index: e
|
|
1031
|
-
}), this.content = this.pswp.contentLoader.getContentBySlide(this), this.container = w("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
|
|
1031
|
+
}), this.content = this.pswp.contentLoader.getContentBySlide(this), this.container = w("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 ue(this), this.prevDisplayedWidth = -1, this.prevDisplayedHeight = -1, this.pswp.dispatch("slideInit", {
|
|
1032
1032
|
slide: this
|
|
1033
1033
|
});
|
|
1034
1034
|
}
|
|
@@ -1152,7 +1152,7 @@ class me {
|
|
|
1152
1152
|
transitionDuration: i
|
|
1153
1153
|
}), o.animations.stopAllPan();
|
|
1154
1154
|
const r = this.currZoomLevel;
|
|
1155
|
-
n || (t =
|
|
1155
|
+
n || (t = k(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), pt(this.pan);
|
|
1156
1156
|
const a = () => {
|
|
1157
1157
|
this._setResolution(t), this.applyCurrentZoomPan();
|
|
1158
1158
|
};
|
|
@@ -1253,14 +1253,14 @@ class me {
|
|
|
1253
1253
|
const {
|
|
1254
1254
|
pswp: t
|
|
1255
1255
|
} = this;
|
|
1256
|
-
_(this.panAreaSize,
|
|
1256
|
+
_(this.panAreaSize, _t(t.options, t.viewportSize, this.data, this.index)), this.zoomLevels.update(this.width, this.height, this.panAreaSize), t.dispatch("calcSlideSize", {
|
|
1257
1257
|
slide: this
|
|
1258
1258
|
});
|
|
1259
1259
|
}
|
|
1260
1260
|
/** @returns {string} */
|
|
1261
1261
|
getCurrentTransform() {
|
|
1262
1262
|
const t = this.currZoomLevel / (this.currentResolution || this.zoomLevels.initial);
|
|
1263
|
-
return
|
|
1263
|
+
return R(this.pan.x, this.pan.y, t);
|
|
1264
1264
|
}
|
|
1265
1265
|
/**
|
|
1266
1266
|
* Set resolution and re-render the image.
|
|
@@ -1281,11 +1281,11 @@ class me {
|
|
|
1281
1281
|
t !== this.currentResolution && (this.currentResolution = t, this.updateContentSize(), this.pswp.dispatch("resolutionChanged"));
|
|
1282
1282
|
}
|
|
1283
1283
|
}
|
|
1284
|
-
const
|
|
1285
|
-
function
|
|
1284
|
+
const fe = 0.35, me = 0.6, ge = 0.4, _e = 0.5;
|
|
1285
|
+
function ye(s, t) {
|
|
1286
1286
|
return s * t / (1 - t);
|
|
1287
1287
|
}
|
|
1288
|
-
class
|
|
1288
|
+
class ve {
|
|
1289
1289
|
/**
|
|
1290
1290
|
* @param {Gestures} gestures
|
|
1291
1291
|
*/
|
|
@@ -1311,12 +1311,12 @@ class Se {
|
|
|
1311
1311
|
if (!this.pswp.dispatch("verticalDrag", {
|
|
1312
1312
|
panY: o
|
|
1313
1313
|
}).defaultPrevented) {
|
|
1314
|
-
this._setPanWithFriction("y", o,
|
|
1314
|
+
this._setPanWithFriction("y", o, me);
|
|
1315
1315
|
const r = 1 - Math.abs(this._getVerticalDragRatio(n.pan.y));
|
|
1316
1316
|
this.pswp.applyBgOpacity(r), n.applyCurrentZoomPan();
|
|
1317
1317
|
}
|
|
1318
1318
|
} else
|
|
1319
|
-
this._panOrMoveMainScroll("x") || (this._panOrMoveMainScroll("y"), n && (
|
|
1319
|
+
this._panOrMoveMainScroll("x") || (this._panOrMoveMainScroll("y"), n && (pt(n.pan), n.applyCurrentZoomPan()));
|
|
1320
1320
|
}
|
|
1321
1321
|
end() {
|
|
1322
1322
|
const {
|
|
@@ -1328,7 +1328,7 @@ class Se {
|
|
|
1328
1328
|
let n = 0;
|
|
1329
1329
|
if (this.pswp.animations.stopAll(), e.isShifted()) {
|
|
1330
1330
|
const r = (e.x - e.getCurrSlideX()) / this.pswp.viewportSize.x;
|
|
1331
|
-
t.x < -0.5 && r < 0 || t.x < 0.1 && r < -0.5 ? (n = 1, t.x = Math.min(t.x, 0)) : (t.x >
|
|
1331
|
+
t.x < -0.5 && r < 0 || t.x < 0.1 && r < -0.5 ? (n = 1, t.x = Math.min(t.x, 0)) : (t.x > _e && r > 0 || t.x > -0.1 && r > 0.5) && (n = -1, t.x = Math.max(t.x, 0)), e.moveIndexBy(n, !0, t.x);
|
|
1332
1332
|
}
|
|
1333
1333
|
i && i.currZoomLevel > i.zoomLevels.max || this.gestures.isMultitouch ? this.gestures.zoomLevels.correctZoomPan(!0) : (this._finishPanGestureForAxis("x"), this._finishPanGestureForAxis("y"));
|
|
1334
1334
|
}
|
|
@@ -1347,10 +1347,10 @@ class Se {
|
|
|
1347
1347
|
const {
|
|
1348
1348
|
pan: n,
|
|
1349
1349
|
bounds: o
|
|
1350
|
-
} = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", h = r +
|
|
1350
|
+
} = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", h = r + ye(e[t], 0.995);
|
|
1351
1351
|
if (a) {
|
|
1352
1352
|
const u = this._getVerticalDragRatio(r), f = this._getVerticalDragRatio(h);
|
|
1353
|
-
if (u < 0 && f < -0.4 || u > 0 && f >
|
|
1353
|
+
if (u < 0 && f < -0.4 || u > 0 && f > ge) {
|
|
1354
1354
|
this.pswp.close();
|
|
1355
1355
|
return;
|
|
1356
1356
|
}
|
|
@@ -1369,7 +1369,7 @@ class Se {
|
|
|
1369
1369
|
onUpdate: (u) => {
|
|
1370
1370
|
if (a && this.pswp.bgOpacity < 1) {
|
|
1371
1371
|
const f = 1 - (c - u) / g;
|
|
1372
|
-
this.pswp.applyBgOpacity(
|
|
1372
|
+
this.pswp.applyBgOpacity(k(p + (1 - p) * f, 0, 1));
|
|
1373
1373
|
}
|
|
1374
1374
|
n[t] = Math.floor(u), i.applyCurrentZoomPan();
|
|
1375
1375
|
}
|
|
@@ -1462,16 +1462,16 @@ class Se {
|
|
|
1462
1462
|
} = n;
|
|
1463
1463
|
if (r.correctPan(t, e) !== e || i) {
|
|
1464
1464
|
const l = Math.round(e - o[t]);
|
|
1465
|
-
o[t] += l * (i ||
|
|
1465
|
+
o[t] += l * (i || fe);
|
|
1466
1466
|
} else
|
|
1467
1467
|
o[t] = e;
|
|
1468
1468
|
}
|
|
1469
1469
|
}
|
|
1470
|
-
const
|
|
1471
|
-
function
|
|
1470
|
+
const we = 0.05, Se = 0.15;
|
|
1471
|
+
function st(s, t, e) {
|
|
1472
1472
|
return s.x = (t.x + e.x) / 2, s.y = (t.y + e.y) / 2, s;
|
|
1473
1473
|
}
|
|
1474
|
-
class
|
|
1474
|
+
class be {
|
|
1475
1475
|
/**
|
|
1476
1476
|
* @param {Gestures} gestures
|
|
1477
1477
|
*/
|
|
@@ -1508,8 +1508,8 @@ class Ee {
|
|
|
1508
1508
|
const a = r.zoomLevels.min, l = r.zoomLevels.max;
|
|
1509
1509
|
if (!r.isZoomable() || o.mainScroll.isShifted())
|
|
1510
1510
|
return;
|
|
1511
|
-
|
|
1512
|
-
let h = 1 /
|
|
1511
|
+
st(this._startZoomPoint, e, n), st(this._zoomPoint, t, i);
|
|
1512
|
+
let h = 1 / W(e, n) * W(t, i) * this._startZoomLevel;
|
|
1513
1513
|
if (h > r.zoomLevels.initial + r.zoomLevels.initial / 15 && (this._wasOverFitZoomLevel = !0), h < a)
|
|
1514
1514
|
if (o.options.pinchToClose && !this._wasOverFitZoomLevel && this._startZoomLevel <= r.zoomLevels.initial) {
|
|
1515
1515
|
const c = 1 - (a - h) / (a / 1.2);
|
|
@@ -1517,8 +1517,8 @@ class Ee {
|
|
|
1517
1517
|
bgOpacity: c
|
|
1518
1518
|
}).defaultPrevented || o.applyBgOpacity(c);
|
|
1519
1519
|
} else
|
|
1520
|
-
h = a - (a - h) *
|
|
1521
|
-
else h > l && (h = l + (h - l) *
|
|
1520
|
+
h = a - (a - h) * Se;
|
|
1521
|
+
else h > l && (h = l + (h - l) * we);
|
|
1522
1522
|
r.pan.x = this._calculatePanForZoomLevel("x", h), r.pan.y = this._calculatePanForZoomLevel("y", h), r.setZoomLevel(h), r.applyCurrentZoomPan();
|
|
1523
1523
|
}
|
|
1524
1524
|
end() {
|
|
@@ -1594,7 +1594,7 @@ class Ee {
|
|
|
1594
1594
|
}
|
|
1595
1595
|
i.applyCurrentZoomPan();
|
|
1596
1596
|
}
|
|
1597
|
-
l && e.bgOpacity < 1 && e.applyBgOpacity(
|
|
1597
|
+
l && e.bgOpacity < 1 && e.applyBgOpacity(k(a + (1 - a) * p, 0, 1));
|
|
1598
1598
|
},
|
|
1599
1599
|
onComplete: () => {
|
|
1600
1600
|
i._setResolution(o), i.applyCurrentZoomPan();
|
|
@@ -1602,11 +1602,11 @@ class Ee {
|
|
|
1602
1602
|
});
|
|
1603
1603
|
}
|
|
1604
1604
|
}
|
|
1605
|
-
function
|
|
1605
|
+
function nt(s) {
|
|
1606
1606
|
return !!/** @type {HTMLElement} */
|
|
1607
1607
|
s.target.closest(".pswp__container");
|
|
1608
1608
|
}
|
|
1609
|
-
class
|
|
1609
|
+
class Le {
|
|
1610
1610
|
/**
|
|
1611
1611
|
* @param {Gestures} gestures
|
|
1612
1612
|
*/
|
|
@@ -1629,14 +1629,14 @@ class Pe {
|
|
|
1629
1629
|
* @param {PointerEvent} originalEvent
|
|
1630
1630
|
*/
|
|
1631
1631
|
tap(t, e) {
|
|
1632
|
-
|
|
1632
|
+
nt(e) && this._doClickOrTapAction("tap", t, e);
|
|
1633
1633
|
}
|
|
1634
1634
|
/**
|
|
1635
1635
|
* @param {Point} point
|
|
1636
1636
|
* @param {PointerEvent} originalEvent
|
|
1637
1637
|
*/
|
|
1638
1638
|
doubleTap(t, e) {
|
|
1639
|
-
|
|
1639
|
+
nt(e) && this._doClickOrTapAction("doubleTap", t, e);
|
|
1640
1640
|
}
|
|
1641
1641
|
/**
|
|
1642
1642
|
* @private
|
|
@@ -1680,8 +1680,8 @@ class Pe {
|
|
|
1680
1680
|
}
|
|
1681
1681
|
}
|
|
1682
1682
|
}
|
|
1683
|
-
const
|
|
1684
|
-
class
|
|
1683
|
+
const Ee = 10, Pe = 300, Ae = 25;
|
|
1684
|
+
class xe {
|
|
1685
1685
|
/**
|
|
1686
1686
|
* @param {PhotoSwipe} pswp
|
|
1687
1687
|
*/
|
|
@@ -1713,7 +1713,7 @@ class Ce {
|
|
|
1713
1713
|
}, this._intervalP1 = {
|
|
1714
1714
|
x: 0,
|
|
1715
1715
|
y: 0
|
|
1716
|
-
}, 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
|
|
1716
|
+
}, 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 ve(this), this.zoomLevels = new be(this), this.tapHandler = new Le(this), t.on("bindEvents", () => {
|
|
1717
1717
|
t.events.add(
|
|
1718
1718
|
t.scrollWrap,
|
|
1719
1719
|
"click",
|
|
@@ -1833,8 +1833,8 @@ class Ce {
|
|
|
1833
1833
|
this.tapHandler.click(this.startP1, t);
|
|
1834
1834
|
return;
|
|
1835
1835
|
}
|
|
1836
|
-
const i = this.pswp.options.doubleTapAction ?
|
|
1837
|
-
this._tapTimer ? (this._clearTapTimer(),
|
|
1836
|
+
const i = this.pswp.options.doubleTapAction ? Pe : 0;
|
|
1837
|
+
this._tapTimer ? (this._clearTapTimer(), W(this._lastStartP1, this.startP1) < Ae && this.tapHandler.doubleTap(this.startP1, t)) : (_(this._lastStartP1, this.startP1), this._tapTimer = setTimeout(() => {
|
|
1838
1838
|
this.tapHandler.tap(this.startP1, t), this._clearTapTimer();
|
|
1839
1839
|
}, i));
|
|
1840
1840
|
}
|
|
@@ -1920,7 +1920,7 @@ class Ce {
|
|
|
1920
1920
|
const t = Math.abs(this.p1.x - this.startP1.x) - Math.abs(this.p1.y - this.startP1.y);
|
|
1921
1921
|
if (t !== 0) {
|
|
1922
1922
|
const e = t > 0 ? "x" : "y";
|
|
1923
|
-
Math.abs(this.p1[e] - this.startP1[e]) >=
|
|
1923
|
+
Math.abs(this.p1[e] - this.startP1[e]) >= Ee && (this.dragAxis = e);
|
|
1924
1924
|
}
|
|
1925
1925
|
}
|
|
1926
1926
|
}
|
|
@@ -1944,8 +1944,8 @@ class Ce {
|
|
|
1944
1944
|
this.pswp.mainScroll.isShifted() && (t.preventDefault(), t.stopPropagation());
|
|
1945
1945
|
}
|
|
1946
1946
|
}
|
|
1947
|
-
const
|
|
1948
|
-
class
|
|
1947
|
+
const Ie = 0.35;
|
|
1948
|
+
class Ce {
|
|
1949
1949
|
/**
|
|
1950
1950
|
* @param {PhotoSwipe} pswp
|
|
1951
1951
|
*/
|
|
@@ -2098,7 +2098,7 @@ class ze {
|
|
|
2098
2098
|
let i = (this.slideWidth * this._currPositionIndex - t) / this.slideWidth;
|
|
2099
2099
|
i += this.pswp.currIndex;
|
|
2100
2100
|
const n = Math.round(t - this.x);
|
|
2101
|
-
(i < 0 && n > 0 || i >= this.pswp.getNumItems() - 1 && n < 0) && (t = this.x + n *
|
|
2101
|
+
(i < 0 && n > 0 || i >= this.pswp.getNumItems() - 1 && n < 0) && (t = this.x + n * Ie);
|
|
2102
2102
|
}
|
|
2103
2103
|
this.x = t, this.pswp.container && I(this.pswp.container, t), this.pswp.dispatch("moveMainScroll", {
|
|
2104
2104
|
x: t,
|
|
@@ -2106,7 +2106,7 @@ class ze {
|
|
|
2106
2106
|
});
|
|
2107
2107
|
}
|
|
2108
2108
|
}
|
|
2109
|
-
const
|
|
2109
|
+
const Te = {
|
|
2110
2110
|
Escape: 27,
|
|
2111
2111
|
z: 90,
|
|
2112
2112
|
ArrowLeft: 37,
|
|
@@ -2114,8 +2114,8 @@ const Oe = {
|
|
|
2114
2114
|
ArrowRight: 39,
|
|
2115
2115
|
ArrowDown: 40,
|
|
2116
2116
|
Tab: 9
|
|
2117
|
-
}, x = (s, t) => t ? s :
|
|
2118
|
-
class
|
|
2117
|
+
}, x = (s, t) => t ? s : Te[s];
|
|
2118
|
+
class ze {
|
|
2119
2119
|
/**
|
|
2120
2120
|
* @param {PhotoSwipe} pswp
|
|
2121
2121
|
*/
|
|
@@ -2155,7 +2155,7 @@ class De {
|
|
|
2155
2155
|
} = this;
|
|
2156
2156
|
if (e.dispatch("keydown", {
|
|
2157
2157
|
originalEvent: t
|
|
2158
|
-
}).defaultPrevented ||
|
|
2158
|
+
}).defaultPrevented || he(t))
|
|
2159
2159
|
return;
|
|
2160
2160
|
let i, n, o = !1;
|
|
2161
2161
|
const r = "key" in t;
|
|
@@ -2207,8 +2207,8 @@ class De {
|
|
|
2207
2207
|
) && e.focus();
|
|
2208
2208
|
}
|
|
2209
2209
|
}
|
|
2210
|
-
const
|
|
2211
|
-
class
|
|
2210
|
+
const Oe = "cubic-bezier(.4,0,.22,1)";
|
|
2211
|
+
class De {
|
|
2212
2212
|
/**
|
|
2213
2213
|
* onComplete can be unpredictable, be careful about current state
|
|
2214
2214
|
*
|
|
@@ -2224,12 +2224,12 @@ class Re {
|
|
|
2224
2224
|
onFinish: r = () => {
|
|
2225
2225
|
},
|
|
2226
2226
|
duration: a = 333,
|
|
2227
|
-
easing: l =
|
|
2227
|
+
easing: l = Oe
|
|
2228
2228
|
} = t;
|
|
2229
2229
|
this.onFinish = r;
|
|
2230
2230
|
const h = o ? "transform" : "opacity", c = (e = t[h]) !== null && e !== void 0 ? e : "";
|
|
2231
2231
|
this._target = i, this._onComplete = n, this._finished = !1, this._onTransitionEnd = this._onTransitionEnd.bind(this), this._helperTimeout = setTimeout(() => {
|
|
2232
|
-
|
|
2232
|
+
ft(i, h, a, l), this._helperTimeout = setTimeout(() => {
|
|
2233
2233
|
i.addEventListener("transitionend", this._onTransitionEnd, !1), i.addEventListener("transitioncancel", this._onTransitionEnd, !1), this._helperTimeout = setTimeout(() => {
|
|
2234
2234
|
this._finalizeAnimation();
|
|
2235
2235
|
}, a + 500), i.style[h] = c;
|
|
@@ -2251,11 +2251,11 @@ class Re {
|
|
|
2251
2251
|
}
|
|
2252
2252
|
// Destroy is called automatically onFinish
|
|
2253
2253
|
destroy() {
|
|
2254
|
-
this._helperTimeout && clearTimeout(this._helperTimeout),
|
|
2254
|
+
this._helperTimeout && clearTimeout(this._helperTimeout), ae(this._target), this._target.removeEventListener("transitionend", this._onTransitionEnd, !1), this._target.removeEventListener("transitioncancel", this._onTransitionEnd, !1), this._finished || this._finalizeAnimation();
|
|
2255
2255
|
}
|
|
2256
2256
|
}
|
|
2257
|
-
const
|
|
2258
|
-
class
|
|
2257
|
+
const Me = 12, Ze = 0.75;
|
|
2258
|
+
class $e {
|
|
2259
2259
|
/**
|
|
2260
2260
|
* @param {number} initialVelocity Initial velocity, px per ms.
|
|
2261
2261
|
*
|
|
@@ -2272,7 +2272,7 @@ class Fe {
|
|
|
2272
2272
|
* Recommended value from 10 to 50
|
|
2273
2273
|
*/
|
|
2274
2274
|
constructor(t, e, i) {
|
|
2275
|
-
this.velocity = t * 1e3, this._dampingRatio = e ||
|
|
2275
|
+
this.velocity = t * 1e3, this._dampingRatio = e || Ze, this._naturalFrequency = i || Me, this._dampedFrequency = this._naturalFrequency, this._dampingRatio < 1 && (this._dampedFrequency *= Math.sqrt(1 - this._dampingRatio * this._dampingRatio));
|
|
2276
2276
|
}
|
|
2277
2277
|
/**
|
|
2278
2278
|
* @param {number} deltaPosition Difference between current and end position of the animation
|
|
@@ -2294,7 +2294,7 @@ class Fe {
|
|
|
2294
2294
|
return i;
|
|
2295
2295
|
}
|
|
2296
2296
|
}
|
|
2297
|
-
class
|
|
2297
|
+
class Fe {
|
|
2298
2298
|
/**
|
|
2299
2299
|
* @param {SpringAnimationProps} props
|
|
2300
2300
|
*/
|
|
@@ -2312,7 +2312,7 @@ class ke {
|
|
|
2312
2312
|
naturalFrequency: h
|
|
2313
2313
|
} = t;
|
|
2314
2314
|
this.onFinish = a;
|
|
2315
|
-
const c = new
|
|
2315
|
+
const c = new $e(n, l, h);
|
|
2316
2316
|
let d = Date.now(), p = e - i;
|
|
2317
2317
|
const g = () => {
|
|
2318
2318
|
this._raf && (p = c.easeFrame(p, Date.now() - d), Math.abs(p) < 1 && Math.abs(c.velocity) < 50 ? (o(i), r && r(), this.onFinish()) : (d = Date.now(), o(p + i), this._raf = requestAnimationFrame(g)));
|
|
@@ -2324,7 +2324,7 @@ class ke {
|
|
|
2324
2324
|
this._raf >= 0 && cancelAnimationFrame(this._raf), this._raf = 0;
|
|
2325
2325
|
}
|
|
2326
2326
|
}
|
|
2327
|
-
class
|
|
2327
|
+
class Re {
|
|
2328
2328
|
constructor() {
|
|
2329
2329
|
this.activeAnimations = [];
|
|
2330
2330
|
}
|
|
@@ -2347,10 +2347,10 @@ class Be {
|
|
|
2347
2347
|
* @returns {Animation}
|
|
2348
2348
|
*/
|
|
2349
2349
|
_start(t, e) {
|
|
2350
|
-
const i = e ? new
|
|
2350
|
+
const i = e ? new Fe(
|
|
2351
2351
|
/** @type SpringAnimationProps */
|
|
2352
2352
|
t
|
|
2353
|
-
) : new
|
|
2353
|
+
) : new De(
|
|
2354
2354
|
/** @type CssAnimationProps */
|
|
2355
2355
|
t
|
|
2356
2356
|
);
|
|
@@ -2393,7 +2393,7 @@ class Be {
|
|
|
2393
2393
|
return this.activeAnimations.some((t) => t.props.isPan);
|
|
2394
2394
|
}
|
|
2395
2395
|
}
|
|
2396
|
-
class
|
|
2396
|
+
class ke {
|
|
2397
2397
|
/**
|
|
2398
2398
|
* @param {PhotoSwipe} pswp
|
|
2399
2399
|
*/
|
|
@@ -2435,7 +2435,7 @@ class qe {
|
|
|
2435
2435
|
e.isPannable() && (t.deltaMode === 1 && (i *= 18, n *= 18), e.panTo(e.pan.x - i, e.pan.y - n));
|
|
2436
2436
|
}
|
|
2437
2437
|
}
|
|
2438
|
-
function
|
|
2438
|
+
function qe(s) {
|
|
2439
2439
|
if (typeof s == "string")
|
|
2440
2440
|
return s;
|
|
2441
2441
|
if (!s || !s.isCustomSVG)
|
|
@@ -2447,7 +2447,7 @@ function Ne(s) {
|
|
|
2447
2447
|
t.size || 32
|
|
2448
2448
|
), t.outlineID && (e += '<use class="pswp__icn-shadow" xlink:href="#' + t.outlineID + '"/>'), e += t.inner, e += "</svg>", e;
|
|
2449
2449
|
}
|
|
2450
|
-
class
|
|
2450
|
+
class Ne {
|
|
2451
2451
|
/**
|
|
2452
2452
|
* @param {PhotoSwipe} pswp
|
|
2453
2453
|
* @param {UIElementData} data
|
|
@@ -2479,7 +2479,7 @@ class He {
|
|
|
2479
2479
|
const g = p || d;
|
|
2480
2480
|
g && l.setAttribute("aria-label", g);
|
|
2481
2481
|
}
|
|
2482
|
-
l.innerHTML =
|
|
2482
|
+
l.innerHTML = qe(o), e.onInit && e.onInit(l, t), e.onClick && (l.onclick = (d) => {
|
|
2483
2483
|
typeof e.onClick == "string" ? t[e.onClick]() : typeof e.onClick == "function" && e.onClick(d, l, t);
|
|
2484
2484
|
});
|
|
2485
2485
|
const h = e.appendTo || "bar";
|
|
@@ -2487,12 +2487,12 @@ class He {
|
|
|
2487
2487
|
h === "bar" ? (t.topBar || (t.topBar = w("pswp__top-bar pswp__hide-on-close", "div", t.scrollWrap)), c = t.topBar) : (l.classList.add("pswp__hide-on-close"), h === "wrapper" && (c = t.scrollWrap)), (i = c) === null || i === void 0 || i.appendChild(t.applyFilters("uiElement", l, e));
|
|
2488
2488
|
}
|
|
2489
2489
|
}
|
|
2490
|
-
function
|
|
2490
|
+
function vt(s, t, e) {
|
|
2491
2491
|
s.classList.add("pswp__button--arrow"), s.setAttribute("aria-controls", "pswp__items"), t.on("change", () => {
|
|
2492
2492
|
t.options.loop || (e ? s.disabled = !(t.currIndex < t.getNumItems() - 1) : s.disabled = !(t.currIndex > 0));
|
|
2493
2493
|
});
|
|
2494
2494
|
}
|
|
2495
|
-
const
|
|
2495
|
+
const Be = {
|
|
2496
2496
|
name: "arrowPrev",
|
|
2497
2497
|
className: "pswp__button--arrow--prev",
|
|
2498
2498
|
title: "Previous",
|
|
@@ -2506,8 +2506,8 @@ const We = {
|
|
|
2506
2506
|
outlineID: "pswp__icn-arrow"
|
|
2507
2507
|
},
|
|
2508
2508
|
onClick: "prev",
|
|
2509
|
-
onInit:
|
|
2510
|
-
},
|
|
2509
|
+
onInit: vt
|
|
2510
|
+
}, He = {
|
|
2511
2511
|
name: "arrowNext",
|
|
2512
2512
|
className: "pswp__button--arrow--next",
|
|
2513
2513
|
title: "Next",
|
|
@@ -2522,9 +2522,9 @@ const We = {
|
|
|
2522
2522
|
},
|
|
2523
2523
|
onClick: "next",
|
|
2524
2524
|
onInit: (s, t) => {
|
|
2525
|
-
|
|
2525
|
+
vt(s, t, !0);
|
|
2526
2526
|
}
|
|
2527
|
-
},
|
|
2527
|
+
}, We = {
|
|
2528
2528
|
name: "close",
|
|
2529
2529
|
title: "Close",
|
|
2530
2530
|
order: 20,
|
|
@@ -2535,7 +2535,7 @@ const We = {
|
|
|
2535
2535
|
outlineID: "pswp__icn-close"
|
|
2536
2536
|
},
|
|
2537
2537
|
onClick: "close"
|
|
2538
|
-
},
|
|
2538
|
+
}, Ve = {
|
|
2539
2539
|
name: "zoom",
|
|
2540
2540
|
title: "Zoom",
|
|
2541
2541
|
order: 10,
|
|
@@ -2547,7 +2547,7 @@ const We = {
|
|
|
2547
2547
|
outlineID: "pswp__icn-zoom"
|
|
2548
2548
|
},
|
|
2549
2549
|
onClick: "toggleZoom"
|
|
2550
|
-
},
|
|
2550
|
+
}, je = {
|
|
2551
2551
|
name: "preloader",
|
|
2552
2552
|
appendTo: "bar",
|
|
2553
2553
|
order: 7,
|
|
@@ -2578,7 +2578,7 @@ const We = {
|
|
|
2578
2578
|
t.currSlide === a.slide && r();
|
|
2579
2579
|
}), t.ui && (t.ui.updatePreloaderVisibility = r);
|
|
2580
2580
|
}
|
|
2581
|
-
},
|
|
2581
|
+
}, Ue = {
|
|
2582
2582
|
name: "counter",
|
|
2583
2583
|
order: 5,
|
|
2584
2584
|
onInit: (s, t) => {
|
|
@@ -2587,10 +2587,10 @@ const We = {
|
|
|
2587
2587
|
});
|
|
2588
2588
|
}
|
|
2589
2589
|
};
|
|
2590
|
-
function
|
|
2590
|
+
function ot(s, t) {
|
|
2591
2591
|
s.classList.toggle("pswp--zoomed-in", t);
|
|
2592
2592
|
}
|
|
2593
|
-
class
|
|
2593
|
+
class Ge {
|
|
2594
2594
|
/**
|
|
2595
2595
|
* @param {PhotoSwipe} pswp
|
|
2596
2596
|
*/
|
|
@@ -2602,7 +2602,7 @@ class Xe {
|
|
|
2602
2602
|
const {
|
|
2603
2603
|
pswp: t
|
|
2604
2604
|
} = this;
|
|
2605
|
-
this.isRegistered = !1, this.uiElementsData = [
|
|
2605
|
+
this.isRegistered = !1, this.uiElementsData = [We, Be, He, Ve, je, Ue], t.dispatch("uiRegister"), this.uiElementsData.sort((e, i) => (e.order || 0) - (i.order || 0)), this.items = [], this.isRegistered = !0, this.uiElementsData.forEach((e) => {
|
|
2606
2606
|
this.registerElement(e);
|
|
2607
2607
|
}), t.on("change", () => {
|
|
2608
2608
|
var e;
|
|
@@ -2613,7 +2613,7 @@ class Xe {
|
|
|
2613
2613
|
* @param {UIElementData} elementData
|
|
2614
2614
|
*/
|
|
2615
2615
|
registerElement(t) {
|
|
2616
|
-
this.isRegistered ? this.items.push(new
|
|
2616
|
+
this.isRegistered ? this.items.push(new Ne(this.pswp, t)) : this.uiElementsData.push(t);
|
|
2617
2617
|
}
|
|
2618
2618
|
/**
|
|
2619
2619
|
* Fired each time zoom or pan position is changed.
|
|
@@ -2637,15 +2637,15 @@ class Xe {
|
|
|
2637
2637
|
this._lastUpdatedZoomLevel = n;
|
|
2638
2638
|
const o = e.zoomLevels.initial - e.zoomLevels.secondary;
|
|
2639
2639
|
if (Math.abs(o) < 0.01 || !e.isZoomable()) {
|
|
2640
|
-
|
|
2640
|
+
ot(t, !1), t.classList.remove("pswp--zoom-allowed");
|
|
2641
2641
|
return;
|
|
2642
2642
|
}
|
|
2643
2643
|
t.classList.add("pswp--zoom-allowed");
|
|
2644
2644
|
const r = n === e.zoomLevels.initial ? e.zoomLevels.secondary : e.zoomLevels.initial;
|
|
2645
|
-
|
|
2645
|
+
ot(t, r <= n), (i.imageClickAction === "zoom" || i.imageClickAction === "zoom-or-close") && t.classList.add("pswp--click-to-zoom");
|
|
2646
2646
|
}
|
|
2647
2647
|
}
|
|
2648
|
-
function
|
|
2648
|
+
function Ke(s) {
|
|
2649
2649
|
const t = s.getBoundingClientRect();
|
|
2650
2650
|
return {
|
|
2651
2651
|
x: t.left,
|
|
@@ -2653,7 +2653,7 @@ function Ye(s) {
|
|
|
2653
2653
|
w: t.width
|
|
2654
2654
|
};
|
|
2655
2655
|
}
|
|
2656
|
-
function
|
|
2656
|
+
function Xe(s, t, e) {
|
|
2657
2657
|
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, h = {
|
|
2658
2658
|
x: i.left + a,
|
|
2659
2659
|
y: i.top + l,
|
|
@@ -2666,7 +2666,7 @@ function Qe(s, t, e) {
|
|
|
2666
2666
|
y: l
|
|
2667
2667
|
}, h;
|
|
2668
2668
|
}
|
|
2669
|
-
function
|
|
2669
|
+
function Ye(s, t, e) {
|
|
2670
2670
|
const i = e.dispatch("thumbBounds", {
|
|
2671
2671
|
index: s,
|
|
2672
2672
|
itemData: t,
|
|
@@ -2685,9 +2685,9 @@ function Je(s, t, e) {
|
|
|
2685
2685
|
n.querySelector(a)
|
|
2686
2686
|
);
|
|
2687
2687
|
}
|
|
2688
|
-
return r = e.applyFilters("thumbEl", r, t, s), r && (t.thumbCropped ? o =
|
|
2688
|
+
return r = e.applyFilters("thumbEl", r, t, s), r && (t.thumbCropped ? o = Xe(r, t.width || t.w || 0, t.height || t.h || 0) : o = Ke(r)), e.applyFilters("thumbBounds", o, t, s);
|
|
2689
2689
|
}
|
|
2690
|
-
let
|
|
2690
|
+
let Qe = class {
|
|
2691
2691
|
/**
|
|
2692
2692
|
* @param {T} type
|
|
2693
2693
|
* @param {PhotoSwipeEventsMap[T]} [details]
|
|
@@ -2698,7 +2698,7 @@ let ti = class {
|
|
|
2698
2698
|
preventDefault() {
|
|
2699
2699
|
this.defaultPrevented = !0;
|
|
2700
2700
|
}
|
|
2701
|
-
},
|
|
2701
|
+
}, Je = class {
|
|
2702
2702
|
constructor() {
|
|
2703
2703
|
this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
|
|
2704
2704
|
}
|
|
@@ -2765,13 +2765,13 @@ let ti = class {
|
|
|
2765
2765
|
return this.pswp.dispatch(t, e);
|
|
2766
2766
|
const n = (
|
|
2767
2767
|
/** @type {AugmentedEvent<T>} */
|
|
2768
|
-
new
|
|
2768
|
+
new Qe(t, e)
|
|
2769
2769
|
);
|
|
2770
2770
|
return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
|
|
2771
2771
|
o.call(this, n);
|
|
2772
2772
|
}), n;
|
|
2773
2773
|
}
|
|
2774
|
-
},
|
|
2774
|
+
}, ti = class {
|
|
2775
2775
|
/**
|
|
2776
2776
|
* @param {string | false} imageSrc
|
|
2777
2777
|
* @param {HTMLElement} container
|
|
@@ -2791,13 +2791,13 @@ let ti = class {
|
|
|
2791
2791
|
* @param {number} height
|
|
2792
2792
|
*/
|
|
2793
2793
|
setDisplayedSize(t, e) {
|
|
2794
|
-
this.element && (this.element.tagName === "IMG" ? (
|
|
2794
|
+
this.element && (this.element.tagName === "IMG" ? (V(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = R(0, 0, t / 250)) : V(this.element, t, e));
|
|
2795
2795
|
}
|
|
2796
2796
|
destroy() {
|
|
2797
2797
|
var t;
|
|
2798
2798
|
(t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
|
|
2799
2799
|
}
|
|
2800
|
-
},
|
|
2800
|
+
}, ei = class {
|
|
2801
2801
|
/**
|
|
2802
2802
|
* @param {SlideData} itemData Slide data
|
|
2803
2803
|
* @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
|
|
@@ -2832,7 +2832,7 @@ let ti = class {
|
|
|
2832
2832
|
this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
|
|
2833
2833
|
this
|
|
2834
2834
|
);
|
|
2835
|
-
this.placeholder = new
|
|
2835
|
+
this.placeholder = new ti(i, this.slide.container);
|
|
2836
2836
|
}
|
|
2837
2837
|
this.element && !e || this.instance.dispatch("contentLoad", {
|
|
2838
2838
|
content: this,
|
|
@@ -2920,7 +2920,7 @@ let ti = class {
|
|
|
2920
2920
|
content: this,
|
|
2921
2921
|
width: t,
|
|
2922
2922
|
height: e
|
|
2923
|
-
}).defaultPrevented && (
|
|
2923
|
+
}).defaultPrevented && (V(this.element, t, e), this.isImageContent() && !this.isError()))) {
|
|
2924
2924
|
const i = !this.displayedImageWidth && t;
|
|
2925
2925
|
this.displayedImageWidth = t, this.displayedImageHeight = e, i ? this.loadImage(!1) : this.updateSrcsetSizes(), this.slide && this.instance.dispatch("imageSizeChange", {
|
|
2926
2926
|
slide: this.slide,
|
|
@@ -3002,7 +3002,7 @@ let ti = class {
|
|
|
3002
3002
|
}).defaultPrevented)
|
|
3003
3003
|
return;
|
|
3004
3004
|
const t = "decode" in this.element;
|
|
3005
|
-
this.isImageContent() ? t && this.slide && (!this.slide.isActive ||
|
|
3005
|
+
this.isImageContent() ? t && this.slide && (!this.slide.isActive || et()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
|
|
3006
3006
|
}).finally(() => {
|
|
3007
3007
|
this.isDecoding = !1, this.appendImage();
|
|
3008
3008
|
})) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element);
|
|
@@ -3015,7 +3015,7 @@ let ti = class {
|
|
|
3015
3015
|
activate() {
|
|
3016
3016
|
this.instance.dispatch("contentActivate", {
|
|
3017
3017
|
content: this
|
|
3018
|
-
}).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !
|
|
3018
|
+
}).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !et() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
|
|
3019
3019
|
}
|
|
3020
3020
|
/**
|
|
3021
3021
|
* Deactivate the content
|
|
@@ -3042,36 +3042,36 @@ let ti = class {
|
|
|
3042
3042
|
}).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === S.LOADED || this.state === S.ERROR) && this.removePlaceholder()));
|
|
3043
3043
|
}
|
|
3044
3044
|
};
|
|
3045
|
-
const
|
|
3046
|
-
function
|
|
3045
|
+
const ii = 5;
|
|
3046
|
+
function wt(s, t, e) {
|
|
3047
3047
|
const i = t.createContentFromData(s, e);
|
|
3048
3048
|
let n;
|
|
3049
3049
|
const {
|
|
3050
3050
|
options: o
|
|
3051
3051
|
} = t;
|
|
3052
3052
|
if (o) {
|
|
3053
|
-
n = new
|
|
3053
|
+
n = new yt(o, s, -1);
|
|
3054
3054
|
let r;
|
|
3055
|
-
t.pswp ? r = t.pswp.viewportSize : r =
|
|
3056
|
-
const a =
|
|
3055
|
+
t.pswp ? r = t.pswp.viewportSize : r = gt(o, t);
|
|
3056
|
+
const a = _t(o, r, s, e);
|
|
3057
3057
|
n.update(i.width, i.height, a);
|
|
3058
3058
|
}
|
|
3059
3059
|
return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
|
|
3060
3060
|
}
|
|
3061
|
-
function
|
|
3061
|
+
function si(s, t) {
|
|
3062
3062
|
const e = t.getItemData(s);
|
|
3063
3063
|
if (!t.dispatch("lazyLoadSlide", {
|
|
3064
3064
|
index: s,
|
|
3065
3065
|
itemData: e
|
|
3066
3066
|
}).defaultPrevented)
|
|
3067
|
-
return
|
|
3067
|
+
return wt(e, t, s);
|
|
3068
3068
|
}
|
|
3069
|
-
class
|
|
3069
|
+
class ni {
|
|
3070
3070
|
/**
|
|
3071
3071
|
* @param {PhotoSwipe} pswp
|
|
3072
3072
|
*/
|
|
3073
3073
|
constructor(t) {
|
|
3074
|
-
this.pswp = t, this.limit = Math.max(t.options.preload[0] + t.options.preload[1] + 1,
|
|
3074
|
+
this.pswp = t, this.limit = Math.max(t.options.preload[0] + t.options.preload[1] + 1, ii), this._cachedItems = [];
|
|
3075
3075
|
}
|
|
3076
3076
|
/**
|
|
3077
3077
|
* Lazy load nearby slides based on `preload` option.
|
|
@@ -3099,7 +3099,7 @@ class ri {
|
|
|
3099
3099
|
loadSlideByIndex(t) {
|
|
3100
3100
|
const e = this.pswp.getLoopedIndex(t);
|
|
3101
3101
|
let i = this.getContentByIndex(e);
|
|
3102
|
-
i || (i =
|
|
3102
|
+
i || (i = si(e, this.pswp), i && this.addToCache(i));
|
|
3103
3103
|
}
|
|
3104
3104
|
/**
|
|
3105
3105
|
* @param {Slide} slide
|
|
@@ -3138,7 +3138,7 @@ class ri {
|
|
|
3138
3138
|
this._cachedItems.forEach((t) => t.destroy()), this._cachedItems = [];
|
|
3139
3139
|
}
|
|
3140
3140
|
}
|
|
3141
|
-
let
|
|
3141
|
+
let oi = class extends Je {
|
|
3142
3142
|
/**
|
|
3143
3143
|
* Get total number of slides
|
|
3144
3144
|
*
|
|
@@ -3161,7 +3161,7 @@ let ai = class extends ei {
|
|
|
3161
3161
|
* @returns {Content}
|
|
3162
3162
|
*/
|
|
3163
3163
|
createContentFromData(t, e) {
|
|
3164
|
-
return new
|
|
3164
|
+
return new ei(t, this, e);
|
|
3165
3165
|
}
|
|
3166
3166
|
/**
|
|
3167
3167
|
* Get item data by index.
|
|
@@ -3195,7 +3195,7 @@ let ai = class extends ei {
|
|
|
3195
3195
|
*/
|
|
3196
3196
|
_getGalleryDOMElements(t) {
|
|
3197
3197
|
var e, i;
|
|
3198
|
-
return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ?
|
|
3198
|
+
return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? ce(this.options.children, this.options.childSelector, t) || [] : [t];
|
|
3199
3199
|
}
|
|
3200
3200
|
/**
|
|
3201
3201
|
* Converts DOM element to item data object.
|
|
@@ -3229,11 +3229,11 @@ let ai = class extends ei {
|
|
|
3229
3229
|
* @returns {Content} Image that is being decoded or false.
|
|
3230
3230
|
*/
|
|
3231
3231
|
lazyLoadData(t, e) {
|
|
3232
|
-
return
|
|
3232
|
+
return wt(t, this, e);
|
|
3233
3233
|
}
|
|
3234
3234
|
};
|
|
3235
3235
|
const O = 3e-3;
|
|
3236
|
-
class
|
|
3236
|
+
class ri {
|
|
3237
3237
|
/**
|
|
3238
3238
|
* @param {PhotoSwipe} pswp
|
|
3239
3239
|
*/
|
|
@@ -3286,7 +3286,7 @@ class li {
|
|
|
3286
3286
|
_start() {
|
|
3287
3287
|
this.isOpening && this._useAnimation && this._placeholder && this._placeholder.tagName === "IMG" ? new Promise((t) => {
|
|
3288
3288
|
let e = !1, i = !0;
|
|
3289
|
-
|
|
3289
|
+
le(
|
|
3290
3290
|
/** @type {HTMLImageElement} */
|
|
3291
3291
|
this._placeholder
|
|
3292
3292
|
).finally(() => {
|
|
@@ -3349,7 +3349,7 @@ class li {
|
|
|
3349
3349
|
} = e;
|
|
3350
3350
|
if (this._croppedZoom && i && this._cropContainer1 && this._cropContainer2) {
|
|
3351
3351
|
const r = -o.x + (this._thumbBounds.x - i.x) + i.w, a = -o.y + (this._thumbBounds.y - i.y) + i.h, l = o.x - i.w, h = o.y - i.h;
|
|
3352
|
-
t ? (this._animateTo(this._cropContainer1, "transform",
|
|
3352
|
+
t ? (this._animateTo(this._cropContainer1, "transform", R(r, a)), this._animateTo(this._cropContainer2, "transform", R(l, h))) : (I(this._cropContainer1, r, a), I(this._cropContainer2, l, h));
|
|
3353
3353
|
}
|
|
3354
3354
|
n && (_(n.pan, i || this._thumbBounds), n.currZoomLevel = this._thumbBounds.w / n.width, t ? this._animateTo(n.container, "transform", n.getCurrentTransform()) : n.applyCurrentZoomPan());
|
|
3355
3355
|
}
|
|
@@ -3377,7 +3377,7 @@ class li {
|
|
|
3377
3377
|
o[e] = i, n.startTransition(o);
|
|
3378
3378
|
}
|
|
3379
3379
|
}
|
|
3380
|
-
const
|
|
3380
|
+
const ai = {
|
|
3381
3381
|
allowPanToNext: !0,
|
|
3382
3382
|
spacing: 0.1,
|
|
3383
3383
|
loop: !0,
|
|
@@ -3404,7 +3404,7 @@ const hi = {
|
|
|
3404
3404
|
preload: [1, 2],
|
|
3405
3405
|
easing: "cubic-bezier(.4,0,.22,1)"
|
|
3406
3406
|
};
|
|
3407
|
-
class
|
|
3407
|
+
class li extends oi {
|
|
3408
3408
|
/**
|
|
3409
3409
|
* @param {PhotoSwipeOptions} [options]
|
|
3410
3410
|
*/
|
|
@@ -3418,7 +3418,7 @@ class ci extends ai {
|
|
|
3418
3418
|
}, this.viewportSize = {
|
|
3419
3419
|
x: 0,
|
|
3420
3420
|
y: 0
|
|
3421
|
-
}, 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
|
|
3421
|
+
}, 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 de(), this.animations = new Re(), this.mainScroll = new Ce(this), this.gestures = new xe(this), this.opener = new ri(this), this.keyboard = new ze(this), this.contentLoader = new ni(this);
|
|
3422
3422
|
}
|
|
3423
3423
|
/** @returns {boolean} */
|
|
3424
3424
|
init() {
|
|
@@ -3426,7 +3426,7 @@ class ci extends ai {
|
|
|
3426
3426
|
return !1;
|
|
3427
3427
|
this.isOpen = !0, this.dispatch("init"), this.dispatch("beforeOpen"), this._createMainStructure();
|
|
3428
3428
|
let t = "pswp--open";
|
|
3429
|
-
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
|
|
3429
|
+
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 ke(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", {
|
|
3430
3430
|
index: this.currIndex,
|
|
3431
3431
|
data: this._initialItemData,
|
|
3432
3432
|
slide: void 0
|
|
@@ -3446,7 +3446,7 @@ class ci extends ai {
|
|
|
3446
3446
|
*/
|
|
3447
3447
|
getLoopedIndex(t) {
|
|
3448
3448
|
const e = this.getNumItems();
|
|
3449
|
-
return this.options.loop && (t > e - 1 && (t -= e), t < 0 && (t += e)),
|
|
3449
|
+
return this.options.loop && (t > e - 1 && (t -= e), t < 0 && (t += e)), k(t, 0, e - 1);
|
|
3450
3450
|
}
|
|
3451
3451
|
appendHeavy() {
|
|
3452
3452
|
this.mainScroll.itemHolders.forEach((t) => {
|
|
@@ -3545,7 +3545,7 @@ class ci extends ai {
|
|
|
3545
3545
|
if (!this.canLoop() && (e < 0 || e >= this.getNumItems()))
|
|
3546
3546
|
return;
|
|
3547
3547
|
const n = this.getItemData(e);
|
|
3548
|
-
t.slide = new
|
|
3548
|
+
t.slide = new pe(n, e, this), e === this.currIndex && (this.currSlide = t.slide), t.slide.append(t.el);
|
|
3549
3549
|
}
|
|
3550
3550
|
/** @returns {Point} */
|
|
3551
3551
|
getViewportCenterPoint() {
|
|
@@ -3563,7 +3563,7 @@ class ci extends ai {
|
|
|
3563
3563
|
updateSize(t) {
|
|
3564
3564
|
if (this.isDestroying)
|
|
3565
3565
|
return;
|
|
3566
|
-
const e =
|
|
3566
|
+
const e = gt(this.options, this);
|
|
3567
3567
|
!t && F(e, this._prevViewportSize) || (_(this._prevViewportSize, e), this.dispatch("beforeResize"), _(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"));
|
|
3568
3568
|
}
|
|
3569
3569
|
/**
|
|
@@ -3615,7 +3615,7 @@ class ci extends ai {
|
|
|
3615
3615
|
* @private
|
|
3616
3616
|
*/
|
|
3617
3617
|
_createMainStructure() {
|
|
3618
|
-
this.element = w("pswp", "div"), this.element.setAttribute("tabindex", "-1"), this.element.setAttribute("role", "dialog"), this.template = this.element, this.bg = w("pswp__bg", "div", this.element), this.scrollWrap = w("pswp__scroll-wrap", "section", this.element), this.container = w("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
|
|
3618
|
+
this.element = w("pswp", "div"), this.element.setAttribute("tabindex", "-1"), this.element.setAttribute("role", "dialog"), this.template = this.element, this.bg = w("pswp__bg", "div", this.element), this.scrollWrap = w("pswp__scroll-wrap", "section", this.element), this.container = w("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 Ge(this), this.ui.init(), (this.options.appendToEl || document.body).appendChild(this.element);
|
|
3619
3619
|
}
|
|
3620
3620
|
/**
|
|
3621
3621
|
* Get position and dimensions of small thumbnail
|
|
@@ -3626,7 +3626,7 @@ class ci extends ai {
|
|
|
3626
3626
|
* @returns {Bounds | undefined}
|
|
3627
3627
|
*/
|
|
3628
3628
|
getThumbBounds() {
|
|
3629
|
-
return
|
|
3629
|
+
return Ye(this.currIndex, this.currSlide ? this.currSlide.data : this._initialItemData, this);
|
|
3630
3630
|
}
|
|
3631
3631
|
/**
|
|
3632
3632
|
* If the PhotoSwipe can have continuous loop
|
|
@@ -3642,7 +3642,7 @@ class ci extends ai {
|
|
|
3642
3642
|
*/
|
|
3643
3643
|
_prepareOptions(t) {
|
|
3644
3644
|
return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches && (t.showHideAnimationType = "none", t.zoomAnimationDuration = 0), {
|
|
3645
|
-
...
|
|
3645
|
+
...ai,
|
|
3646
3646
|
...t
|
|
3647
3647
|
};
|
|
3648
3648
|
}
|
|
@@ -3651,15 +3651,15 @@ class ci extends ai {
|
|
|
3651
3651
|
* PhotoSwipe Lightbox 5.4.4 - https://photoswipe.com
|
|
3652
3652
|
* (c) 2024 Dmytro Semenov
|
|
3653
3653
|
*/
|
|
3654
|
-
function
|
|
3654
|
+
function M(s, t, e) {
|
|
3655
3655
|
const i = document.createElement(t);
|
|
3656
3656
|
return s && (i.className = s), e && e.appendChild(i), i;
|
|
3657
3657
|
}
|
|
3658
|
-
function
|
|
3658
|
+
function hi(s, t, e) {
|
|
3659
3659
|
let i = `translate3d(${s}px,0px,0)`;
|
|
3660
3660
|
return e !== void 0 && (i += ` scale3d(${e},${e},1)`), i;
|
|
3661
3661
|
}
|
|
3662
|
-
function
|
|
3662
|
+
function j(s, t, e) {
|
|
3663
3663
|
s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
|
|
3664
3664
|
}
|
|
3665
3665
|
const b = {
|
|
@@ -3668,7 +3668,7 @@ const b = {
|
|
|
3668
3668
|
LOADED: "loaded",
|
|
3669
3669
|
ERROR: "error"
|
|
3670
3670
|
};
|
|
3671
|
-
function
|
|
3671
|
+
function ci(s) {
|
|
3672
3672
|
return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
|
|
3673
3673
|
}
|
|
3674
3674
|
function Z(s, t, e = document) {
|
|
@@ -3683,13 +3683,13 @@ function Z(s, t, e = document) {
|
|
|
3683
3683
|
}
|
|
3684
3684
|
return i;
|
|
3685
3685
|
}
|
|
3686
|
-
function
|
|
3686
|
+
function di(s) {
|
|
3687
3687
|
return typeof s == "function" && s.prototype && s.prototype.goTo;
|
|
3688
3688
|
}
|
|
3689
|
-
function
|
|
3689
|
+
function rt() {
|
|
3690
3690
|
return !!(navigator.vendor && navigator.vendor.match(/apple/i));
|
|
3691
3691
|
}
|
|
3692
|
-
class
|
|
3692
|
+
class ui {
|
|
3693
3693
|
/**
|
|
3694
3694
|
* @param {T} type
|
|
3695
3695
|
* @param {PhotoSwipeEventsMap[T]} [details]
|
|
@@ -3701,7 +3701,7 @@ class fi {
|
|
|
3701
3701
|
this.defaultPrevented = !0;
|
|
3702
3702
|
}
|
|
3703
3703
|
}
|
|
3704
|
-
class
|
|
3704
|
+
class pi {
|
|
3705
3705
|
constructor() {
|
|
3706
3706
|
this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
|
|
3707
3707
|
}
|
|
@@ -3768,20 +3768,20 @@ class mi {
|
|
|
3768
3768
|
return this.pswp.dispatch(t, e);
|
|
3769
3769
|
const n = (
|
|
3770
3770
|
/** @type {AugmentedEvent<T>} */
|
|
3771
|
-
new
|
|
3771
|
+
new ui(t, e)
|
|
3772
3772
|
);
|
|
3773
3773
|
return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
|
|
3774
3774
|
o.call(this, n);
|
|
3775
3775
|
}), n;
|
|
3776
3776
|
}
|
|
3777
3777
|
}
|
|
3778
|
-
class
|
|
3778
|
+
class fi {
|
|
3779
3779
|
/**
|
|
3780
3780
|
* @param {string | false} imageSrc
|
|
3781
3781
|
* @param {HTMLElement} container
|
|
3782
3782
|
*/
|
|
3783
3783
|
constructor(t, e) {
|
|
3784
|
-
if (this.element =
|
|
3784
|
+
if (this.element = M("pswp__img pswp__img--placeholder", t ? "img" : "div", e), t) {
|
|
3785
3785
|
const i = (
|
|
3786
3786
|
/** @type {HTMLImageElement} */
|
|
3787
3787
|
this.element
|
|
@@ -3795,14 +3795,14 @@ class gi {
|
|
|
3795
3795
|
* @param {number} height
|
|
3796
3796
|
*/
|
|
3797
3797
|
setDisplayedSize(t, e) {
|
|
3798
|
-
this.element && (this.element.tagName === "IMG" ? (
|
|
3798
|
+
this.element && (this.element.tagName === "IMG" ? (j(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = hi(0, 0, t / 250)) : j(this.element, t, e));
|
|
3799
3799
|
}
|
|
3800
3800
|
destroy() {
|
|
3801
3801
|
var t;
|
|
3802
3802
|
(t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
|
|
3803
3803
|
}
|
|
3804
3804
|
}
|
|
3805
|
-
class
|
|
3805
|
+
class mi {
|
|
3806
3806
|
/**
|
|
3807
3807
|
* @param {SlideData} itemData Slide data
|
|
3808
3808
|
* @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
|
|
@@ -3837,12 +3837,12 @@ class _i {
|
|
|
3837
3837
|
this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
|
|
3838
3838
|
this
|
|
3839
3839
|
);
|
|
3840
|
-
this.placeholder = new
|
|
3840
|
+
this.placeholder = new fi(i, this.slide.container);
|
|
3841
3841
|
}
|
|
3842
3842
|
this.element && !e || this.instance.dispatch("contentLoad", {
|
|
3843
3843
|
content: this,
|
|
3844
3844
|
isLazy: t
|
|
3845
|
-
}).defaultPrevented || (this.isImageContent() ? (this.element =
|
|
3845
|
+
}).defaultPrevented || (this.isImageContent() ? (this.element = M("pswp__img", "img"), this.displayedImageWidth && this.loadImage(t)) : (this.element = M("pswp__content", "div"), this.element.innerHTML = this.data.html || ""), e && this.slide && this.slide.updateContentSize(!0));
|
|
3846
3846
|
}
|
|
3847
3847
|
/**
|
|
3848
3848
|
* Preload image
|
|
@@ -3925,7 +3925,7 @@ class _i {
|
|
|
3925
3925
|
content: this,
|
|
3926
3926
|
width: t,
|
|
3927
3927
|
height: e
|
|
3928
|
-
}).defaultPrevented && (
|
|
3928
|
+
}).defaultPrevented && (j(this.element, t, e), this.isImageContent() && !this.isError()))) {
|
|
3929
3929
|
const i = !this.displayedImageWidth && t;
|
|
3930
3930
|
this.displayedImageWidth = t, this.displayedImageHeight = e, i ? this.loadImage(!1) : this.updateSrcsetSizes(), this.slide && this.instance.dispatch("imageSizeChange", {
|
|
3931
3931
|
slide: this.slide,
|
|
@@ -3987,9 +3987,9 @@ class _i {
|
|
|
3987
3987
|
displayError() {
|
|
3988
3988
|
if (this.slide) {
|
|
3989
3989
|
var t, e;
|
|
3990
|
-
let i =
|
|
3990
|
+
let i = M("pswp__error-msg", "div");
|
|
3991
3991
|
i.innerText = (t = (e = this.instance.options) === null || e === void 0 ? void 0 : e.errorMsg) !== null && t !== void 0 ? t : "", i = /** @type {HTMLDivElement} */
|
|
3992
|
-
this.instance.applyFilters("contentErrorElement", i, this), this.element =
|
|
3992
|
+
this.instance.applyFilters("contentErrorElement", i, this), this.element = M("pswp__content pswp__error-msg-container", "div"), this.element.appendChild(i), this.slide.container.innerText = "", this.slide.container.appendChild(this.element), this.slide.updateContentSize(!0), this.removePlaceholder();
|
|
3993
3993
|
}
|
|
3994
3994
|
}
|
|
3995
3995
|
/**
|
|
@@ -4007,7 +4007,7 @@ class _i {
|
|
|
4007
4007
|
}).defaultPrevented)
|
|
4008
4008
|
return;
|
|
4009
4009
|
const t = "decode" in this.element;
|
|
4010
|
-
this.isImageContent() ? t && this.slide && (!this.slide.isActive ||
|
|
4010
|
+
this.isImageContent() ? t && this.slide && (!this.slide.isActive || rt()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
|
|
4011
4011
|
}).finally(() => {
|
|
4012
4012
|
this.isDecoding = !1, this.appendImage();
|
|
4013
4013
|
})) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element);
|
|
@@ -4020,7 +4020,7 @@ class _i {
|
|
|
4020
4020
|
activate() {
|
|
4021
4021
|
this.instance.dispatch("contentActivate", {
|
|
4022
4022
|
content: this
|
|
4023
|
-
}).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !
|
|
4023
|
+
}).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !rt() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
|
|
4024
4024
|
}
|
|
4025
4025
|
/**
|
|
4026
4026
|
* Deactivate the content
|
|
@@ -4047,7 +4047,7 @@ class _i {
|
|
|
4047
4047
|
}).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === b.LOADED || this.state === b.ERROR) && this.removePlaceholder()));
|
|
4048
4048
|
}
|
|
4049
4049
|
}
|
|
4050
|
-
function
|
|
4050
|
+
function gi(s, t) {
|
|
4051
4051
|
if (s.getViewportSizeFn) {
|
|
4052
4052
|
const e = s.getViewportSizeFn(s, t);
|
|
4053
4053
|
if (e)
|
|
@@ -4074,14 +4074,14 @@ function q(s, t, e, i, n) {
|
|
|
4074
4074
|
}
|
|
4075
4075
|
return Number(o) || 0;
|
|
4076
4076
|
}
|
|
4077
|
-
function
|
|
4077
|
+
function _i(s, t, e, i) {
|
|
4078
4078
|
return {
|
|
4079
4079
|
x: t.x - q("left", s, t, e, i) - q("right", s, t, e, i),
|
|
4080
4080
|
y: t.y - q("top", s, t, e, i) - q("bottom", s, t, e, i)
|
|
4081
4081
|
};
|
|
4082
4082
|
}
|
|
4083
|
-
const
|
|
4084
|
-
class
|
|
4083
|
+
const at = 4e3;
|
|
4084
|
+
class yi {
|
|
4085
4085
|
/**
|
|
4086
4086
|
* @param {PhotoSwipeOptions} options PhotoSwipe options
|
|
4087
4087
|
* @param {SlideData} itemData Slide data
|
|
@@ -4138,7 +4138,7 @@ class wi {
|
|
|
4138
4138
|
*/
|
|
4139
4139
|
_getSecondary() {
|
|
4140
4140
|
let t = this._parseZoomLevelOption("secondary");
|
|
4141
|
-
return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x >
|
|
4141
|
+
return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > at && (t = at / this.elementSize.x), t);
|
|
4142
4142
|
}
|
|
4143
4143
|
/**
|
|
4144
4144
|
* Get initial image zoom level.
|
|
@@ -4161,30 +4161,30 @@ class wi {
|
|
|
4161
4161
|
return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
|
|
4162
4162
|
}
|
|
4163
4163
|
}
|
|
4164
|
-
function
|
|
4164
|
+
function St(s, t, e) {
|
|
4165
4165
|
const i = t.createContentFromData(s, e);
|
|
4166
4166
|
let n;
|
|
4167
4167
|
const {
|
|
4168
4168
|
options: o
|
|
4169
4169
|
} = t;
|
|
4170
4170
|
if (o) {
|
|
4171
|
-
n = new
|
|
4171
|
+
n = new yi(o, s, -1);
|
|
4172
4172
|
let r;
|
|
4173
|
-
t.pswp ? r = t.pswp.viewportSize : r =
|
|
4174
|
-
const a =
|
|
4173
|
+
t.pswp ? r = t.pswp.viewportSize : r = gi(o, t);
|
|
4174
|
+
const a = _i(o, r, s, e);
|
|
4175
4175
|
n.update(i.width, i.height, a);
|
|
4176
4176
|
}
|
|
4177
4177
|
return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
|
|
4178
4178
|
}
|
|
4179
|
-
function
|
|
4179
|
+
function vi(s, t) {
|
|
4180
4180
|
const e = t.getItemData(s);
|
|
4181
4181
|
if (!t.dispatch("lazyLoadSlide", {
|
|
4182
4182
|
index: s,
|
|
4183
4183
|
itemData: e
|
|
4184
4184
|
}).defaultPrevented)
|
|
4185
|
-
return
|
|
4185
|
+
return St(e, t, s);
|
|
4186
4186
|
}
|
|
4187
|
-
class
|
|
4187
|
+
class wi extends pi {
|
|
4188
4188
|
/**
|
|
4189
4189
|
* Get total number of slides
|
|
4190
4190
|
*
|
|
@@ -4207,7 +4207,7 @@ class bi extends mi {
|
|
|
4207
4207
|
* @returns {Content}
|
|
4208
4208
|
*/
|
|
4209
4209
|
createContentFromData(t, e) {
|
|
4210
|
-
return new
|
|
4210
|
+
return new mi(t, this, e);
|
|
4211
4211
|
}
|
|
4212
4212
|
/**
|
|
4213
4213
|
* Get item data by index.
|
|
@@ -4275,10 +4275,10 @@ class bi extends mi {
|
|
|
4275
4275
|
* @returns {Content} Image that is being decoded or false.
|
|
4276
4276
|
*/
|
|
4277
4277
|
lazyLoadData(t, e) {
|
|
4278
|
-
return
|
|
4278
|
+
return St(t, this, e);
|
|
4279
4279
|
}
|
|
4280
4280
|
}
|
|
4281
|
-
class
|
|
4281
|
+
class Si extends wi {
|
|
4282
4282
|
/**
|
|
4283
4283
|
* @param {PhotoSwipeOptions} [options]
|
|
4284
4284
|
*/
|
|
@@ -4298,7 +4298,7 @@ class Li extends bi {
|
|
|
4298
4298
|
* @param {MouseEvent} e
|
|
4299
4299
|
*/
|
|
4300
4300
|
onThumbnailsClick(t) {
|
|
4301
|
-
if (
|
|
4301
|
+
if (ci(t) || window.pswp)
|
|
4302
4302
|
return;
|
|
4303
4303
|
let e = {
|
|
4304
4304
|
x: t.clientX,
|
|
@@ -4366,7 +4366,7 @@ class Li extends bi {
|
|
|
4366
4366
|
} = this;
|
|
4367
4367
|
e && (i.dataSource = e);
|
|
4368
4368
|
const n = [], o = typeof i.pswpModule;
|
|
4369
|
-
if (
|
|
4369
|
+
if (di(i.pswpModule))
|
|
4370
4370
|
n.push(Promise.resolve(
|
|
4371
4371
|
/** @type {Type<PhotoSwipe>} */
|
|
4372
4372
|
i.pswpModule
|
|
@@ -4382,7 +4382,7 @@ class Li extends bi {
|
|
|
4382
4382
|
else
|
|
4383
4383
|
throw new Error("pswpModule is not valid");
|
|
4384
4384
|
}
|
|
4385
|
-
typeof i.openPromise == "function" && n.push(i.openPromise()), i.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent =
|
|
4385
|
+
typeof i.openPromise == "function" && n.push(i.openPromise()), i.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent = vi(t, this));
|
|
4386
4386
|
const r = ++this._uid;
|
|
4387
4387
|
Promise.all(n).then((a) => {
|
|
4388
4388
|
if (this.shouldOpen) {
|
|
@@ -4428,12 +4428,12 @@ class Li extends bi {
|
|
|
4428
4428
|
});
|
|
4429
4429
|
}
|
|
4430
4430
|
}
|
|
4431
|
-
const
|
|
4431
|
+
const bi = () => {
|
|
4432
4432
|
let s = null;
|
|
4433
|
-
return s = new
|
|
4433
|
+
return s = new Si({
|
|
4434
4434
|
gallery: "#photoswipe-gallery",
|
|
4435
4435
|
children: "a",
|
|
4436
|
-
pswpModule:
|
|
4436
|
+
pswpModule: li,
|
|
4437
4437
|
zoom: !1,
|
|
4438
4438
|
imageClickAction: "next",
|
|
4439
4439
|
tapAction: "next"
|
|
@@ -4457,7 +4457,7 @@ const Ei = () => {
|
|
|
4457
4457
|
}), s.init(), () => {
|
|
4458
4458
|
s && (s.destroy(), s = null);
|
|
4459
4459
|
};
|
|
4460
|
-
},
|
|
4460
|
+
}, Li = () => {
|
|
4461
4461
|
const s = document.querySelector(".js-limit-scroll-progress-bar"), t = document.querySelector(".c-progress__bar");
|
|
4462
4462
|
if (!t)
|
|
4463
4463
|
return;
|
|
@@ -4469,41 +4469,9 @@ const Ei = () => {
|
|
|
4469
4469
|
s && (i = s.scrollHeight - e.clientHeight + (window.pageYOffset + s.getBoundingClientRect().top));
|
|
4470
4470
|
const o = Math.round(n / i * 100);
|
|
4471
4471
|
t.style.width = `${o}%`, o >= 100 && (t.style.width = "100%");
|
|
4472
|
-
},
|
|
4473
|
-
document.querySelector(".c-progress") && window.addEventListener("scroll",
|
|
4474
|
-
}
|
|
4475
|
-
let D, W = 0;
|
|
4476
|
-
const xi = 180, Ii = () => {
|
|
4477
|
-
const s = [], t = document.querySelectorAll(".taboola");
|
|
4478
|
-
return t ? (t.forEach((e, i) => {
|
|
4479
|
-
const { top: n } = e.getBoundingClientRect();
|
|
4480
|
-
if (n <= xi) {
|
|
4481
|
-
s[i] = !0;
|
|
4482
|
-
return;
|
|
4483
|
-
}
|
|
4484
|
-
s[i] = !1;
|
|
4485
|
-
}), !!s.find((e) => e === !0)) : !1;
|
|
4486
|
-
}, Ci = () => {
|
|
4487
|
-
const s = document.querySelector(".c-read-also-banner");
|
|
4488
|
-
if (s) {
|
|
4489
|
-
if (Ii()) {
|
|
4490
|
-
s.classList.add("u-hidden");
|
|
4491
|
-
return;
|
|
4492
|
-
}
|
|
4493
|
-
s.classList.remove("u-hidden"), D = null, document.body.getBoundingClientRect().top > W + 2 && (D = "up"), document.body.getBoundingClientRect().top < W - 2 && (D = "down"), W = document.body.getBoundingClientRect().top;
|
|
4494
|
-
const t = s.dataset.bannerLimitTop || "0";
|
|
4495
|
-
D === "up" && -document.body.getBoundingClientRect().top >= parseInt(t, 10) && (s.classList.remove("c-read-also-banner__scrolldirection--down"), s.style.paddingTop = "0.75em", s.style.paddingBottom = "0.75em", s.style.borderWidth = "1px", s.classList.contains("c-read-also-banner__scrolldirection--up") || s.classList.add("c-read-also-banner__scrolldirection--up")), (D === "down" || -document.body.getBoundingClientRect().top <= parseInt(t, 10)) && (s.classList.remove("c-read-also-banner__scrolldirection--up"), s.style.paddingTop = "0", s.style.paddingBottom = "0", s.style.borderWidth = "0", s.classList.contains("c-read-also-banner__scrolldirection--down") || s.classList.add("c-read-also-banner__scrolldirection--down"));
|
|
4496
|
-
}
|
|
4497
|
-
}, Ti = (s = document.querySelector(
|
|
4498
|
-
".c-read-also-banner"
|
|
4499
|
-
)) => {
|
|
4500
|
-
if (s) {
|
|
4501
|
-
let t;
|
|
4502
|
-
window.addEventListener("scroll", () => {
|
|
4503
|
-
clearTimeout(t), t = setTimeout(Ci, 100);
|
|
4504
|
-
});
|
|
4505
|
-
}
|
|
4506
|
-
}, V = "#page-content", K = "#text-tooltip", zi = ".tooltip-btn", Et = "c-text-tooltip--show", Oi = [
|
|
4472
|
+
}, Ei = () => {
|
|
4473
|
+
document.querySelector(".c-progress") && window.addEventListener("scroll", Li);
|
|
4474
|
+
}, H = "#page-content", U = "#text-tooltip", Pi = ".tooltip-btn", bt = "c-text-tooltip--show", Ai = [
|
|
4507
4475
|
"#page-content .c-content p",
|
|
4508
4476
|
"#page-content .c-content h2",
|
|
4509
4477
|
"#page-content .c-content h3",
|
|
@@ -4515,18 +4483,18 @@ const xi = 180, Ii = () => {
|
|
|
4515
4483
|
"#page-content header span",
|
|
4516
4484
|
"#page-content header h1",
|
|
4517
4485
|
"#page-content header h2"
|
|
4518
|
-
],
|
|
4486
|
+
], lt = (s, t) => s instanceof Element ? t.some((e) => s.matches(e)) : !1, xi = (s, t) => {
|
|
4519
4487
|
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;
|
|
4520
|
-
return !!e &&
|
|
4521
|
-
},
|
|
4488
|
+
return !!e && lt(e, t) || !!i && lt(i, t);
|
|
4489
|
+
}, Ii = (s) => {
|
|
4522
4490
|
var e;
|
|
4523
4491
|
if (!s.focusNode)
|
|
4524
4492
|
return null;
|
|
4525
4493
|
const t = (e = s.anchorNode) == null ? void 0 : e.compareDocumentPosition(s.focusNode);
|
|
4526
4494
|
return t ? (t & 4) > 0 : s.anchorOffset < s.focusOffset;
|
|
4527
|
-
},
|
|
4528
|
-
const i = document.querySelector(`${
|
|
4529
|
-
`${
|
|
4495
|
+
}, Ci = (s, t, e) => {
|
|
4496
|
+
const i = document.querySelector(`${H} ${U}`), n = document.querySelector(`${H}`), o = document.querySelectorAll(
|
|
4497
|
+
`${H} ${U} ${Pi}`
|
|
4530
4498
|
);
|
|
4531
4499
|
if (!i || !n) {
|
|
4532
4500
|
console.warn("Text tooltip : Tooltip or it's parent are not found in the DOM");
|
|
@@ -4534,44 +4502,44 @@ const xi = 180, Ii = () => {
|
|
|
4534
4502
|
}
|
|
4535
4503
|
Array.from(o).forEach((l) => l.setAttribute("data-selected-text", e));
|
|
4536
4504
|
const r = s.getClientRects(), a = r[t ? r.length - 1 : 0];
|
|
4537
|
-
i.style.top = `${a.top - n.getBoundingClientRect().top - (i.offsetHeight + 10)}px`, a.width < i.offsetWidth ? i.style.left = `${a.left - n.getBoundingClientRect().left + a.width / 2 - i.offsetWidth / 2}px` : t ? i.style.left = `${a.left - n.getBoundingClientRect().left + a.width - i.offsetWidth}px` : i.style.left = `${a.left - n.getBoundingClientRect().left}px`, i.classList.add(
|
|
4538
|
-
},
|
|
4539
|
-
const s = document.querySelector(`${
|
|
4540
|
-
s && s.classList.remove(
|
|
4505
|
+
i.style.top = `${a.top - n.getBoundingClientRect().top - (i.offsetHeight + 10)}px`, a.width < i.offsetWidth ? i.style.left = `${a.left - n.getBoundingClientRect().left + a.width / 2 - i.offsetWidth / 2}px` : t ? i.style.left = `${a.left - n.getBoundingClientRect().left + a.width - i.offsetWidth}px` : i.style.left = `${a.left - n.getBoundingClientRect().left}px`, i.classList.add(bt);
|
|
4506
|
+
}, ht = () => {
|
|
4507
|
+
const s = document.querySelector(`${U}`);
|
|
4508
|
+
s && s.classList.remove(bt);
|
|
4541
4509
|
}, N = ({ type: s }) => {
|
|
4542
4510
|
const t = window.getSelection();
|
|
4543
4511
|
if (s === "selectionchange") {
|
|
4544
|
-
|
|
4512
|
+
ht();
|
|
4545
4513
|
return;
|
|
4546
4514
|
}
|
|
4547
4515
|
if (!t || !t.rangeCount)
|
|
4548
4516
|
return;
|
|
4549
4517
|
const e = t.getRangeAt(0), i = t.toString().trim();
|
|
4550
4518
|
if (i.length) {
|
|
4551
|
-
const n =
|
|
4552
|
-
n &&
|
|
4519
|
+
const n = xi(e, Ai), o = Ii(t) || !1;
|
|
4520
|
+
n && Ci(e, o, i);
|
|
4553
4521
|
return;
|
|
4554
4522
|
}
|
|
4555
|
-
|
|
4556
|
-
},
|
|
4523
|
+
ht();
|
|
4524
|
+
}, Ti = () => {
|
|
4557
4525
|
if (!(window != null && window.getSelection)) {
|
|
4558
4526
|
console.warn("Selection API isn't supported");
|
|
4559
4527
|
return;
|
|
4560
4528
|
}
|
|
4561
4529
|
document.addEventListener("mouseup", N), document.addEventListener("selectionchange", N), document.addEventListener("touchend", N), document.addEventListener("touchcancel", N);
|
|
4562
|
-
},
|
|
4530
|
+
}, zi = (s) => {
|
|
4563
4531
|
const { target: t } = s;
|
|
4564
4532
|
if (t instanceof Element) {
|
|
4565
4533
|
const e = t.closest(".c-search-form--button");
|
|
4566
4534
|
e && (s.preventDefault(), e.classList.remove("c-search-form--button"));
|
|
4567
4535
|
}
|
|
4568
|
-
},
|
|
4536
|
+
}, Oi = (s = document.querySelector(
|
|
4569
4537
|
".c-search-form--button"
|
|
4570
4538
|
)) => {
|
|
4571
4539
|
s && s.addEventListener("click", (t) => {
|
|
4572
|
-
|
|
4540
|
+
zi(t);
|
|
4573
4541
|
});
|
|
4574
|
-
},
|
|
4542
|
+
}, Di = ({
|
|
4575
4543
|
tabsContainerElement: s,
|
|
4576
4544
|
event: t
|
|
4577
4545
|
}) => {
|
|
@@ -4587,58 +4555,58 @@ const xi = 180, Ii = () => {
|
|
|
4587
4555
|
}), n.forEach((a) => {
|
|
4588
4556
|
a.setAttribute("aria-hidden", "true");
|
|
4589
4557
|
}), e.setAttribute("aria-selected", "true"), r && r.removeAttribute("aria-hidden");
|
|
4590
|
-
},
|
|
4558
|
+
}, ct = (s) => s.code === "ArrowLeft" || s.keyCode === 39, dt = (s) => s.code === "ArrowRight" || s.keyCode === 37, Mi = (s = document.querySelectorAll(
|
|
4591
4559
|
".js-tabs"
|
|
4592
4560
|
)) => {
|
|
4593
4561
|
s.length > 0 && s.forEach((t) => {
|
|
4594
4562
|
const e = t.querySelectorAll('[role="tab"]');
|
|
4595
4563
|
e.forEach((n) => {
|
|
4596
4564
|
n.addEventListener("click", (o) => {
|
|
4597
|
-
|
|
4565
|
+
Di({ tabsContainerElement: t, event: o });
|
|
4598
4566
|
});
|
|
4599
4567
|
});
|
|
4600
4568
|
const i = t.querySelector('[role="tablist"]');
|
|
4601
4569
|
if (i && e.length > 0) {
|
|
4602
4570
|
let n = 0;
|
|
4603
4571
|
i.addEventListener("keydown", (o) => {
|
|
4604
|
-
o instanceof KeyboardEvent && (
|
|
4572
|
+
o instanceof KeyboardEvent && (ct(o) || dt(o)) && (e[n].setAttribute("tabindex", "-1"), ct(o) ? (n += 1, n >= e.length && (n = 0)) : dt(o) && (n -= 1, n < 0 && (n = e.length - 1)), e[n].setAttribute("tabindex", "0"), e[n].focus());
|
|
4605
4573
|
});
|
|
4606
4574
|
}
|
|
4607
4575
|
});
|
|
4608
|
-
},
|
|
4576
|
+
}, G = "c-social-bar-item__container--is-highlighted", Zi = (s) => {
|
|
4609
4577
|
const t = s.find(
|
|
4610
|
-
(e) => e.classList.contains(
|
|
4578
|
+
(e) => e.classList.contains(G)
|
|
4611
4579
|
);
|
|
4612
|
-
t == null || t.classList.remove(
|
|
4613
|
-
},
|
|
4580
|
+
t == null || t.classList.remove(G);
|
|
4581
|
+
}, $i = () => {
|
|
4614
4582
|
const s = document.querySelector(".c-toolbar");
|
|
4615
4583
|
if (s) {
|
|
4616
4584
|
const t = window.location.origin + window.location.pathname, e = Array.from(s.querySelectorAll(".c-social-bar-item__container"));
|
|
4617
|
-
|
|
4585
|
+
Zi(e);
|
|
4618
4586
|
const i = e.find(
|
|
4619
4587
|
(n) => {
|
|
4620
4588
|
var o;
|
|
4621
4589
|
return ((o = n.querySelector("a")) == null ? void 0 : o.getAttribute("href")) === t;
|
|
4622
4590
|
}
|
|
4623
4591
|
);
|
|
4624
|
-
i == null || i.classList.add(
|
|
4592
|
+
i == null || i.classList.add(G);
|
|
4625
4593
|
}
|
|
4626
|
-
},
|
|
4627
|
-
|
|
4594
|
+
}, Wi = () => {
|
|
4595
|
+
Wt(), Mi(), Ot(), qt(), Ei(), bi(), Jt(), Oi(), Dt("paralympicsGames", "countdown-paralympics-games"), Ti(), Tt(), Ut(), $t(), It(), K(
|
|
4628
4596
|
"jobs-input",
|
|
4629
4597
|
"https://www.groupeactual.eu/autocomplete/profession-simple?code&prefix&limit=75",
|
|
4630
4598
|
"&term=",
|
|
4631
4599
|
"id",
|
|
4632
4600
|
"title",
|
|
4633
4601
|
"items"
|
|
4634
|
-
),
|
|
4602
|
+
), K(
|
|
4635
4603
|
"localisation-input",
|
|
4636
4604
|
"https://www.20minutes.fr/elections/resultats/recherche",
|
|
4637
4605
|
"?searchValue=",
|
|
4638
4606
|
"text",
|
|
4639
4607
|
"text"
|
|
4640
|
-
),
|
|
4608
|
+
), Zt(), $i(), Pt(), At(), ne(), oe(), jt();
|
|
4641
4609
|
};
|
|
4642
4610
|
export {
|
|
4643
|
-
|
|
4611
|
+
Wi as initScripts
|
|
4644
4612
|
};
|