1(function(a,r){class n{constructor(e){this.el=e,this.id=`share-${Math.random().toString(36).slice(2,9)}`,this.el.setAttribute("id",this.id),this.escHandler=null,this.mediaQuery=window.matchMedia("(max-width: 767px)"),this.init(),this.bindItemClick()}init(){this.handleBreakpoint(this.mediaQuery.matches),this.mediaQuery.addEventListener("change",e=>{this.handleBreakpoint(e.matches)})}handleBreakpoint(e){e?this.el.closest(".share__wrapper")||this.wrap():this.unwrap()}wrap(){const e=document.createElement("div");e.className="share__wrapper",this.el.parentNode.insertBefore(e,this.el),e.appendChild(this.el);const t=document.createElement("button");t.className="share__toggle btn btn-icon",t.setAttribute("data-js-btn-toggle-all",""),t.setAttribute("data-icon","share"),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-controls",this.id),t.setAttribute("aria-label","Afficher les options de partage"),this.el.setAttribute("aria-hidden","true"),e.appendChild(t),this.bindToggle(t)}unwrap(){const e=this.el.parentNode;e&&e.classList.contains("share__wrapper")&&(e.parentNode.insertBefore(this.el,e),e.remove()),this.el.classList.remove("show"),this.el.setAttribute("aria-hidden","false"),this.escHandler&&(document.removeEventListener("keydown",this.escHandler),this.escHandler=null)}bindToggle(e){e.addEventListener("click",()=>{const t=e.classList.toggle("active");this.el.classList.toggle("show",t),e.setAttribute("aria-expanded",t),this.el.setAttribute("aria-hidden",!t),t&&this.el.querySelector('a, button, [tabindex]:not([tabindex="-1"])')?.focus()}),this.escHandler=t=>{t.key==="Escape"&&this.el.classList.contains("show")&&(e.classList.remove("active"),this.el.classList.remove("show"),e.setAttribute("aria-expanded","false"),this.el.setAttribute("aria-hidden","true"),e.focus())},document.addEventListener("keydown",this.escHandler)}bindItemClick(){this.el.querySelectorAll('.share__item:not([data-once="favoriButton"])').forEach(e=>{e.addEventListener("click",t=>{t.preventDefault();const s=e.getAttribute("data-href");s&&window.open(s,"_blank")})})}}a.behaviors.shareWidget={attach(i){r("shareWidget",i.querySelectorAll(".share")).forEach(e=>{new n(e)})}}})(Drupal,once); 2//# sourceMappingURL=share.min.js.map
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.