@20minutes/hela 2.16.10 → 2.17.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 +1160 -963
- package/dist/index.umd.cjs +1 -0
- package/dist/js/scripts.es.js +675 -545
- package/dist/js/{scripts.umd.js → scripts.umd.cjs} +1 -1
- package/dist/scss/abstracts/variables/_other-colors.scss +14 -9
- package/dist/scss/abstracts/variables/_token-variables.scss +69 -69
- package/dist/scss/abstracts/variables/_variables.scss +45 -46
- package/dist/src/assets/scripts/townsMarkerMap.d.ts +1 -1
- package/dist/src/components/atoms/InlineSeparator/InlineSeparator.stories.d.ts +1 -1
- package/dist/src/components/atoms/Link/Link.d.ts +5 -3
- package/dist/src/components/atoms/Link/Link.stories.d.ts +3 -1
- package/dist/src/components/atoms/ScrollToTopButton/ScrollToTopButton.stories.d.ts +112 -112
- package/dist/src/components/atoms/SkipLink/SkipLink.stories.d.ts +1 -1
- package/dist/src/components/molecules/DiscoverList/DiscoverList.stories.d.ts +104 -104
- package/dist/src/components/molecules/Elections/SearchBanner/SearchBanner.d.ts +1 -0
- package/dist/src/components/molecules/Elections/SearchBanner/SearchBanner.stories.d.ts +69 -69
- package/dist/src/components/molecules/VerticalTimeline/VerticalTimeline.stories.d.ts +105 -105
- package/dist/src/components/organisms/Elections/ElectionsResult.stories.d.ts +1 -0
- package/dist/src/components/organisms/Footer/Footer.stories.d.ts +2 -2
- package/dist/src/constants/cssProperties/typography.d.ts +5 -4
- package/dist/src/constants/tokenNameList.d.ts +5 -5
- package/dist/src/constants/tokenVariables.d.ts +364 -132
- package/dist/src/helpers/forwardRef.d.ts +2 -2
- package/dist/src/helpers/imgHelper.d.ts +1 -1
- package/dist/src/helpers/storybookHelper.d.ts +3 -3
- package/dist/src/helpers/systemPropsHelper/classNameWithModifier.d.ts +2 -2
- package/dist/src/helpers/systemPropsHelper/classNamesWithModifiers.d.ts +3 -3
- package/dist/src/helpers/systemPropsHelper/typographySystemClassName.d.ts +1 -1
- package/dist/src/types/ComponentWithAs.d.ts +3 -2
- package/dist/style.css +1 -1
- package/package.json +38 -40
- package/dist/index.umd.js +0 -1
package/dist/js/scripts.es.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
const
|
|
1
|
+
const Rt = () => /Android/i.test(navigator.userAgent), Bt = typeof window < "u" && navigator.userAgent.toLowerCase().includes("firefox"), Ft = () => {
|
|
2
2
|
const s = document.getElementById("js-download-band");
|
|
3
|
-
s &&
|
|
3
|
+
s && Rt() && 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
|
+
}, Zt = () => {
|
|
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
|
+
}, kt = () => {
|
|
13
13
|
const s = document.querySelector(".c-search-banner");
|
|
14
14
|
if (!s)
|
|
15
15
|
return;
|
|
@@ -22,7 +22,7 @@ const Dt = () => /Android/i.test(navigator.userAgent), Mt = typeof window < "u"
|
|
|
22
22
|
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"));
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
},
|
|
25
|
+
}, qt = [
|
|
26
26
|
{
|
|
27
27
|
text: "Paris",
|
|
28
28
|
_index: "town_1717424751904",
|
|
@@ -53,48 +53,48 @@ const Dt = () => /Android/i.test(navigator.userAgent), Mt = typeof window < "u"
|
|
|
53
53
|
url: "/elections/resultats/paris/paris-75011"
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
],
|
|
56
|
+
], Nt = (s, t, e, i, n, o) => {
|
|
57
57
|
const r = document.getElementById(s);
|
|
58
58
|
if (!r)
|
|
59
59
|
return;
|
|
60
|
-
const a = r.dataset.storybook, l = r.querySelector(`#${s}-search`), c = l?.getAttribute("data-api-url"),
|
|
61
|
-
if (!l || !
|
|
60
|
+
const a = r.dataset.storybook, l = r.querySelector(`#${s}-search`), c = l?.getAttribute("data-api-url"), d = r.querySelector(".c-autocomplete__menu");
|
|
61
|
+
if (!l || !d || !c)
|
|
62
62
|
return;
|
|
63
|
-
const
|
|
63
|
+
const h = r.querySelector(".c-autocomplete__input-spinner"), u = l.getAttribute("data-trigger-message"), p = async (g) => {
|
|
64
64
|
try {
|
|
65
65
|
let y;
|
|
66
|
-
return a && t.includes("20minutes.fr") ? y =
|
|
66
|
+
return a && t.includes("20minutes.fr") ? y = qt : y = await (await fetch(`${c}${e}${encodeURIComponent(g)}`)).json(), o ? y[o] : y;
|
|
67
67
|
} catch (y) {
|
|
68
68
|
return console.error("Error fetching autocomplete results:", y), [];
|
|
69
69
|
}
|
|
70
70
|
}, f = (g, y) => {
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
l instanceof HTMLInputElement && (l.value = y,
|
|
74
|
-
}),
|
|
75
|
-
},
|
|
76
|
-
|
|
71
|
+
const w = document.createElement("li");
|
|
72
|
+
w.id = `/${g}`, w.textContent = y, w.addEventListener("click", () => {
|
|
73
|
+
l instanceof HTMLInputElement && (l.value = y, d.classList.add("u-hidden"));
|
|
74
|
+
}), d.appendChild(w);
|
|
75
|
+
}, m = () => {
|
|
76
|
+
h?.classList.toggle("u-hidden");
|
|
77
77
|
}, _ = () => {
|
|
78
78
|
const g = document.createElement("li");
|
|
79
|
-
g.textContent = u,
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
const y = await
|
|
83
|
-
|
|
84
|
-
f(
|
|
85
|
-
}),
|
|
86
|
-
},
|
|
79
|
+
g.textContent = u, d.appendChild(g);
|
|
80
|
+
}, S = async (g) => {
|
|
81
|
+
m(), d.classList.remove("u-hidden");
|
|
82
|
+
const y = await p(g);
|
|
83
|
+
d.innerHTML = "", y.length === 0 && d.classList.add("u-hidden"), y.forEach((w) => {
|
|
84
|
+
f(w[i], w[n]);
|
|
85
|
+
}), m();
|
|
86
|
+
}, L = (g) => {
|
|
87
87
|
if (!(g.target instanceof HTMLInputElement))
|
|
88
88
|
return;
|
|
89
89
|
const y = g.target.value;
|
|
90
|
-
|
|
90
|
+
d.classList.remove("u-hidden"), y.length >= 3 ? S(y) : (d.innerHTML = "", _());
|
|
91
91
|
};
|
|
92
|
-
l.addEventListener("input",
|
|
93
|
-
setTimeout(() =>
|
|
92
|
+
l.addEventListener("input", L), l.addEventListener("focusout", () => {
|
|
93
|
+
setTimeout(() => d.classList.add("u-hidden"), 300);
|
|
94
94
|
}), l.addEventListener("focusin", () => {
|
|
95
|
-
|
|
95
|
+
d.childElementCount > 0 && d.classList.remove("u-hidden");
|
|
96
96
|
});
|
|
97
|
-
},
|
|
97
|
+
}, Ht = () => {
|
|
98
98
|
const s = document.querySelector(".js-content-header"), t = document.querySelector(".js-limit-scroll-close-article-btn"), e = document.querySelector(".js-close-article-btn"), i = document.querySelector(".c-header-mobile"), n = i instanceof HTMLElement ? i.offsetHeight : 0;
|
|
99
99
|
if (s && t && e) {
|
|
100
100
|
const o = new IntersectionObserver(
|
|
@@ -107,7 +107,7 @@ const Dt = () => /Android/i.test(navigator.userAgent), Mt = typeof window < "u"
|
|
|
107
107
|
);
|
|
108
108
|
o.observe(s), o.observe(t);
|
|
109
109
|
}
|
|
110
|
-
},
|
|
110
|
+
}, Wt = (s) => {
|
|
111
111
|
s.stopImmediatePropagation(), s.preventDefault();
|
|
112
112
|
const t = s.currentTarget;
|
|
113
113
|
if (t instanceof HTMLButtonElement) {
|
|
@@ -116,15 +116,15 @@ const Dt = () => /Android/i.test(navigator.userAgent), Mt = typeof window < "u"
|
|
|
116
116
|
);
|
|
117
117
|
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"));
|
|
118
118
|
}
|
|
119
|
-
},
|
|
119
|
+
}, Vt = (s = document.querySelector(
|
|
120
120
|
".js-collapse__button"
|
|
121
121
|
)) => {
|
|
122
122
|
s && document.querySelectorAll(".c-collapse__button").forEach((e) => {
|
|
123
123
|
e.addEventListener("click", (i) => {
|
|
124
|
-
|
|
124
|
+
Wt(i);
|
|
125
125
|
});
|
|
126
126
|
});
|
|
127
|
-
},
|
|
127
|
+
}, V = (s, t) => {
|
|
128
128
|
const e = document.querySelector(
|
|
129
129
|
`#${t}`
|
|
130
130
|
);
|
|
@@ -139,21 +139,21 @@ const Dt = () => /Android/i.test(navigator.userAgent), Mt = typeof window < "u"
|
|
|
139
139
|
worldFoot2026: "2026-06-11 15:00:00"
|
|
140
140
|
};
|
|
141
141
|
const a = window.counters[s], l = new Date(a).getTime(), c = setInterval(() => {
|
|
142
|
-
const
|
|
143
|
-
if (
|
|
142
|
+
const d = (/* @__PURE__ */ new Date()).getTime(), h = l - d;
|
|
143
|
+
if (h <= 0)
|
|
144
144
|
clearInterval(c);
|
|
145
145
|
else {
|
|
146
|
-
const u = Math.floor(
|
|
147
|
-
i.innerHTML = u.toString(), n.innerHTML =
|
|
146
|
+
const u = Math.floor(h / 864e5), p = Math.floor(h % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60)), f = Math.floor(h % (1e3 * 60 * 60) / (1e3 * 60)), m = Math.floor(h % (1e3 * 60) / 1e3);
|
|
147
|
+
i.innerHTML = u.toString(), n.innerHTML = p.toString(), o.innerHTML = f.toString(), r.innerHTML = m.toString();
|
|
148
148
|
}
|
|
149
149
|
}, 1e3);
|
|
150
150
|
}
|
|
151
|
-
},
|
|
151
|
+
}, jt = (s) => {
|
|
152
152
|
const t = s.getBBox(), e = t.width / 20;
|
|
153
153
|
return [t.x - e, t.y - e, t.width + e * 2, t.height + e * 2].join(
|
|
154
154
|
" "
|
|
155
155
|
);
|
|
156
|
-
},
|
|
156
|
+
}, Gt = () => {
|
|
157
157
|
const s = document.querySelector(".c-map-districts-container"), t = document.querySelector(".c-map-districts");
|
|
158
158
|
if (!s || !t)
|
|
159
159
|
return;
|
|
@@ -165,55 +165,55 @@ const Dt = () => /Android/i.test(navigator.userAgent), Mt = typeof window < "u"
|
|
|
165
165
|
".c-map-districts-container__unzoom-button"
|
|
166
166
|
);
|
|
167
167
|
let o = t;
|
|
168
|
-
const r = t.getAttribute("viewBox"), a = (f,
|
|
168
|
+
const r = t.getAttribute("viewBox"), a = (f, m) => f.matches?.call(f, m), l = (f, m, _ = ".c-map-districts__zoomable:not(.js-selected-area)") => {
|
|
169
169
|
if (!f)
|
|
170
170
|
return;
|
|
171
|
-
let
|
|
172
|
-
for (;
|
|
173
|
-
a(
|
|
174
|
-
return
|
|
175
|
-
}, c = (f,
|
|
171
|
+
let S, L = f.parentElement;
|
|
172
|
+
for (; L instanceof SVGGraphicsElement && L !== m; )
|
|
173
|
+
a(L, _) && (S = L), L = L.parentElement;
|
|
174
|
+
return S;
|
|
175
|
+
}, c = (f, m, _) => {
|
|
176
176
|
if (!f)
|
|
177
177
|
return;
|
|
178
|
-
let
|
|
179
|
-
for (;
|
|
180
|
-
if (
|
|
178
|
+
let S = f.parentElement;
|
|
179
|
+
for (; S instanceof SVGGraphicsElement && S !== _; ) {
|
|
180
|
+
if (m === S)
|
|
181
181
|
return !0;
|
|
182
|
-
|
|
182
|
+
S = S.parentElement;
|
|
183
183
|
}
|
|
184
|
-
return _ ===
|
|
185
|
-
},
|
|
186
|
-
if (
|
|
187
|
-
s.classList.remove("c-map-districts-container--department-view"), e.classList.remove("u-hidden"), i?.classList.add("u-hidden"), n.classList.add("u-hidden"),
|
|
184
|
+
return _ === m;
|
|
185
|
+
}, d = (f, m) => {
|
|
186
|
+
if (m && n && e) {
|
|
187
|
+
s.classList.remove("c-map-districts-container--department-view"), e.classList.remove("u-hidden"), i?.classList.add("u-hidden"), n.classList.add("u-hidden"), m !== r && (e.classList.add("u-hidden"), n.classList.remove("u-hidden")), o.classList.remove("js-selected-area"), o = f;
|
|
188
188
|
const _ = o.getAttribute("data-info");
|
|
189
|
-
i && _ && (s.classList.add("c-map-districts-container--department-view"), i.classList.remove("u-hidden"), i.innerHTML = _), o.classList.add("js-selected-area"), t.setAttribute("viewBox",
|
|
189
|
+
i && _ && (s.classList.add("c-map-districts-container--department-view"), i.classList.remove("u-hidden"), i.innerHTML = _), o.classList.add("js-selected-area"), t.setAttribute("viewBox", m);
|
|
190
190
|
}
|
|
191
|
-
},
|
|
191
|
+
}, h = (f) => {
|
|
192
192
|
f.stopPropagation();
|
|
193
|
-
const
|
|
194
|
-
if (o && t &&
|
|
195
|
-
if (
|
|
193
|
+
const m = f.currentTarget;
|
|
194
|
+
if (o && t && m instanceof SVGGraphicsElement) {
|
|
195
|
+
if (m === o)
|
|
196
196
|
return;
|
|
197
|
-
if (f.preventDefault(), o !== t && !c(
|
|
198
|
-
|
|
197
|
+
if (f.preventDefault(), o !== t && !c(m, o, t)) {
|
|
198
|
+
d(t, r);
|
|
199
199
|
return;
|
|
200
200
|
}
|
|
201
201
|
const _ = l(
|
|
202
|
-
|
|
202
|
+
m,
|
|
203
203
|
o
|
|
204
204
|
);
|
|
205
|
-
|
|
206
|
-
_ ||
|
|
207
|
-
|
|
205
|
+
d(
|
|
206
|
+
_ || m,
|
|
207
|
+
jt(_ || m)
|
|
208
208
|
);
|
|
209
209
|
}
|
|
210
210
|
}, u = () => {
|
|
211
|
-
t && o !== t &&
|
|
211
|
+
t && o !== t && d(t, r);
|
|
212
212
|
};
|
|
213
213
|
t.addEventListener("click", u), n && n.addEventListener("click", u), document.querySelectorAll(".c-map-districts__zoomable").forEach((f) => {
|
|
214
|
-
f.addEventListener("click", (
|
|
214
|
+
f.addEventListener("click", (m) => h(m));
|
|
215
215
|
});
|
|
216
|
-
},
|
|
216
|
+
}, Ut = () => {
|
|
217
217
|
const s = document.getElementById("elections-form-search"), t = document.querySelector(".c-search-form__autocomplete");
|
|
218
218
|
if (!s || !t)
|
|
219
219
|
return;
|
|
@@ -242,52 +242,52 @@ const Dt = () => /Android/i.test(navigator.userAgent), Mt = typeof window < "u"
|
|
|
242
242
|
}), s.addEventListener("focusin", () => {
|
|
243
243
|
t.childElementCount > 0 && t.classList.remove("u-hidden");
|
|
244
244
|
});
|
|
245
|
-
},
|
|
245
|
+
}, Kt = (s, t) => {
|
|
246
246
|
s.setAttribute("aria-expanded", "true"), s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach((n) => n.classList.remove(t));
|
|
247
247
|
const i = s.querySelector(".js-ellipsis-button__label");
|
|
248
248
|
i instanceof HTMLSpanElement && (i.innerHTML = "Voir moins");
|
|
249
|
-
},
|
|
249
|
+
}, Xt = (s, t) => {
|
|
250
250
|
s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach((n) => n.classList.add(t)), s.setAttribute("aria-expanded", "false");
|
|
251
251
|
const i = s.querySelector(".js-ellipsis-button__label");
|
|
252
252
|
i instanceof HTMLSpanElement && (i.innerHTML = "Voir plus");
|
|
253
|
-
},
|
|
253
|
+
}, Yt = (s, t) => {
|
|
254
254
|
const e = s.currentTarget;
|
|
255
255
|
if (s.preventDefault(), e instanceof HTMLButtonElement) {
|
|
256
256
|
const i = t ? "u-ellipsis-multiline" : "u-ellipsis";
|
|
257
|
-
return e.getAttribute("aria-expanded") === "true" ?
|
|
257
|
+
return e.getAttribute("aria-expanded") === "true" ? Xt(e, i) : Kt(e, i);
|
|
258
258
|
}
|
|
259
259
|
return null;
|
|
260
|
-
},
|
|
260
|
+
}, Jt = (s = document.querySelector(
|
|
261
261
|
".js-ellipsis-button"
|
|
262
262
|
)) => {
|
|
263
263
|
s && document.querySelectorAll(".js-ellipsis-button").forEach((e) => {
|
|
264
264
|
const i = e.getAttribute("data-multiple") === "true";
|
|
265
|
-
e.addEventListener("click", (n) =>
|
|
265
|
+
e.addEventListener("click", (n) => Yt(n, i));
|
|
266
266
|
});
|
|
267
|
-
},
|
|
267
|
+
}, Qt = (s) => {
|
|
268
268
|
s.setAttribute("aria-expanded", "true"), s.parentNode?.querySelectorAll(".js-expand-target")?.forEach((i) => i.setAttribute("aria-hidden", "false"));
|
|
269
269
|
const e = s.querySelector(".js-expand-button__label");
|
|
270
270
|
e instanceof HTMLSpanElement && (e.innerHTML = "Voir moins");
|
|
271
|
-
},
|
|
271
|
+
}, te = (s) => {
|
|
272
272
|
s.parentNode?.querySelectorAll(".js-expand-target")?.forEach((i) => i.setAttribute("aria-hidden", "true")), s.setAttribute("aria-expanded", "false");
|
|
273
273
|
const e = s.querySelector(".js-expand-button__label");
|
|
274
274
|
e instanceof HTMLSpanElement && (e.innerHTML = "Voir plus");
|
|
275
|
-
},
|
|
275
|
+
}, ee = (s) => {
|
|
276
276
|
const t = s.currentTarget;
|
|
277
|
-
return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ?
|
|
278
|
-
},
|
|
277
|
+
return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ? te(t) : Qt(t) : null;
|
|
278
|
+
}, ie = (s) => {
|
|
279
279
|
const t = s.parentNode?.querySelector(".js-expand-target");
|
|
280
280
|
return !t || t.classList.contains("c-elections-result__members") ? !1 : (t.textContent?.trim().length ?? 0) < 255;
|
|
281
|
-
},
|
|
281
|
+
}, se = (s = document.querySelector(
|
|
282
282
|
".js-expand-button"
|
|
283
283
|
)) => {
|
|
284
284
|
s && document.querySelectorAll(".js-expand-button").forEach((e) => {
|
|
285
|
-
|
|
285
|
+
ie(e) ? (e.style.display = "none", e.parentNode?.querySelectorAll(".js-expand-target")?.forEach((n) => n.setAttribute("aria-hidden", "false"))) : e.addEventListener("click", ee);
|
|
286
286
|
});
|
|
287
|
-
},
|
|
287
|
+
}, ne = () => {
|
|
288
288
|
const s = document.querySelector(".js-game-alert");
|
|
289
|
-
|
|
290
|
-
},
|
|
289
|
+
Bt && s && s.classList.remove("u-hidden");
|
|
290
|
+
}, oe = () => {
|
|
291
291
|
const s = document.querySelectorAll(".js-half-donut-result");
|
|
292
292
|
for (const t of Array.from(s)) {
|
|
293
293
|
const e = t.querySelector(".c-half-donut"), i = t.querySelector(".c-legend");
|
|
@@ -306,7 +306,7 @@ const Dt = () => /Android/i.test(navigator.userAgent), Mt = typeof window < "u"
|
|
|
306
306
|
});
|
|
307
307
|
});
|
|
308
308
|
}
|
|
309
|
-
},
|
|
309
|
+
}, re = () => {
|
|
310
310
|
const s = document.querySelector(".c-image-slider__container");
|
|
311
311
|
if (!s)
|
|
312
312
|
return () => {
|
|
@@ -323,66 +323,66 @@ const Dt = () => /Android/i.test(navigator.userAgent), Mt = typeof window < "u"
|
|
|
323
323
|
s.style.transition = g ? "transform 0.3s ease" : "none";
|
|
324
324
|
const y = -o * 100;
|
|
325
325
|
s.style.transform = `translateX(${y}%)`, l();
|
|
326
|
-
},
|
|
326
|
+
}, d = (g) => {
|
|
327
327
|
o = g, c(!0);
|
|
328
|
-
},
|
|
328
|
+
}, h = () => {
|
|
329
329
|
r && clearInterval(r), r = setInterval(() => {
|
|
330
330
|
if (!a) {
|
|
331
331
|
const g = (o + 1) % t.length;
|
|
332
|
-
|
|
332
|
+
d(g);
|
|
333
333
|
}
|
|
334
334
|
}, 4e3);
|
|
335
335
|
}, u = () => {
|
|
336
336
|
r && (clearInterval(r), r = null);
|
|
337
|
-
},
|
|
337
|
+
}, p = () => {
|
|
338
338
|
a = !0, u();
|
|
339
339
|
}, f = () => {
|
|
340
|
-
a = !1,
|
|
340
|
+
a = !1, h();
|
|
341
341
|
};
|
|
342
342
|
e?.addEventListener("click", () => {
|
|
343
|
-
|
|
343
|
+
p();
|
|
344
344
|
const g = (o - 1 + t.length) % t.length;
|
|
345
|
-
|
|
345
|
+
d(g), setTimeout(f, 5e3);
|
|
346
346
|
}), i?.addEventListener("click", () => {
|
|
347
|
-
|
|
347
|
+
p();
|
|
348
348
|
const g = (o + 1) % t.length;
|
|
349
|
-
|
|
349
|
+
d(g), setTimeout(f, 5e3);
|
|
350
350
|
}), n.forEach((g, y) => {
|
|
351
351
|
g.addEventListener("click", () => {
|
|
352
|
-
|
|
352
|
+
p(), d(y), setTimeout(f, 5e3);
|
|
353
353
|
});
|
|
354
354
|
});
|
|
355
|
-
let
|
|
355
|
+
let m = 0, _ = 0, S = !1;
|
|
356
356
|
return s.addEventListener("touchstart", (g) => {
|
|
357
|
-
s instanceof HTMLElement && (
|
|
357
|
+
s instanceof HTMLElement && (p(), m = g.touches[0].clientX, _ = m, S = !0, s.style.transition = "none");
|
|
358
358
|
}), s.addEventListener("touchmove", (g) => {
|
|
359
359
|
if (!(s instanceof HTMLElement))
|
|
360
360
|
return;
|
|
361
361
|
_ = g.touches[0].clientX;
|
|
362
|
-
const y = _ -
|
|
363
|
-
s.style.transform = `translateX(${
|
|
362
|
+
const y = _ - m, w = -o * window.innerWidth + y;
|
|
363
|
+
s.style.transform = `translateX(${w}px)`;
|
|
364
364
|
}), s.addEventListener("touchend", () => {
|
|
365
|
-
if (!
|
|
365
|
+
if (!S)
|
|
366
366
|
return;
|
|
367
|
-
|
|
368
|
-
const g = _ -
|
|
367
|
+
S = !1;
|
|
368
|
+
const g = _ - m;
|
|
369
369
|
Math.abs(g) > 75 && (g < 0 ? o = Math.min(o + 1, t.length - 1) : g > 0 && (o = Math.max(o - 1, 0))), c(!0), setTimeout(f, 5e3);
|
|
370
|
-
}), c(!0),
|
|
370
|
+
}), c(!0), h(), () => {
|
|
371
371
|
u();
|
|
372
372
|
};
|
|
373
|
-
},
|
|
373
|
+
}, ae = (s) => {
|
|
374
374
|
s.stopImmediatePropagation(), s.preventDefault();
|
|
375
375
|
const t = s.currentTarget, e = document.getElementById("info-button-content");
|
|
376
376
|
!(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")));
|
|
377
|
-
},
|
|
377
|
+
}, le = () => {
|
|
378
378
|
const s = document.querySelector(".js-info-banner__button");
|
|
379
|
-
s instanceof HTMLButtonElement && s.addEventListener("click",
|
|
379
|
+
s instanceof HTMLButtonElement && s.addEventListener("click", ae);
|
|
380
380
|
}, v = {
|
|
381
381
|
inert: ":not([inert]):not([inert] *)",
|
|
382
382
|
negTabIndex: ':not([tabindex^="-"])',
|
|
383
383
|
disabled: ":not(:disabled)"
|
|
384
384
|
};
|
|
385
|
-
var
|
|
385
|
+
var ce = [
|
|
386
386
|
`a[href]${v.inert}${v.negTabIndex}`,
|
|
387
387
|
`area[href]${v.inert}${v.negTabIndex}`,
|
|
388
388
|
`input:not([type="hidden"]):not([type="radio"])${v.inert}${v.negTabIndex}${v.disabled}`,
|
|
@@ -400,24 +400,24 @@ var re = [
|
|
|
400
400
|
`[contenteditable]${v.inert}${v.negTabIndex}`,
|
|
401
401
|
`[tabindex]${v.inert}${v.negTabIndex}`
|
|
402
402
|
];
|
|
403
|
-
function
|
|
403
|
+
function et(s) {
|
|
404
404
|
(s.querySelector("[autofocus]") || s).focus();
|
|
405
405
|
}
|
|
406
|
-
function
|
|
406
|
+
function de(s) {
|
|
407
407
|
const t = $(s, !0), e = t ? $(s, !1) || t : null;
|
|
408
408
|
return [t, e];
|
|
409
409
|
}
|
|
410
410
|
function $(s, t) {
|
|
411
|
-
if (t &&
|
|
411
|
+
if (t && nt(s))
|
|
412
412
|
return s;
|
|
413
|
-
if (
|
|
413
|
+
if (ue(s))
|
|
414
414
|
if (s.shadowRoot) {
|
|
415
|
-
let e =
|
|
415
|
+
let e = it(s.shadowRoot, t);
|
|
416
416
|
for (; e; ) {
|
|
417
417
|
const i = $(e, t);
|
|
418
418
|
if (i)
|
|
419
419
|
return i;
|
|
420
|
-
e =
|
|
420
|
+
e = st(e, t);
|
|
421
421
|
}
|
|
422
422
|
} else if (s.localName === "slot") {
|
|
423
423
|
const e = s.assignedElements({
|
|
@@ -430,32 +430,32 @@ function $(s, t) {
|
|
|
430
430
|
return n;
|
|
431
431
|
}
|
|
432
432
|
} else {
|
|
433
|
-
let e =
|
|
433
|
+
let e = it(s, t);
|
|
434
434
|
for (; e; ) {
|
|
435
435
|
const i = $(e, t);
|
|
436
436
|
if (i)
|
|
437
437
|
return i;
|
|
438
|
-
e =
|
|
438
|
+
e = st(e, t);
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
|
-
return !t &&
|
|
441
|
+
return !t && nt(s) ? s : null;
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function it(s, t) {
|
|
444
444
|
return t ? s.firstElementChild : s.lastElementChild;
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function st(s, t) {
|
|
447
447
|
return t ? s.nextElementSibling : s.previousElementSibling;
|
|
448
448
|
}
|
|
449
|
-
const
|
|
450
|
-
function
|
|
449
|
+
const he = (s) => s.matches("details:not([open]) *") && !s.matches("details>summary:first-of-type") ? !0 : !(s.offsetWidth || s.offsetHeight || s.getClientRects().length), nt = (s) => s.shadowRoot?.delegatesFocus ? !1 : s.matches(ce.join(",")) && !he(s);
|
|
450
|
+
function ue(s) {
|
|
451
451
|
return s.shadowRoot && s.getAttribute("tabindex") === "-1" ? !1 : !s.matches(":disabled,[hidden],[inert]");
|
|
452
452
|
}
|
|
453
453
|
function R(s = document) {
|
|
454
454
|
const t = s.activeElement;
|
|
455
455
|
return t ? t.shadowRoot ? R(t.shadowRoot) || document.activeElement : t : null;
|
|
456
456
|
}
|
|
457
|
-
function
|
|
458
|
-
const [e, i] =
|
|
457
|
+
function pe(s, t) {
|
|
458
|
+
const [e, i] = de(s);
|
|
459
459
|
if (!e)
|
|
460
460
|
return t.preventDefault();
|
|
461
461
|
const n = R();
|
|
@@ -465,16 +465,16 @@ function T(s, t) {
|
|
|
465
465
|
function e(i) {
|
|
466
466
|
if (!i || i === document || i === window)
|
|
467
467
|
return null;
|
|
468
|
-
const n =
|
|
468
|
+
const n = wt(i);
|
|
469
469
|
return n && (i = n), i.closest(s) || e(i.getRootNode().host);
|
|
470
470
|
}
|
|
471
471
|
return e(t);
|
|
472
472
|
}
|
|
473
|
-
function
|
|
474
|
-
return s.assignedSlot || (s.parentNode ?
|
|
473
|
+
function wt(s) {
|
|
474
|
+
return s.assignedSlot || (s.parentNode ? wt(s.parentNode) : null);
|
|
475
475
|
}
|
|
476
|
-
const
|
|
477
|
-
class
|
|
476
|
+
const I = "data-a11y-dialog";
|
|
477
|
+
class bt {
|
|
478
478
|
$el;
|
|
479
479
|
id;
|
|
480
480
|
previouslyFocused;
|
|
@@ -497,7 +497,7 @@ class _t {
|
|
|
497
497
|
* `[data-a11y-dialog-show="<id>"]` and `[data-a11y-dialog-hide="<id>"]`.
|
|
498
498
|
*/
|
|
499
499
|
constructor(t) {
|
|
500
|
-
this.$el = t, this.id = this.$el.getAttribute(
|
|
500
|
+
this.$el = t, this.id = this.$el.getAttribute(I) || this.$el.id, this.previouslyFocused = null, this.shown = !1, this.maintainFocus = this.maintainFocus.bind(this), this.bindKeypress = this.bindKeypress.bind(this), this.handleTriggerClicks = this.handleTriggerClicks.bind(this), this.show = this.show.bind(this), this.hide = this.hide.bind(this), this.$el.setAttribute("aria-hidden", "true"), this.$el.setAttribute("aria-modal", "true"), this.$el.setAttribute("tabindex", "-1"), this.$el.hasAttribute("role") || this.$el.setAttribute("role", "dialog"), document.addEventListener("click", this.handleTriggerClicks, !0);
|
|
501
501
|
}
|
|
502
502
|
/**
|
|
503
503
|
* Destroy the current instance (after making sure the dialog has been hidden)
|
|
@@ -523,7 +523,7 @@ class _t {
|
|
|
523
523
|
* Returns the instance to allow method chaining.
|
|
524
524
|
*/
|
|
525
525
|
show(t) {
|
|
526
|
-
return this.shown ? this : this.fire("show", t).defaultPrevented ? this : (this.shown = !0, this.$el.removeAttribute("aria-hidden"), this.previouslyFocused = R(), this.previouslyFocused?.tagName === "BODY" && t?.target && (this.previouslyFocused = t.target), t?.type === "focus" ? this.maintainFocus() :
|
|
526
|
+
return this.shown ? this : this.fire("show", t).defaultPrevented ? this : (this.shown = !0, this.$el.removeAttribute("aria-hidden"), this.previouslyFocused = R(), this.previouslyFocused?.tagName === "BODY" && t?.target && (this.previouslyFocused = t.target), t?.type === "focus" ? this.maintainFocus() : et(this.$el), document.body.addEventListener("focus", this.maintainFocus, !0), this.$el.addEventListener("keydown", this.bindKeypress, !0), this);
|
|
527
527
|
}
|
|
528
528
|
/**
|
|
529
529
|
* Hide the dialog.
|
|
@@ -571,7 +571,7 @@ class _t {
|
|
|
571
571
|
* dialog are clicked, and call `show` or `hide`, respectively
|
|
572
572
|
*/
|
|
573
573
|
handleTriggerClicks(t) {
|
|
574
|
-
const e = t.composedPath()[0], i = T(`[${
|
|
574
|
+
const e = t.composedPath()[0], i = T(`[${I}-show="${this.id}"]`, e), n = T(`[${I}-hide="${this.id}"]`, e), o = T(`[${I}-hide]`, e) && T('[aria-modal="true"]', e) === this.$el;
|
|
575
575
|
i && this.show(t), (n || o) && this.hide(t);
|
|
576
576
|
}
|
|
577
577
|
/**
|
|
@@ -586,7 +586,7 @@ class _t {
|
|
|
586
586
|
e = !!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open');
|
|
587
587
|
} catch {
|
|
588
588
|
}
|
|
589
|
-
t.key === "Escape" && this.$el.getAttribute("role") !== "alertdialog" && !e && (t.preventDefault(), this.hide(t)), t.key === "Tab" &&
|
|
589
|
+
t.key === "Escape" && this.$el.getAttribute("role") !== "alertdialog" && !e && (t.preventDefault(), this.hide(t)), t.key === "Tab" && pe(this.$el, t);
|
|
590
590
|
}
|
|
591
591
|
/**
|
|
592
592
|
* If the dialog is shown and the focus is not within a dialog element (either
|
|
@@ -596,18 +596,18 @@ class _t {
|
|
|
596
596
|
*/
|
|
597
597
|
maintainFocus() {
|
|
598
598
|
const t = R();
|
|
599
|
-
T(`[aria-modal="true"], [${
|
|
599
|
+
T(`[aria-modal="true"], [${I}-ignore-focus-trap]`, t) || et(this.$el);
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
|
-
function
|
|
602
|
+
function ot() {
|
|
603
603
|
for (const s of document.querySelectorAll("[data-a11y-dialog]"))
|
|
604
|
-
new
|
|
604
|
+
new bt(s);
|
|
605
605
|
}
|
|
606
|
-
typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded",
|
|
607
|
-
const
|
|
606
|
+
typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", ot) : ot());
|
|
607
|
+
const me = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
608
608
|
if (!(s instanceof HTMLElement))
|
|
609
609
|
return;
|
|
610
|
-
const t = new
|
|
610
|
+
const t = new bt(s);
|
|
611
611
|
if (s.id === "dialog-menu") {
|
|
612
612
|
const e = document.querySelectorAll("button[data-a11y-dialog-show='dialog-menu']"), i = document.querySelectorAll("button[data-a11y-dialog-hide='dialog-menu']");
|
|
613
613
|
e.length > 0 && i.length > 0 && (t.on("show", () => {
|
|
@@ -621,28 +621,28 @@ const de = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
621
621
|
}).on("hide", () => {
|
|
622
622
|
document.body.classList.remove("noscroll");
|
|
623
623
|
});
|
|
624
|
-
}),
|
|
624
|
+
}), St = "68px", Lt = "50px", Q = ({
|
|
625
625
|
navigationContainer: s,
|
|
626
626
|
navigatedList: t,
|
|
627
627
|
nextBtn: e,
|
|
628
628
|
prevBtn: i
|
|
629
629
|
}) => {
|
|
630
|
-
const n = s.classList.contains("c-breadcrumb--is-small") ?
|
|
630
|
+
const n = s.classList.contains("c-breadcrumb--is-small") ? Lt : St;
|
|
631
631
|
e.classList.contains("o-nav-button--visible") && !i.classList.contains("o-nav-button--visible") && (s.style.paddingRight = n, s.style.paddingLeft = ""), i.classList.contains("o-nav-button--visible") && (s.style.paddingLeft = n, e.classList.contains("o-nav-button--visible") && (s.style.paddingRight = n), e.classList.contains("o-nav-button--visible") || (s.style.paddingRight = "")), !e.classList.contains("o-nav-button--visible") && !i.classList.contains("o-nav-button--visible") && (t.style.width = "", s.style.paddingRight = "");
|
|
632
|
-
},
|
|
632
|
+
}, fe = ({
|
|
633
633
|
navigationContainer: s,
|
|
634
634
|
navigatedList: t,
|
|
635
635
|
nextBtn: e,
|
|
636
636
|
prevBtn: i
|
|
637
637
|
}) => {
|
|
638
638
|
const n = t.scrollLeft > 0, o = t.scrollLeft + (t.clientWidth + 0.5) < t.scrollWidth;
|
|
639
|
-
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") &&
|
|
639
|
+
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") && Q({
|
|
640
640
|
navigationContainer: s,
|
|
641
641
|
navigatedList: t,
|
|
642
642
|
nextBtn: e,
|
|
643
643
|
prevBtn: i
|
|
644
644
|
});
|
|
645
|
-
},
|
|
645
|
+
}, ge = ({
|
|
646
646
|
navigationContainer: s,
|
|
647
647
|
navigatedList: t,
|
|
648
648
|
nextBtn: e,
|
|
@@ -687,14 +687,14 @@ const de = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
687
687
|
behavior: "smooth"
|
|
688
688
|
}), e.classList.remove("o-nav-button--visible"), i.classList.add("o-nav-button--visible");
|
|
689
689
|
}
|
|
690
|
-
e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") &&
|
|
690
|
+
e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && Q({
|
|
691
691
|
navigationContainer: s,
|
|
692
692
|
navigatedList: t,
|
|
693
693
|
nextBtn: e,
|
|
694
694
|
prevBtn: i
|
|
695
695
|
});
|
|
696
696
|
}
|
|
697
|
-
},
|
|
697
|
+
}, ve = ({
|
|
698
698
|
navigationContainer: s,
|
|
699
699
|
navigatedList: t,
|
|
700
700
|
nextBtn: e,
|
|
@@ -706,11 +706,11 @@ const de = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
706
706
|
const l = t.closest(".js-overview-bar-container")?.querySelector(".c-stepper")?.querySelectorAll(".c-stepper__item");
|
|
707
707
|
if (l) {
|
|
708
708
|
const c = Array.from(l).findIndex(
|
|
709
|
-
(
|
|
709
|
+
(d) => d.classList.contains("c-stepper__item--loading")
|
|
710
710
|
);
|
|
711
711
|
c < 0 ? l[0].classList.add("c-stepper__item--loading") : (l[c].classList.remove("c-stepper__item--loading"), l[c].classList.remove("c-stepper__item--loaded"), c - 1 > 0 && (l[c - 1].classList.remove("c-stepper__item--loading"), l[c - 1].classList.remove("c-stepper__item--loaded"), setTimeout(() => {
|
|
712
|
-
const
|
|
713
|
-
l[c - 1].classList.add("c-stepper__item--loading"),
|
|
712
|
+
const d = l[c - 1].querySelector(".c-stepper__loader");
|
|
713
|
+
l[c - 1].classList.add("c-stepper__item--loading"), d && d instanceof HTMLElement && (d.style.transition = `width ${o / 1e3}s linear`);
|
|
714
714
|
}, 0)));
|
|
715
715
|
}
|
|
716
716
|
if (t.clientWidth < t.scrollLeft) {
|
|
@@ -735,73 +735,73 @@ const de = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
735
735
|
left: 0,
|
|
736
736
|
behavior: "smooth"
|
|
737
737
|
}), i.classList.remove("o-nav-button--visible"), t.clientWidth < t.scrollWidth && e.classList.add("o-nav-button--visible");
|
|
738
|
-
e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") &&
|
|
738
|
+
e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && Q({
|
|
739
739
|
navigationContainer: s,
|
|
740
740
|
navigatedList: t,
|
|
741
741
|
nextBtn: e,
|
|
742
742
|
prevBtn: i
|
|
743
743
|
});
|
|
744
744
|
}
|
|
745
|
-
},
|
|
745
|
+
}, ye = ({
|
|
746
746
|
navigationContainer: s,
|
|
747
747
|
navigatedList: t,
|
|
748
748
|
nextBtn: e,
|
|
749
749
|
prevBtn: i
|
|
750
750
|
}) => {
|
|
751
|
-
|
|
751
|
+
fe({
|
|
752
752
|
navigationContainer: s,
|
|
753
753
|
navigatedList: t,
|
|
754
754
|
nextBtn: e,
|
|
755
755
|
prevBtn: i
|
|
756
756
|
});
|
|
757
|
-
},
|
|
757
|
+
}, _e = (s) => {
|
|
758
758
|
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(
|
|
759
759
|
".js-navigation-container__list"
|
|
760
|
-
), c = s.querySelector(".o-nav-button--next-button"),
|
|
760
|
+
), c = s.querySelector(".o-nav-button--next-button"), d = s.querySelector(
|
|
761
761
|
".o-nav-button--previous-button"
|
|
762
762
|
);
|
|
763
|
-
if (!(!l || !c || !
|
|
763
|
+
if (!(!l || !c || !d)) {
|
|
764
764
|
if (l.clientWidth < l.scrollWidth && (c.classList.add("o-nav-button--visible"), c.classList.contains("c-slider__button-container--has-space-around"))) {
|
|
765
|
-
const
|
|
766
|
-
s.style.paddingRight =
|
|
765
|
+
const h = s.classList.contains("c-breadcrumb--is-small") ? Lt : St;
|
|
766
|
+
s.style.paddingRight = h;
|
|
767
767
|
}
|
|
768
768
|
if (c.addEventListener(
|
|
769
769
|
"click",
|
|
770
|
-
|
|
770
|
+
ge.bind(!1, {
|
|
771
771
|
navigationContainer: s,
|
|
772
772
|
navigatedList: l,
|
|
773
773
|
nextBtn: c,
|
|
774
|
-
prevBtn:
|
|
774
|
+
prevBtn: d,
|
|
775
775
|
sliderVariant: t
|
|
776
776
|
})
|
|
777
|
-
),
|
|
777
|
+
), d.addEventListener(
|
|
778
778
|
"click",
|
|
779
|
-
|
|
779
|
+
ve.bind(!1, {
|
|
780
780
|
navigationContainer: s,
|
|
781
781
|
navigatedList: l,
|
|
782
782
|
nextBtn: c,
|
|
783
|
-
prevBtn:
|
|
783
|
+
prevBtn: d,
|
|
784
784
|
sliderVariant: t,
|
|
785
785
|
delay: n
|
|
786
786
|
})
|
|
787
787
|
), e === "true") {
|
|
788
|
-
const
|
|
788
|
+
const h = r ? r.querySelector(".c-stepper__item--loading") : null;
|
|
789
789
|
a && (a.forEach((u) => {
|
|
790
|
-
const
|
|
791
|
-
|
|
792
|
-
}),
|
|
793
|
-
c.classList.contains("o-nav-button--visible") ? c.click() : l &&
|
|
794
|
-
const
|
|
795
|
-
|
|
796
|
-
|
|
790
|
+
const p = u.querySelector(".c-stepper__loader");
|
|
791
|
+
p && p instanceof HTMLElement && (p.style.transition = `width ${n / 1e3}s linear`);
|
|
792
|
+
}), h || a[0].classList.add("c-stepper__item--loading")), setInterval(() => {
|
|
793
|
+
c.classList.contains("o-nav-button--visible") ? c.click() : l && d && (l.scrollLeft = 0, a && (a.forEach((u) => {
|
|
794
|
+
const p = u.querySelector(".c-stepper__loader");
|
|
795
|
+
p && p instanceof HTMLElement && (p.style.transition = "width 0s linear"), u.classList.remove("c-stepper__item--loading"), u.classList.remove("c-stepper__item--loaded"), setTimeout(() => {
|
|
796
|
+
p && p instanceof HTMLElement && (p.style.transition = `width ${n / 1e3}s linear`);
|
|
797
797
|
}, 0);
|
|
798
798
|
}), setTimeout(() => {
|
|
799
799
|
a[0].classList.add("c-stepper__item--loading");
|
|
800
|
-
}, 0)),
|
|
800
|
+
}, 0)), d.click());
|
|
801
801
|
}, n);
|
|
802
802
|
}
|
|
803
803
|
}
|
|
804
|
-
},
|
|
804
|
+
}, we = () => {
|
|
805
805
|
const s = document.querySelectorAll(".js-navigation-container");
|
|
806
806
|
Array.from(s).forEach((t) => {
|
|
807
807
|
const e = t.querySelector(
|
|
@@ -811,13 +811,13 @@ const de = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
811
811
|
const i = new ResizeObserver((n) => {
|
|
812
812
|
n.forEach((o) => {
|
|
813
813
|
const { width: r } = o.contentRect;
|
|
814
|
-
r > 0 && (
|
|
814
|
+
r > 0 && (_e(t), i.disconnect());
|
|
815
815
|
});
|
|
816
816
|
});
|
|
817
817
|
i.observe(e);
|
|
818
818
|
}
|
|
819
819
|
});
|
|
820
|
-
},
|
|
820
|
+
}, be = () => {
|
|
821
821
|
const s = document.querySelectorAll(".js-navigation-container");
|
|
822
822
|
for (const t of Array.from(s))
|
|
823
823
|
if (t) {
|
|
@@ -830,7 +830,7 @@ const de = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
830
830
|
);
|
|
831
831
|
e && i && n && window.addEventListener(
|
|
832
832
|
"resize",
|
|
833
|
-
|
|
833
|
+
ye.bind(!1, {
|
|
834
834
|
navigationContainer: t,
|
|
835
835
|
navigatedList: e,
|
|
836
836
|
nextBtn: i,
|
|
@@ -839,44 +839,44 @@ const de = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
839
839
|
);
|
|
840
840
|
}
|
|
841
841
|
};
|
|
842
|
-
function
|
|
842
|
+
function A(s, t, e) {
|
|
843
843
|
const i = document.createElement(t);
|
|
844
844
|
return s && (i.className = s), e && e.appendChild(i), i;
|
|
845
845
|
}
|
|
846
846
|
function b(s, t) {
|
|
847
847
|
return s.x = t.x, s.y = t.y, t.id !== void 0 && (s.id = t.id), s;
|
|
848
848
|
}
|
|
849
|
-
function
|
|
849
|
+
function At(s) {
|
|
850
850
|
s.x = Math.round(s.x), s.y = Math.round(s.y);
|
|
851
851
|
}
|
|
852
|
-
function
|
|
852
|
+
function G(s, t) {
|
|
853
853
|
const e = Math.abs(s.x - t.x), i = Math.abs(s.y - t.y);
|
|
854
854
|
return Math.sqrt(e * e + i * i);
|
|
855
855
|
}
|
|
856
|
-
function
|
|
856
|
+
function B(s, t) {
|
|
857
857
|
return s.x === t.x && s.y === t.y;
|
|
858
858
|
}
|
|
859
|
-
function
|
|
859
|
+
function Z(s, t, e) {
|
|
860
860
|
return Math.min(Math.max(s, t), e);
|
|
861
861
|
}
|
|
862
862
|
function F(s, t, e) {
|
|
863
863
|
let i = `translate3d(${s}px,${t || 0}px,0)`;
|
|
864
864
|
return e !== void 0 && (i += ` scale3d(${e},${e},1)`), i;
|
|
865
865
|
}
|
|
866
|
-
function
|
|
866
|
+
function P(s, t, e, i) {
|
|
867
867
|
s.style.transform = F(t, e, i);
|
|
868
868
|
}
|
|
869
|
-
const
|
|
870
|
-
function
|
|
871
|
-
s.style.transition = t ? `${t} ${e}ms ${i ||
|
|
869
|
+
const Se = "cubic-bezier(.4,0,.22,1)";
|
|
870
|
+
function Et(s, t, e, i) {
|
|
871
|
+
s.style.transition = t ? `${t} ${e}ms ${i || Se}` : "none";
|
|
872
872
|
}
|
|
873
|
-
function
|
|
873
|
+
function U(s, t, e) {
|
|
874
874
|
s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
|
|
875
875
|
}
|
|
876
|
-
function
|
|
877
|
-
|
|
876
|
+
function Le(s) {
|
|
877
|
+
Et(s);
|
|
878
878
|
}
|
|
879
|
-
function
|
|
879
|
+
function Ae(s) {
|
|
880
880
|
return "decode" in s ? s.decode().catch(() => {
|
|
881
881
|
}) : s.complete ? Promise.resolve(s) : new Promise((t, e) => {
|
|
882
882
|
s.onload = () => t(s), s.onerror = e;
|
|
@@ -888,10 +888,10 @@ const E = {
|
|
|
888
888
|
LOADED: "loaded",
|
|
889
889
|
ERROR: "error"
|
|
890
890
|
};
|
|
891
|
-
function
|
|
891
|
+
function Ee(s) {
|
|
892
892
|
return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
|
|
893
893
|
}
|
|
894
|
-
function
|
|
894
|
+
function xe(s, t, e = document) {
|
|
895
895
|
let i = [];
|
|
896
896
|
if (s instanceof Element)
|
|
897
897
|
i = [s];
|
|
@@ -903,19 +903,19 @@ function Le(s, t, e = document) {
|
|
|
903
903
|
}
|
|
904
904
|
return i;
|
|
905
905
|
}
|
|
906
|
-
function
|
|
906
|
+
function rt() {
|
|
907
907
|
return !!(navigator.vendor && navigator.vendor.match(/apple/i));
|
|
908
908
|
}
|
|
909
|
-
let
|
|
909
|
+
let xt = !1;
|
|
910
910
|
try {
|
|
911
911
|
window.addEventListener("test", null, Object.defineProperty({}, "passive", {
|
|
912
912
|
get: () => {
|
|
913
|
-
|
|
913
|
+
xt = !0;
|
|
914
914
|
}
|
|
915
915
|
}));
|
|
916
916
|
} catch {
|
|
917
917
|
}
|
|
918
|
-
class
|
|
918
|
+
class Ce {
|
|
919
919
|
constructor() {
|
|
920
920
|
this._pool = [];
|
|
921
921
|
}
|
|
@@ -966,21 +966,21 @@ class Ee {
|
|
|
966
966
|
const a = o ? "removeEventListener" : "addEventListener";
|
|
967
967
|
e.split(" ").forEach((c) => {
|
|
968
968
|
if (c) {
|
|
969
|
-
r || (o ? this._pool = this._pool.filter((
|
|
969
|
+
r || (o ? this._pool = this._pool.filter((h) => h.type !== c || h.listener !== i || h.target !== t) : this._pool.push({
|
|
970
970
|
target: t,
|
|
971
971
|
type: c,
|
|
972
972
|
listener: i,
|
|
973
973
|
passive: n
|
|
974
974
|
}));
|
|
975
|
-
const
|
|
975
|
+
const d = xt ? {
|
|
976
976
|
passive: n || !1
|
|
977
977
|
} : !1;
|
|
978
|
-
t[a](c, i,
|
|
978
|
+
t[a](c, i, d);
|
|
979
979
|
}
|
|
980
980
|
});
|
|
981
981
|
}
|
|
982
982
|
}
|
|
983
|
-
function
|
|
983
|
+
function Ct(s, t) {
|
|
984
984
|
if (s.getViewportSizeFn) {
|
|
985
985
|
const e = s.getViewportSizeFn(s, t);
|
|
986
986
|
if (e)
|
|
@@ -995,7 +995,7 @@ function Et(s, t) {
|
|
|
995
995
|
y: window.innerHeight
|
|
996
996
|
};
|
|
997
997
|
}
|
|
998
|
-
function
|
|
998
|
+
function M(s, t, e, i, n) {
|
|
999
999
|
let o = 0;
|
|
1000
1000
|
if (t.paddingFn)
|
|
1001
1001
|
o = t.paddingFn(e, i, n)[s];
|
|
@@ -1007,13 +1007,13 @@ function O(s, t, e, i, n) {
|
|
|
1007
1007
|
}
|
|
1008
1008
|
return Number(o) || 0;
|
|
1009
1009
|
}
|
|
1010
|
-
function
|
|
1010
|
+
function Pt(s, t, e, i) {
|
|
1011
1011
|
return {
|
|
1012
|
-
x: t.x -
|
|
1013
|
-
y: t.y -
|
|
1012
|
+
x: t.x - M("left", s, t, e, i) - M("right", s, t, e, i),
|
|
1013
|
+
y: t.y - M("top", s, t, e, i) - M("bottom", s, t, e, i)
|
|
1014
1014
|
};
|
|
1015
1015
|
}
|
|
1016
|
-
class
|
|
1016
|
+
class Pe {
|
|
1017
1017
|
/**
|
|
1018
1018
|
* @param {Slide} slide
|
|
1019
1019
|
*/
|
|
@@ -1050,7 +1050,7 @@ class Ae {
|
|
|
1050
1050
|
_updateAxis(t) {
|
|
1051
1051
|
const {
|
|
1052
1052
|
pswp: e
|
|
1053
|
-
} = this.slide, i = this.slide[t === "x" ? "width" : "height"] * this.currZoomLevel, o =
|
|
1053
|
+
} = this.slide, i = this.slide[t === "x" ? "width" : "height"] * this.currZoomLevel, o = M(t === "x" ? "left" : "top", e.options, e.viewportSize, this.slide.data, this.slide.index), r = this.slide.panAreaSize[t];
|
|
1054
1054
|
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];
|
|
1055
1055
|
}
|
|
1056
1056
|
// _getZeroBounds
|
|
@@ -1065,11 +1065,11 @@ class Ae {
|
|
|
1065
1065
|
* @returns {number}
|
|
1066
1066
|
*/
|
|
1067
1067
|
correctPan(t, e) {
|
|
1068
|
-
return
|
|
1068
|
+
return Z(e, this.max[t], this.min[t]);
|
|
1069
1069
|
}
|
|
1070
1070
|
}
|
|
1071
|
-
const
|
|
1072
|
-
let
|
|
1071
|
+
const at = 4e3;
|
|
1072
|
+
let Tt = class {
|
|
1073
1073
|
/**
|
|
1074
1074
|
* @param {PhotoSwipeOptions} options PhotoSwipe options
|
|
1075
1075
|
* @param {SlideData} itemData Slide data
|
|
@@ -1126,7 +1126,7 @@ let xt = class {
|
|
|
1126
1126
|
*/
|
|
1127
1127
|
_getSecondary() {
|
|
1128
1128
|
let t = this._parseZoomLevelOption("secondary");
|
|
1129
|
-
return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x >
|
|
1129
|
+
return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > at && (t = at / this.elementSize.x), t);
|
|
1130
1130
|
}
|
|
1131
1131
|
/**
|
|
1132
1132
|
* Get initial image zoom level.
|
|
@@ -1149,7 +1149,7 @@ let xt = class {
|
|
|
1149
1149
|
return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
|
|
1150
1150
|
}
|
|
1151
1151
|
};
|
|
1152
|
-
class
|
|
1152
|
+
class Te {
|
|
1153
1153
|
/**
|
|
1154
1154
|
* @param {SlideData} data
|
|
1155
1155
|
* @param {number} index
|
|
@@ -1162,11 +1162,11 @@ class xe {
|
|
|
1162
1162
|
}, this.pan = {
|
|
1163
1163
|
x: 0,
|
|
1164
1164
|
y: 0
|
|
1165
|
-
}, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new
|
|
1165
|
+
}, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new Tt(i.options, t, e, i), this.pswp.dispatch("gettingData", {
|
|
1166
1166
|
slide: this,
|
|
1167
1167
|
data: this.data,
|
|
1168
1168
|
index: e
|
|
1169
|
-
}), this.content = this.pswp.contentLoader.getContentBySlide(this), this.container =
|
|
1169
|
+
}), this.content = this.pswp.contentLoader.getContentBySlide(this), this.container = A("pswp__zoom-wrap", "div"), this.holderElement = null, this.currZoomLevel = 1, this.width = this.content.width, this.height = this.content.height, this.heavyAppended = !1, this.bounds = new Pe(this), this.prevDisplayedWidth = -1, this.prevDisplayedHeight = -1, this.pswp.dispatch("slideInit", {
|
|
1170
1170
|
slide: this
|
|
1171
1171
|
});
|
|
1172
1172
|
}
|
|
@@ -1290,7 +1290,7 @@ class xe {
|
|
|
1290
1290
|
transitionDuration: i
|
|
1291
1291
|
}), o.animations.stopAllPan();
|
|
1292
1292
|
const r = this.currZoomLevel;
|
|
1293
|
-
n || (t =
|
|
1293
|
+
n || (t = Z(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), At(this.pan);
|
|
1294
1294
|
const a = () => {
|
|
1295
1295
|
this._setResolution(t), this.applyCurrentZoomPan();
|
|
1296
1296
|
};
|
|
@@ -1385,13 +1385,13 @@ class xe {
|
|
|
1385
1385
|
* @private
|
|
1386
1386
|
*/
|
|
1387
1387
|
_applyZoomTransform(t, e, i) {
|
|
1388
|
-
i /= this.currentResolution || this.zoomLevels.initial,
|
|
1388
|
+
i /= this.currentResolution || this.zoomLevels.initial, P(this.container, t, e, i);
|
|
1389
1389
|
}
|
|
1390
1390
|
calculateSize() {
|
|
1391
1391
|
const {
|
|
1392
1392
|
pswp: t
|
|
1393
1393
|
} = this;
|
|
1394
|
-
b(this.panAreaSize,
|
|
1394
|
+
b(this.panAreaSize, Pt(t.options, t.viewportSize, this.data, this.index)), this.zoomLevels.update(this.width, this.height, this.panAreaSize), t.dispatch("calcSlideSize", {
|
|
1395
1395
|
slide: this
|
|
1396
1396
|
});
|
|
1397
1397
|
}
|
|
@@ -1419,11 +1419,11 @@ class xe {
|
|
|
1419
1419
|
t !== this.currentResolution && (this.currentResolution = t, this.updateContentSize(), this.pswp.dispatch("resolutionChanged"));
|
|
1420
1420
|
}
|
|
1421
1421
|
}
|
|
1422
|
-
const
|
|
1423
|
-
function
|
|
1422
|
+
const Ie = 0.35, ze = 0.6, lt = 0.4, ct = 0.5;
|
|
1423
|
+
function Me(s, t) {
|
|
1424
1424
|
return s * t / (1 - t);
|
|
1425
1425
|
}
|
|
1426
|
-
class
|
|
1426
|
+
class De {
|
|
1427
1427
|
/**
|
|
1428
1428
|
* @param {Gestures} gestures
|
|
1429
1429
|
*/
|
|
@@ -1449,12 +1449,12 @@ class Ce {
|
|
|
1449
1449
|
if (!this.pswp.dispatch("verticalDrag", {
|
|
1450
1450
|
panY: o
|
|
1451
1451
|
}).defaultPrevented) {
|
|
1452
|
-
this._setPanWithFriction("y", o,
|
|
1452
|
+
this._setPanWithFriction("y", o, ze);
|
|
1453
1453
|
const r = 1 - Math.abs(this._getVerticalDragRatio(n.pan.y));
|
|
1454
1454
|
this.pswp.applyBgOpacity(r), n.applyCurrentZoomPan();
|
|
1455
1455
|
}
|
|
1456
1456
|
} else
|
|
1457
|
-
this._panOrMoveMainScroll("x") || (this._panOrMoveMainScroll("y"), n && (
|
|
1457
|
+
this._panOrMoveMainScroll("x") || (this._panOrMoveMainScroll("y"), n && (At(n.pan), n.applyCurrentZoomPan()));
|
|
1458
1458
|
}
|
|
1459
1459
|
end() {
|
|
1460
1460
|
const {
|
|
@@ -1466,7 +1466,7 @@ class Ce {
|
|
|
1466
1466
|
let n = 0;
|
|
1467
1467
|
if (this.pswp.animations.stopAll(), e.isShifted()) {
|
|
1468
1468
|
const r = (e.x - e.getCurrSlideX()) / this.pswp.viewportSize.x;
|
|
1469
|
-
t.x < -
|
|
1469
|
+
t.x < -ct && r < 0 || t.x < 0.1 && r < -0.5 ? (n = 1, t.x = Math.min(t.x, 0)) : (t.x > ct && r > 0 || t.x > -0.1 && r > 0.5) && (n = -1, t.x = Math.max(t.x, 0)), e.moveIndexBy(n, !0, t.x);
|
|
1470
1470
|
}
|
|
1471
1471
|
i && i.currZoomLevel > i.zoomLevels.max || this.gestures.isMultitouch ? this.gestures.zoomLevels.correctZoomPan(!0) : (this._finishPanGestureForAxis("x"), this._finishPanGestureForAxis("y"));
|
|
1472
1472
|
}
|
|
@@ -1485,29 +1485,29 @@ class Ce {
|
|
|
1485
1485
|
const {
|
|
1486
1486
|
pan: n,
|
|
1487
1487
|
bounds: o
|
|
1488
|
-
} = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", c = r +
|
|
1488
|
+
} = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", c = r + Me(e[t], 0.995);
|
|
1489
1489
|
if (a) {
|
|
1490
|
-
const f = this._getVerticalDragRatio(r),
|
|
1491
|
-
if (f < 0 &&
|
|
1490
|
+
const f = this._getVerticalDragRatio(r), m = this._getVerticalDragRatio(c);
|
|
1491
|
+
if (f < 0 && m < -lt || f > 0 && m > lt) {
|
|
1492
1492
|
this.pswp.close();
|
|
1493
1493
|
return;
|
|
1494
1494
|
}
|
|
1495
1495
|
}
|
|
1496
|
-
const
|
|
1497
|
-
if (r ===
|
|
1496
|
+
const d = o.correctPan(t, c);
|
|
1497
|
+
if (r === d)
|
|
1498
1498
|
return;
|
|
1499
|
-
const
|
|
1499
|
+
const h = d === c ? 1 : 0.82, u = this.pswp.bgOpacity, p = d - r;
|
|
1500
1500
|
this.pswp.animations.startSpring({
|
|
1501
1501
|
name: "panGesture" + t,
|
|
1502
1502
|
isPan: !0,
|
|
1503
1503
|
start: r,
|
|
1504
|
-
end:
|
|
1504
|
+
end: d,
|
|
1505
1505
|
velocity: e[t],
|
|
1506
|
-
dampingRatio:
|
|
1506
|
+
dampingRatio: h,
|
|
1507
1507
|
onUpdate: (f) => {
|
|
1508
1508
|
if (a && this.pswp.bgOpacity < 1) {
|
|
1509
|
-
const
|
|
1510
|
-
this.pswp.applyBgOpacity(
|
|
1509
|
+
const m = 1 - (d - f) / p;
|
|
1510
|
+
this.pswp.applyBgOpacity(Z(u + (1 - u) * m, 0, 1));
|
|
1511
1511
|
}
|
|
1512
1512
|
n[t] = Math.floor(f), i.applyCurrentZoomPan();
|
|
1513
1513
|
}
|
|
@@ -1538,27 +1538,27 @@ class Ce {
|
|
|
1538
1538
|
if (t === "x" && !r.isPannable() && !o)
|
|
1539
1539
|
return a.moveTo(c, !0), !0;
|
|
1540
1540
|
const {
|
|
1541
|
-
bounds:
|
|
1542
|
-
} = r,
|
|
1541
|
+
bounds: d
|
|
1542
|
+
} = r, h = r.pan[t] + l;
|
|
1543
1543
|
if (this.pswp.options.allowPanToNext && i === "x" && t === "x" && !o) {
|
|
1544
|
-
const u = a.getCurrSlideX(),
|
|
1545
|
-
if (
|
|
1546
|
-
if (
|
|
1544
|
+
const u = a.getCurrSlideX(), p = a.x - u, f = l > 0, m = !f;
|
|
1545
|
+
if (h > d.min[t] && f) {
|
|
1546
|
+
if (d.min[t] <= this.startPan[t])
|
|
1547
1547
|
return a.moveTo(c, !0), !0;
|
|
1548
|
-
this._setPanWithFriction(t,
|
|
1549
|
-
} else if (
|
|
1550
|
-
if (this.startPan[t] <=
|
|
1548
|
+
this._setPanWithFriction(t, h);
|
|
1549
|
+
} else if (h < d.max[t] && m) {
|
|
1550
|
+
if (this.startPan[t] <= d.max[t])
|
|
1551
1551
|
return a.moveTo(c, !0), !0;
|
|
1552
|
-
this._setPanWithFriction(t,
|
|
1553
|
-
} else if (
|
|
1554
|
-
if (
|
|
1552
|
+
this._setPanWithFriction(t, h);
|
|
1553
|
+
} else if (p !== 0) {
|
|
1554
|
+
if (p > 0)
|
|
1555
1555
|
return a.moveTo(Math.max(c, u), !0), !0;
|
|
1556
|
-
if (
|
|
1556
|
+
if (p < 0)
|
|
1557
1557
|
return a.moveTo(Math.min(c, u), !0), !0;
|
|
1558
1558
|
} else
|
|
1559
|
-
this._setPanWithFriction(t,
|
|
1559
|
+
this._setPanWithFriction(t, h);
|
|
1560
1560
|
} else
|
|
1561
|
-
t === "y" ? !a.isShifted() &&
|
|
1561
|
+
t === "y" ? !a.isShifted() && d.min.y !== d.max.y && this._setPanWithFriction(t, h) : this._setPanWithFriction(t, h);
|
|
1562
1562
|
return !1;
|
|
1563
1563
|
}
|
|
1564
1564
|
// If we move above - the ratio is negative
|
|
@@ -1600,16 +1600,16 @@ class Ce {
|
|
|
1600
1600
|
} = n;
|
|
1601
1601
|
if (r.correctPan(t, e) !== e || i) {
|
|
1602
1602
|
const l = Math.round(e - o[t]);
|
|
1603
|
-
o[t] += l * (i ||
|
|
1603
|
+
o[t] += l * (i || Ie);
|
|
1604
1604
|
} else
|
|
1605
1605
|
o[t] = e;
|
|
1606
1606
|
}
|
|
1607
1607
|
}
|
|
1608
|
-
const
|
|
1609
|
-
function
|
|
1608
|
+
const Oe = 0.05, $e = 0.15;
|
|
1609
|
+
function dt(s, t, e) {
|
|
1610
1610
|
return s.x = (t.x + e.x) / 2, s.y = (t.y + e.y) / 2, s;
|
|
1611
1611
|
}
|
|
1612
|
-
class
|
|
1612
|
+
class Re {
|
|
1613
1613
|
/**
|
|
1614
1614
|
* @param {Gestures} gestures
|
|
1615
1615
|
*/
|
|
@@ -1646,17 +1646,17 @@ class De {
|
|
|
1646
1646
|
const a = r.zoomLevels.min, l = r.zoomLevels.max;
|
|
1647
1647
|
if (!r.isZoomable() || o.mainScroll.isShifted())
|
|
1648
1648
|
return;
|
|
1649
|
-
|
|
1650
|
-
let c = 1 /
|
|
1649
|
+
dt(this._startZoomPoint, e, n), dt(this._zoomPoint, t, i);
|
|
1650
|
+
let c = 1 / G(e, n) * G(t, i) * this._startZoomLevel;
|
|
1651
1651
|
if (c > r.zoomLevels.initial + r.zoomLevels.initial / 15 && (this._wasOverFitZoomLevel = !0), c < a)
|
|
1652
1652
|
if (o.options.pinchToClose && !this._wasOverFitZoomLevel && this._startZoomLevel <= r.zoomLevels.initial) {
|
|
1653
|
-
const
|
|
1653
|
+
const d = 1 - (a - c) / (a / 1.2);
|
|
1654
1654
|
o.dispatch("pinchClose", {
|
|
1655
|
-
bgOpacity:
|
|
1656
|
-
}).defaultPrevented || o.applyBgOpacity(
|
|
1655
|
+
bgOpacity: d
|
|
1656
|
+
}).defaultPrevented || o.applyBgOpacity(d);
|
|
1657
1657
|
} else
|
|
1658
|
-
c = a - (a - c) *
|
|
1659
|
-
else c > l && (c = l + (c - l) *
|
|
1658
|
+
c = a - (a - c) * $e;
|
|
1659
|
+
else c > l && (c = l + (c - l) * Oe);
|
|
1660
1660
|
r.pan.x = this._calculatePanForZoomLevel("x", c), r.pan.y = this._calculatePanForZoomLevel("y", c), r.setZoomLevel(c), r.applyCurrentZoomPan();
|
|
1661
1661
|
}
|
|
1662
1662
|
end() {
|
|
@@ -1701,19 +1701,19 @@ class De {
|
|
|
1701
1701
|
x: 0,
|
|
1702
1702
|
y: 0
|
|
1703
1703
|
}, i.pan);
|
|
1704
|
-
let
|
|
1704
|
+
let d = b({
|
|
1705
1705
|
x: 0,
|
|
1706
1706
|
y: 0
|
|
1707
1707
|
}, c);
|
|
1708
|
-
t && (this._zoomPoint.x = 0, this._zoomPoint.y = 0, this._startZoomPoint.x = 0, this._startZoomPoint.y = 0, this._startZoomLevel = n, b(this._startPan, c)), r && (
|
|
1708
|
+
t && (this._zoomPoint.x = 0, this._zoomPoint.y = 0, this._startZoomPoint.x = 0, this._startZoomPoint.y = 0, this._startZoomLevel = n, b(this._startPan, c)), r && (d = {
|
|
1709
1709
|
x: this._calculatePanForZoomLevel("x", o),
|
|
1710
1710
|
y: this._calculatePanForZoomLevel("y", o)
|
|
1711
|
-
}), i.setZoomLevel(o),
|
|
1712
|
-
x: i.bounds.correctPan("x",
|
|
1713
|
-
y: i.bounds.correctPan("y",
|
|
1711
|
+
}), i.setZoomLevel(o), d = {
|
|
1712
|
+
x: i.bounds.correctPan("x", d.x),
|
|
1713
|
+
y: i.bounds.correctPan("y", d.y)
|
|
1714
1714
|
}, i.setZoomLevel(n);
|
|
1715
|
-
const
|
|
1716
|
-
if (!
|
|
1715
|
+
const h = !B(d, c);
|
|
1716
|
+
if (!h && !r && !l) {
|
|
1717
1717
|
i._setResolution(o), i.applyCurrentZoomPan();
|
|
1718
1718
|
return;
|
|
1719
1719
|
}
|
|
@@ -1725,14 +1725,14 @@ class De {
|
|
|
1725
1725
|
dampingRatio: 1,
|
|
1726
1726
|
naturalFrequency: 40,
|
|
1727
1727
|
onUpdate: (u) => {
|
|
1728
|
-
if (u /= 1e3,
|
|
1729
|
-
if (
|
|
1730
|
-
const
|
|
1731
|
-
i.setZoomLevel(
|
|
1728
|
+
if (u /= 1e3, h || r) {
|
|
1729
|
+
if (h && (i.pan.x = c.x + (d.x - c.x) * u, i.pan.y = c.y + (d.y - c.y) * u), r) {
|
|
1730
|
+
const p = n + (o - n) * u;
|
|
1731
|
+
i.setZoomLevel(p);
|
|
1732
1732
|
}
|
|
1733
1733
|
i.applyCurrentZoomPan();
|
|
1734
1734
|
}
|
|
1735
|
-
l && e.bgOpacity < 1 && e.applyBgOpacity(
|
|
1735
|
+
l && e.bgOpacity < 1 && e.applyBgOpacity(Z(a + (1 - a) * u, 0, 1));
|
|
1736
1736
|
},
|
|
1737
1737
|
onComplete: () => {
|
|
1738
1738
|
i._setResolution(o), i.applyCurrentZoomPan();
|
|
@@ -1740,11 +1740,11 @@ class De {
|
|
|
1740
1740
|
});
|
|
1741
1741
|
}
|
|
1742
1742
|
}
|
|
1743
|
-
function
|
|
1743
|
+
function ht(s) {
|
|
1744
1744
|
return !!/** @type {HTMLElement} */
|
|
1745
1745
|
s.target.closest(".pswp__container");
|
|
1746
1746
|
}
|
|
1747
|
-
class
|
|
1747
|
+
class Be {
|
|
1748
1748
|
/**
|
|
1749
1749
|
* @param {Gestures} gestures
|
|
1750
1750
|
*/
|
|
@@ -1767,14 +1767,14 @@ class Me {
|
|
|
1767
1767
|
* @param {PointerEvent} originalEvent
|
|
1768
1768
|
*/
|
|
1769
1769
|
tap(t, e) {
|
|
1770
|
-
|
|
1770
|
+
ht(e) && this._doClickOrTapAction("tap", t, e);
|
|
1771
1771
|
}
|
|
1772
1772
|
/**
|
|
1773
1773
|
* @param {Point} point
|
|
1774
1774
|
* @param {PointerEvent} originalEvent
|
|
1775
1775
|
*/
|
|
1776
1776
|
doubleTap(t, e) {
|
|
1777
|
-
|
|
1777
|
+
ht(e) && this._doClickOrTapAction("doubleTap", t, e);
|
|
1778
1778
|
}
|
|
1779
1779
|
/**
|
|
1780
1780
|
* @private
|
|
@@ -1818,8 +1818,8 @@ class Me {
|
|
|
1818
1818
|
}
|
|
1819
1819
|
}
|
|
1820
1820
|
}
|
|
1821
|
-
const
|
|
1822
|
-
class
|
|
1821
|
+
const Fe = 10, Ze = 300, ke = 25;
|
|
1822
|
+
class qe {
|
|
1823
1823
|
/**
|
|
1824
1824
|
* @param {PhotoSwipe} pswp
|
|
1825
1825
|
*/
|
|
@@ -1851,7 +1851,7 @@ class Fe {
|
|
|
1851
1851
|
}, this._intervalP1 = {
|
|
1852
1852
|
x: 0,
|
|
1853
1853
|
y: 0
|
|
1854
|
-
}, 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
|
|
1854
|
+
}, this._numActivePoints = 0, this._ongoingPointers = [], this._touchEventEnabled = "ontouchstart" in window, this._pointerEventEnabled = !!window.PointerEvent, this.supportsTouch = this._touchEventEnabled || this._pointerEventEnabled && navigator.maxTouchPoints > 1, this._numActivePoints = 0, this._intervalTime = 0, this._velocityCalculated = !1, this.isMultitouch = !1, this.isDragging = !1, this.isZooming = !1, this.raf = null, this._tapTimer = null, this.supportsTouch || (t.options.allowPanToNext = !1), this.drag = new De(this), this.zoomLevels = new Re(this), this.tapHandler = new Be(this), t.on("bindEvents", () => {
|
|
1855
1855
|
t.events.add(
|
|
1856
1856
|
t.scrollWrap,
|
|
1857
1857
|
"click",
|
|
@@ -1941,7 +1941,7 @@ class Fe {
|
|
|
1941
1941
|
* @private
|
|
1942
1942
|
*/
|
|
1943
1943
|
_rafRenderLoop() {
|
|
1944
|
-
(this.isDragging || this.isZooming) && (this._updateVelocity(), this.isDragging ?
|
|
1944
|
+
(this.isDragging || this.isZooming) && (this._updateVelocity(), this.isDragging ? B(this.p1, this.prevP1) || this.drag.change() : (!B(this.p1, this.prevP1) || !B(this.p2, this.prevP2)) && this.zoomLevels.change(), this._updatePrevPoints(), this.raf = requestAnimationFrame(this._rafRenderLoop.bind(this)));
|
|
1945
1945
|
}
|
|
1946
1946
|
/**
|
|
1947
1947
|
* Update velocity at 50ms interval
|
|
@@ -1971,8 +1971,8 @@ class Fe {
|
|
|
1971
1971
|
this.tapHandler.click(this.startP1, t);
|
|
1972
1972
|
return;
|
|
1973
1973
|
}
|
|
1974
|
-
const i = this.pswp.options.doubleTapAction ?
|
|
1975
|
-
this._tapTimer ? (this._clearTapTimer(),
|
|
1974
|
+
const i = this.pswp.options.doubleTapAction ? Ze : 0;
|
|
1975
|
+
this._tapTimer ? (this._clearTapTimer(), G(this._lastStartP1, this.startP1) < ke && this.tapHandler.doubleTap(this.startP1, t)) : (b(this._lastStartP1, this.startP1), this._tapTimer = setTimeout(() => {
|
|
1976
1976
|
this.tapHandler.tap(this.startP1, t), this._clearTapTimer();
|
|
1977
1977
|
}, i));
|
|
1978
1978
|
}
|
|
@@ -2058,7 +2058,7 @@ class Fe {
|
|
|
2058
2058
|
const t = Math.abs(this.p1.x - this.startP1.x) - Math.abs(this.p1.y - this.startP1.y);
|
|
2059
2059
|
if (t !== 0) {
|
|
2060
2060
|
const e = t > 0 ? "x" : "y";
|
|
2061
|
-
Math.abs(this.p1[e] - this.startP1[e]) >=
|
|
2061
|
+
Math.abs(this.p1[e] - this.startP1[e]) >= Fe && (this.dragAxis = e);
|
|
2062
2062
|
}
|
|
2063
2063
|
}
|
|
2064
2064
|
}
|
|
@@ -2082,8 +2082,8 @@ class Fe {
|
|
|
2082
2082
|
this.pswp.mainScroll.isShifted() && (t.preventDefault(), t.stopPropagation());
|
|
2083
2083
|
}
|
|
2084
2084
|
}
|
|
2085
|
-
const
|
|
2086
|
-
class
|
|
2085
|
+
const Ne = 0.35;
|
|
2086
|
+
class He {
|
|
2087
2087
|
/**
|
|
2088
2088
|
* @param {PhotoSwipe} pswp
|
|
2089
2089
|
*/
|
|
@@ -2101,7 +2101,7 @@ class ke {
|
|
|
2101
2101
|
pswp: e
|
|
2102
2102
|
} = this, i = Math.round(e.viewportSize.x + e.viewportSize.x * e.options.spacing), n = i !== this.slideWidth;
|
|
2103
2103
|
n && (this.slideWidth = i, this.moveTo(this.getCurrSlideX())), this.itemHolders.forEach((o, r) => {
|
|
2104
|
-
n &&
|
|
2104
|
+
n && P(o.el, (r + this._containerShiftIndex) * this.slideWidth), t && o.slide && o.slide.resize();
|
|
2105
2105
|
});
|
|
2106
2106
|
}
|
|
2107
2107
|
/**
|
|
@@ -2117,7 +2117,7 @@ class ke {
|
|
|
2117
2117
|
appendHolders() {
|
|
2118
2118
|
this.itemHolders = [];
|
|
2119
2119
|
for (let t = 0; t < 3; t++) {
|
|
2120
|
-
const e =
|
|
2120
|
+
const e = A("pswp__item", "div", this.pswp.container);
|
|
2121
2121
|
e.setAttribute("role", "group"), e.setAttribute("aria-roledescription", "slide"), e.setAttribute("aria-hidden", "true"), e.style.display = t === 1 ? "block" : "none", this.itemHolders.push({
|
|
2122
2122
|
el: e
|
|
2123
2123
|
//index: -1
|
|
@@ -2220,7 +2220,7 @@ class ke {
|
|
|
2220
2220
|
(a = r.slide) === null || a === void 0 || a.destroy(), r.slide = void 0;
|
|
2221
2221
|
}));
|
|
2222
2222
|
for (let r = 0; r < n; r++)
|
|
2223
|
-
i > 0 ? (o = this.itemHolders.shift(), o && (this.itemHolders[2] = o, this._containerShiftIndex++,
|
|
2223
|
+
i > 0 ? (o = this.itemHolders.shift(), o && (this.itemHolders[2] = o, this._containerShiftIndex++, P(o.el, (this._containerShiftIndex + 2) * this.slideWidth), e.setContent(o, e.currIndex - n + r + 2))) : (o = this.itemHolders.pop(), o && (this.itemHolders.unshift(o), this._containerShiftIndex--, P(o.el, this._containerShiftIndex * this.slideWidth), e.setContent(o, e.currIndex + n - r - 2)));
|
|
2224
2224
|
Math.abs(this._containerShiftIndex) > 50 && !this.isShifted() && (this.resetPosition(), this.resize()), e.animations.stopAllPan(), this.itemHolders.forEach((r, a) => {
|
|
2225
2225
|
r.slide && r.slide.setIsActive(a === 1);
|
|
2226
2226
|
}), e.currSlide = (t = this.itemHolders[1]) === null || t === void 0 ? void 0 : t.slide, e.contentLoader.updateLazy(i), e.currSlide && e.currSlide.applyCurrentZoomPan(), e.dispatch("change");
|
|
@@ -2236,15 +2236,15 @@ class ke {
|
|
|
2236
2236
|
let i = (this.slideWidth * this._currPositionIndex - t) / this.slideWidth;
|
|
2237
2237
|
i += this.pswp.currIndex;
|
|
2238
2238
|
const n = Math.round(t - this.x);
|
|
2239
|
-
(i < 0 && n > 0 || i >= this.pswp.getNumItems() - 1 && n < 0) && (t = this.x + n *
|
|
2239
|
+
(i < 0 && n > 0 || i >= this.pswp.getNumItems() - 1 && n < 0) && (t = this.x + n * Ne);
|
|
2240
2240
|
}
|
|
2241
|
-
this.x = t, this.pswp.container &&
|
|
2241
|
+
this.x = t, this.pswp.container && P(this.pswp.container, t), this.pswp.dispatch("moveMainScroll", {
|
|
2242
2242
|
x: t,
|
|
2243
2243
|
dragging: e ?? !1
|
|
2244
2244
|
});
|
|
2245
2245
|
}
|
|
2246
2246
|
}
|
|
2247
|
-
const
|
|
2247
|
+
const We = {
|
|
2248
2248
|
Escape: 27,
|
|
2249
2249
|
z: 90,
|
|
2250
2250
|
ArrowLeft: 37,
|
|
@@ -2252,8 +2252,8 @@ const Be = {
|
|
|
2252
2252
|
ArrowRight: 39,
|
|
2253
2253
|
ArrowDown: 40,
|
|
2254
2254
|
Tab: 9
|
|
2255
|
-
},
|
|
2256
|
-
class
|
|
2255
|
+
}, C = (s, t) => t ? s : We[s];
|
|
2256
|
+
class Ve {
|
|
2257
2257
|
/**
|
|
2258
2258
|
* @param {PhotoSwipe} pswp
|
|
2259
2259
|
*/
|
|
@@ -2293,30 +2293,30 @@ class Ne {
|
|
|
2293
2293
|
} = this;
|
|
2294
2294
|
if (e.dispatch("keydown", {
|
|
2295
2295
|
originalEvent: t
|
|
2296
|
-
}).defaultPrevented ||
|
|
2296
|
+
}).defaultPrevented || Ee(t))
|
|
2297
2297
|
return;
|
|
2298
2298
|
let i, n, o = !1;
|
|
2299
2299
|
const r = "key" in t;
|
|
2300
2300
|
switch (r ? t.key : t.keyCode) {
|
|
2301
|
-
case
|
|
2301
|
+
case C("Escape", r):
|
|
2302
2302
|
e.options.escKey && (i = "close");
|
|
2303
2303
|
break;
|
|
2304
|
-
case
|
|
2304
|
+
case C("z", r):
|
|
2305
2305
|
i = "toggleZoom";
|
|
2306
2306
|
break;
|
|
2307
|
-
case
|
|
2307
|
+
case C("ArrowLeft", r):
|
|
2308
2308
|
n = "x";
|
|
2309
2309
|
break;
|
|
2310
|
-
case
|
|
2310
|
+
case C("ArrowUp", r):
|
|
2311
2311
|
n = "y";
|
|
2312
2312
|
break;
|
|
2313
|
-
case
|
|
2313
|
+
case C("ArrowRight", r):
|
|
2314
2314
|
n = "x", o = !0;
|
|
2315
2315
|
break;
|
|
2316
|
-
case
|
|
2316
|
+
case C("ArrowDown", r):
|
|
2317
2317
|
o = !0, n = "y";
|
|
2318
2318
|
break;
|
|
2319
|
-
case
|
|
2319
|
+
case C("Tab", r):
|
|
2320
2320
|
this._focusRoot();
|
|
2321
2321
|
break;
|
|
2322
2322
|
}
|
|
@@ -2345,8 +2345,8 @@ class Ne {
|
|
|
2345
2345
|
) && e.focus();
|
|
2346
2346
|
}
|
|
2347
2347
|
}
|
|
2348
|
-
const
|
|
2349
|
-
class
|
|
2348
|
+
const je = "cubic-bezier(.4,0,.22,1)";
|
|
2349
|
+
class Ge {
|
|
2350
2350
|
/**
|
|
2351
2351
|
* onComplete can be unpredictable, be careful about current state
|
|
2352
2352
|
*
|
|
@@ -2362,15 +2362,15 @@ class We {
|
|
|
2362
2362
|
onFinish: r = () => {
|
|
2363
2363
|
},
|
|
2364
2364
|
duration: a = 333,
|
|
2365
|
-
easing: l =
|
|
2365
|
+
easing: l = je
|
|
2366
2366
|
} = t;
|
|
2367
2367
|
this.onFinish = r;
|
|
2368
|
-
const c = o ? "transform" : "opacity",
|
|
2368
|
+
const c = o ? "transform" : "opacity", d = (e = t[c]) !== null && e !== void 0 ? e : "";
|
|
2369
2369
|
this._target = i, this._onComplete = n, this._finished = !1, this._onTransitionEnd = this._onTransitionEnd.bind(this), this._helperTimeout = setTimeout(() => {
|
|
2370
|
-
|
|
2370
|
+
Et(i, c, a, l), this._helperTimeout = setTimeout(() => {
|
|
2371
2371
|
i.addEventListener("transitionend", this._onTransitionEnd, !1), i.addEventListener("transitioncancel", this._onTransitionEnd, !1), this._helperTimeout = setTimeout(() => {
|
|
2372
2372
|
this._finalizeAnimation();
|
|
2373
|
-
}, a + 500), i.style[c] =
|
|
2373
|
+
}, a + 500), i.style[c] = d;
|
|
2374
2374
|
}, 30);
|
|
2375
2375
|
}, 0);
|
|
2376
2376
|
}
|
|
@@ -2389,11 +2389,11 @@ class We {
|
|
|
2389
2389
|
}
|
|
2390
2390
|
// Destroy is called automatically onFinish
|
|
2391
2391
|
destroy() {
|
|
2392
|
-
this._helperTimeout && clearTimeout(this._helperTimeout),
|
|
2392
|
+
this._helperTimeout && clearTimeout(this._helperTimeout), Le(this._target), this._target.removeEventListener("transitionend", this._onTransitionEnd, !1), this._target.removeEventListener("transitioncancel", this._onTransitionEnd, !1), this._finished || this._finalizeAnimation();
|
|
2393
2393
|
}
|
|
2394
2394
|
}
|
|
2395
|
-
const
|
|
2396
|
-
class
|
|
2395
|
+
const Ue = 12, Ke = 0.75;
|
|
2396
|
+
class Xe {
|
|
2397
2397
|
/**
|
|
2398
2398
|
* @param {number} initialVelocity Initial velocity, px per ms.
|
|
2399
2399
|
*
|
|
@@ -2410,7 +2410,7 @@ class Ge {
|
|
|
2410
2410
|
* Recommended value from 10 to 50
|
|
2411
2411
|
*/
|
|
2412
2412
|
constructor(t, e, i) {
|
|
2413
|
-
this.velocity = t * 1e3, this._dampingRatio = e ||
|
|
2413
|
+
this.velocity = t * 1e3, this._dampingRatio = e || Ke, this._naturalFrequency = i || Ue, this._dampedFrequency = this._naturalFrequency, this._dampingRatio < 1 && (this._dampedFrequency *= Math.sqrt(1 - this._dampingRatio * this._dampingRatio));
|
|
2414
2414
|
}
|
|
2415
2415
|
/**
|
|
2416
2416
|
* @param {number} deltaPosition Difference between current and end position of the animation
|
|
@@ -2432,7 +2432,7 @@ class Ge {
|
|
|
2432
2432
|
return i;
|
|
2433
2433
|
}
|
|
2434
2434
|
}
|
|
2435
|
-
class
|
|
2435
|
+
class Ye {
|
|
2436
2436
|
/**
|
|
2437
2437
|
* @param {SpringAnimationProps} props
|
|
2438
2438
|
*/
|
|
@@ -2450,19 +2450,19 @@ class Ue {
|
|
|
2450
2450
|
naturalFrequency: c
|
|
2451
2451
|
} = t;
|
|
2452
2452
|
this.onFinish = a;
|
|
2453
|
-
const
|
|
2454
|
-
let
|
|
2455
|
-
const
|
|
2456
|
-
this._raf && (u =
|
|
2453
|
+
const d = new Xe(n, l, c);
|
|
2454
|
+
let h = Date.now(), u = e - i;
|
|
2455
|
+
const p = () => {
|
|
2456
|
+
this._raf && (u = d.easeFrame(u, Date.now() - h), Math.abs(u) < 1 && Math.abs(d.velocity) < 50 ? (o(i), r && r(), this.onFinish()) : (h = Date.now(), o(u + i), this._raf = requestAnimationFrame(p)));
|
|
2457
2457
|
};
|
|
2458
|
-
this._raf = requestAnimationFrame(
|
|
2458
|
+
this._raf = requestAnimationFrame(p);
|
|
2459
2459
|
}
|
|
2460
2460
|
// Destroy is called automatically onFinish
|
|
2461
2461
|
destroy() {
|
|
2462
2462
|
this._raf >= 0 && cancelAnimationFrame(this._raf), this._raf = 0;
|
|
2463
2463
|
}
|
|
2464
2464
|
}
|
|
2465
|
-
class
|
|
2465
|
+
class Je {
|
|
2466
2466
|
constructor() {
|
|
2467
2467
|
this.activeAnimations = [];
|
|
2468
2468
|
}
|
|
@@ -2485,10 +2485,10 @@ class Ke {
|
|
|
2485
2485
|
* @returns {Animation}
|
|
2486
2486
|
*/
|
|
2487
2487
|
_start(t, e) {
|
|
2488
|
-
const i = e ? new
|
|
2488
|
+
const i = e ? new Ye(
|
|
2489
2489
|
/** @type SpringAnimationProps */
|
|
2490
2490
|
t
|
|
2491
|
-
) : new
|
|
2491
|
+
) : new Ge(
|
|
2492
2492
|
/** @type CssAnimationProps */
|
|
2493
2493
|
t
|
|
2494
2494
|
);
|
|
@@ -2531,7 +2531,7 @@ class Ke {
|
|
|
2531
2531
|
return this.activeAnimations.some((t) => t.props.isPan);
|
|
2532
2532
|
}
|
|
2533
2533
|
}
|
|
2534
|
-
class
|
|
2534
|
+
class Qe {
|
|
2535
2535
|
/**
|
|
2536
2536
|
* @param {PhotoSwipe} pswp
|
|
2537
2537
|
*/
|
|
@@ -2573,7 +2573,7 @@ class Xe {
|
|
|
2573
2573
|
e.isPannable() && (t.deltaMode === 1 && (i *= 18, n *= 18), e.panTo(e.pan.x - i, e.pan.y - n));
|
|
2574
2574
|
}
|
|
2575
2575
|
}
|
|
2576
|
-
function
|
|
2576
|
+
function ti(s) {
|
|
2577
2577
|
if (typeof s == "string")
|
|
2578
2578
|
return s;
|
|
2579
2579
|
if (!s || !s.isCustomSVG)
|
|
@@ -2585,7 +2585,7 @@ function Ye(s) {
|
|
|
2585
2585
|
t.size || 32
|
|
2586
2586
|
), t.outlineID && (e += '<use class="pswp__icn-shadow" xlink:href="#' + t.outlineID + '"/>'), e += t.inner, e += "</svg>", e;
|
|
2587
2587
|
}
|
|
2588
|
-
class
|
|
2588
|
+
class ei {
|
|
2589
2589
|
/**
|
|
2590
2590
|
* @param {PhotoSwipe} pswp
|
|
2591
2591
|
* @param {UIElementData} data
|
|
@@ -2604,33 +2604,33 @@ class Qe {
|
|
|
2604
2604
|
let a = e.isButton ? e.tagName || "button" : e.tagName || "div";
|
|
2605
2605
|
a = /** @type {keyof HTMLElementTagNameMap} */
|
|
2606
2606
|
a.toLowerCase();
|
|
2607
|
-
const l =
|
|
2607
|
+
const l = A(r, a);
|
|
2608
2608
|
if (e.isButton) {
|
|
2609
2609
|
a === "button" && (l.type = "button");
|
|
2610
2610
|
let {
|
|
2611
|
-
title:
|
|
2611
|
+
title: h
|
|
2612
2612
|
} = e;
|
|
2613
2613
|
const {
|
|
2614
2614
|
ariaLabel: u
|
|
2615
2615
|
} = e;
|
|
2616
|
-
typeof t.options[n + "Title"] == "string" && (
|
|
2617
|
-
const
|
|
2618
|
-
|
|
2616
|
+
typeof t.options[n + "Title"] == "string" && (h = t.options[n + "Title"]), h && (l.title = h);
|
|
2617
|
+
const p = u || h;
|
|
2618
|
+
p && l.setAttribute("aria-label", p);
|
|
2619
2619
|
}
|
|
2620
|
-
l.innerHTML =
|
|
2621
|
-
typeof e.onClick == "string" ? t[e.onClick]() : typeof e.onClick == "function" && e.onClick(
|
|
2620
|
+
l.innerHTML = ti(o), e.onInit && e.onInit(l, t), e.onClick && (l.onclick = (h) => {
|
|
2621
|
+
typeof e.onClick == "string" ? t[e.onClick]() : typeof e.onClick == "function" && e.onClick(h, l, t);
|
|
2622
2622
|
});
|
|
2623
2623
|
const c = e.appendTo || "bar";
|
|
2624
|
-
let
|
|
2625
|
-
c === "bar" ? (t.topBar || (t.topBar =
|
|
2624
|
+
let d = t.element;
|
|
2625
|
+
c === "bar" ? (t.topBar || (t.topBar = A("pswp__top-bar pswp__hide-on-close", "div", t.scrollWrap)), d = t.topBar) : (l.classList.add("pswp__hide-on-close"), c === "wrapper" && (d = t.scrollWrap)), (i = d) === null || i === void 0 || i.appendChild(t.applyFilters("uiElement", l, e));
|
|
2626
2626
|
}
|
|
2627
2627
|
}
|
|
2628
|
-
function
|
|
2628
|
+
function It(s, t, e) {
|
|
2629
2629
|
s.classList.add("pswp__button--arrow"), s.setAttribute("aria-controls", "pswp__items"), t.on("change", () => {
|
|
2630
2630
|
t.options.loop || (e ? s.disabled = !(t.currIndex < t.getNumItems() - 1) : s.disabled = !(t.currIndex > 0));
|
|
2631
2631
|
});
|
|
2632
2632
|
}
|
|
2633
|
-
const
|
|
2633
|
+
const ii = {
|
|
2634
2634
|
name: "arrowPrev",
|
|
2635
2635
|
className: "pswp__button--arrow--prev",
|
|
2636
2636
|
title: "Previous",
|
|
@@ -2644,8 +2644,8 @@ const Je = {
|
|
|
2644
2644
|
outlineID: "pswp__icn-arrow"
|
|
2645
2645
|
},
|
|
2646
2646
|
onClick: "prev",
|
|
2647
|
-
onInit:
|
|
2648
|
-
},
|
|
2647
|
+
onInit: It
|
|
2648
|
+
}, si = {
|
|
2649
2649
|
name: "arrowNext",
|
|
2650
2650
|
className: "pswp__button--arrow--next",
|
|
2651
2651
|
title: "Next",
|
|
@@ -2660,9 +2660,9 @@ const Je = {
|
|
|
2660
2660
|
},
|
|
2661
2661
|
onClick: "next",
|
|
2662
2662
|
onInit: (s, t) => {
|
|
2663
|
-
|
|
2663
|
+
It(s, t, !0);
|
|
2664
2664
|
}
|
|
2665
|
-
},
|
|
2665
|
+
}, ni = {
|
|
2666
2666
|
name: "close",
|
|
2667
2667
|
title: "Close",
|
|
2668
2668
|
order: 20,
|
|
@@ -2673,7 +2673,7 @@ const Je = {
|
|
|
2673
2673
|
outlineID: "pswp__icn-close"
|
|
2674
2674
|
},
|
|
2675
2675
|
onClick: "close"
|
|
2676
|
-
},
|
|
2676
|
+
}, oi = {
|
|
2677
2677
|
name: "zoom",
|
|
2678
2678
|
title: "Zoom",
|
|
2679
2679
|
order: 10,
|
|
@@ -2685,7 +2685,7 @@ const Je = {
|
|
|
2685
2685
|
outlineID: "pswp__icn-zoom"
|
|
2686
2686
|
},
|
|
2687
2687
|
onClick: "toggleZoom"
|
|
2688
|
-
},
|
|
2688
|
+
}, ri = {
|
|
2689
2689
|
name: "preloader",
|
|
2690
2690
|
appendTo: "bar",
|
|
2691
2691
|
order: 7,
|
|
@@ -2716,7 +2716,7 @@ const Je = {
|
|
|
2716
2716
|
t.currSlide === a.slide && r();
|
|
2717
2717
|
}), t.ui && (t.ui.updatePreloaderVisibility = r);
|
|
2718
2718
|
}
|
|
2719
|
-
},
|
|
2719
|
+
}, ai = {
|
|
2720
2720
|
name: "counter",
|
|
2721
2721
|
order: 5,
|
|
2722
2722
|
onInit: (s, t) => {
|
|
@@ -2725,10 +2725,10 @@ const Je = {
|
|
|
2725
2725
|
});
|
|
2726
2726
|
}
|
|
2727
2727
|
};
|
|
2728
|
-
function
|
|
2728
|
+
function ut(s, t) {
|
|
2729
2729
|
s.classList.toggle("pswp--zoomed-in", t);
|
|
2730
2730
|
}
|
|
2731
|
-
class
|
|
2731
|
+
class li {
|
|
2732
2732
|
/**
|
|
2733
2733
|
* @param {PhotoSwipe} pswp
|
|
2734
2734
|
*/
|
|
@@ -2740,7 +2740,7 @@ class oi {
|
|
|
2740
2740
|
const {
|
|
2741
2741
|
pswp: t
|
|
2742
2742
|
} = this;
|
|
2743
|
-
this.isRegistered = !1, this.uiElementsData = [
|
|
2743
|
+
this.isRegistered = !1, this.uiElementsData = [ni, ii, si, oi, ri, ai], t.dispatch("uiRegister"), this.uiElementsData.sort((e, i) => (e.order || 0) - (i.order || 0)), this.items = [], this.isRegistered = !0, this.uiElementsData.forEach((e) => {
|
|
2744
2744
|
this.registerElement(e);
|
|
2745
2745
|
}), t.on("change", () => {
|
|
2746
2746
|
var e;
|
|
@@ -2751,7 +2751,7 @@ class oi {
|
|
|
2751
2751
|
* @param {UIElementData} elementData
|
|
2752
2752
|
*/
|
|
2753
2753
|
registerElement(t) {
|
|
2754
|
-
this.isRegistered ? this.items.push(new
|
|
2754
|
+
this.isRegistered ? this.items.push(new ei(this.pswp, t)) : this.uiElementsData.push(t);
|
|
2755
2755
|
}
|
|
2756
2756
|
/**
|
|
2757
2757
|
* Fired each time zoom or pan position is changed.
|
|
@@ -2775,15 +2775,15 @@ class oi {
|
|
|
2775
2775
|
this._lastUpdatedZoomLevel = n;
|
|
2776
2776
|
const o = e.zoomLevels.initial - e.zoomLevels.secondary;
|
|
2777
2777
|
if (Math.abs(o) < 0.01 || !e.isZoomable()) {
|
|
2778
|
-
|
|
2778
|
+
ut(t, !1), t.classList.remove("pswp--zoom-allowed");
|
|
2779
2779
|
return;
|
|
2780
2780
|
}
|
|
2781
2781
|
t.classList.add("pswp--zoom-allowed");
|
|
2782
2782
|
const r = n === e.zoomLevels.initial ? e.zoomLevels.secondary : e.zoomLevels.initial;
|
|
2783
|
-
|
|
2783
|
+
ut(t, r <= n), (i.imageClickAction === "zoom" || i.imageClickAction === "zoom-or-close") && t.classList.add("pswp--click-to-zoom");
|
|
2784
2784
|
}
|
|
2785
2785
|
}
|
|
2786
|
-
function
|
|
2786
|
+
function ci(s) {
|
|
2787
2787
|
const t = s.getBoundingClientRect();
|
|
2788
2788
|
return {
|
|
2789
2789
|
x: t.left,
|
|
@@ -2791,7 +2791,7 @@ function ri(s) {
|
|
|
2791
2791
|
w: t.width
|
|
2792
2792
|
};
|
|
2793
2793
|
}
|
|
2794
|
-
function
|
|
2794
|
+
function di(s, t, e) {
|
|
2795
2795
|
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 = {
|
|
2796
2796
|
x: i.left + a,
|
|
2797
2797
|
y: i.top + l,
|
|
@@ -2804,7 +2804,7 @@ function ai(s, t, e) {
|
|
|
2804
2804
|
y: l
|
|
2805
2805
|
}, c;
|
|
2806
2806
|
}
|
|
2807
|
-
function
|
|
2807
|
+
function hi(s, t, e) {
|
|
2808
2808
|
const i = e.dispatch("thumbBounds", {
|
|
2809
2809
|
index: s,
|
|
2810
2810
|
itemData: t,
|
|
@@ -2823,9 +2823,9 @@ function li(s, t, e) {
|
|
|
2823
2823
|
n.querySelector(a)
|
|
2824
2824
|
);
|
|
2825
2825
|
}
|
|
2826
|
-
return r = e.applyFilters("thumbEl", r, t, s), r && (t.thumbCropped ? o =
|
|
2826
|
+
return r = e.applyFilters("thumbEl", r, t, s), r && (t.thumbCropped ? o = di(r, t.width || t.w || 0, t.height || t.h || 0) : o = ci(r)), e.applyFilters("thumbBounds", o, t, s);
|
|
2827
2827
|
}
|
|
2828
|
-
let
|
|
2828
|
+
let ui = class {
|
|
2829
2829
|
/**
|
|
2830
2830
|
* @param {T} type
|
|
2831
2831
|
* @param {PhotoSwipeEventsMap[T]} [details]
|
|
@@ -2836,7 +2836,7 @@ let ci = class {
|
|
|
2836
2836
|
preventDefault() {
|
|
2837
2837
|
this.defaultPrevented = !0;
|
|
2838
2838
|
}
|
|
2839
|
-
},
|
|
2839
|
+
}, pi = class {
|
|
2840
2840
|
constructor() {
|
|
2841
2841
|
this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
|
|
2842
2842
|
}
|
|
@@ -2903,19 +2903,19 @@ let ci = class {
|
|
|
2903
2903
|
return this.pswp.dispatch(t, e);
|
|
2904
2904
|
const n = (
|
|
2905
2905
|
/** @type {AugmentedEvent<T>} */
|
|
2906
|
-
new
|
|
2906
|
+
new ui(t, e)
|
|
2907
2907
|
);
|
|
2908
2908
|
return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
|
|
2909
2909
|
o.call(this, n);
|
|
2910
2910
|
}), n;
|
|
2911
2911
|
}
|
|
2912
|
-
},
|
|
2912
|
+
}, mi = class {
|
|
2913
2913
|
/**
|
|
2914
2914
|
* @param {string | false} imageSrc
|
|
2915
2915
|
* @param {HTMLElement} container
|
|
2916
2916
|
*/
|
|
2917
2917
|
constructor(t, e) {
|
|
2918
|
-
if (this.element =
|
|
2918
|
+
if (this.element = A("pswp__img pswp__img--placeholder", t ? "img" : "div", e), t) {
|
|
2919
2919
|
const i = (
|
|
2920
2920
|
/** @type {HTMLImageElement} */
|
|
2921
2921
|
this.element
|
|
@@ -2929,13 +2929,13 @@ let ci = class {
|
|
|
2929
2929
|
* @param {number} height
|
|
2930
2930
|
*/
|
|
2931
2931
|
setDisplayedSize(t, e) {
|
|
2932
|
-
this.element && (this.element.tagName === "IMG" ? (
|
|
2932
|
+
this.element && (this.element.tagName === "IMG" ? (U(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = F(0, 0, t / 250)) : U(this.element, t, e));
|
|
2933
2933
|
}
|
|
2934
2934
|
destroy() {
|
|
2935
2935
|
var t;
|
|
2936
2936
|
(t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
|
|
2937
2937
|
}
|
|
2938
|
-
},
|
|
2938
|
+
}, fi = class {
|
|
2939
2939
|
/**
|
|
2940
2940
|
* @param {SlideData} itemData Slide data
|
|
2941
2941
|
* @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
|
|
@@ -2970,12 +2970,12 @@ let ci = class {
|
|
|
2970
2970
|
this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
|
|
2971
2971
|
this
|
|
2972
2972
|
);
|
|
2973
|
-
this.placeholder = new
|
|
2973
|
+
this.placeholder = new mi(i, this.slide.container);
|
|
2974
2974
|
}
|
|
2975
2975
|
this.element && !e || this.instance.dispatch("contentLoad", {
|
|
2976
2976
|
content: this,
|
|
2977
2977
|
isLazy: t
|
|
2978
|
-
}).defaultPrevented || (this.isImageContent() ? (this.element =
|
|
2978
|
+
}).defaultPrevented || (this.isImageContent() ? (this.element = A("pswp__img", "img"), this.displayedImageWidth && this.loadImage(t)) : (this.element = A("pswp__content", "div"), this.element.innerHTML = this.data.html || ""), e && this.slide && this.slide.updateContentSize(!0));
|
|
2979
2979
|
}
|
|
2980
2980
|
/**
|
|
2981
2981
|
* Preload image
|
|
@@ -3058,7 +3058,7 @@ let ci = class {
|
|
|
3058
3058
|
content: this,
|
|
3059
3059
|
width: t,
|
|
3060
3060
|
height: e
|
|
3061
|
-
}).defaultPrevented && (
|
|
3061
|
+
}).defaultPrevented && (U(this.element, t, e), this.isImageContent() && !this.isError()))) {
|
|
3062
3062
|
const i = !this.displayedImageWidth && t;
|
|
3063
3063
|
this.displayedImageWidth = t, this.displayedImageHeight = e, i ? this.loadImage(!1) : this.updateSrcsetSizes(), this.slide && this.instance.dispatch("imageSizeChange", {
|
|
3064
3064
|
slide: this.slide,
|
|
@@ -3120,9 +3120,9 @@ let ci = class {
|
|
|
3120
3120
|
displayError() {
|
|
3121
3121
|
if (this.slide) {
|
|
3122
3122
|
var t, e;
|
|
3123
|
-
let i =
|
|
3123
|
+
let i = A("pswp__error-msg", "div");
|
|
3124
3124
|
i.innerText = (t = (e = this.instance.options) === null || e === void 0 ? void 0 : e.errorMsg) !== null && t !== void 0 ? t : "", i = /** @type {HTMLDivElement} */
|
|
3125
|
-
this.instance.applyFilters("contentErrorElement", i, this), this.element =
|
|
3125
|
+
this.instance.applyFilters("contentErrorElement", i, this), this.element = A("pswp__content pswp__error-msg-container", "div"), this.element.appendChild(i), this.slide.container.innerText = "", this.slide.container.appendChild(this.element), this.slide.updateContentSize(!0), this.removePlaceholder();
|
|
3126
3126
|
}
|
|
3127
3127
|
}
|
|
3128
3128
|
/**
|
|
@@ -3140,7 +3140,7 @@ let ci = class {
|
|
|
3140
3140
|
}).defaultPrevented)
|
|
3141
3141
|
return;
|
|
3142
3142
|
const t = "decode" in this.element;
|
|
3143
|
-
this.isImageContent() ? t && this.slide && (!this.slide.isActive ||
|
|
3143
|
+
this.isImageContent() ? t && this.slide && (!this.slide.isActive || rt()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
|
|
3144
3144
|
}).finally(() => {
|
|
3145
3145
|
this.isDecoding = !1, this.appendImage();
|
|
3146
3146
|
})) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element);
|
|
@@ -3153,7 +3153,7 @@ let ci = class {
|
|
|
3153
3153
|
activate() {
|
|
3154
3154
|
this.instance.dispatch("contentActivate", {
|
|
3155
3155
|
content: this
|
|
3156
|
-
}).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !
|
|
3156
|
+
}).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"));
|
|
3157
3157
|
}
|
|
3158
3158
|
/**
|
|
3159
3159
|
* Deactivate the content
|
|
@@ -3180,36 +3180,36 @@ let ci = class {
|
|
|
3180
3180
|
}).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === E.LOADED || this.state === E.ERROR) && this.removePlaceholder()));
|
|
3181
3181
|
}
|
|
3182
3182
|
};
|
|
3183
|
-
const
|
|
3184
|
-
function
|
|
3183
|
+
const gi = 5;
|
|
3184
|
+
function zt(s, t, e) {
|
|
3185
3185
|
const i = t.createContentFromData(s, e);
|
|
3186
3186
|
let n;
|
|
3187
3187
|
const {
|
|
3188
3188
|
options: o
|
|
3189
3189
|
} = t;
|
|
3190
3190
|
if (o) {
|
|
3191
|
-
n = new
|
|
3191
|
+
n = new Tt(o, s, -1);
|
|
3192
3192
|
let r;
|
|
3193
|
-
t.pswp ? r = t.pswp.viewportSize : r =
|
|
3194
|
-
const a =
|
|
3193
|
+
t.pswp ? r = t.pswp.viewportSize : r = Ct(o, t);
|
|
3194
|
+
const a = Pt(o, r, s, e);
|
|
3195
3195
|
n.update(i.width, i.height, a);
|
|
3196
3196
|
}
|
|
3197
3197
|
return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
|
|
3198
3198
|
}
|
|
3199
|
-
function
|
|
3199
|
+
function vi(s, t) {
|
|
3200
3200
|
const e = t.getItemData(s);
|
|
3201
3201
|
if (!t.dispatch("lazyLoadSlide", {
|
|
3202
3202
|
index: s,
|
|
3203
3203
|
itemData: e
|
|
3204
3204
|
}).defaultPrevented)
|
|
3205
|
-
return
|
|
3205
|
+
return zt(e, t, s);
|
|
3206
3206
|
}
|
|
3207
|
-
class
|
|
3207
|
+
class yi {
|
|
3208
3208
|
/**
|
|
3209
3209
|
* @param {PhotoSwipe} pswp
|
|
3210
3210
|
*/
|
|
3211
3211
|
constructor(t) {
|
|
3212
|
-
this.pswp = t, this.limit = Math.max(t.options.preload[0] + t.options.preload[1] + 1,
|
|
3212
|
+
this.pswp = t, this.limit = Math.max(t.options.preload[0] + t.options.preload[1] + 1, gi), this._cachedItems = [];
|
|
3213
3213
|
}
|
|
3214
3214
|
/**
|
|
3215
3215
|
* Lazy load nearby slides based on `preload` option.
|
|
@@ -3237,7 +3237,7 @@ class fi {
|
|
|
3237
3237
|
loadSlideByIndex(t) {
|
|
3238
3238
|
const e = this.pswp.getLoopedIndex(t);
|
|
3239
3239
|
let i = this.getContentByIndex(e);
|
|
3240
|
-
i || (i =
|
|
3240
|
+
i || (i = vi(e, this.pswp), i && this.addToCache(i));
|
|
3241
3241
|
}
|
|
3242
3242
|
/**
|
|
3243
3243
|
* @param {Slide} slide
|
|
@@ -3276,7 +3276,7 @@ class fi {
|
|
|
3276
3276
|
this._cachedItems.forEach((t) => t.destroy()), this._cachedItems = [];
|
|
3277
3277
|
}
|
|
3278
3278
|
}
|
|
3279
|
-
let
|
|
3279
|
+
let _i = class extends pi {
|
|
3280
3280
|
/**
|
|
3281
3281
|
* Get total number of slides
|
|
3282
3282
|
*
|
|
@@ -3299,7 +3299,7 @@ let gi = class extends hi {
|
|
|
3299
3299
|
* @returns {Content}
|
|
3300
3300
|
*/
|
|
3301
3301
|
createContentFromData(t, e) {
|
|
3302
|
-
return new
|
|
3302
|
+
return new fi(t, this, e);
|
|
3303
3303
|
}
|
|
3304
3304
|
/**
|
|
3305
3305
|
* Get item data by index.
|
|
@@ -3333,7 +3333,7 @@ let gi = class extends hi {
|
|
|
3333
3333
|
*/
|
|
3334
3334
|
_getGalleryDOMElements(t) {
|
|
3335
3335
|
var e, i;
|
|
3336
|
-
return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ?
|
|
3336
|
+
return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? xe(this.options.children, this.options.childSelector, t) || [] : [t];
|
|
3337
3337
|
}
|
|
3338
3338
|
/**
|
|
3339
3339
|
* Converts DOM element to item data object.
|
|
@@ -3367,11 +3367,11 @@ let gi = class extends hi {
|
|
|
3367
3367
|
* @returns {Content} Image that is being decoded or false.
|
|
3368
3368
|
*/
|
|
3369
3369
|
lazyLoadData(t, e) {
|
|
3370
|
-
return
|
|
3370
|
+
return zt(t, this, e);
|
|
3371
3371
|
}
|
|
3372
3372
|
};
|
|
3373
3373
|
const z = 3e-3;
|
|
3374
|
-
class
|
|
3374
|
+
class wi {
|
|
3375
3375
|
/**
|
|
3376
3376
|
* @param {PhotoSwipe} pswp
|
|
3377
3377
|
*/
|
|
@@ -3424,7 +3424,7 @@ class vi {
|
|
|
3424
3424
|
_start() {
|
|
3425
3425
|
this.isOpening && this._useAnimation && this._placeholder && this._placeholder.tagName === "IMG" ? new Promise((t) => {
|
|
3426
3426
|
let e = !1, i = !0;
|
|
3427
|
-
|
|
3427
|
+
Ae(
|
|
3428
3428
|
/** @type {HTMLImageElement} */
|
|
3429
3429
|
this._placeholder
|
|
3430
3430
|
).finally(() => {
|
|
@@ -3487,7 +3487,7 @@ class vi {
|
|
|
3487
3487
|
} = e;
|
|
3488
3488
|
if (this._croppedZoom && i && this._cropContainer1 && this._cropContainer2) {
|
|
3489
3489
|
const r = -o.x + (this._thumbBounds.x - i.x) + i.w, a = -o.y + (this._thumbBounds.y - i.y) + i.h, l = o.x - i.w, c = o.y - i.h;
|
|
3490
|
-
t ? (this._animateTo(this._cropContainer1, "transform", F(r, a)), this._animateTo(this._cropContainer2, "transform", F(l, c))) : (
|
|
3490
|
+
t ? (this._animateTo(this._cropContainer1, "transform", F(r, a)), this._animateTo(this._cropContainer2, "transform", F(l, c))) : (P(this._cropContainer1, r, a), P(this._cropContainer2, l, c));
|
|
3491
3491
|
}
|
|
3492
3492
|
n && (b(n.pan, i || this._thumbBounds), n.currZoomLevel = this._thumbBounds.w / n.width, t ? this._animateTo(n.container, "transform", n.getCurrentTransform()) : n.applyCurrentZoomPan());
|
|
3493
3493
|
}
|
|
@@ -3515,7 +3515,7 @@ class vi {
|
|
|
3515
3515
|
o[e] = i, n.startTransition(o);
|
|
3516
3516
|
}
|
|
3517
3517
|
}
|
|
3518
|
-
const
|
|
3518
|
+
const bi = {
|
|
3519
3519
|
allowPanToNext: !0,
|
|
3520
3520
|
spacing: 0.1,
|
|
3521
3521
|
loop: !0,
|
|
@@ -3542,7 +3542,7 @@ const _i = {
|
|
|
3542
3542
|
preload: [1, 2],
|
|
3543
3543
|
easing: "cubic-bezier(.4,0,.22,1)"
|
|
3544
3544
|
};
|
|
3545
|
-
class
|
|
3545
|
+
class Si extends _i {
|
|
3546
3546
|
/**
|
|
3547
3547
|
* @param {PhotoSwipeOptions} [options]
|
|
3548
3548
|
*/
|
|
@@ -3556,7 +3556,7 @@ class yi extends gi {
|
|
|
3556
3556
|
}, this.viewportSize = {
|
|
3557
3557
|
x: 0,
|
|
3558
3558
|
y: 0
|
|
3559
|
-
}, 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
|
|
3559
|
+
}, this.bgOpacity = 1, this.currIndex = 0, this.potentialIndex = 0, this.isOpen = !1, this.isDestroying = !1, this.hasMouse = !1, this._initialItemData = {}, this._initialThumbBounds = void 0, this.topBar = void 0, this.element = void 0, this.template = void 0, this.container = void 0, this.scrollWrap = void 0, this.currSlide = void 0, this.events = new Ce(), this.animations = new Je(), this.mainScroll = new He(this), this.gestures = new qe(this), this.opener = new wi(this), this.keyboard = new Ve(this), this.contentLoader = new yi(this);
|
|
3560
3560
|
}
|
|
3561
3561
|
/** @returns {boolean} */
|
|
3562
3562
|
init() {
|
|
@@ -3564,7 +3564,7 @@ class yi extends gi {
|
|
|
3564
3564
|
return !1;
|
|
3565
3565
|
this.isOpen = !0, this.dispatch("init"), this.dispatch("beforeOpen"), this._createMainStructure();
|
|
3566
3566
|
let t = "pswp--open";
|
|
3567
|
-
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
|
|
3567
|
+
return this.gestures.supportsTouch && (t += " pswp--touch"), this.options.mainClass && (t += " " + this.options.mainClass), this.element && (this.element.className += " " + t), this.currIndex = this.options.index || 0, this.potentialIndex = this.currIndex, this.dispatch("firstUpdate"), this.scrollWheel = new Qe(this), (Number.isNaN(this.currIndex) || this.currIndex < 0 || this.currIndex >= this.getNumItems()) && (this.currIndex = 0), this.gestures.supportsTouch || this.mouseDetected(), this.updateSize(), this.offset.y = window.pageYOffset, this._initialItemData = this.getItemData(this.currIndex), this.dispatch("gettingData", {
|
|
3568
3568
|
index: this.currIndex,
|
|
3569
3569
|
data: this._initialItemData,
|
|
3570
3570
|
slide: void 0
|
|
@@ -3584,7 +3584,7 @@ class yi extends gi {
|
|
|
3584
3584
|
*/
|
|
3585
3585
|
getLoopedIndex(t) {
|
|
3586
3586
|
const e = this.getNumItems();
|
|
3587
|
-
return this.options.loop && (t > e - 1 && (t -= e), t < 0 && (t += e)),
|
|
3587
|
+
return this.options.loop && (t > e - 1 && (t -= e), t < 0 && (t += e)), Z(t, 0, e - 1);
|
|
3588
3588
|
}
|
|
3589
3589
|
appendHeavy() {
|
|
3590
3590
|
this.mainScroll.itemHolders.forEach((t) => {
|
|
@@ -3683,7 +3683,7 @@ class yi extends gi {
|
|
|
3683
3683
|
if (!this.canLoop() && (e < 0 || e >= this.getNumItems()))
|
|
3684
3684
|
return;
|
|
3685
3685
|
const n = this.getItemData(e);
|
|
3686
|
-
t.slide = new
|
|
3686
|
+
t.slide = new Te(n, e, this), e === this.currIndex && (this.currSlide = t.slide), t.slide.append(t.el);
|
|
3687
3687
|
}
|
|
3688
3688
|
/** @returns {Point} */
|
|
3689
3689
|
getViewportCenterPoint() {
|
|
@@ -3701,8 +3701,8 @@ class yi extends gi {
|
|
|
3701
3701
|
updateSize(t) {
|
|
3702
3702
|
if (this.isDestroying)
|
|
3703
3703
|
return;
|
|
3704
|
-
const e =
|
|
3705
|
-
!t &&
|
|
3704
|
+
const e = Ct(this.options, this);
|
|
3705
|
+
!t && B(e, this._prevViewportSize) || (b(this._prevViewportSize, e), this.dispatch("beforeResize"), b(this.viewportSize, this._prevViewportSize), this._updatePageScrollOffset(), this.dispatch("viewportSize"), this.mainScroll.resize(this.opener.isOpen), !this.hasMouse && window.matchMedia("(any-hover: hover)").matches && this.mouseDetected(), this.dispatch("resize"));
|
|
3706
3706
|
}
|
|
3707
3707
|
/**
|
|
3708
3708
|
* @param {number} opacity
|
|
@@ -3753,7 +3753,7 @@ class yi extends gi {
|
|
|
3753
3753
|
* @private
|
|
3754
3754
|
*/
|
|
3755
3755
|
_createMainStructure() {
|
|
3756
|
-
this.element =
|
|
3756
|
+
this.element = A("pswp", "div"), this.element.setAttribute("tabindex", "-1"), this.element.setAttribute("role", "dialog"), this.template = this.element, this.bg = A("pswp__bg", "div", this.element), this.scrollWrap = A("pswp__scroll-wrap", "section", this.element), this.container = A("pswp__container", "div", this.scrollWrap), this.scrollWrap.setAttribute("aria-roledescription", "carousel"), this.container.setAttribute("aria-live", "off"), this.container.setAttribute("id", "pswp__items"), this.mainScroll.appendHolders(), this.ui = new li(this), this.ui.init(), (this.options.appendToEl || document.body).appendChild(this.element);
|
|
3757
3757
|
}
|
|
3758
3758
|
/**
|
|
3759
3759
|
* Get position and dimensions of small thumbnail
|
|
@@ -3764,7 +3764,7 @@ class yi extends gi {
|
|
|
3764
3764
|
* @returns {Bounds | undefined}
|
|
3765
3765
|
*/
|
|
3766
3766
|
getThumbBounds() {
|
|
3767
|
-
return
|
|
3767
|
+
return hi(this.currIndex, this.currSlide ? this.currSlide.data : this._initialItemData, this);
|
|
3768
3768
|
}
|
|
3769
3769
|
/**
|
|
3770
3770
|
* If the PhotoSwipe can have continuous loop
|
|
@@ -3780,7 +3780,7 @@ class yi extends gi {
|
|
|
3780
3780
|
*/
|
|
3781
3781
|
_prepareOptions(t) {
|
|
3782
3782
|
return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches && (t.showHideAnimationType = "none", t.zoomAnimationDuration = 0), {
|
|
3783
|
-
...
|
|
3783
|
+
...bi,
|
|
3784
3784
|
...t
|
|
3785
3785
|
};
|
|
3786
3786
|
}
|
|
@@ -3789,23 +3789,23 @@ function D(s, t, e) {
|
|
|
3789
3789
|
const i = document.createElement(t);
|
|
3790
3790
|
return s && (i.className = s), e && e.appendChild(i), i;
|
|
3791
3791
|
}
|
|
3792
|
-
function
|
|
3792
|
+
function Li(s, t, e) {
|
|
3793
3793
|
let i = `translate3d(${s}px,0px,0)`;
|
|
3794
3794
|
return e !== void 0 && (i += ` scale3d(${e},${e},1)`), i;
|
|
3795
3795
|
}
|
|
3796
|
-
function
|
|
3796
|
+
function K(s, t, e) {
|
|
3797
3797
|
s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
|
|
3798
3798
|
}
|
|
3799
|
-
const
|
|
3799
|
+
const x = {
|
|
3800
3800
|
IDLE: "idle",
|
|
3801
3801
|
LOADING: "loading",
|
|
3802
3802
|
LOADED: "loaded",
|
|
3803
3803
|
ERROR: "error"
|
|
3804
3804
|
};
|
|
3805
|
-
function
|
|
3805
|
+
function Ai(s) {
|
|
3806
3806
|
return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
|
|
3807
3807
|
}
|
|
3808
|
-
function
|
|
3808
|
+
function O(s, t, e = document) {
|
|
3809
3809
|
let i = [];
|
|
3810
3810
|
if (s instanceof Element)
|
|
3811
3811
|
i = [s];
|
|
@@ -3817,13 +3817,13 @@ function M(s, t, e = document) {
|
|
|
3817
3817
|
}
|
|
3818
3818
|
return i;
|
|
3819
3819
|
}
|
|
3820
|
-
function
|
|
3820
|
+
function Ei(s) {
|
|
3821
3821
|
return typeof s == "function" && s.prototype && s.prototype.goTo;
|
|
3822
3822
|
}
|
|
3823
|
-
function
|
|
3823
|
+
function pt() {
|
|
3824
3824
|
return !!(navigator.vendor && navigator.vendor.match(/apple/i));
|
|
3825
3825
|
}
|
|
3826
|
-
class
|
|
3826
|
+
class xi {
|
|
3827
3827
|
/**
|
|
3828
3828
|
* @param {T} type
|
|
3829
3829
|
* @param {PhotoSwipeEventsMap[T]} [details]
|
|
@@ -3835,7 +3835,7 @@ class Li {
|
|
|
3835
3835
|
this.defaultPrevented = !0;
|
|
3836
3836
|
}
|
|
3837
3837
|
}
|
|
3838
|
-
class
|
|
3838
|
+
class Ci {
|
|
3839
3839
|
constructor() {
|
|
3840
3840
|
this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
|
|
3841
3841
|
}
|
|
@@ -3902,14 +3902,14 @@ class Ei {
|
|
|
3902
3902
|
return this.pswp.dispatch(t, e);
|
|
3903
3903
|
const n = (
|
|
3904
3904
|
/** @type {AugmentedEvent<T>} */
|
|
3905
|
-
new
|
|
3905
|
+
new xi(t, e)
|
|
3906
3906
|
);
|
|
3907
3907
|
return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
|
|
3908
3908
|
o.call(this, n);
|
|
3909
3909
|
}), n;
|
|
3910
3910
|
}
|
|
3911
3911
|
}
|
|
3912
|
-
class
|
|
3912
|
+
class Pi {
|
|
3913
3913
|
/**
|
|
3914
3914
|
* @param {string | false} imageSrc
|
|
3915
3915
|
* @param {HTMLElement} container
|
|
@@ -3929,21 +3929,21 @@ class Ai {
|
|
|
3929
3929
|
* @param {number} height
|
|
3930
3930
|
*/
|
|
3931
3931
|
setDisplayedSize(t, e) {
|
|
3932
|
-
this.element && (this.element.tagName === "IMG" ? (
|
|
3932
|
+
this.element && (this.element.tagName === "IMG" ? (K(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = Li(0, 0, t / 250)) : K(this.element, t, e));
|
|
3933
3933
|
}
|
|
3934
3934
|
destroy() {
|
|
3935
3935
|
var t;
|
|
3936
3936
|
(t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
|
|
3937
3937
|
}
|
|
3938
3938
|
}
|
|
3939
|
-
class
|
|
3939
|
+
class Ti {
|
|
3940
3940
|
/**
|
|
3941
3941
|
* @param {SlideData} itemData Slide data
|
|
3942
3942
|
* @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
|
|
3943
3943
|
* @param {number} index
|
|
3944
3944
|
*/
|
|
3945
3945
|
constructor(t, e, i) {
|
|
3946
|
-
this.instance = e, this.data = t, this.index = i, this.element = void 0, this.placeholder = void 0, this.slide = void 0, this.displayedImageWidth = 0, this.displayedImageHeight = 0, this.width = Number(this.data.w) || Number(this.data.width) || 0, this.height = Number(this.data.h) || Number(this.data.height) || 0, this.isAttached = !1, this.hasSlide = !1, this.isDecoding = !1, this.state =
|
|
3946
|
+
this.instance = e, this.data = t, this.index = i, this.element = void 0, this.placeholder = void 0, this.slide = void 0, this.displayedImageWidth = 0, this.displayedImageHeight = 0, this.width = Number(this.data.w) || Number(this.data.width) || 0, this.height = Number(this.data.h) || Number(this.data.height) || 0, this.isAttached = !1, this.hasSlide = !1, this.isDecoding = !1, this.state = x.IDLE, this.data.type ? this.type = this.data.type : this.data.src ? this.type = "image" : this.type = "html", this.instance.dispatch("contentInit", {
|
|
3947
3947
|
content: this
|
|
3948
3948
|
});
|
|
3949
3949
|
}
|
|
@@ -3971,7 +3971,7 @@ class xi {
|
|
|
3971
3971
|
this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
|
|
3972
3972
|
this
|
|
3973
3973
|
);
|
|
3974
|
-
this.placeholder = new
|
|
3974
|
+
this.placeholder = new Pi(i, this.slide.container);
|
|
3975
3975
|
}
|
|
3976
3976
|
this.element && !e || this.instance.dispatch("contentLoad", {
|
|
3977
3977
|
content: this,
|
|
@@ -3994,7 +3994,7 @@ class xi {
|
|
|
3994
3994
|
/** @type HTMLImageElement */
|
|
3995
3995
|
this.element
|
|
3996
3996
|
);
|
|
3997
|
-
this.updateSrcsetSizes(), this.data.srcset && (n.srcset = this.data.srcset), n.src = (e = this.data.src) !== null && e !== void 0 ? e : "", n.alt = (i = this.data.alt) !== null && i !== void 0 ? i : "", this.state =
|
|
3997
|
+
this.updateSrcsetSizes(), this.data.srcset && (n.srcset = this.data.srcset), n.src = (e = this.data.src) !== null && e !== void 0 ? e : "", n.alt = (i = this.data.alt) !== null && i !== void 0 ? i : "", this.state = x.LOADING, n.complete ? this.onLoaded() : (n.onload = () => {
|
|
3998
3998
|
this.onLoaded();
|
|
3999
3999
|
}, n.onerror = () => {
|
|
4000
4000
|
this.onError();
|
|
@@ -4012,16 +4012,16 @@ class xi {
|
|
|
4012
4012
|
* Content load success handler
|
|
4013
4013
|
*/
|
|
4014
4014
|
onLoaded() {
|
|
4015
|
-
this.state =
|
|
4015
|
+
this.state = x.LOADED, this.slide && this.element && (this.instance.dispatch("loadComplete", {
|
|
4016
4016
|
slide: this.slide,
|
|
4017
4017
|
content: this
|
|
4018
|
-
}), this.slide.isActive && this.slide.heavyAppended && !this.element.parentNode && (this.append(), this.slide.updateContentSize(!0)), (this.state ===
|
|
4018
|
+
}), this.slide.isActive && this.slide.heavyAppended && !this.element.parentNode && (this.append(), this.slide.updateContentSize(!0)), (this.state === x.LOADED || this.state === x.ERROR) && this.removePlaceholder());
|
|
4019
4019
|
}
|
|
4020
4020
|
/**
|
|
4021
4021
|
* Content load error handler
|
|
4022
4022
|
*/
|
|
4023
4023
|
onError() {
|
|
4024
|
-
this.state =
|
|
4024
|
+
this.state = x.ERROR, this.slide && (this.displayError(), this.instance.dispatch("loadComplete", {
|
|
4025
4025
|
slide: this.slide,
|
|
4026
4026
|
isError: !0,
|
|
4027
4027
|
content: this
|
|
@@ -4034,13 +4034,13 @@ class xi {
|
|
|
4034
4034
|
* @returns {Boolean} If the content is currently loading
|
|
4035
4035
|
*/
|
|
4036
4036
|
isLoading() {
|
|
4037
|
-
return this.instance.applyFilters("isContentLoading", this.state ===
|
|
4037
|
+
return this.instance.applyFilters("isContentLoading", this.state === x.LOADING, this);
|
|
4038
4038
|
}
|
|
4039
4039
|
/**
|
|
4040
4040
|
* @returns {Boolean} If the content is in error state
|
|
4041
4041
|
*/
|
|
4042
4042
|
isError() {
|
|
4043
|
-
return this.state ===
|
|
4043
|
+
return this.state === x.ERROR;
|
|
4044
4044
|
}
|
|
4045
4045
|
/**
|
|
4046
4046
|
* @returns {boolean} If the content is image
|
|
@@ -4059,7 +4059,7 @@ class xi {
|
|
|
4059
4059
|
content: this,
|
|
4060
4060
|
width: t,
|
|
4061
4061
|
height: e
|
|
4062
|
-
}).defaultPrevented && (
|
|
4062
|
+
}).defaultPrevented && (K(this.element, t, e), this.isImageContent() && !this.isError()))) {
|
|
4063
4063
|
const i = !this.displayedImageWidth && t;
|
|
4064
4064
|
this.displayedImageWidth = t, this.displayedImageHeight = e, i ? this.loadImage(!1) : this.updateSrcsetSizes(), this.slide && this.instance.dispatch("imageSizeChange", {
|
|
4065
4065
|
slide: this.slide,
|
|
@@ -4073,7 +4073,7 @@ class xi {
|
|
|
4073
4073
|
* @returns {boolean} If the content can be zoomed
|
|
4074
4074
|
*/
|
|
4075
4075
|
isZoomable() {
|
|
4076
|
-
return this.instance.applyFilters("isContentZoomable", this.isImageContent() && this.state !==
|
|
4076
|
+
return this.instance.applyFilters("isContentZoomable", this.isImageContent() && this.state !== x.ERROR, this);
|
|
4077
4077
|
}
|
|
4078
4078
|
/**
|
|
4079
4079
|
* Update image srcset sizes attribute based on width and height
|
|
@@ -4132,7 +4132,7 @@ class xi {
|
|
|
4132
4132
|
append() {
|
|
4133
4133
|
if (this.isAttached || !this.element)
|
|
4134
4134
|
return;
|
|
4135
|
-
if (this.isAttached = !0, this.state ===
|
|
4135
|
+
if (this.isAttached = !0, this.state === x.ERROR) {
|
|
4136
4136
|
this.displayError();
|
|
4137
4137
|
return;
|
|
4138
4138
|
}
|
|
@@ -4141,7 +4141,7 @@ class xi {
|
|
|
4141
4141
|
}).defaultPrevented)
|
|
4142
4142
|
return;
|
|
4143
4143
|
const t = "decode" in this.element;
|
|
4144
|
-
this.isImageContent() ? t && this.slide && (!this.slide.isActive ||
|
|
4144
|
+
this.isImageContent() ? t && this.slide && (!this.slide.isActive || pt()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
|
|
4145
4145
|
}).finally(() => {
|
|
4146
4146
|
this.isDecoding = !1, this.appendImage();
|
|
4147
4147
|
})) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element);
|
|
@@ -4154,7 +4154,7 @@ class xi {
|
|
|
4154
4154
|
activate() {
|
|
4155
4155
|
this.instance.dispatch("contentActivate", {
|
|
4156
4156
|
content: this
|
|
4157
|
-
}).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !
|
|
4157
|
+
}).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !pt() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
|
|
4158
4158
|
}
|
|
4159
4159
|
/**
|
|
4160
4160
|
* Deactivate the content
|
|
@@ -4178,10 +4178,10 @@ class xi {
|
|
|
4178
4178
|
appendImage() {
|
|
4179
4179
|
this.isAttached && (this.instance.dispatch("contentAppendImage", {
|
|
4180
4180
|
content: this
|
|
4181
|
-
}).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state ===
|
|
4181
|
+
}).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === x.LOADED || this.state === x.ERROR) && this.removePlaceholder()));
|
|
4182
4182
|
}
|
|
4183
4183
|
}
|
|
4184
|
-
function
|
|
4184
|
+
function Ii(s, t) {
|
|
4185
4185
|
if (s.getViewportSizeFn) {
|
|
4186
4186
|
const e = s.getViewportSizeFn(s, t);
|
|
4187
4187
|
if (e)
|
|
@@ -4196,7 +4196,7 @@ function Pi(s, t) {
|
|
|
4196
4196
|
y: window.innerHeight
|
|
4197
4197
|
};
|
|
4198
4198
|
}
|
|
4199
|
-
function
|
|
4199
|
+
function q(s, t, e, i, n) {
|
|
4200
4200
|
let o = 0;
|
|
4201
4201
|
if (t.paddingFn)
|
|
4202
4202
|
o = t.paddingFn(e, i, n)[s];
|
|
@@ -4208,14 +4208,14 @@ function k(s, t, e, i, n) {
|
|
|
4208
4208
|
}
|
|
4209
4209
|
return Number(o) || 0;
|
|
4210
4210
|
}
|
|
4211
|
-
function
|
|
4211
|
+
function zi(s, t, e, i) {
|
|
4212
4212
|
return {
|
|
4213
|
-
x: t.x -
|
|
4214
|
-
y: t.y -
|
|
4213
|
+
x: t.x - q("left", s, t, e, i) - q("right", s, t, e, i),
|
|
4214
|
+
y: t.y - q("top", s, t, e, i) - q("bottom", s, t, e, i)
|
|
4215
4215
|
};
|
|
4216
4216
|
}
|
|
4217
|
-
const
|
|
4218
|
-
class
|
|
4217
|
+
const mt = 4e3;
|
|
4218
|
+
class Mi {
|
|
4219
4219
|
/**
|
|
4220
4220
|
* @param {PhotoSwipeOptions} options PhotoSwipe options
|
|
4221
4221
|
* @param {SlideData} itemData Slide data
|
|
@@ -4272,7 +4272,7 @@ class Ti {
|
|
|
4272
4272
|
*/
|
|
4273
4273
|
_getSecondary() {
|
|
4274
4274
|
let t = this._parseZoomLevelOption("secondary");
|
|
4275
|
-
return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x >
|
|
4275
|
+
return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > mt && (t = mt / this.elementSize.x), t);
|
|
4276
4276
|
}
|
|
4277
4277
|
/**
|
|
4278
4278
|
* Get initial image zoom level.
|
|
@@ -4295,30 +4295,30 @@ class Ti {
|
|
|
4295
4295
|
return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
|
|
4296
4296
|
}
|
|
4297
4297
|
}
|
|
4298
|
-
function
|
|
4298
|
+
function Mt(s, t, e) {
|
|
4299
4299
|
const i = t.createContentFromData(s, e);
|
|
4300
4300
|
let n;
|
|
4301
4301
|
const {
|
|
4302
4302
|
options: o
|
|
4303
4303
|
} = t;
|
|
4304
4304
|
if (o) {
|
|
4305
|
-
n = new
|
|
4305
|
+
n = new Mi(o, s, -1);
|
|
4306
4306
|
let r;
|
|
4307
|
-
t.pswp ? r = t.pswp.viewportSize : r =
|
|
4308
|
-
const a =
|
|
4307
|
+
t.pswp ? r = t.pswp.viewportSize : r = Ii(o, t);
|
|
4308
|
+
const a = zi(o, r, s, e);
|
|
4309
4309
|
n.update(i.width, i.height, a);
|
|
4310
4310
|
}
|
|
4311
4311
|
return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
|
|
4312
4312
|
}
|
|
4313
|
-
function
|
|
4313
|
+
function Di(s, t) {
|
|
4314
4314
|
const e = t.getItemData(s);
|
|
4315
4315
|
if (!t.dispatch("lazyLoadSlide", {
|
|
4316
4316
|
index: s,
|
|
4317
4317
|
itemData: e
|
|
4318
4318
|
}).defaultPrevented)
|
|
4319
|
-
return
|
|
4319
|
+
return Mt(e, t, s);
|
|
4320
4320
|
}
|
|
4321
|
-
class
|
|
4321
|
+
class Oi extends Ci {
|
|
4322
4322
|
/**
|
|
4323
4323
|
* Get total number of slides
|
|
4324
4324
|
*
|
|
@@ -4341,7 +4341,7 @@ class zi extends Ei {
|
|
|
4341
4341
|
* @returns {Content}
|
|
4342
4342
|
*/
|
|
4343
4343
|
createContentFromData(t, e) {
|
|
4344
|
-
return new
|
|
4344
|
+
return new Ti(t, this, e);
|
|
4345
4345
|
}
|
|
4346
4346
|
/**
|
|
4347
4347
|
* Get item data by index.
|
|
@@ -4375,7 +4375,7 @@ class zi extends Ei {
|
|
|
4375
4375
|
*/
|
|
4376
4376
|
_getGalleryDOMElements(t) {
|
|
4377
4377
|
var e, i;
|
|
4378
|
-
return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ?
|
|
4378
|
+
return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? O(this.options.children, this.options.childSelector, t) || [] : [t];
|
|
4379
4379
|
}
|
|
4380
4380
|
/**
|
|
4381
4381
|
* Converts DOM element to item data object.
|
|
@@ -4409,10 +4409,10 @@ class zi extends Ei {
|
|
|
4409
4409
|
* @returns {Content} Image that is being decoded or false.
|
|
4410
4410
|
*/
|
|
4411
4411
|
lazyLoadData(t, e) {
|
|
4412
|
-
return
|
|
4412
|
+
return Mt(t, this, e);
|
|
4413
4413
|
}
|
|
4414
4414
|
}
|
|
4415
|
-
class
|
|
4415
|
+
class $i extends Oi {
|
|
4416
4416
|
/**
|
|
4417
4417
|
* @param {PhotoSwipeOptions} [options]
|
|
4418
4418
|
*/
|
|
@@ -4424,7 +4424,7 @@ class Oi extends zi {
|
|
|
4424
4424
|
* It's not included in the main constructor, so you may bind events before it.
|
|
4425
4425
|
*/
|
|
4426
4426
|
init() {
|
|
4427
|
-
|
|
4427
|
+
O(this.options.gallery, this.options.gallerySelector).forEach((t) => {
|
|
4428
4428
|
t.addEventListener("click", this.onThumbnailsClick, !1);
|
|
4429
4429
|
});
|
|
4430
4430
|
}
|
|
@@ -4432,7 +4432,7 @@ class Oi extends zi {
|
|
|
4432
4432
|
* @param {MouseEvent} e
|
|
4433
4433
|
*/
|
|
4434
4434
|
onThumbnailsClick(t) {
|
|
4435
|
-
if (
|
|
4435
|
+
if (Ai(t) || window.pswp)
|
|
4436
4436
|
return;
|
|
4437
4437
|
let e = {
|
|
4438
4438
|
x: t.clientX,
|
|
@@ -4461,7 +4461,7 @@ class Oi extends zi {
|
|
|
4461
4461
|
const e = (
|
|
4462
4462
|
/** @type {HTMLElement} */
|
|
4463
4463
|
t.target
|
|
4464
|
-
), n =
|
|
4464
|
+
), n = O(
|
|
4465
4465
|
this.options.children,
|
|
4466
4466
|
this.options.childSelector,
|
|
4467
4467
|
/** @type {HTMLElement} */
|
|
@@ -4481,7 +4481,7 @@ class Oi extends zi {
|
|
|
4481
4481
|
if (window.pswp || !this.options)
|
|
4482
4482
|
return !1;
|
|
4483
4483
|
if (!e && this.options.gallery && this.options.children) {
|
|
4484
|
-
const n =
|
|
4484
|
+
const n = O(this.options.gallery);
|
|
4485
4485
|
n[0] && (e = {
|
|
4486
4486
|
gallery: n[0]
|
|
4487
4487
|
});
|
|
@@ -4500,7 +4500,7 @@ class Oi extends zi {
|
|
|
4500
4500
|
} = this;
|
|
4501
4501
|
e && (i.dataSource = e);
|
|
4502
4502
|
const n = [], o = typeof i.pswpModule;
|
|
4503
|
-
if (
|
|
4503
|
+
if (Ei(i.pswpModule))
|
|
4504
4504
|
n.push(Promise.resolve(
|
|
4505
4505
|
/** @type {Type<PhotoSwipe>} */
|
|
4506
4506
|
i.pswpModule
|
|
@@ -4516,7 +4516,7 @@ class Oi extends zi {
|
|
|
4516
4516
|
else
|
|
4517
4517
|
throw new Error("pswpModule is not valid");
|
|
4518
4518
|
}
|
|
4519
|
-
typeof i.openPromise == "function" && n.push(i.openPromise()), i.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent =
|
|
4519
|
+
typeof i.openPromise == "function" && n.push(i.openPromise()), i.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent = Di(t, this));
|
|
4520
4520
|
const r = ++this._uid;
|
|
4521
4521
|
Promise.all(n).then((a) => {
|
|
4522
4522
|
if (this.shouldOpen) {
|
|
@@ -4557,17 +4557,17 @@ class Oi extends zi {
|
|
|
4557
4557
|
*/
|
|
4558
4558
|
destroy() {
|
|
4559
4559
|
var t;
|
|
4560
|
-
(t = this.pswp) === null || t === void 0 || t.destroy(), this.shouldOpen = !1, this._listeners = {},
|
|
4560
|
+
(t = this.pswp) === null || t === void 0 || t.destroy(), this.shouldOpen = !1, this._listeners = {}, O(this.options.gallery, this.options.gallerySelector).forEach((e) => {
|
|
4561
4561
|
e.removeEventListener("click", this.onThumbnailsClick, !1);
|
|
4562
4562
|
});
|
|
4563
4563
|
}
|
|
4564
4564
|
}
|
|
4565
|
-
const
|
|
4565
|
+
const Ri = () => {
|
|
4566
4566
|
let s = null;
|
|
4567
|
-
return s = new
|
|
4567
|
+
return s = new $i({
|
|
4568
4568
|
gallery: "#photoswipe-gallery",
|
|
4569
4569
|
children: "a",
|
|
4570
|
-
pswpModule:
|
|
4570
|
+
pswpModule: Si,
|
|
4571
4571
|
zoom: !1,
|
|
4572
4572
|
imageClickAction: "next",
|
|
4573
4573
|
tapAction: "next"
|
|
@@ -4588,7 +4588,7 @@ const Di = () => {
|
|
|
4588
4588
|
}), s.init(), () => {
|
|
4589
4589
|
s && (s.destroy(), s = null);
|
|
4590
4590
|
};
|
|
4591
|
-
},
|
|
4591
|
+
}, Bi = () => {
|
|
4592
4592
|
const s = document.querySelector(".js-limit-scroll-progress-bar"), t = document.querySelector(".c-progress__bar");
|
|
4593
4593
|
if (!t)
|
|
4594
4594
|
return;
|
|
@@ -4600,9 +4600,9 @@ const Di = () => {
|
|
|
4600
4600
|
s && (i = s.scrollHeight - e.clientHeight + (window.pageYOffset + s.getBoundingClientRect().top));
|
|
4601
4601
|
const o = Math.round(n / i * 100);
|
|
4602
4602
|
t.style.width = `${o}%`, o >= 100 && (t.style.width = "100%");
|
|
4603
|
-
},
|
|
4604
|
-
document.querySelector(".c-progress") && window.addEventListener("scroll",
|
|
4605
|
-
},
|
|
4603
|
+
}, Fi = () => {
|
|
4604
|
+
document.querySelector(".c-progress") && window.addEventListener("scroll", Bi);
|
|
4605
|
+
}, Zi = (s = {}) => {
|
|
4606
4606
|
const { buttonSelector: t = ".c-scroll-to-top" } = s, e = document.querySelector(t), i = e?.querySelector("button");
|
|
4607
4607
|
if (!e || !i)
|
|
4608
4608
|
return;
|
|
@@ -4612,8 +4612,8 @@ const Di = () => {
|
|
|
4612
4612
|
const l = document.querySelector(n);
|
|
4613
4613
|
let c = !1;
|
|
4614
4614
|
if (l) {
|
|
4615
|
-
const
|
|
4616
|
-
c = window.pageYOffset >=
|
|
4615
|
+
const d = l.getBoundingClientRect().top;
|
|
4616
|
+
c = window.pageYOffset >= d - o;
|
|
4617
4617
|
} else
|
|
4618
4618
|
c = window.pageYOffset > 300;
|
|
4619
4619
|
e.style.display = c ? "block" : "none";
|
|
@@ -4624,7 +4624,7 @@ const Di = () => {
|
|
|
4624
4624
|
});
|
|
4625
4625
|
};
|
|
4626
4626
|
window.addEventListener("scroll", r), i.addEventListener("click", a), r();
|
|
4627
|
-
},
|
|
4627
|
+
}, j = "#page-content", X = "#text-tooltip", ki = ".tooltip-btn", Dt = "c-text-tooltip--show", qi = [
|
|
4628
4628
|
"#page-content .c-content p",
|
|
4629
4629
|
"#page-content .c-content h2",
|
|
4630
4630
|
"#page-content .c-content h3",
|
|
@@ -4636,17 +4636,17 @@ const Di = () => {
|
|
|
4636
4636
|
"#page-content header span",
|
|
4637
4637
|
"#page-content header h1",
|
|
4638
4638
|
"#page-content header h2"
|
|
4639
|
-
],
|
|
4639
|
+
], ft = (s, t) => s instanceof Element ? t.some((e) => s.matches(e)) : !1, Ni = (s, t) => {
|
|
4640
4640
|
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;
|
|
4641
|
-
return !!e &&
|
|
4642
|
-
},
|
|
4641
|
+
return !!e && ft(e, t) || !!i && ft(i, t);
|
|
4642
|
+
}, Hi = (s) => {
|
|
4643
4643
|
if (!s.focusNode)
|
|
4644
4644
|
return null;
|
|
4645
4645
|
const t = s.anchorNode?.compareDocumentPosition(s.focusNode);
|
|
4646
4646
|
return t ? (t & 4) > 0 : s.anchorOffset < s.focusOffset;
|
|
4647
|
-
},
|
|
4648
|
-
const i = document.querySelector(`${
|
|
4649
|
-
`${
|
|
4647
|
+
}, Wi = (s, t, e) => {
|
|
4648
|
+
const i = document.querySelector(`${j} ${X}`), n = document.querySelector(`${j}`), o = document.querySelectorAll(
|
|
4649
|
+
`${j} ${X} ${ki}`
|
|
4650
4650
|
);
|
|
4651
4651
|
if (!i || !n) {
|
|
4652
4652
|
console.warn("Text tooltip : Tooltip or it's parent are not found in the DOM");
|
|
@@ -4654,44 +4654,44 @@ const Di = () => {
|
|
|
4654
4654
|
}
|
|
4655
4655
|
Array.from(o).forEach((l) => l.setAttribute("data-selected-text", e));
|
|
4656
4656
|
const r = s.getClientRects(), a = r[t ? r.length - 1 : 0];
|
|
4657
|
-
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(
|
|
4658
|
-
},
|
|
4659
|
-
const s = document.querySelector(`${
|
|
4660
|
-
s && s.classList.remove(
|
|
4661
|
-
},
|
|
4657
|
+
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(Dt);
|
|
4658
|
+
}, gt = () => {
|
|
4659
|
+
const s = document.querySelector(`${X}`);
|
|
4660
|
+
s && s.classList.remove(Dt);
|
|
4661
|
+
}, N = ({ type: s }) => {
|
|
4662
4662
|
const t = window.getSelection();
|
|
4663
4663
|
if (s === "selectionchange") {
|
|
4664
|
-
|
|
4664
|
+
gt();
|
|
4665
4665
|
return;
|
|
4666
4666
|
}
|
|
4667
4667
|
if (!t || !t.rangeCount)
|
|
4668
4668
|
return;
|
|
4669
4669
|
const e = t.getRangeAt(0), i = t.toString().trim();
|
|
4670
4670
|
if (i.length) {
|
|
4671
|
-
const n =
|
|
4672
|
-
n &&
|
|
4671
|
+
const n = Ni(e, qi), o = Hi(t) || !1;
|
|
4672
|
+
n && Wi(e, o, i);
|
|
4673
4673
|
return;
|
|
4674
4674
|
}
|
|
4675
|
-
|
|
4676
|
-
},
|
|
4675
|
+
gt();
|
|
4676
|
+
}, Vi = () => {
|
|
4677
4677
|
if (!window?.getSelection) {
|
|
4678
4678
|
console.warn("Selection API isn't supported");
|
|
4679
4679
|
return;
|
|
4680
4680
|
}
|
|
4681
|
-
document.addEventListener("mouseup",
|
|
4682
|
-
},
|
|
4681
|
+
document.addEventListener("mouseup", N), document.addEventListener("selectionchange", N), document.addEventListener("touchend", N), document.addEventListener("touchcancel", N);
|
|
4682
|
+
}, ji = (s) => {
|
|
4683
4683
|
const { target: t } = s;
|
|
4684
4684
|
if (t instanceof Element) {
|
|
4685
4685
|
const e = t.closest(".c-search-form--button");
|
|
4686
4686
|
e && (s.preventDefault(), e.classList.remove("c-search-form--button"));
|
|
4687
4687
|
}
|
|
4688
|
-
},
|
|
4688
|
+
}, Gi = (s = document.querySelector(
|
|
4689
4689
|
".c-search-form--button"
|
|
4690
4690
|
)) => {
|
|
4691
4691
|
s && s.addEventListener("click", (t) => {
|
|
4692
|
-
|
|
4692
|
+
ji(t);
|
|
4693
4693
|
});
|
|
4694
|
-
},
|
|
4694
|
+
}, Ui = ({
|
|
4695
4695
|
tabsContainerElement: s,
|
|
4696
4696
|
event: t
|
|
4697
4697
|
}) => {
|
|
@@ -4707,53 +4707,56 @@ const Di = () => {
|
|
|
4707
4707
|
}), n.forEach((a) => {
|
|
4708
4708
|
a.setAttribute("aria-hidden", "true");
|
|
4709
4709
|
}), e.setAttribute("aria-selected", "true"), r && r.removeAttribute("aria-hidden");
|
|
4710
|
-
},
|
|
4710
|
+
}, vt = (s) => s.code === "ArrowLeft" || s.keyCode === 39, yt = (s) => s.code === "ArrowRight" || s.keyCode === 37, Ki = (s = document.querySelectorAll(
|
|
4711
4711
|
".js-tabs"
|
|
4712
4712
|
)) => {
|
|
4713
4713
|
s.length > 0 && s.forEach((t) => {
|
|
4714
4714
|
const e = t.querySelectorAll('[role="tab"]');
|
|
4715
4715
|
e.forEach((n) => {
|
|
4716
4716
|
n.addEventListener("click", (o) => {
|
|
4717
|
-
|
|
4717
|
+
Ui({ tabsContainerElement: t, event: o });
|
|
4718
4718
|
});
|
|
4719
4719
|
});
|
|
4720
4720
|
const i = t.querySelector('[role="tablist"]');
|
|
4721
4721
|
if (i && e.length > 0) {
|
|
4722
4722
|
let n = 0;
|
|
4723
4723
|
i.addEventListener("keydown", (o) => {
|
|
4724
|
-
o instanceof KeyboardEvent && (
|
|
4724
|
+
o instanceof KeyboardEvent && (vt(o) || yt(o)) && (e[n].setAttribute("tabindex", "-1"), vt(o) ? (n += 1, n >= e.length && (n = 0)) : yt(o) && (n -= 1, n < 0 && (n = e.length - 1)), e[n].setAttribute("tabindex", "0"), e[n].focus());
|
|
4725
4725
|
});
|
|
4726
4726
|
}
|
|
4727
4727
|
});
|
|
4728
|
-
},
|
|
4728
|
+
}, H = (s) => {
|
|
4729
4729
|
const [t, e] = s.split("h").map(Number);
|
|
4730
4730
|
return t * 60 + e;
|
|
4731
|
-
},
|
|
4731
|
+
}, Ot = () => {
|
|
4732
4732
|
const s = /* @__PURE__ */ new Date(), t = s.getHours(), e = s.getMinutes();
|
|
4733
4733
|
return t * 60 + e;
|
|
4734
|
-
},
|
|
4735
|
-
const e =
|
|
4734
|
+
}, Xi = (s, t) => {
|
|
4735
|
+
const e = Ot();
|
|
4736
4736
|
if (e < s || e > t)
|
|
4737
4737
|
return 0;
|
|
4738
4738
|
const i = t - s;
|
|
4739
4739
|
return (e - s) / i;
|
|
4740
|
-
},
|
|
4741
|
-
const t =
|
|
4740
|
+
}, Yi = (s) => {
|
|
4741
|
+
const t = Ot();
|
|
4742
4742
|
let e = null, i = null, n = -1;
|
|
4743
4743
|
return Array.from(s).find((o, r, a) => {
|
|
4744
4744
|
if (r === a.length - 1)
|
|
4745
4745
|
return !1;
|
|
4746
|
-
const l =
|
|
4747
|
-
|
|
4746
|
+
const l = o.textContent, c = a[r + 1].textContent;
|
|
4747
|
+
if (!l || !c)
|
|
4748
|
+
return !1;
|
|
4749
|
+
const d = H(l), h = H(c);
|
|
4750
|
+
return t >= d && t < h ? (e = l, i = c, n = r, !0) : !1;
|
|
4748
4751
|
}), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n };
|
|
4749
|
-
},
|
|
4752
|
+
}, Ji = () => {
|
|
4750
4753
|
const s = document.querySelectorAll(".c-timeline__time");
|
|
4751
4754
|
if (!s || s.length < 2)
|
|
4752
4755
|
return;
|
|
4753
|
-
const t = document.querySelector(".c-timeline__progress-bar"), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n } =
|
|
4756
|
+
const t = document.querySelector(".c-timeline__progress-bar"), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n } = Yi(s);
|
|
4754
4757
|
if (!e || !i)
|
|
4755
4758
|
return;
|
|
4756
|
-
const o =
|
|
4759
|
+
const o = H(e), r = H(i), a = Xi(o, r);
|
|
4757
4760
|
if (t instanceof HTMLElement) {
|
|
4758
4761
|
if (t.classList.contains("c-timeline__progress-bar--is-desktop") && s.length >= 5) {
|
|
4759
4762
|
const l = "172px / 2";
|
|
@@ -4787,77 +4790,186 @@ const Di = () => {
|
|
|
4787
4790
|
t.style.width = "0%";
|
|
4788
4791
|
}
|
|
4789
4792
|
if (n === 1 || n === 2 || n === 3) {
|
|
4790
|
-
const
|
|
4791
|
-
|
|
4793
|
+
const d = document.querySelectorAll(".c-timeline__time"), h = document.querySelectorAll(".c-timeline__event");
|
|
4794
|
+
d.length > 0 && h.length > 0 && (d[0].textContent = e, d[1].textContent = i, h[0].textContent = h[n].textContent, h[1].textContent = h[n + 1].textContent);
|
|
4792
4795
|
}
|
|
4793
4796
|
}
|
|
4794
4797
|
}
|
|
4795
|
-
},
|
|
4798
|
+
}, Y = "c-icon-item__container--is-highlighted", Qi = (s) => {
|
|
4796
4799
|
s.find(
|
|
4797
|
-
(e) => e.classList.contains(
|
|
4798
|
-
)?.classList.remove(
|
|
4799
|
-
},
|
|
4800
|
+
(e) => e.classList.contains(Y)
|
|
4801
|
+
)?.classList.remove(Y);
|
|
4802
|
+
}, ts = () => {
|
|
4800
4803
|
const s = document.querySelector(".c-toolbar");
|
|
4801
4804
|
if (s) {
|
|
4802
4805
|
const t = window.location.origin + window.location.pathname, e = Array.from(s.querySelectorAll(".c-icon-item__container"));
|
|
4803
|
-
|
|
4806
|
+
Qi(e), e.find(
|
|
4804
4807
|
(n) => n.querySelector("a")?.getAttribute("href") === t
|
|
4805
|
-
)?.classList.add(
|
|
4806
|
-
}
|
|
4807
|
-
},
|
|
4808
|
-
const
|
|
4809
|
-
if (!
|
|
4810
|
-
new MutationObserver((
|
|
4811
|
-
document
|
|
4808
|
+
)?.classList.add(Y);
|
|
4809
|
+
}
|
|
4810
|
+
}, tt = (s) => {
|
|
4811
|
+
const t = s || document.querySelector(".c-map-towns");
|
|
4812
|
+
if (!t) {
|
|
4813
|
+
new MutationObserver((o, r) => {
|
|
4814
|
+
if (typeof document < "u") {
|
|
4815
|
+
const a = document.querySelector(".c-map-towns");
|
|
4816
|
+
a && (r.disconnect(), tt(a));
|
|
4817
|
+
}
|
|
4812
4818
|
}).observe(document.body, { childList: !0, subtree: !0 });
|
|
4813
4819
|
return;
|
|
4814
4820
|
}
|
|
4815
|
-
const
|
|
4816
|
-
const
|
|
4817
|
-
if (
|
|
4821
|
+
const e = () => {
|
|
4822
|
+
const n = document.querySelectorAll(".js-city-marker");
|
|
4823
|
+
if (n.length === 0)
|
|
4818
4824
|
return !1;
|
|
4819
|
-
const
|
|
4820
|
-
let
|
|
4821
|
-
|
|
4822
|
-
if (
|
|
4825
|
+
const o = () => {
|
|
4826
|
+
let r = !0;
|
|
4827
|
+
n.forEach((a) => {
|
|
4828
|
+
if (a.getAttribute("aria-hidden") === "false")
|
|
4823
4829
|
return;
|
|
4824
|
-
const
|
|
4825
|
-
if (!(
|
|
4830
|
+
const l = a.querySelector(".js-city-anchor"), c = a.querySelector(".js-city-text"), d = a.querySelector(".js-city-bg");
|
|
4831
|
+
if (!(l instanceof SVGGraphicsElement) || !(c instanceof SVGTextElement) || !(d instanceof SVGRectElement))
|
|
4826
4832
|
return;
|
|
4827
|
-
const h =
|
|
4833
|
+
const h = l.getBBox();
|
|
4828
4834
|
if (h.width > 0) {
|
|
4829
|
-
const { x:
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4835
|
+
const { x: u, y: p, width: f, height: m } = h, _ = a.getAttribute("data-scale"), S = _ ? ` scale(${_})` : "";
|
|
4836
|
+
a.setAttribute(
|
|
4837
|
+
"transform",
|
|
4838
|
+
`translate(${u + f / 2}, ${p + m / 2})${S}`
|
|
4839
|
+
);
|
|
4840
|
+
const L = c.getBBox(), g = 8, y = 4, w = 8, k = L.width + g, W = L.height + y;
|
|
4841
|
+
d.setAttribute("width", `${k}`), d.setAttribute("height", `${W}`), d.setAttribute("x", `${-k / 2}`), d.setAttribute("y", `${-W - w}`);
|
|
4842
|
+
const $t = -W / 2 - w;
|
|
4843
|
+
c.setAttribute("y", `${$t}`), a.setAttribute("aria-hidden", "false");
|
|
4833
4844
|
} else
|
|
4834
|
-
|
|
4835
|
-
}),
|
|
4845
|
+
r = !1;
|
|
4846
|
+
}), r || requestAnimationFrame(o);
|
|
4836
4847
|
};
|
|
4837
|
-
return requestAnimationFrame(
|
|
4848
|
+
return requestAnimationFrame(o), !0;
|
|
4838
4849
|
};
|
|
4839
|
-
if (
|
|
4850
|
+
if (e())
|
|
4840
4851
|
return;
|
|
4841
|
-
new MutationObserver((
|
|
4842
|
-
|
|
4843
|
-
}).observe(
|
|
4852
|
+
new MutationObserver((n, o) => {
|
|
4853
|
+
e() && o.disconnect();
|
|
4854
|
+
}).observe(t, {
|
|
4844
4855
|
childList: !0,
|
|
4845
4856
|
subtree: !0
|
|
4846
4857
|
});
|
|
4847
|
-
},
|
|
4858
|
+
}, es = {
|
|
4859
|
+
10: [{ id: "10387", name: "Troyes" }, { id: "10323", name: "Romilly-sur-Seine" }, { id: "10033", name: "Bar-sur-Aube" }],
|
|
4860
|
+
11: [{ id: "11262", name: "Narbonne" }, { id: "11069", name: "Carcassonne" }, { id: "11076", name: "Castelnaudary" }],
|
|
4861
|
+
12: [{ id: "12202", name: "Rodez" }, { id: "12145", name: "Millau" }, { id: "12300", name: "Villefranche-de-Rouergue" }],
|
|
4862
|
+
13: [{ id: "13055", name: "Marseille" }, { id: "13001", name: "Aix-en-Provence" }, { id: "13004", name: "Arles" }],
|
|
4863
|
+
14: [{ id: "14118", name: "Caen" }, { id: "14366", name: "Lisieux" }, { id: "14762", name: "Vire Normandie" }],
|
|
4864
|
+
15: [{ id: "15014", name: "Aurillac" }, { id: "15187", name: "Saint-Flour" }, { id: "15120", name: "Mauriac" }],
|
|
4865
|
+
16: [{ id: "16015", name: "Angoulême" }, { id: "16102", name: "Cognac" }, { id: "16028", name: "Barbezieux-Saint-Hilaire" }],
|
|
4866
|
+
17: [{ id: "17300", name: "La Rochelle" }, { id: "17415", name: "Saintes" }, { id: "17299", name: "Rochefort" }],
|
|
4867
|
+
18: [{ id: "18033", name: "Bourges" }, { id: "18279", name: "Vierzon" }, { id: "18197", name: "Saint-Amand-Montrond" }],
|
|
4868
|
+
19: [{ id: "19031", name: "Brive-la-Gaillarde" }, { id: "19272", name: "Tulle" }, { id: "19275", name: "Ussel" }],
|
|
4869
|
+
21: [{ id: "21231", name: "Dijon" }, { id: "21054", name: "Beaune" }, { id: "21038", name: "Auxonne" }],
|
|
4870
|
+
22: [{ id: "22278", name: "Saint-Brieuc" }, { id: "22113", name: "Lannion" }, { id: "22093", name: "Lamballe-Armor" }],
|
|
4871
|
+
23: [{ id: "23096", name: "Guéret" }, { id: "23176", name: "La Souterraine" }, { id: "23008", name: "Aubusson" }],
|
|
4872
|
+
24: [{ id: "24322", name: "Périgueux" }, { id: "24037", name: "Bergerac" }, { id: "24520", name: "Sarlat-la-Canéda" }],
|
|
4873
|
+
25: [{ id: "25056", name: "Besançon" }, { id: "25388", name: "Montbéliard" }, { id: "25462", name: "Pontarlier" }],
|
|
4874
|
+
26: [{ id: "26362", name: "Valence" }, { id: "26198", name: "Montélimar" }, { id: "26235", name: "Pierrelatte" }],
|
|
4875
|
+
27: [{ id: "27229", name: "Évreux" }, { id: "27681", name: "Vernon" }, { id: "27375", name: "Louviers" }],
|
|
4876
|
+
28: [{ id: "28085", name: "Chartres" }, { id: "28134", name: "Dreux" }, { id: "28088", name: "Châteaudun" }],
|
|
4877
|
+
29: [{ id: "29019", name: "Brest" }, { id: "29232", name: "Quimper" }, { id: "29039", name: "Concarneau" }],
|
|
4878
|
+
30: [{ id: "30189", name: "Nîmes" }, { id: "30007", name: "Alès" }, { id: "30028", name: "Bagnols-sur-Cèze" }],
|
|
4879
|
+
31: [{ id: "31555", name: "Toulouse" }, { id: "31483", name: "Saint-Gaudens" }, { id: "31033", name: "Auterive" }],
|
|
4880
|
+
32: [{ id: "32013", name: "Auch" }, { id: "32160", name: "L'Isle-Jourdain" }, { id: "32107", name: "Condom" }],
|
|
4881
|
+
33: [{ id: "33063", name: "Bordeaux" }, { id: "33529", name: "La Teste-de-Buch" }, { id: "33243", name: "Libourne" }],
|
|
4882
|
+
34: [{ id: "34172", name: "Montpellier" }, { id: "34032", name: "Béziers" }, { id: "34301", name: "Sète" }],
|
|
4883
|
+
35: [{ id: "35238", name: "Rennes" }, { id: "35288", name: "Saint-Malo" }, { id: "35115", name: "Fougères" }],
|
|
4884
|
+
36: [{ id: "36044", name: "Châteauroux" }, { id: "36088", name: "Issoudun" }, { id: "36018", name: "Le Blanc" }],
|
|
4885
|
+
37: [{ id: "37261", name: "Tours" }, { id: "37003", name: "Amboise" }, { id: "37072", name: "Chinon" }],
|
|
4886
|
+
38: [{ id: "38185", name: "Grenoble" }, { id: "38544", name: "Vienne" }, { id: "38053", name: "Bourgoin-Jallieu" }],
|
|
4887
|
+
39: [{ id: "39198", name: "Dole" }, { id: "39300", name: "Lons-le-Saunier" }, { id: "39478", name: "Saint-Claude" }],
|
|
4888
|
+
40: [{ id: "40192", name: "Mont-de-Marsan" }, { id: "40088", name: "Dax" }, { id: "40046", name: "Biscarrosse" }],
|
|
4889
|
+
41: [{ id: "41018", name: "Blois" }, { id: "41194", name: "Romorantin-Lanthenay" }, { id: "41269", name: "Vendôme" }],
|
|
4890
|
+
42: [{ id: "42218", name: "Saint-Étienne" }, { id: "42187", name: "Roanne" }, { id: "42147", name: "Montbrison" }],
|
|
4891
|
+
43: [{ id: "43157", name: "Le Puy-en-Velay" }, { id: "43137", name: "Monistrol-sur-Loire" }, { id: "43040", name: "Brioude" }],
|
|
4892
|
+
44: [{ id: "44109", name: "Nantes" }, { id: "44184", name: "Saint-Nazaire" }, { id: "44131", name: "Pornic" }],
|
|
4893
|
+
45: [{ id: "45234", name: "Orléans" }, { id: "45208", name: "Montargis" }, { id: "45155", name: "Gien" }],
|
|
4894
|
+
46: [{ id: "46042", name: "Cahors" }, { id: "46102", name: "Figeac" }, { id: "46127", name: "Gourdon" }],
|
|
4895
|
+
47: [{ id: "47001", name: "Agen" }, { id: "47323", name: "Villeneuve-sur-Lot" }, { id: "47157", name: "Marmande" }],
|
|
4896
|
+
48: [{ id: "48095", name: "Mende" }, { id: "48140", name: "Saint-Chély-d'Apcher" }, { id: "48080", name: "Langogne" }],
|
|
4897
|
+
49: [{ id: "49007", name: "Angers" }, { id: "49099", name: "Cholet" }, { id: "49328", name: "Saumur" }],
|
|
4898
|
+
50: [{ id: "50129", name: "Cherbourg-en-Cotentin" }, { id: "50502", name: "Saint-Lô" }, { id: "50218", name: "Granville" }],
|
|
4899
|
+
51: [{ id: "51454", name: "Reims" }, { id: "51108", name: "Châlons-en-Champagne" }, { id: "51230", name: "Épernay" }],
|
|
4900
|
+
52: [{ id: "52448", name: "Saint-Dizier" }, { id: "52121", name: "Chaumont" }, { id: "52269", name: "Langres" }],
|
|
4901
|
+
53: [{ id: "53130", name: "Laval" }, { id: "53062", name: "Château-Gontier-sur-Mayenne" }, { id: "53147", name: "Mayenne" }],
|
|
4902
|
+
54: [{ id: "54395", name: "Nancy" }, { id: "54329", name: "Lunéville" }, { id: "54528", name: "Toul" }],
|
|
4903
|
+
55: [{ id: "55545", name: "Verdun" }, { id: "55029", name: "Bar-le-Duc" }, { id: "55122", name: "Commercy" }],
|
|
4904
|
+
56: [{ id: "56121", name: "Lorient" }, { id: "56260", name: "Vannes" }, { id: "56178", name: "Pontivy" }],
|
|
4905
|
+
57: [{ id: "57463", name: "Metz" }, { id: "57672", name: "Thionville" }, { id: "57227", name: "Forbach" }],
|
|
4906
|
+
58: [{ id: "58194", name: "Nevers" }, { id: "58086", name: "Cosne-Cours-sur-Loire" }, { id: "58095", name: "Decize" }],
|
|
4907
|
+
59: [{ id: "59350", name: "Lille" }, { id: "59183", name: "Dunkerque" }, { id: "59606", name: "Valenciennes" }],
|
|
4908
|
+
60: [{ id: "60057", name: "Beauvais" }, { id: "60159", name: "Compiègne" }, { id: "60175", name: "Creil" }],
|
|
4909
|
+
61: [{ id: "61001", name: "Alençon" }, { id: "61169", name: "Flers" }, { id: "61006", name: "Argentan" }],
|
|
4910
|
+
62: [{ id: "62193", name: "Calais" }, { id: "62041", name: "Arras" }, { id: "62160", name: "Boulogne-sur-Mer" }],
|
|
4911
|
+
63: [{ id: "63113", name: "Clermont-Ferrand" }, { id: "63178", name: "Issoire" }, { id: "63430", name: "Thiers" }],
|
|
4912
|
+
64: [{ id: "64445", name: "Pau" }, { id: "64102", name: "Bayonne" }, { id: "64260", name: "Hendaye" }],
|
|
4913
|
+
65: [{ id: "65440", name: "Tarbes" }, { id: "65258", name: "Lannemezan" }, { id: "65025", name: "Argelès-Gazost" }],
|
|
4914
|
+
66: [{ id: "66136", name: "Perpignan" }, { id: "66049", name: "Céret" }, { id: "66149", name: "Prades" }],
|
|
4915
|
+
67: [{ id: "67482", name: "Strasbourg" }, { id: "67180", name: "Haguenau" }, { id: "67462", name: "Sélestat" }],
|
|
4916
|
+
68: [{ id: "68224", name: "Mulhouse" }, { id: "68066", name: "Colmar" }, { id: "68297", name: "Saint-Louis" }],
|
|
4917
|
+
69: [{ id: "69123", name: "Lyon" }, { id: "69264", name: "Villefranche-sur-Saône" }, { id: "69091", name: "Givors" }],
|
|
4918
|
+
70: [{ id: "70550", name: "Vesoul" }, { id: "70285", name: "Héricourt" }, { id: "70310", name: "Lure" }],
|
|
4919
|
+
71: [{ id: "71076", name: "Chalon-sur-Saône" }, { id: "71270", name: "Mâcon" }, { id: "71153", name: "Le Creusot" }],
|
|
4920
|
+
72: [{ id: "72181", name: "Le Mans" }, { id: "72154", name: "La Flèche" }, { id: "72264", name: "Sablé-sur-Sarthe" }],
|
|
4921
|
+
73: [{ id: "73065", name: "Chambéry" }, { id: "73011", name: "Albertville" }, { id: "73248", name: "Saint-Jean-de-Maurienne" }],
|
|
4922
|
+
74: [{ id: "74010", name: "Annecy" }, { id: "74281", name: "Thonon-les-Bains" }, { id: "74012", name: "Annemasse" }],
|
|
4923
|
+
75: [{ id: "75056", name: "Paris" }],
|
|
4924
|
+
76: [{ id: "76351", name: "Le Havre" }, { id: "76540", name: "Rouen" }, { id: "76217", name: "Dieppe" }],
|
|
4925
|
+
77: [{ id: "77284", name: "Meaux" }, { id: "77108", name: "Chelles" }, { id: "77288", name: "Melun" }],
|
|
4926
|
+
78: [{ id: "78646", name: "Versailles" }, { id: "78361", name: "Mantes-la-Jolie" }, { id: "78172", name: "Conflans-Sainte-Honorine" }],
|
|
4927
|
+
79: [{ id: "79191", name: "Niort" }, { id: "79049", name: "Bressuire" }, { id: "79329", name: "Thouars" }],
|
|
4928
|
+
80: [{ id: "80021", name: "Amiens" }, { id: "80001", name: "Abbeville" }, { id: "80016", name: "Albert" }],
|
|
4929
|
+
81: [{ id: "81004", name: "Albi" }, { id: "81065", name: "Castres" }, { id: "81105", name: "Graulhet" }],
|
|
4930
|
+
82: [{ id: "82121", name: "Montauban" }, { id: "82033", name: "Castelsarrasin" }, { id: "82037", name: "Caussade" }],
|
|
4931
|
+
83: [{ id: "83137", name: "Toulon" }, { id: "83061", name: "Fréjus" }, { id: "83050", name: "Draguignan" }],
|
|
4932
|
+
84: [{ id: "84007", name: "Avignon" }, { id: "84031", name: "Carpentras" }, { id: "84087", name: "Orange" }],
|
|
4933
|
+
85: [{ id: "85191", name: "La Roche-sur-Yon" }, { id: "85194", name: "Les Sables-d'Olonne" }, { id: "85047", name: "Challans" }],
|
|
4934
|
+
86: [{ id: "86194", name: "Poitiers" }, { id: "86066", name: "Châtellerault" }, { id: "86070", name: "Chauvigny" }],
|
|
4935
|
+
87: [{ id: "87085", name: "Limoges" }, { id: "87154", name: "Saint-Junien" }, { id: "87187", name: "Saint-Yrieix-la-Perche" }],
|
|
4936
|
+
88: [{ id: "88160", name: "Épinal" }, { id: "88413", name: "Saint-Dié-des-Vosges" }, { id: "88196", name: "Gérardmer" }],
|
|
4937
|
+
89: [{ id: "89024", name: "Auxerre" }, { id: "89387", name: "Sens" }, { id: "89206", name: "Joigny" }],
|
|
4938
|
+
90: [{ id: "90010", name: "Belfort" }, { id: "90081", name: "Réchésy" }],
|
|
4939
|
+
91: [{ id: "91228", name: "Évry-Courcouronnes" }, { id: "91223", name: "Étampes" }, { id: "91692", name: "Les Ulis" }],
|
|
4940
|
+
92: [{ id: "92012", name: "Boulogne-Billancourt" }],
|
|
4941
|
+
93: [{ id: "93066", name: "Saint-Denis" }],
|
|
4942
|
+
94: [{ id: "94081", name: "Vitry-sur-Seine" }],
|
|
4943
|
+
95: [{ id: "95018", name: "Argenteuil" }, { id: "95487", name: "Persan" }, { id: "95351", name: "Louvres" }],
|
|
4944
|
+
971: [{ id: "97101", name: "Les Abymes" }, { id: "97128", name: "Sainte-Anne" }, { id: "97118", name: "Petit-Bourg" }],
|
|
4945
|
+
972: [{ id: "97209", name: "Fort-de-France" }, { id: "97224", name: "Saint-Joseph" }, { id: "97220", name: "Rivière-Pilote" }],
|
|
4946
|
+
973: [{ id: "97311", name: "Saint-Laurent-du-Maroni" }, { id: "97304", name: "Kourou" }],
|
|
4947
|
+
974: [{ id: "97411", name: "Saint-Denis" }, { id: "97416", name: "Saint-Pierre" }, { id: "97409", name: "Saint-André" }],
|
|
4948
|
+
"03": [{ id: "03185", name: "Montluçon" }, { id: "03310", name: "Vichy" }, { id: "03190", name: "Moulins" }],
|
|
4949
|
+
"04": [{ id: "04112", name: "Manosque" }, { id: "04070", name: "Digne-les-Bains" }, { id: "04209", name: "Sisteron" }],
|
|
4950
|
+
"09": [{ id: "09225", name: "Pamiers" }, { id: "09261", name: "Saint-Girons" }, { id: "09160", name: "Lavelanet" }],
|
|
4951
|
+
"01": [{ id: "01053", name: "Bourg-en-Bresse" }, { id: "01283", name: "Oyonnax" }, { id: "01033", name: "Valserhône" }],
|
|
4952
|
+
"06": [{ id: "06088", name: "Nice" }, { id: "06029", name: "Cannes" }, { id: "06083", name: "Menton" }],
|
|
4953
|
+
"2B": [{ id: "2B033", name: "Bastia" }, { id: "2B096", name: "Corte" }, { id: "2B050", name: "Calvi" }],
|
|
4954
|
+
"2A": [{ id: "2A004", name: "Ajaccio" }, { id: "2A247", name: "Porto-Vecchio" }, { id: "2A032", name: "Bastelicaccia" }],
|
|
4955
|
+
"02": [{ id: "02691", name: "Saint-Quentin" }, { id: "02722", name: "Soissons" }, { id: "02408", name: "Laon" }],
|
|
4956
|
+
"07": [{ id: "07010", name: "Annonay" }, { id: "07019", name: "Aubenas" }, { id: "07324", name: "Tournon-sur-Rhône" }],
|
|
4957
|
+
"05": [{ id: "05061", name: "Gap" }, { id: "05023", name: "Briançon" }, { id: "05046", name: "Embrun" }],
|
|
4958
|
+
"08": [{ id: "08105", name: "Charleville-Mézières" }, { id: "08362", name: "Rethel" }, { id: "08190", name: "Givet" }]
|
|
4959
|
+
}, is = (s, t) => {
|
|
4848
4960
|
if (s.startsWith("97"))
|
|
4849
4961
|
return Array.from(
|
|
4850
4962
|
document.querySelectorAll(`path[id^="town-${s}"][id$="-drom"]`)
|
|
4851
4963
|
);
|
|
4852
4964
|
const e = `[id^="town-${s}"]`;
|
|
4853
4965
|
return t ? Array.from(t.querySelectorAll(e)) : [];
|
|
4854
|
-
},
|
|
4966
|
+
}, ss = (s, t, e, i) => {
|
|
4855
4967
|
(i.startsWith("97") ? s : document.querySelector(
|
|
4856
4968
|
`.c-map-towns__layer-towns [href="#${e}"], .c-map-towns__layer-towns [xlink\\:href="#${e}"]`
|
|
4857
4969
|
))?.classList.forEach((o) => {
|
|
4858
4970
|
o.includes("--") && t.classList.add(o);
|
|
4859
4971
|
});
|
|
4860
|
-
},
|
|
4972
|
+
}, ns = (s, t) => {
|
|
4861
4973
|
const e = s.getAttribute("id"), i = s.getAttribute("data-url"), n = s.getAttribute("data-name");
|
|
4862
4974
|
if (!e || !i)
|
|
4863
4975
|
return null;
|
|
@@ -4871,55 +4983,73 @@ const Di = () => {
|
|
|
4871
4983
|
r = a, r.removeAttribute("id");
|
|
4872
4984
|
} else
|
|
4873
4985
|
r = document.createElementNS("http://www.w3.org/2000/svg", "use"), r.setAttribute("href", `#${e}`);
|
|
4874
|
-
return r.classList.add("c-map-towns__path"),
|
|
4875
|
-
},
|
|
4876
|
-
|
|
4877
|
-
|
|
4986
|
+
return r.classList.add("c-map-towns__path"), ss(s, r, e, t), o.appendChild(r), o;
|
|
4987
|
+
}, os = (s, t, e) => {
|
|
4988
|
+
const i = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
4989
|
+
i.setAttribute("class", "js-city-marker c-map-towns__city-marker"), i.setAttribute("aria-hidden", "true"), i.setAttribute("data-scale", e.toString());
|
|
4990
|
+
const n = document.createElementNS("http://www.w3.org/2000/svg", "use"), r = t.startsWith("97") ? `#town-${t}-drom` : `#town-${t}`;
|
|
4991
|
+
n.setAttribute("href", r), n.setAttribute("class", "js-city-anchor c-map-towns__city-anchor");
|
|
4992
|
+
const a = document.createElementNS("http://www.w3.org/2000/svg", "circle");
|
|
4993
|
+
a.setAttribute("class", "c-map-towns__city-circle"), a.setAttribute("r", "5"), a.setAttribute("fill", "white"), a.setAttribute("stroke", "black"), a.setAttribute("strokeWidth", "1");
|
|
4994
|
+
const l = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
4995
|
+
l.setAttribute("class", "js-city-bg"), l.setAttribute("fill", "white"), l.setAttribute("rx", "4"), l.setAttribute("ry", "4");
|
|
4996
|
+
const c = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
4997
|
+
return c.setAttribute("class", "js-city-text c-map-towns__city-text"), c.textContent = s, i.appendChild(n), i.appendChild(a), i.appendChild(l), i.appendChild(c), i;
|
|
4998
|
+
}, rs = (s, t, e) => {
|
|
4999
|
+
s.innerHTML = "", e.forEach((c) => s.appendChild(c));
|
|
5000
|
+
const i = s.getBBox(), n = 5, o = i.width + n * 2, r = i.height + n * 2;
|
|
4878
5001
|
t.setAttribute(
|
|
4879
5002
|
"viewBox",
|
|
4880
|
-
`${i.x - n} ${i.y - n} ${
|
|
5003
|
+
`${i.x - n} ${i.y - n} ${o} ${r}`
|
|
4881
5004
|
);
|
|
5005
|
+
const a = t.clientWidth || 800, l = t.clientHeight || 600;
|
|
5006
|
+
return Math.max(o / a, r / l);
|
|
4882
5007
|
};
|
|
4883
|
-
let
|
|
4884
|
-
const
|
|
4885
|
-
if (
|
|
5008
|
+
let _t = !1;
|
|
5009
|
+
const J = () => {
|
|
5010
|
+
if (_t)
|
|
4886
5011
|
return;
|
|
4887
5012
|
if (!document.querySelector(".c-map-towns")) {
|
|
4888
|
-
new MutationObserver((
|
|
4889
|
-
document.querySelector(".c-map-towns") && (u.disconnect(),
|
|
5013
|
+
new MutationObserver((h, u) => {
|
|
5014
|
+
typeof document < "u" && document.querySelector(".c-map-towns") && (u.disconnect(), J());
|
|
4890
5015
|
}).observe(document.body, { childList: !0, subtree: !0 });
|
|
4891
5016
|
return;
|
|
4892
5017
|
}
|
|
4893
5018
|
const t = document.getElementById("js-zoom-overlay"), e = document.getElementById("js-zoom-svg"), i = document.getElementById("js-zoom-group"), n = document.getElementById("js-zoom-close");
|
|
4894
5019
|
if (!(t instanceof HTMLElement) || !(e instanceof SVGSVGElement) || !(i instanceof SVGGElement) || !(n instanceof HTMLElement)) {
|
|
4895
|
-
requestAnimationFrame(
|
|
5020
|
+
requestAnimationFrame(J);
|
|
4896
5021
|
return;
|
|
4897
5022
|
}
|
|
4898
|
-
|
|
4899
|
-
const o = document.querySelector(".c-map-towns__map"), r = document.querySelector(".c-map-towns__droms"), a = document.getElementById("js-zoom-label"), l = (
|
|
4900
|
-
const { target:
|
|
4901
|
-
if (!(
|
|
5023
|
+
_t = !0;
|
|
5024
|
+
const o = document.querySelector(".c-map-towns__map"), r = document.querySelector(".c-map-towns__droms"), a = document.getElementById("js-zoom-label"), l = (d) => {
|
|
5025
|
+
const { target: h } = d;
|
|
5026
|
+
if (!(h instanceof Element))
|
|
4902
5027
|
return;
|
|
4903
|
-
const u =
|
|
5028
|
+
const u = h?.closest(".c-map-towns__dept-trigger");
|
|
4904
5029
|
if (!u)
|
|
4905
5030
|
return;
|
|
4906
|
-
const
|
|
4907
|
-
a && f && (a.textContent = f)
|
|
5031
|
+
const p = u.getAttribute("id")?.replace("out-", "") || "", f = u.getAttribute("data-name"), m = document.querySelector(".c-map-towns__sprite"), S = is(p, m).map((w) => ns(w, p)).filter((w) => w !== null);
|
|
5032
|
+
a && f && (a.textContent = f);
|
|
5033
|
+
const L = rs(i, e, S);
|
|
5034
|
+
(es[p] || []).forEach((w) => {
|
|
5035
|
+
const k = os(w.name, w.id, L);
|
|
5036
|
+
i.appendChild(k);
|
|
5037
|
+
}), tt(i), t.setAttribute("aria-hidden", "false");
|
|
4908
5038
|
};
|
|
4909
5039
|
o?.addEventListener("click", l), r?.addEventListener("click", l), n.addEventListener("click", () => {
|
|
4910
5040
|
t.setAttribute("aria-hidden", "true");
|
|
4911
|
-
}), t.addEventListener("click", (
|
|
4912
|
-
|
|
5041
|
+
}), t.addEventListener("click", (d) => {
|
|
5042
|
+
d.target === t && t.setAttribute("aria-hidden", "true");
|
|
4913
5043
|
});
|
|
4914
|
-
},
|
|
4915
|
-
|
|
5044
|
+
}, ps = () => {
|
|
5045
|
+
se(), Ki(), Vt(), le(), Jt(), Fi(), Ri(), me(), Gi(), V("winterOlympicsGames", "countdown-winter-olympics-games"), V("eurovision", "countdown-eurovision"), V("worldFoot2026", "countdown-world-foot-2026"), Vi(), Ht(), oe(), Ut(), Nt(
|
|
4916
5046
|
"localisation-input",
|
|
4917
5047
|
"https://www.20minutes.fr/elections/resultats/recherche",
|
|
4918
5048
|
"?searchValue=",
|
|
4919
5049
|
"text",
|
|
4920
5050
|
"text"
|
|
4921
|
-
),
|
|
5051
|
+
), Gt(), tt(), ts(), Zt(), kt(), re(), J(), we(), be(), ne(), Ft(), Ji(), Zi();
|
|
4922
5052
|
};
|
|
4923
5053
|
export {
|
|
4924
|
-
|
|
5054
|
+
ps as initScripts
|
|
4925
5055
|
};
|