PageSourceSearch

https://sf.mariefrance.fr/wp-content/themes/core/assets/js/front/min/default.js?ver=234

js mariefrance.fr collected 2026-09-24 09:02:17 UTC 4,063 bytes, 1 lines download raw bytes

1document.addEventListener("DOMContentLoaded",()=>{const t=[],e=document.querySelectorAll("[header-toggle-js]");e.forEach(e=>{const n=document.querySelector(e.getAttribute("header-toggle-js"));n&&!t.includes(n)&&t.push(n)}),e.forEach(e=>{e.addEventListener("click",n=>{const s=document.querySelector(e.getAttribute("header-toggle-js"));t.forEach(t=>{s!==t||t.classList.contains("active")?t.classList.remove("active"):t.classList.add("active")})})})}),(()=>{"use strict";class t{constructor(t){this.navSelector=t.navSelector,this.navWrapper=document.querySelector(t.navWrapperSelector),this.navWrapper&&this.create()}create(){this.cloneSubMenu(),this.navWrapper.scrollWidth<=this.navWrapper.offsetWidth||(this.navWrapper.classList.add("scrollable-menu"),this.createScrollBtns())}createScrollBtns(){const t="scrollable-btn";this.nextBtn=document.createElement("button"),this.prevBtn=document.createElement("button");const e=document.createElement("span");this.nextBtn.setAttribute("class",t+" next"),this.prevBtn.setAttribute("class",t+" prev"),e.setAttribute("class","icon"),this.navWrapper.appendChild(this.prevBtn),this.navWrapper.appendChild(this.nextBtn),this.prevBtn.appendChild(e.cloneNode(!0)),this.nextBtn.appendChild(e.cloneNode(!0)),this.nextBtn.classList.add("active"),this.nextBtn.addEventListener("click",()=>this.scrollMenu(1)),this.prevBtn.addEventListener("click",()=>this.scrollMenu(-1))}scrollMenu(t){const e=this.navWrapper.querySelector(this.navSelector);if(!e)return;if(1===(parseInt(e.getAttribute("data-is-scrolling"))||0))return;e.setAttribute("data-is-scrolling",1);const n=e.offsetWidth,s=e.scrollWidth-n,a=parseInt(e.getAttribute("data-from-x"))||0;let r=a+t*n;r=Math.max(0,Math.min(s,r)),r=this.getOptimalItemOffsetLeft(r,e,s);const i=Math.abs(r-a)/.3;e.animate([{transform:`translateX(${-a}px)`},{transform:`translateX(${-r}px)`}],{duration:i,easing:"ease-in-out"}).onfinish=()=>{e.style.transform=`translateX(${-r}px)`,0===r?(this.prevBtn.classList.remove("active"),this.nextBtn.classList.add("active")):r===s?(this.prevBtn.classList.add("active"),this.nextBtn.classList.remove("active")):(this.prevBtn.classList.add("active"),this.nextBtn.classList.add("active")),e.setAttribute("data-from-x",r),e.setAttribute("data-is-scrolling",0)}}getOptimalItemOffsetLeft(t,e,n){if(t<=0)return 0;if(t>=n)return n;const s=Array.from(e.querySelectorAll(":scope > li"));let a=0;for(const e of s){const n=window.getComputedStyle(e),s=Math.max(0,e.offsetLeft-(parseInt(n.paddingLeft)||0));s<=t&&s>a&&(a=s)}return a}cloneSubMenu(){const t=document.createElement("div");t.setAttribute("class","menu-header-submenu"),this.navWrapper.parentNode.appendChild(t),this.navWrapper.querySelector(this.navSelector)?.querySelectorAll("li").forEach(e=>{e.addEventListener("mouseenter",n=>{const s=e.querySelector("ul");s&&(t.classList.add("active"),t.style.top=e.getBoundingClientRect().top-12+"px",t.style.left=e.getBoundingClientRect().left+"px",t.innerHTML=s.outerHTML)}),e.addEventListener("mouseleave",e=>{t.classList.remove("active")})})}}document.addEventListener("DOMContentLoaded",()=>{new t({navSelector:".menu-header__list",navWrapperSelector:".menu-header"}),document.querySelectorAll(".chevron-icon").forEach(t=>{t.addEventListener("click",e=>{if(!(window.innerWidth<1024))return;e.preventDefault();const n=t.parentElement.querySelector(".header-submenu");n&&(n.classList.contains("active")?(n.classList.remove("active"),e.target.classList.remove("active")):(document.querySelectorAll(".header-submenu").forEach(t=>{t.classList.remove("active")}),document.querySelectorAll(".chevron-icon").forEach(t=>{t.classList.remove("active")}),n.classList.add("active"),e.target.classList.add("active")))})})})})(),document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll("[data-href]").forEach(function(t){!function(t){const e=Object.assign(document.createElement("a"),{innerHTML:t.innerHTML});for(const n of t.attributes){let t=n.name;t.startsWith("data-")&&(t=t.replace("data-","")),e.setAttribute(t,n.value)}t.replaceWith(e)}(t)})});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.