Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@20minutes/hela

Package Overview
Dependencies
Maintainers
2
Versions
332
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@20minutes/hela - npm Package Compare versions

Comparing version 0.1.116 to 0.1.117

2

dist/components/molecules/SocialBar/SocialBar.d.ts
import React from 'react';
import { type SharingNetwork } from '../../../components';
import type { RubricColorType, SpacingSystemProps } from '../../../types';

@@ -9,3 +8,2 @@ export interface SocialBarProps extends SpacingSystemProps {

rubricColor?: RubricColorType;
networks?: SharingNetwork[];
saveContentId?: string;

@@ -12,0 +10,0 @@ onReport?: () => void;

3

dist/components/molecules/SocialBar/SocialItem/SocialBarItem.d.ts
import React from 'react';
import type { FlexProps, SharingNetwork } from '../../../../components';
import type { FlexProps } from '../../../../components';
import type { IconNameType, LayoutType, RubricColorType } from '../../../../types';

@@ -9,3 +9,2 @@ export interface SocialBarItemProps extends FlexProps {

countColor?: RubricColorType;
sharingNetworks?: SharingNetwork[];
anchor?: string;

@@ -12,0 +11,0 @@ layout?: LayoutType;

var S = /* @__PURE__ */ ((e) => (e.MOBILE = "mobile", e.DESKTOP = "desktop", e))(S || {});
const q = (e) => {
const w = (e) => {
e.stopImmediatePropagation(), e.preventDefault();
const t = e.currentTarget, s = t.parentElement, i = s == null ? void 0 : s.querySelector(
const t = e.currentTarget, s = t.parentElement, o = s == null ? void 0 : s.querySelector(
`#${t.getAttribute("aria-controls")}`
);
t.getAttribute("aria-expanded") === "true" ? (t.setAttribute("aria-expanded", "false"), i == null || i.setAttribute("aria-hidden", "true")) : (t.setAttribute("aria-expanded", "true"), i == null || i.setAttribute("aria-hidden", "false"));
}, k = (e = document.querySelector(
t.getAttribute("aria-expanded") === "true" ? (t.setAttribute("aria-expanded", "false"), o == null || o.setAttribute("aria-hidden", "true")) : (t.setAttribute("aria-expanded", "true"), o == null || o.setAttribute("aria-hidden", "false"));
}, q = (e = document.querySelector(
".js-collapse__button"
)) => {
e && document.querySelectorAll(".c-collapse__button").forEach((s) => {
s.addEventListener("click", (i) => {
q(i);
s.addEventListener("click", (o) => {
w(o);
});

@@ -20,14 +20,14 @@ });

e.setAttribute("aria-expanded", "true"), t.innerHTML = "Voir moins", (s = e.previousElementSibling) == null || s.setAttribute("aria-hidden", "false");
}, x = (e) => {
}, k = (e) => {
var s;
const t = e.querySelector(".js-expandButton__label");
e.setAttribute("aria-expanded", "false"), t.innerHTML = "Voir plus", (s = e.previousElementSibling) == null || s.setAttribute("aria-hidden", "true");
}, j = (e) => {
}, x = (e) => {
const t = e.currentTarget;
return e.preventDefault(), t.getAttribute("aria-expanded") === "true" ? x(t) : T(t);
}, $ = (e = document.querySelector(
return e.preventDefault(), t.getAttribute("aria-expanded") === "true" ? k(t) : T(t);
}, j = (e = document.querySelector(
".js-expandButton"
)) => {
e && document.querySelectorAll(".js-expandButton").forEach((s) => s.addEventListener("click", j));
}, O = (e) => {
e && document.querySelectorAll(".js-expandButton").forEach((s) => s.addEventListener("click", x));
}, $ = (e) => {
const t = e.querySelector(".js-live-form__textarea"), s = e.querySelector("#live-form-submit-section");

@@ -41,3 +41,3 @@ t == null || t.setAttribute("aria-expanded", "true"), s == null || s.setAttribute("aria-hidden", "false");

);
t == null || t.addEventListener("focus", O.bind(!1, e));
t == null || t.addEventListener("focus", $.bind(!1, e));
}

@@ -58,3 +58,3 @@ };

'[tabindex]:not([tabindex^="-"])'
], D = "Tab", F = "Escape";
], O = "Tab", D = "Escape";
function u(e) {

@@ -103,6 +103,6 @@ this._show = this.show.bind(this), this._hide = this.hide.bind(this), this._maintainFocus = this._maintainFocus.bind(this), this._bindKeypress = this._bindKeypress.bind(this), this.$el = e, this.shown = !1, this._id = this.$el.getAttribute("data-a11y-dialog") || this.$el.id, this._previouslyFocused = null, this._listeners = {}, this.create();

u.prototype._fire = function(e, t) {
var s = this._listeners[e] || [], i = new CustomEvent(e, { detail: t });
this.$el.dispatchEvent(i), s.forEach(
function(r) {
r(this.$el, t);
var s = this._listeners[e] || [], o = new CustomEvent(e, { detail: t });
this.$el.dispatchEvent(o), s.forEach(
function(n) {
n(this.$el, t);
}.bind(this)

@@ -113,3 +113,3 @@ );

const t = document.activeElement;
t && t.closest('[aria-modal="true"]') !== this.$el || (this.shown && e.key === F && this.$el.getAttribute("role") !== "alertdialog" && (e.preventDefault(), this.hide(e)), this.shown && e.key === D && M(this.$el, e));
t && t.closest('[aria-modal="true"]') !== this.$el || (this.shown && e.key === D && this.$el.getAttribute("role") !== "alertdialog" && (e.preventDefault(), this.hide(e)), this.shown && e.key === O && C(this.$el, e));
};

@@ -119,7 +119,7 @@ u.prototype._maintainFocus = function(e) {

};
function H(e) {
function F(e) {
return Array.prototype.slice.call(e);
}
function p(e, t) {
return H((t || document).querySelectorAll(e));
return F((t || document).querySelectorAll(e));
}

@@ -130,3 +130,3 @@ function L(e) {

}
function C(e) {
function H(e) {
return p(I.join(","), e).filter(function(t) {

@@ -136,7 +136,7 @@ return !!(t.offsetWidth || t.offsetHeight || t.getClientRects().length);

}
function M(e, t) {
var s = C(e), i = s.indexOf(document.activeElement);
t.shiftKey && i === 0 ? (s[s.length - 1].focus(), t.preventDefault()) : !t.shiftKey && i === s.length - 1 && (s[0].focus(), t.preventDefault());
function C(e, t) {
var s = H(e), o = s.indexOf(document.activeElement);
t.shiftKey && o === 0 ? (s[s.length - 1].focus(), t.preventDefault()) : !t.shiftKey && o === s.length - 1 && (s[0].focus(), t.preventDefault());
}
function _() {
function y() {
p("[data-a11y-dialog]").forEach(function(e) {

@@ -146,52 +146,52 @@ new u(e);

}
typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", _) : window.requestAnimationFrame ? window.requestAnimationFrame(_) : window.setTimeout(_, 16));
const R = (e = document.querySelector(".js-modal")) => {
typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", y) : window.requestAnimationFrame ? window.requestAnimationFrame(y) : window.setTimeout(y, 16));
const M = (e = document.querySelector(".js-modal")) => {
e && new u(e);
}, K = ({ navigatedList: e, nextBtn: t, prevBtn: s }) => {
const i = e.scrollLeft > 0, r = e.scrollLeft + e.clientWidth < e.scrollWidth;
i && r ? (t.classList.add("o-nav-button--visible"), s.classList.add("o-nav-button--visible")) : i ? (t.classList.remove("o-nav-button--visible"), s.classList.add("o-nav-button--visible")) : r ? (t.classList.add("o-nav-button--visible"), s.classList.remove("o-nav-button--visible")) : (t.classList.remove("o-nav-button--visible"), s.classList.remove("o-nav-button--visible"));
}, P = ({
}, R = ({ navigatedList: e, nextBtn: t, prevBtn: s }) => {
const o = e.scrollLeft > 0, n = e.scrollLeft + e.clientWidth < e.scrollWidth;
o && n ? (t.classList.add("o-nav-button--visible"), s.classList.add("o-nav-button--visible")) : o ? (t.classList.remove("o-nav-button--visible"), s.classList.add("o-nav-button--visible")) : n ? (t.classList.add("o-nav-button--visible"), s.classList.remove("o-nav-button--visible")) : (t.classList.remove("o-nav-button--visible"), s.classList.remove("o-nav-button--visible"));
}, K = ({
navigatedList: e,
nextBtn: t,
prevBtn: s,
sliderVariant: i
sliderVariant: o
}) => {
if (e) {
const r = e.closest(".js-overview-bar-container"), c = r == null ? void 0 : r.querySelector(".c-stepper"), l = c == null ? void 0 : c.querySelectorAll(".c-stepper__item");
if (l) {
const o = Array.from(l).findIndex(
(n) => n.classList.contains("c-stepper__item--loading")
const n = e.closest(".js-overview-bar-container"), l = n == null ? void 0 : n.querySelector(".c-stepper"), c = l == null ? void 0 : l.querySelectorAll(".c-stepper__item");
if (c) {
const i = Array.from(c).findIndex(
(r) => r.classList.contains("c-stepper__item--loading")
);
if (o < 0)
l[0].classList.add("c-stepper__item--loading");
if (i < 0)
c[0].classList.add("c-stepper__item--loading");
else {
l[o].classList.remove("c-stepper__item--loading"), l[o].classList.add("c-stepper__item--loaded");
const n = l[o].querySelector(".c-stepper__loader");
n && n instanceof HTMLElement && (n.style.transition = "width 0s linear"), o + 1 < l.length && l[o + 1].classList.add("c-stepper__item--loading");
c[i].classList.remove("c-stepper__item--loading"), c[i].classList.add("c-stepper__item--loaded");
const r = c[i].querySelector(".c-stepper__loader");
r && r instanceof HTMLElement && (r.style.transition = "width 0s linear"), i + 1 < c.length && c[i + 1].classList.add("c-stepper__item--loading");
}
}
if (e.scrollWidth - e.clientWidth > e.clientWidth) {
let o = e.scrollLeft;
switch (i) {
let i = e.scrollLeft;
switch (o) {
case "partners":
o += e.clientWidth + 32;
i += e.clientWidth + 32;
break;
case "rubrics":
o += e.clientWidth - 36;
i += e.clientWidth - 36;
break;
case "overviewbar":
o += e.clientWidth - 20;
i += e.clientWidth - 20;
break;
default:
o += Math.ceil(e.clientWidth * 0.6);
i += Math.ceil(e.clientWidth * 0.6);
break;
}
e.scrollTo({
left: o,
left: i,
behavior: "smooth"
}), s.classList.add("o-nav-button--visible"), o + e.clientWidth >= e.scrollWidth && t.classList.remove("o-nav-button--visible");
}), s.classList.add("o-nav-button--visible"), i + e.clientWidth >= e.scrollWidth && t.classList.remove("o-nav-button--visible");
} else {
const o = e.scrollWidth - e.clientWidth;
const i = e.scrollWidth - e.clientWidth;
e.scrollTo({
left: o,
left: i,
behavior: "smooth"

@@ -205,36 +205,36 @@ }), t.classList.remove("o-nav-button--visible"), s.classList.add("o-nav-button--visible");

prevBtn: s,
sliderVariant: i,
delay: r
sliderVariant: o,
delay: n
}) => {
if (e) {
const c = e.closest(".js-overview-bar-container"), l = c == null ? void 0 : c.querySelector(".c-stepper"), o = l == null ? void 0 : l.querySelectorAll(".c-stepper__item");
if (o) {
const n = Array.from(o).findIndex(
const l = e.closest(".js-overview-bar-container"), c = l == null ? void 0 : l.querySelector(".c-stepper"), i = c == null ? void 0 : c.querySelectorAll(".c-stepper__item");
if (i) {
const r = Array.from(i).findIndex(
(a) => a.classList.contains("c-stepper__item--loading")
);
n < 0 ? o[0].classList.add("c-stepper__item--loading") : (o[n].classList.remove("c-stepper__item--loading"), o[n].classList.remove("c-stepper__item--loaded"), n - 1 > 0 && (o[n - 1].classList.remove("c-stepper__item--loading"), o[n - 1].classList.remove("c-stepper__item--loaded"), setTimeout(() => {
const a = o[n - 1].querySelector(".c-stepper__loader");
o[n - 1].classList.add("c-stepper__item--loading"), a && a instanceof HTMLElement && (a.style.transition = `width ${r / 1e3}s linear`);
r < 0 ? i[0].classList.add("c-stepper__item--loading") : (i[r].classList.remove("c-stepper__item--loading"), i[r].classList.remove("c-stepper__item--loaded"), r - 1 > 0 && (i[r - 1].classList.remove("c-stepper__item--loading"), i[r - 1].classList.remove("c-stepper__item--loaded"), setTimeout(() => {
const a = i[r - 1].querySelector(".c-stepper__loader");
i[r - 1].classList.add("c-stepper__item--loading"), a && a instanceof HTMLElement && (a.style.transition = `width ${n / 1e3}s linear`);
}, 0)));
}
if (e.clientWidth < e.scrollLeft) {
let n = e.scrollLeft;
switch (i) {
let r = e.scrollLeft;
switch (o) {
case "partners":
n -= e.clientWidth + 32;
r -= e.clientWidth + 32;
break;
case "rubrics":
n -= e.clientWidth - 36;
r -= e.clientWidth - 36;
break;
case "overviewbar":
n -= e.clientWidth - 24;
r -= e.clientWidth - 24;
break;
default:
n -= Math.ceil(e.clientWidth * 0.6);
r -= Math.ceil(e.clientWidth * 0.6);
break;
}
e.scrollTo({
left: n,
left: r,
behavior: "smooth"
}), t.classList.add("o-nav-button--visible"), n === 0 && s.classList.remove("o-nav-button--visible");
}), t.classList.add("o-nav-button--visible"), r === 0 && s.classList.remove("o-nav-button--visible");
} else

@@ -246,4 +246,4 @@ e.scrollTo({

}
}, V = ({ navigatedList: e, nextBtn: t, prevBtn: s }) => {
K({
}, P = ({ navigatedList: e, nextBtn: t, prevBtn: s }) => {
R({
navigatedList: e,

@@ -253,6 +253,6 @@ nextBtn: t,

});
}, z = () => {
}, V = () => {
const e = document.querySelectorAll(".js-navigation-container");
for (const t of Array.from(e)) {
const { sliderVariant: s } = t.dataset, { sliderAuto: i } = t.dataset, { sliderDelay: r } = t.dataset, c = r ? parseInt(r, 10) : 3e3, l = t.closest(".js-overview-bar-container"), o = l == null ? void 0 : l.querySelector(".c-stepper"), n = o == null ? void 0 : o.querySelectorAll(".c-stepper__item");
const { sliderVariant: s } = t.dataset, { sliderAuto: o } = t.dataset, { sliderDelay: n } = t.dataset, l = n ? parseInt(n, 10) : 3e3, c = t.closest(".js-overview-bar-container"), i = c == null ? void 0 : c.querySelector(".c-stepper"), r = i == null ? void 0 : i.querySelectorAll(".c-stepper__item");
if (t) {

@@ -263,3 +263,3 @@ const a = t.querySelector(

".o-nav-button--next-button"
), f = t.querySelector(
), h = t.querySelector(
".o-nav-button--previous-button"

@@ -269,9 +269,9 @@ );

"click",
P.bind(!1, {
K.bind(!1, {
navigatedList: a,
nextBtn: d,
prevBtn: f,
prevBtn: h,
sliderVariant: s
})
), f == null || f.addEventListener(
), h == null || h.addEventListener(
"click",

@@ -281,25 +281,25 @@ B.bind(!1, {

nextBtn: d,
prevBtn: f,
prevBtn: h,
sliderVariant: s,
delay: c
delay: l
})
), i === "true" && d) {
const w = o ? o.querySelector(".c-stepper__item--loading") : null;
n && (n.forEach((b) => {
const h = b.querySelector(".c-stepper__loader");
h && h instanceof HTMLElement && (h.style.transition = `width ${c / 1e3}s linear`);
}), w || n[0].classList.add("c-stepper__item--loading")), setInterval(() => {
d.classList.contains("o-nav-button--visible") ? d.click() : a && f && (a.scrollLeft = 0, n && (n.forEach((b) => {
const h = b.querySelector(".c-stepper__loader");
h && h instanceof HTMLElement && (h.style.transition = "width 0s linear"), b.classList.remove("c-stepper__item--loading"), b.classList.remove("c-stepper__item--loaded"), setTimeout(() => {
h && h instanceof HTMLElement && (h.style.transition = `width ${c / 1e3}s linear`);
), o === "true" && d) {
const A = i ? i.querySelector(".c-stepper__item--loading") : null;
r && (r.forEach((b) => {
const f = b.querySelector(".c-stepper__loader");
f && f instanceof HTMLElement && (f.style.transition = `width ${l / 1e3}s linear`);
}), A || r[0].classList.add("c-stepper__item--loading")), setInterval(() => {
d.classList.contains("o-nav-button--visible") ? d.click() : a && h && (a.scrollLeft = 0, r && (r.forEach((b) => {
const f = b.querySelector(".c-stepper__loader");
f && f instanceof HTMLElement && (f.style.transition = "width 0s linear"), b.classList.remove("c-stepper__item--loading"), b.classList.remove("c-stepper__item--loaded"), setTimeout(() => {
f && f instanceof HTMLElement && (f.style.transition = `width ${l / 1e3}s linear`);
}, 0);
}), setTimeout(() => {
n[0].classList.add("c-stepper__item--loading");
}, 0)), f.click());
}, c);
r[0].classList.add("c-stepper__item--loading");
}, 0)), h.click());
}, l);
}
}
}
}, N = () => {
}, z = () => {
const e = document.querySelectorAll(".js-navigation-container");

@@ -309,7 +309,7 @@ for (const t of Array.from(e)) {

if (t) {
const i = t.querySelector(
const o = t.querySelector(
".js-navigation-container__list"
), r = t.querySelector(
), n = t.querySelector(
".o-nav-button--next-button"
), c = t.querySelector(
), l = t.querySelector(
".o-nav-button--previous-button"

@@ -319,6 +319,6 @@ );

"resize",
V.bind(!1, {
navigatedList: i,
nextBtn: r,
prevBtn: c,
P.bind(!1, {
navigatedList: o,
nextBtn: n,
prevBtn: l,
sliderVariant: s

@@ -334,5 +334,5 @@ })

s.addEventListener("mouseenter", () => {
const i = s.querySelector(".js-sub-menu");
if (i) {
if (window.getComputedStyle(i).getPropertyValue("display") !== "none") {
const o = s.querySelector(".js-sub-menu");
if (o) {
if (window.getComputedStyle(o).getPropertyValue("display") !== "none") {
t.classList.remove("u-hidden");

@@ -346,19 +346,19 @@ return;

});
}, G = () => {
}, N = () => {
const e = document.querySelector(".js-limit-scroll-progress-bar"), t = document.querySelector(".c-progress__bar"), { documentElement: s } = document;
if (!t)
return;
let i = s.scrollHeight - s.clientHeight;
if (!i)
let o = s.scrollHeight - s.clientHeight;
if (!o)
return;
const r = s.scrollTop;
e && (i = e.scrollHeight - s.clientHeight + (window.pageYOffset + e.getBoundingClientRect().top));
const c = Math.round(r / i * 100);
t.style.width = `${c}%`, c >= 100 && (t.style.width = "100%");
}, J = () => {
document.querySelector(".c-progress") && window.addEventListener("scroll", G);
const n = s.scrollTop;
e && (o = e.scrollHeight - s.clientHeight + (window.pageYOffset + e.getBoundingClientRect().top));
const l = Math.round(n / o * 100);
t.style.width = `${l}%`, l >= 100 && (t.style.width = "100%");
}, G = () => {
document.querySelector(".c-progress") && window.addEventListener("scroll", N);
};
let m, y = 0;
const Q = () => {
m = null, document.body.getBoundingClientRect().top > y + 2 && (m = "up"), document.body.getBoundingClientRect().top < y - 2 && (m = "down"), y = document.body.getBoundingClientRect().top;
let m, _ = 0;
const J = () => {
m = null, document.body.getBoundingClientRect().top > _ + 2 && (m = "up"), document.body.getBoundingClientRect().top < _ - 2 && (m = "down"), _ = document.body.getBoundingClientRect().top;
const e = document.querySelector(".c-read-also-banner");

@@ -369,3 +369,3 @@ if (e) {

}
}, U = (e = document.querySelector(
}, Q = (e = document.querySelector(
".c-read-also-banner"

@@ -376,11 +376,11 @@ )) => {

window.addEventListener("scroll", () => {
clearTimeout(t), t = setTimeout(Q, 100);
clearTimeout(t), t = setTimeout(J, 100);
});
}
}, X = (e) => {
var i;
}, U = (e) => {
var o;
e.preventDefault();
const t = e.currentTarget, s = (i = t.closest(".js-search-toggle")) == null ? void 0 : i.querySelector(".c-search-form");
const t = e.currentTarget, s = (o = t.closest(".js-search-toggle")) == null ? void 0 : o.querySelector(".c-search-form");
t.setAttribute("aria-hidden", "true"), s == null || s.setAttribute("aria-hidden", "false");
}, Z = (e = document.querySelector(
}, X = (e = document.querySelector(
".js-search-toggle"

@@ -390,31 +390,5 @@ )) => {

const t = e.querySelector(".c-header__search-button");
t == null || t.addEventListener("click", X);
t == null || t.addEventListener("click", U);
}
}, ee = (e) => {
e.stopImmediatePropagation(), e.preventDefault();
const t = e.currentTarget, s = t.parentElement, i = s == null ? void 0 : s.querySelector(".c-social-bar-item__sharebar-container");
i && (t.getAttribute("aria-expanded") === "true" ? (t.setAttribute("aria-expanded", "false"), i.setAttribute("aria-hidden", "true"), i.classList.add("c-social-bar-item__sharebar-container--visible")) : (t.setAttribute("aria-expanded", "true"), i.setAttribute("aria-hidden", "false"), i.classList.remove("c-social-bar-item__sharebar-container--visible")));
}, E = (e, t) => {
const s = t.target;
!s || s.closest(".c-social-bar-item__sharebar-container") || s.closest(".c-social-bar-item") || (e.forEach((i) => {
const r = i.parentElement, c = r == null ? void 0 : r.querySelector(
".c-social-bar-item__sharebar-container"
);
c && (i.setAttribute("aria-expanded", "true"), c.setAttribute("aria-hidden", "false"), c.classList.remove("c-social-bar-item__sharebar-container--visible"));
}), document.removeEventListener(
"click",
E.bind(void 0, e)
));
}, te = (e = document.querySelectorAll(
".js-social-network-button"
)) => {
e.forEach((t) => {
t.addEventListener("click", (s) => {
ee(s);
});
}), document.addEventListener(
"click",
E.bind(void 0, e)
);
}, se = ({
}, Z = ({
tabsContainerElement: e,

@@ -424,16 +398,16 @@ event: t

t.preventDefault();
const s = t.target, i = e.querySelectorAll('[role="tab"]'), r = e.querySelectorAll('[role="tabpanel"]'), c = s.getAttribute("aria-controls"), l = Object.values(r).find(
(o) => o.id === c
const s = t.target, o = e.querySelectorAll('[role="tab"]'), n = e.querySelectorAll('[role="tabpanel"]'), l = s.getAttribute("aria-controls"), c = Object.values(n).find(
(i) => i.id === l
);
i.forEach((o) => {
o.setAttribute("aria-selected", "false");
}), r.forEach((o) => {
o.setAttribute("aria-hidden", "true");
}), s.setAttribute("aria-selected", "true"), l && l.removeAttribute("aria-hidden");
}, v = (e) => e.code === "ArrowLeft" || e.keyCode === 39, g = (e) => e.code === "ArrowRight" || e.keyCode === 37, ie = (e = document.querySelector(".js-tabs")) => {
o.forEach((i) => {
i.setAttribute("aria-selected", "false");
}), n.forEach((i) => {
i.setAttribute("aria-hidden", "true");
}), s.setAttribute("aria-selected", "true"), c && c.removeAttribute("aria-hidden");
}, v = (e) => e.code === "ArrowLeft" || e.keyCode === 39, g = (e) => e.code === "ArrowRight" || e.keyCode === 37, ee = (e = document.querySelector(".js-tabs")) => {
if (e) {
const t = e.querySelectorAll('[role="tab"]');
t.forEach((i) => {
i.addEventListener("click", (r) => {
se({ tabsContainerElement: e, event: r });
t.forEach((o) => {
o.addEventListener("click", (n) => {
Z({ tabsContainerElement: e, event: n });
});

@@ -443,9 +417,9 @@ });

if (s && t.length > 0) {
let i = 0;
s.addEventListener("keydown", (r) => {
r instanceof KeyboardEvent && (v(r) || g(r)) && (t[i].setAttribute("tabindex", "-1"), v(r) ? (i += 1, i >= t.length && (i = 0)) : g(r) && (i -= 1, i < 0 && (i = t.length - 1)), t[i].setAttribute("tabindex", "0"), t[i].focus());
let o = 0;
s.addEventListener("keydown", (n) => {
n instanceof KeyboardEvent && (v(n) || g(n)) && (t[o].setAttribute("tabindex", "-1"), v(n) ? (o += 1, o >= t.length && (o = 0)) : g(n) && (o -= 1, o < 0 && (o = t.length - 1)), t[o].setAttribute("tabindex", "0"), t[o].focus());
});
}
}
}, A = ({
}, E = ({
currentTheme: e,

@@ -456,10 +430,10 @@ switchDarkModeElement: t

t.setAttribute("aria-checked", String(s));
const i = t.querySelector("span[aria-hidden]");
i && (i.setAttribute("aria-hidden", String(s)), i.innerHTML = s ? "on" : "off");
}, oe = (e = document.querySelector(
const o = t.querySelector("span[aria-hidden]");
o && (o.setAttribute("aria-hidden", String(s)), o.innerHTML = s ? "on" : "off");
}, te = (e = document.querySelector(
".js-switch-dark-mode"
)) => {
const t = localStorage.getItem("theme") || "light";
t && e && (document.documentElement.dataset.theme = t, A({ currentTheme: t, switchDarkModeElement: e }));
}, re = (e = document.querySelector(
t && e && (document.documentElement.dataset.theme = t, E({ currentTheme: t, switchDarkModeElement: e }));
}, se = (e = document.querySelector(
".js-switch-dark-mode"

@@ -469,9 +443,9 @@ )) => {

const t = document.documentElement.dataset.theme, s = !t || t === "light" ? "dark" : "light";
document.documentElement.dataset.theme = s, localStorage.setItem("theme", s), A({ currentTheme: s, switchDarkModeElement: e });
document.documentElement.dataset.theme = s, localStorage.setItem("theme", s), E({ currentTheme: s, switchDarkModeElement: e });
});
}, ne = () => {
oe(), re(), $(), ie(), k(), J(), Z(), R(), U(), W(), z(), N(), window.layout === S.DESKTOP && (Y(), te());
}, oe = () => {
te(), se(), j(), ee(), q(), G(), X(), M(), Q(), W(), V(), z(), window.layout === S.DESKTOP && Y();
};
export {
ne as initScripts
oe as initScripts
};

@@ -1,1 +0,1 @@

(function(b,m){typeof exports=="object"&&typeof module<"u"?m(exports):typeof define=="function"&&define.amd?define(["exports"],m):(b=typeof globalThis<"u"?globalThis:b||self,m(b.scripts={}))})(this,function(b){"use strict";var m=(e=>(e.MOBILE="mobile",e.DESKTOP="desktop",e))(m||{});const q=e=>{e.stopImmediatePropagation(),e.preventDefault();const t=e.currentTarget,i=t.parentElement,s=i==null?void 0:i.querySelector(`#${t.getAttribute("aria-controls")}`);t.getAttribute("aria-expanded")==="true"?(t.setAttribute("aria-expanded","false"),s==null||s.setAttribute("aria-hidden","true")):(t.setAttribute("aria-expanded","true"),s==null||s.setAttribute("aria-hidden","false"))},k=(e=document.querySelector(".js-collapse__button"))=>{e&&document.querySelectorAll(".c-collapse__button").forEach(i=>{i.addEventListener("click",s=>{q(s)})})},T=e=>{var i;const t=e.querySelector(".js-expandButton__label");e.setAttribute("aria-expanded","true"),t.innerHTML="Voir moins",(i=e.previousElementSibling)==null||i.setAttribute("aria-hidden","false")},x=e=>{var i;const t=e.querySelector(".js-expandButton__label");e.setAttribute("aria-expanded","false"),t.innerHTML="Voir plus",(i=e.previousElementSibling)==null||i.setAttribute("aria-hidden","true")},j=e=>{const t=e.currentTarget;return e.preventDefault(),t.getAttribute("aria-expanded")==="true"?x(t):T(t)},$=(e=document.querySelector(".js-expandButton"))=>{e&&document.querySelectorAll(".js-expandButton").forEach(i=>i.addEventListener("click",j))},O=e=>{const t=e.querySelector(".js-live-form__textarea"),i=e.querySelector("#live-form-submit-section");t==null||t.setAttribute("aria-expanded","true"),i==null||i.setAttribute("aria-hidden","false")},W=()=>{const e=document.querySelector(".js-live-form");if(e){const t=e.querySelector(".js-live-form__textarea textarea");t==null||t.addEventListener("focus",O.bind(!1,e))}};var I=['a[href]:not([tabindex^="-"])','area[href]:not([tabindex^="-"])','input:not([type="hidden"]):not([type="radio"]):not([disabled]):not([tabindex^="-"])','input[type="radio"]:not([disabled]):not([tabindex^="-"])','select:not([disabled]):not([tabindex^="-"])','textarea:not([disabled]):not([tabindex^="-"])','button:not([disabled]):not([tabindex^="-"])','iframe:not([tabindex^="-"])','audio[controls]:not([tabindex^="-"])','video[controls]:not([tabindex^="-"])','[contenteditable]:not([tabindex^="-"])','[tabindex]:not([tabindex^="-"])'],D="Tab",F="Escape";function d(e){this._show=this.show.bind(this),this._hide=this.hide.bind(this),this._maintainFocus=this._maintainFocus.bind(this),this._bindKeypress=this._bindKeypress.bind(this),this.$el=e,this.shown=!1,this._id=this.$el.getAttribute("data-a11y-dialog")||this.$el.id,this._previouslyFocused=null,this._listeners={},this.create()}d.prototype.create=function(){this.$el.setAttribute("aria-hidden",!0),this.$el.setAttribute("aria-modal",!0),this.$el.setAttribute("tabindex",-1),this.$el.hasAttribute("role")||this.$el.setAttribute("role","dialog"),this._openers=p('[data-a11y-dialog-show="'+this._id+'"]'),this._openers.forEach(function(t){t.addEventListener("click",this._show)}.bind(this));const e=this.$el;return this._closers=p("[data-a11y-dialog-hide]",this.$el).filter(function(t){return t.closest('[aria-modal="true"], [data-a11y-dialog]')===e}).concat(p('[data-a11y-dialog-hide="'+this._id+'"]')),this._closers.forEach(function(t){t.addEventListener("click",this._hide)}.bind(this)),this._fire("create"),this},d.prototype.show=function(e){return this.shown?this:(this._previouslyFocused=document.activeElement,this.$el.removeAttribute("aria-hidden"),this.shown=!0,S(this.$el),document.body.addEventListener("focus",this._maintainFocus,!0),document.addEventListener("keydown",this._bindKeypress),this._fire("show",e),this)},d.prototype.hide=function(e){return this.shown?(this.shown=!1,this.$el.setAttribute("aria-hidden","true"),this._previouslyFocused&&this._previouslyFocused.focus&&this._previouslyFocused.focus(),document.body.removeEventListener("focus",this._maintainFocus,!0),document.removeEventListener("keydown",this._bindKeypress),this._fire("hide",e),this):this},d.prototype.destroy=function(){return this.hide(),this._openers.forEach(function(e){e.removeEventListener("click",this._show)}.bind(this)),this._closers.forEach(function(e){e.removeEventListener("click",this._hide)}.bind(this)),this._fire("destroy"),this._listeners={},this},d.prototype.on=function(e,t){return typeof this._listeners[e]>"u"&&(this._listeners[e]=[]),this._listeners[e].push(t),this},d.prototype.off=function(e,t){var i=(this._listeners[e]||[]).indexOf(t);return i>-1&&this._listeners[e].splice(i,1),this},d.prototype._fire=function(e,t){var i=this._listeners[e]||[],s=new CustomEvent(e,{detail:t});this.$el.dispatchEvent(s),i.forEach(function(n){n(this.$el,t)}.bind(this))},d.prototype._bindKeypress=function(e){const t=document.activeElement;t&&t.closest('[aria-modal="true"]')!==this.$el||(this.shown&&e.key===F&&this.$el.getAttribute("role")!=="alertdialog"&&(e.preventDefault(),this.hide(e)),this.shown&&e.key===D&&M(this.$el,e))},d.prototype._maintainFocus=function(e){this.shown&&!e.target.closest('[aria-modal="true"]')&&!e.target.closest("[data-a11y-dialog-ignore-focus-trap]")&&S(this.$el)};function H(e){return Array.prototype.slice.call(e)}function p(e,t){return H((t||document).querySelectorAll(e))}function S(e){var t=e.querySelector("[autofocus]")||e;t.focus()}function C(e){return p(I.join(","),e).filter(function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)})}function M(e,t){var i=C(e),s=i.indexOf(document.activeElement);t.shiftKey&&s===0?(i[i.length-1].focus(),t.preventDefault()):!t.shiftKey&&s===i.length-1&&(i[0].focus(),t.preventDefault())}function v(){p("[data-a11y-dialog]").forEach(function(e){new d(e)})}typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",v):window.requestAnimationFrame?window.requestAnimationFrame(v):window.setTimeout(v,16));const R=(e=document.querySelector(".js-modal"))=>{e&&new d(e)},K=({navigatedList:e,nextBtn:t,prevBtn:i})=>{const s=e.scrollLeft>0,n=e.scrollLeft+e.clientWidth<e.scrollWidth;s&&n?(t.classList.add("o-nav-button--visible"),i.classList.add("o-nav-button--visible")):s?(t.classList.remove("o-nav-button--visible"),i.classList.add("o-nav-button--visible")):n?(t.classList.add("o-nav-button--visible"),i.classList.remove("o-nav-button--visible")):(t.classList.remove("o-nav-button--visible"),i.classList.remove("o-nav-button--visible"))},P=({navigatedList:e,nextBtn:t,prevBtn:i,sliderVariant:s})=>{if(e){const n=e.closest(".js-overview-bar-container"),c=n==null?void 0:n.querySelector(".c-stepper"),l=c==null?void 0:c.querySelectorAll(".c-stepper__item");if(l){const o=Array.from(l).findIndex(r=>r.classList.contains("c-stepper__item--loading"));if(o<0)l[0].classList.add("c-stepper__item--loading");else{l[o].classList.remove("c-stepper__item--loading"),l[o].classList.add("c-stepper__item--loaded");const r=l[o].querySelector(".c-stepper__loader");r&&r instanceof HTMLElement&&(r.style.transition="width 0s linear"),o+1<l.length&&l[o+1].classList.add("c-stepper__item--loading")}}if(e.scrollWidth-e.clientWidth>e.clientWidth){let o=e.scrollLeft;switch(s){case"partners":o+=e.clientWidth+32;break;case"rubrics":o+=e.clientWidth-36;break;case"overviewbar":o+=e.clientWidth-20;break;default:o+=Math.ceil(e.clientWidth*.6);break}e.scrollTo({left:o,behavior:"smooth"}),i.classList.add("o-nav-button--visible"),o+e.clientWidth>=e.scrollWidth&&t.classList.remove("o-nav-button--visible")}else{const o=e.scrollWidth-e.clientWidth;e.scrollTo({left:o,behavior:"smooth"}),t.classList.remove("o-nav-button--visible"),i.classList.add("o-nav-button--visible")}}},B=({navigatedList:e,nextBtn:t,prevBtn:i,sliderVariant:s,delay:n})=>{if(e){const c=e.closest(".js-overview-bar-container"),l=c==null?void 0:c.querySelector(".c-stepper"),o=l==null?void 0:l.querySelectorAll(".c-stepper__item");if(o){const r=Array.from(o).findIndex(a=>a.classList.contains("c-stepper__item--loading"));r<0?o[0].classList.add("c-stepper__item--loading"):(o[r].classList.remove("c-stepper__item--loading"),o[r].classList.remove("c-stepper__item--loaded"),r-1>0&&(o[r-1].classList.remove("c-stepper__item--loading"),o[r-1].classList.remove("c-stepper__item--loaded"),setTimeout(()=>{const a=o[r-1].querySelector(".c-stepper__loader");o[r-1].classList.add("c-stepper__item--loading"),a&&a instanceof HTMLElement&&(a.style.transition=`width ${n/1e3}s linear`)},0)))}if(e.clientWidth<e.scrollLeft){let r=e.scrollLeft;switch(s){case"partners":r-=e.clientWidth+32;break;case"rubrics":r-=e.clientWidth-36;break;case"overviewbar":r-=e.clientWidth-24;break;default:r-=Math.ceil(e.clientWidth*.6);break}e.scrollTo({left:r,behavior:"smooth"}),t.classList.add("o-nav-button--visible"),r===0&&i.classList.remove("o-nav-button--visible")}else e.scrollTo({left:0,behavior:"smooth"}),i.classList.remove("o-nav-button--visible"),e.clientWidth<e.scrollWidth&&t.classList.add("o-nav-button--visible")}},V=({navigatedList:e,nextBtn:t,prevBtn:i})=>{K({navigatedList:e,nextBtn:t,prevBtn:i})},z=()=>{const e=document.querySelectorAll(".js-navigation-container");for(const t of Array.from(e)){const{sliderVariant:i}=t.dataset,{sliderAuto:s}=t.dataset,{sliderDelay:n}=t.dataset,c=n?parseInt(n,10):3e3,l=t.closest(".js-overview-bar-container"),o=l==null?void 0:l.querySelector(".c-stepper"),r=o==null?void 0:o.querySelectorAll(".c-stepper__item");if(t){const a=t.querySelector(".js-navigation-container__list"),u=t.querySelector(".o-nav-button--next-button"),h=t.querySelector(".o-nav-button--previous-button");if(a&&a.clientWidth<a.scrollWidth&&(u==null||u.classList.add("o-nav-button--visible")),u==null||u.addEventListener("click",P.bind(!1,{navigatedList:a,nextBtn:u,prevBtn:h,sliderVariant:i})),h==null||h.addEventListener("click",B.bind(!1,{navigatedList:a,nextBtn:u,prevBtn:h,sliderVariant:i,delay:c})),s==="true"&&u){const ce=o?o.querySelector(".c-stepper__item--loading"):null;r&&(r.forEach(_=>{const f=_.querySelector(".c-stepper__loader");f&&f instanceof HTMLElement&&(f.style.transition=`width ${c/1e3}s linear`)}),ce||r[0].classList.add("c-stepper__item--loading")),setInterval(()=>{u.classList.contains("o-nav-button--visible")?u.click():a&&h&&(a.scrollLeft=0,r&&(r.forEach(_=>{const f=_.querySelector(".c-stepper__loader");f&&f instanceof HTMLElement&&(f.style.transition="width 0s linear"),_.classList.remove("c-stepper__item--loading"),_.classList.remove("c-stepper__item--loaded"),setTimeout(()=>{f&&f instanceof HTMLElement&&(f.style.transition=`width ${c/1e3}s linear`)},0)}),setTimeout(()=>{r[0].classList.add("c-stepper__item--loading")},0)),h.click())},c)}}}},N=()=>{const e=document.querySelectorAll(".js-navigation-container");for(const t of Array.from(e)){const{sliderVariant:i}=t.dataset;if(t){const s=t.querySelector(".js-navigation-container__list"),n=t.querySelector(".o-nav-button--next-button"),c=t.querySelector(".o-nav-button--previous-button");window.addEventListener("resize",V.bind(!1,{navigatedList:s,nextBtn:n,prevBtn:c,sliderVariant:i}))}}},Y=()=>{const e=document.querySelectorAll(".js-header-link"),t=document.querySelector(".js-overlay");if(t)for(const i of e)i.addEventListener("mouseenter",()=>{const s=i.querySelector(".js-sub-menu");if(s){if(window.getComputedStyle(s).getPropertyValue("display")!=="none"){t.classList.remove("u-hidden");return}t.classList.add("u-hidden")}}),i.addEventListener("mouseleave",()=>{t.classList.add("u-hidden")})},G=()=>{const e=document.querySelector(".js-limit-scroll-progress-bar"),t=document.querySelector(".c-progress__bar"),{documentElement:i}=document;if(!t)return;let s=i.scrollHeight-i.clientHeight;if(!s)return;const n=i.scrollTop;e&&(s=e.scrollHeight-i.clientHeight+(window.pageYOffset+e.getBoundingClientRect().top));const c=Math.round(n/s*100);t.style.width=`${c}%`,c>=100&&(t.style.width="100%")},J=()=>{document.querySelector(".c-progress")&&window.addEventListener("scroll",G)};let y,g=0;const Q=()=>{y=null,document.body.getBoundingClientRect().top>g+2&&(y="up"),document.body.getBoundingClientRect().top<g-2&&(y="down"),g=document.body.getBoundingClientRect().top;const e=document.querySelector(".c-read-also-banner");if(e){const t=e.dataset.bannerLimitTop||"0";y==="up"&&-document.body.getBoundingClientRect().top>=parseInt(t,10)&&(e.classList.remove("c-read-also-banner__scrolldirection--down"),e.style.paddingTop="1.5em",e.style.paddingBottom="1.5em",e.classList.contains("c-read-also-banner__scrolldirection--up")||e.classList.add("c-read-also-banner__scrolldirection--up")),(y==="down"||-document.body.getBoundingClientRect().top<=parseInt(t,10))&&(e.classList.remove("c-read-also-banner__scrolldirection--up"),e.style.paddingTop="0",e.style.paddingBottom="0",e.classList.contains("c-read-also-banner__scrolldirection--down")||e.classList.add("c-read-also-banner__scrolldirection--down"))}},U=(e=document.querySelector(".c-read-also-banner"))=>{if(e){let t;window.addEventListener("scroll",()=>{clearTimeout(t),t=setTimeout(Q,100)})}},X=e=>{var s;e.preventDefault();const t=e.currentTarget,i=(s=t.closest(".js-search-toggle"))==null?void 0:s.querySelector(".c-search-form");t.setAttribute("aria-hidden","true"),i==null||i.setAttribute("aria-hidden","false")},Z=(e=document.querySelector(".js-search-toggle"))=>{if(e){const t=e.querySelector(".c-header__search-button");t==null||t.addEventListener("click",X)}},ee=e=>{e.stopImmediatePropagation(),e.preventDefault();const t=e.currentTarget,i=t.parentElement,s=i==null?void 0:i.querySelector(".c-social-bar-item__sharebar-container");s&&(t.getAttribute("aria-expanded")==="true"?(t.setAttribute("aria-expanded","false"),s.setAttribute("aria-hidden","true"),s.classList.add("c-social-bar-item__sharebar-container--visible")):(t.setAttribute("aria-expanded","true"),s.setAttribute("aria-hidden","false"),s.classList.remove("c-social-bar-item__sharebar-container--visible")))},L=(e,t)=>{const i=t.target;!i||i.closest(".c-social-bar-item__sharebar-container")||i.closest(".c-social-bar-item")||(e.forEach(s=>{const n=s.parentElement,c=n==null?void 0:n.querySelector(".c-social-bar-item__sharebar-container");c&&(s.setAttribute("aria-expanded","true"),c.setAttribute("aria-hidden","false"),c.classList.remove("c-social-bar-item__sharebar-container--visible"))}),document.removeEventListener("click",L.bind(void 0,e)))},te=(e=document.querySelectorAll(".js-social-network-button"))=>{e.forEach(t=>{t.addEventListener("click",i=>{ee(i)})}),document.addEventListener("click",L.bind(void 0,e))},ie=({tabsContainerElement:e,event:t})=>{t.preventDefault();const i=t.target,s=e.querySelectorAll('[role="tab"]'),n=e.querySelectorAll('[role="tabpanel"]'),c=i.getAttribute("aria-controls"),l=Object.values(n).find(o=>o.id===c);s.forEach(o=>{o.setAttribute("aria-selected","false")}),n.forEach(o=>{o.setAttribute("aria-hidden","true")}),i.setAttribute("aria-selected","true"),l&&l.removeAttribute("aria-hidden")},E=e=>e.code==="ArrowLeft"||e.keyCode===39,A=e=>e.code==="ArrowRight"||e.keyCode===37,se=(e=document.querySelector(".js-tabs"))=>{if(e){const t=e.querySelectorAll('[role="tab"]');t.forEach(s=>{s.addEventListener("click",n=>{ie({tabsContainerElement:e,event:n})})});const i=e.querySelector('[role="tablist"]');if(i&&t.length>0){let s=0;i.addEventListener("keydown",n=>{n instanceof KeyboardEvent&&(E(n)||A(n))&&(t[s].setAttribute("tabindex","-1"),E(n)?(s+=1,s>=t.length&&(s=0)):A(n)&&(s-=1,s<0&&(s=t.length-1)),t[s].setAttribute("tabindex","0"),t[s].focus())})}}},w=({currentTheme:e,switchDarkModeElement:t})=>{const i=e==="dark";t.setAttribute("aria-checked",String(i));const s=t.querySelector("span[aria-hidden]");s&&(s.setAttribute("aria-hidden",String(i)),s.innerHTML=i?"on":"off")},oe=(e=document.querySelector(".js-switch-dark-mode"))=>{const t=localStorage.getItem("theme")||"light";t&&e&&(document.documentElement.dataset.theme=t,w({currentTheme:t,switchDarkModeElement:e}))},ne=(e=document.querySelector(".js-switch-dark-mode"))=>{e&&e.addEventListener("click",()=>{const t=document.documentElement.dataset.theme,i=!t||t==="light"?"dark":"light";document.documentElement.dataset.theme=i,localStorage.setItem("theme",i),w({currentTheme:i,switchDarkModeElement:e})})},re=()=>{oe(),ne(),$(),se(),k(),J(),Z(),R(),U(),W(),z(),N(),window.layout===m.DESKTOP&&(Y(),te())};b.initScripts=re,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})});
(function(b,p){typeof exports=="object"&&typeof module<"u"?p(exports):typeof define=="function"&&define.amd?define(["exports"],p):(b=typeof globalThis<"u"?globalThis:b||self,p(b.scripts={}))})(this,function(b){"use strict";var p=(e=>(e.MOBILE="mobile",e.DESKTOP="desktop",e))(p||{});const w=e=>{e.stopImmediatePropagation(),e.preventDefault();const t=e.currentTarget,s=t.parentElement,i=s==null?void 0:s.querySelector(`#${t.getAttribute("aria-controls")}`);t.getAttribute("aria-expanded")==="true"?(t.setAttribute("aria-expanded","false"),i==null||i.setAttribute("aria-hidden","true")):(t.setAttribute("aria-expanded","true"),i==null||i.setAttribute("aria-hidden","false"))},q=(e=document.querySelector(".js-collapse__button"))=>{e&&document.querySelectorAll(".c-collapse__button").forEach(s=>{s.addEventListener("click",i=>{w(i)})})},T=e=>{var s;const t=e.querySelector(".js-expandButton__label");e.setAttribute("aria-expanded","true"),t.innerHTML="Voir moins",(s=e.previousElementSibling)==null||s.setAttribute("aria-hidden","false")},k=e=>{var s;const t=e.querySelector(".js-expandButton__label");e.setAttribute("aria-expanded","false"),t.innerHTML="Voir plus",(s=e.previousElementSibling)==null||s.setAttribute("aria-hidden","true")},x=e=>{const t=e.currentTarget;return e.preventDefault(),t.getAttribute("aria-expanded")==="true"?k(t):T(t)},j=(e=document.querySelector(".js-expandButton"))=>{e&&document.querySelectorAll(".js-expandButton").forEach(s=>s.addEventListener("click",x))},$=e=>{const t=e.querySelector(".js-live-form__textarea"),s=e.querySelector("#live-form-submit-section");t==null||t.setAttribute("aria-expanded","true"),s==null||s.setAttribute("aria-hidden","false")},W=()=>{const e=document.querySelector(".js-live-form");if(e){const t=e.querySelector(".js-live-form__textarea textarea");t==null||t.addEventListener("focus",$.bind(!1,e))}};var O=['a[href]:not([tabindex^="-"])','area[href]:not([tabindex^="-"])','input:not([type="hidden"]):not([type="radio"]):not([disabled]):not([tabindex^="-"])','input[type="radio"]:not([disabled]):not([tabindex^="-"])','select:not([disabled]):not([tabindex^="-"])','textarea:not([disabled]):not([tabindex^="-"])','button:not([disabled]):not([tabindex^="-"])','iframe:not([tabindex^="-"])','audio[controls]:not([tabindex^="-"])','video[controls]:not([tabindex^="-"])','[contenteditable]:not([tabindex^="-"])','[tabindex]:not([tabindex^="-"])'],I="Tab",D="Escape";function d(e){this._show=this.show.bind(this),this._hide=this.hide.bind(this),this._maintainFocus=this._maintainFocus.bind(this),this._bindKeypress=this._bindKeypress.bind(this),this.$el=e,this.shown=!1,this._id=this.$el.getAttribute("data-a11y-dialog")||this.$el.id,this._previouslyFocused=null,this._listeners={},this.create()}d.prototype.create=function(){this.$el.setAttribute("aria-hidden",!0),this.$el.setAttribute("aria-modal",!0),this.$el.setAttribute("tabindex",-1),this.$el.hasAttribute("role")||this.$el.setAttribute("role","dialog"),this._openers=m('[data-a11y-dialog-show="'+this._id+'"]'),this._openers.forEach(function(t){t.addEventListener("click",this._show)}.bind(this));const e=this.$el;return this._closers=m("[data-a11y-dialog-hide]",this.$el).filter(function(t){return t.closest('[aria-modal="true"], [data-a11y-dialog]')===e}).concat(m('[data-a11y-dialog-hide="'+this._id+'"]')),this._closers.forEach(function(t){t.addEventListener("click",this._hide)}.bind(this)),this._fire("create"),this},d.prototype.show=function(e){return this.shown?this:(this._previouslyFocused=document.activeElement,this.$el.removeAttribute("aria-hidden"),this.shown=!0,S(this.$el),document.body.addEventListener("focus",this._maintainFocus,!0),document.addEventListener("keydown",this._bindKeypress),this._fire("show",e),this)},d.prototype.hide=function(e){return this.shown?(this.shown=!1,this.$el.setAttribute("aria-hidden","true"),this._previouslyFocused&&this._previouslyFocused.focus&&this._previouslyFocused.focus(),document.body.removeEventListener("focus",this._maintainFocus,!0),document.removeEventListener("keydown",this._bindKeypress),this._fire("hide",e),this):this},d.prototype.destroy=function(){return this.hide(),this._openers.forEach(function(e){e.removeEventListener("click",this._show)}.bind(this)),this._closers.forEach(function(e){e.removeEventListener("click",this._hide)}.bind(this)),this._fire("destroy"),this._listeners={},this},d.prototype.on=function(e,t){return typeof this._listeners[e]>"u"&&(this._listeners[e]=[]),this._listeners[e].push(t),this},d.prototype.off=function(e,t){var s=(this._listeners[e]||[]).indexOf(t);return s>-1&&this._listeners[e].splice(s,1),this},d.prototype._fire=function(e,t){var s=this._listeners[e]||[],i=new CustomEvent(e,{detail:t});this.$el.dispatchEvent(i),s.forEach(function(n){n(this.$el,t)}.bind(this))},d.prototype._bindKeypress=function(e){const t=document.activeElement;t&&t.closest('[aria-modal="true"]')!==this.$el||(this.shown&&e.key===D&&this.$el.getAttribute("role")!=="alertdialog"&&(e.preventDefault(),this.hide(e)),this.shown&&e.key===I&&M(this.$el,e))},d.prototype._maintainFocus=function(e){this.shown&&!e.target.closest('[aria-modal="true"]')&&!e.target.closest("[data-a11y-dialog-ignore-focus-trap]")&&S(this.$el)};function F(e){return Array.prototype.slice.call(e)}function m(e,t){return F((t||document).querySelectorAll(e))}function S(e){var t=e.querySelector("[autofocus]")||e;t.focus()}function H(e){return m(O.join(","),e).filter(function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)})}function M(e,t){var s=H(e),i=s.indexOf(document.activeElement);t.shiftKey&&i===0?(s[s.length-1].focus(),t.preventDefault()):!t.shiftKey&&i===s.length-1&&(s[0].focus(),t.preventDefault())}function v(){m("[data-a11y-dialog]").forEach(function(e){new d(e)})}typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",v):window.requestAnimationFrame?window.requestAnimationFrame(v):window.setTimeout(v,16));const C=(e=document.querySelector(".js-modal"))=>{e&&new d(e)},R=({navigatedList:e,nextBtn:t,prevBtn:s})=>{const i=e.scrollLeft>0,n=e.scrollLeft+e.clientWidth<e.scrollWidth;i&&n?(t.classList.add("o-nav-button--visible"),s.classList.add("o-nav-button--visible")):i?(t.classList.remove("o-nav-button--visible"),s.classList.add("o-nav-button--visible")):n?(t.classList.add("o-nav-button--visible"),s.classList.remove("o-nav-button--visible")):(t.classList.remove("o-nav-button--visible"),s.classList.remove("o-nav-button--visible"))},K=({navigatedList:e,nextBtn:t,prevBtn:s,sliderVariant:i})=>{if(e){const n=e.closest(".js-overview-bar-container"),l=n==null?void 0:n.querySelector(".c-stepper"),c=l==null?void 0:l.querySelectorAll(".c-stepper__item");if(c){const o=Array.from(c).findIndex(r=>r.classList.contains("c-stepper__item--loading"));if(o<0)c[0].classList.add("c-stepper__item--loading");else{c[o].classList.remove("c-stepper__item--loading"),c[o].classList.add("c-stepper__item--loaded");const r=c[o].querySelector(".c-stepper__loader");r&&r instanceof HTMLElement&&(r.style.transition="width 0s linear"),o+1<c.length&&c[o+1].classList.add("c-stepper__item--loading")}}if(e.scrollWidth-e.clientWidth>e.clientWidth){let o=e.scrollLeft;switch(i){case"partners":o+=e.clientWidth+32;break;case"rubrics":o+=e.clientWidth-36;break;case"overviewbar":o+=e.clientWidth-20;break;default:o+=Math.ceil(e.clientWidth*.6);break}e.scrollTo({left:o,behavior:"smooth"}),s.classList.add("o-nav-button--visible"),o+e.clientWidth>=e.scrollWidth&&t.classList.remove("o-nav-button--visible")}else{const o=e.scrollWidth-e.clientWidth;e.scrollTo({left:o,behavior:"smooth"}),t.classList.remove("o-nav-button--visible"),s.classList.add("o-nav-button--visible")}}},P=({navigatedList:e,nextBtn:t,prevBtn:s,sliderVariant:i,delay:n})=>{if(e){const l=e.closest(".js-overview-bar-container"),c=l==null?void 0:l.querySelector(".c-stepper"),o=c==null?void 0:c.querySelectorAll(".c-stepper__item");if(o){const r=Array.from(o).findIndex(a=>a.classList.contains("c-stepper__item--loading"));r<0?o[0].classList.add("c-stepper__item--loading"):(o[r].classList.remove("c-stepper__item--loading"),o[r].classList.remove("c-stepper__item--loaded"),r-1>0&&(o[r-1].classList.remove("c-stepper__item--loading"),o[r-1].classList.remove("c-stepper__item--loaded"),setTimeout(()=>{const a=o[r-1].querySelector(".c-stepper__loader");o[r-1].classList.add("c-stepper__item--loading"),a&&a instanceof HTMLElement&&(a.style.transition=`width ${n/1e3}s linear`)},0)))}if(e.clientWidth<e.scrollLeft){let r=e.scrollLeft;switch(i){case"partners":r-=e.clientWidth+32;break;case"rubrics":r-=e.clientWidth-36;break;case"overviewbar":r-=e.clientWidth-24;break;default:r-=Math.ceil(e.clientWidth*.6);break}e.scrollTo({left:r,behavior:"smooth"}),t.classList.add("o-nav-button--visible"),r===0&&s.classList.remove("o-nav-button--visible")}else e.scrollTo({left:0,behavior:"smooth"}),s.classList.remove("o-nav-button--visible"),e.clientWidth<e.scrollWidth&&t.classList.add("o-nav-button--visible")}},B=({navigatedList:e,nextBtn:t,prevBtn:s})=>{R({navigatedList:e,nextBtn:t,prevBtn:s})},V=()=>{const e=document.querySelectorAll(".js-navigation-container");for(const t of Array.from(e)){const{sliderVariant:s}=t.dataset,{sliderAuto:i}=t.dataset,{sliderDelay:n}=t.dataset,l=n?parseInt(n,10):3e3,c=t.closest(".js-overview-bar-container"),o=c==null?void 0:c.querySelector(".c-stepper"),r=o==null?void 0:o.querySelectorAll(".c-stepper__item");if(t){const a=t.querySelector(".js-navigation-container__list"),u=t.querySelector(".o-nav-button--next-button"),h=t.querySelector(".o-nav-button--previous-button");if(a&&a.clientWidth<a.scrollWidth&&(u==null||u.classList.add("o-nav-button--visible")),u==null||u.addEventListener("click",K.bind(!1,{navigatedList:a,nextBtn:u,prevBtn:h,sliderVariant:s})),h==null||h.addEventListener("click",P.bind(!1,{navigatedList:a,nextBtn:u,prevBtn:h,sliderVariant:s,delay:l})),i==="true"&&u){const oe=o?o.querySelector(".c-stepper__item--loading"):null;r&&(r.forEach(_=>{const f=_.querySelector(".c-stepper__loader");f&&f instanceof HTMLElement&&(f.style.transition=`width ${l/1e3}s linear`)}),oe||r[0].classList.add("c-stepper__item--loading")),setInterval(()=>{u.classList.contains("o-nav-button--visible")?u.click():a&&h&&(a.scrollLeft=0,r&&(r.forEach(_=>{const f=_.querySelector(".c-stepper__loader");f&&f instanceof HTMLElement&&(f.style.transition="width 0s linear"),_.classList.remove("c-stepper__item--loading"),_.classList.remove("c-stepper__item--loaded"),setTimeout(()=>{f&&f instanceof HTMLElement&&(f.style.transition=`width ${l/1e3}s linear`)},0)}),setTimeout(()=>{r[0].classList.add("c-stepper__item--loading")},0)),h.click())},l)}}}},z=()=>{const e=document.querySelectorAll(".js-navigation-container");for(const t of Array.from(e)){const{sliderVariant:s}=t.dataset;if(t){const i=t.querySelector(".js-navigation-container__list"),n=t.querySelector(".o-nav-button--next-button"),l=t.querySelector(".o-nav-button--previous-button");window.addEventListener("resize",B.bind(!1,{navigatedList:i,nextBtn:n,prevBtn:l,sliderVariant:s}))}}},Y=()=>{const e=document.querySelectorAll(".js-header-link"),t=document.querySelector(".js-overlay");if(t)for(const s of e)s.addEventListener("mouseenter",()=>{const i=s.querySelector(".js-sub-menu");if(i){if(window.getComputedStyle(i).getPropertyValue("display")!=="none"){t.classList.remove("u-hidden");return}t.classList.add("u-hidden")}}),s.addEventListener("mouseleave",()=>{t.classList.add("u-hidden")})},N=()=>{const e=document.querySelector(".js-limit-scroll-progress-bar"),t=document.querySelector(".c-progress__bar"),{documentElement:s}=document;if(!t)return;let i=s.scrollHeight-s.clientHeight;if(!i)return;const n=s.scrollTop;e&&(i=e.scrollHeight-s.clientHeight+(window.pageYOffset+e.getBoundingClientRect().top));const l=Math.round(n/i*100);t.style.width=`${l}%`,l>=100&&(t.style.width="100%")},G=()=>{document.querySelector(".c-progress")&&window.addEventListener("scroll",N)};let y,g=0;const J=()=>{y=null,document.body.getBoundingClientRect().top>g+2&&(y="up"),document.body.getBoundingClientRect().top<g-2&&(y="down"),g=document.body.getBoundingClientRect().top;const e=document.querySelector(".c-read-also-banner");if(e){const t=e.dataset.bannerLimitTop||"0";y==="up"&&-document.body.getBoundingClientRect().top>=parseInt(t,10)&&(e.classList.remove("c-read-also-banner__scrolldirection--down"),e.style.paddingTop="1.5em",e.style.paddingBottom="1.5em",e.classList.contains("c-read-also-banner__scrolldirection--up")||e.classList.add("c-read-also-banner__scrolldirection--up")),(y==="down"||-document.body.getBoundingClientRect().top<=parseInt(t,10))&&(e.classList.remove("c-read-also-banner__scrolldirection--up"),e.style.paddingTop="0",e.style.paddingBottom="0",e.classList.contains("c-read-also-banner__scrolldirection--down")||e.classList.add("c-read-also-banner__scrolldirection--down"))}},Q=(e=document.querySelector(".c-read-also-banner"))=>{if(e){let t;window.addEventListener("scroll",()=>{clearTimeout(t),t=setTimeout(J,100)})}},U=e=>{var i;e.preventDefault();const t=e.currentTarget,s=(i=t.closest(".js-search-toggle"))==null?void 0:i.querySelector(".c-search-form");t.setAttribute("aria-hidden","true"),s==null||s.setAttribute("aria-hidden","false")},X=(e=document.querySelector(".js-search-toggle"))=>{if(e){const t=e.querySelector(".c-header__search-button");t==null||t.addEventListener("click",U)}},Z=({tabsContainerElement:e,event:t})=>{t.preventDefault();const s=t.target,i=e.querySelectorAll('[role="tab"]'),n=e.querySelectorAll('[role="tabpanel"]'),l=s.getAttribute("aria-controls"),c=Object.values(n).find(o=>o.id===l);i.forEach(o=>{o.setAttribute("aria-selected","false")}),n.forEach(o=>{o.setAttribute("aria-hidden","true")}),s.setAttribute("aria-selected","true"),c&&c.removeAttribute("aria-hidden")},L=e=>e.code==="ArrowLeft"||e.keyCode===39,E=e=>e.code==="ArrowRight"||e.keyCode===37,ee=(e=document.querySelector(".js-tabs"))=>{if(e){const t=e.querySelectorAll('[role="tab"]');t.forEach(i=>{i.addEventListener("click",n=>{Z({tabsContainerElement:e,event:n})})});const s=e.querySelector('[role="tablist"]');if(s&&t.length>0){let i=0;s.addEventListener("keydown",n=>{n instanceof KeyboardEvent&&(L(n)||E(n))&&(t[i].setAttribute("tabindex","-1"),L(n)?(i+=1,i>=t.length&&(i=0)):E(n)&&(i-=1,i<0&&(i=t.length-1)),t[i].setAttribute("tabindex","0"),t[i].focus())})}}},A=({currentTheme:e,switchDarkModeElement:t})=>{const s=e==="dark";t.setAttribute("aria-checked",String(s));const i=t.querySelector("span[aria-hidden]");i&&(i.setAttribute("aria-hidden",String(s)),i.innerHTML=s?"on":"off")},te=(e=document.querySelector(".js-switch-dark-mode"))=>{const t=localStorage.getItem("theme")||"light";t&&e&&(document.documentElement.dataset.theme=t,A({currentTheme:t,switchDarkModeElement:e}))},se=(e=document.querySelector(".js-switch-dark-mode"))=>{e&&e.addEventListener("click",()=>{const t=document.documentElement.dataset.theme,s=!t||t==="light"?"dark":"light";document.documentElement.dataset.theme=s,localStorage.setItem("theme",s),A({currentTheme:s,switchDarkModeElement:e})})},ie=()=>{te(),se(),j(),ee(),q(),G(),X(),C(),Q(),W(),V(),z(),window.layout===p.DESKTOP&&Y()};b.initScripts=ie,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})});
{
"name": "@20minutes/hela",
"version": "0.1.116",
"version": "0.1.117",
"repository": "git@github.com:20minutes/hela.git",

@@ -71,9 +71,9 @@ "license": "MIT",

"@octokit/core": "4.2.4",
"@storybook/addon-actions": "^7.0.23",
"@storybook/addon-essentials": "^7.0.23",
"@storybook/addon-links": "^7.0.23",
"@storybook/addon-mdx-gfm": "^7.0.23",
"@storybook/blocks": "^7.0.23",
"@storybook/react": "^7.0.23",
"@storybook/react-vite": "^7.0.23",
"@storybook/addon-actions": "^7.0.24",
"@storybook/addon-essentials": "^7.0.24",
"@storybook/addon-links": "^7.0.24",
"@storybook/addon-mdx-gfm": "^7.0.24",
"@storybook/blocks": "^7.0.24",
"@storybook/react": "^7.0.24",
"@storybook/react-vite": "^7.0.24",
"@svgr/cli": "^8.0.1",

@@ -115,3 +115,3 @@ "@types/merge-stream": "^1.1.2",

"sass": "^1.63.6",
"storybook": "^7.0.23",
"storybook": "^7.0.24",
"style-dictionary": "^3.8.0",

@@ -118,0 +118,0 @@ "stylelint": "^15.9.0",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc