1"use strict";(globalThis.webpackChunklibertin||=[]).push([[2540],{12540(e,t,n){n.r(t),n.d(t,{destroyGalleries:()=>C,initGallery:()=>D,initLightGallery:()=>T,inlineLightGallery:()=>A,isMobile:()=>S});var l=n(95248),i=(n(17943),n(57745),n(18967),n(60937),n(36498)),o=n(74960),r=n(74882);const a={like:!0,additionalLikeOptions:[],likePluginStrings:{like:"Like"}},c=(e,t=null)=>String(e?.memberId??"").trim()||(0,r.qz)(t),s=class{constructor(e){this.core=e,this.settings={...a,...e?.settings||{}}}setLgLikeMarkup(){const e='\n <div class="lg-like lg-icon">\n <span class="bouton-like-photogalerie d-none" data-mediaid="0"></span>\n </div>';try{if(this.core?.$toolbar?.append)this.core.$toolbar.append(e);else{const t=this.core?.outer?.querySelector(".lg-toolbar");t&&t.insertAdjacentHTML("beforeend",e)}}catch{}}onAfterSlide(e){const t=e?.detail?.index??0,n=this.core?.galleryItems?.[t]||{},l=this.core?.items?.[t]||null;"photogalerie"===n.mediatype&&document.dispatchEvent(new CustomEvent("displayLikeMedias",{detail:{mediaid:n.mediaid,mediatype:n.mediatype,memberId:c(n,l),lgId:this.core?.lgId}}))}init(){this.core?.settings?.like&&(this.setLgLikeMarkup(),this.core.LGel.on("lgAfterSlide.like",this.onAfterSlide.bind(this)))}destroy(){this.core?.LGel?.off?.(".like")}};var d=n(68412),u=n(72774),g=n(42028),m=n(8288),h=n(95662),p=n(55318);let f=!1,b={},y=null,v=!1,k=!1;const S=()=>(0,g.X)();function E(e){const t=document.documentElement;t&&t.classList.toggle("lg-inline-fullscreen",!!e)}function I(e){if(!e)return void E(!1);const t=e.querySelector(".lg-container");E(!!t&&!t.classList.contains("lg-inline"))}function L(e){if(e&&"function"==typeof e.destroy)try{e.destroy(!0)}catch{}}function T(e=!0,t=!1){let n=document.querySelectorAll(".light-gallery");if(!0!==e){const l=document.querySelectorAll(`${e} .post-inf`);if(n=l.length?[l[l.length-1]]:[],t){const t=document.querySelector(e);if(t){const e=Array.from(t.querySelectorAll(".post-inf")).pop();n=e?e.querySelectorAll(".light-gallery"):[]}}}n.forEach((t,n)=>{if(t.lgData)return;const r=t.querySelectorAll(".lgallery-item").length;if(!r)return;const a=r>1?"lg-custom-thumbnails":"",c=r>1,d={plugins:[i.A,o.A,s],selector:".lgallery-item",startClass:"lg-fade",mode:"lg-fade",speed:200,backdropDuration:100,thumbnail:c,fullScreen:!1,allowMediaOverlap:!0,getCaptionFromTitleOrAlt:!1,enableDrag:!1,hideScrollbar:!0,exThumbImage:"data-external-thumb-image",addClass:a,appendThumbnailsTo:".lg-outer",download:!1,mobileSettings:{controls:!1,showCloseIcon:!0,download:!1},licenseKey:"D7BF91D5-D5154758-85DB7746-AEEB527F",extraProps:["idphotoforlike","mediaid","mediatype","memberId"]};!0===e&&b[n]&&L(b[n]);const u=(0,l.A)(t,d);b[n]=u,t.lgData=u,c&&function(e){const t=document.getElementById(`lg-container-${e.lgId}`);if(!t)return;let n;t.addEventListener("click",n=t=>{const n=t.target.closest(".lg-thumb-item");if(!n)return;t.preventDefault(),t.stopPropagation();const l=n.getAttribute("data-lg-item-id"),i=parseInt(l,10);if(!isNaN(i)&&e){const t=e.items?.[i];if("true"===t?.getAttribute?.("aria-disabled")||t?.classList?.contains("is-encoding"))return!1;e.slide(i,!1,!1)}return!1},!0),t._lgThumbnailClickHandler=n}(u);const g=()=>{const e=document.getElementById(`lg-container-${u.lgId}`),t=e?.querySelector(".lg-current video");if(t){!function(e){if(!e||e._lgSwipeGuardBound)return;e._lgSwipeGuardBound=!0;let t=!1;e.addEventListener("touchstart",n=>{t=n.touches&&1===n.touches.length&&(t=>{const n=e.getBoundingClientRect();return n.height>0&&t.clientY-n.top>=n.height-64})(n.touches[0]),t&&n.stopPropagation()},{passive:!0}),e.addEventListener("touchmove",e=>{t&&e.stopPropagation()},{passive:!0}),e.addEventListener("touchend",e=>{t&&e.stopPropagation(),t=!1},{passive:!0}),e.addEventListener("touchcancel",()=>{t=!1},{passive:!0})}(t);try{t.disablePictureInPicture=!0}catch{}try{t.disableRemotePlayback=!0}catch{}if("controlsList"in t)try{t.controlsList="nodownload noplaybackrate noremoteplayback"}catch{}}};t.addEventListener("lgHasVideo",()=>{1===r&&document.querySelectorAll("body .lg-sub-html").forEach(e=>e.remove()),S()&&g()}),t.addEventListener("lgAfterSlide",()=>{g()})})}function A(){const e=document.getElementById("inline-gallery-container");if(!e)return;if(e.lgData&&document.body.contains(e)){const t=e.querySelector(".lg-container");if(t&&t.classList.contains("lg-show"))return}e.lgData&&(L(e.lgData),delete e.lgData),y&&(y=null),e.querySelectorAll(".lg-container").forEach(e
1=>{e.parentNode&&e.parentNode.removeChild(e)}),[...e.attributes].forEach(t=>{t.name.startsWith("data-lg-")&&e.removeAttribute(t.name)});const t=e.querySelectorAll(".lgallery-item").length;if(!t)return;const n=t>1?"lg-custom-thumbnails":"",o=t>1,r=(0,l.A)(e,{container:e,plugins:[i.A,s],selector:".lgallery-item",extraProps:["idphotoforlike","mediaid","mediatype","memberId"],like:!0,startClass:"lg-fade",mode:"lg-fade",speed:200,backdropDuration:100,allowMediaOverlap:!0,enableDrag:!1,hideScrollbar:!0,thumbnail:o,addClass:n,exThumbImage:"data-external-thumb-image",appendThumbnailsTo:".lg-outer",hash:!1,closable:!1,download:!1,showMaximizeIcon:!0,licenseKey:"D7BF91D5-D5154758-85DB7746-AEEB527F"});let a,c;if(y=r,e.lgData=r,r.openGallery(),I(e),e.addEventListener("click",a=t=>{t.target.closest(".lg-maximize")&&requestAnimationFrame(()=>I(e))}),e._lgInlineFullscreenHandler=a,e.addEventListener("click",c=e=>{const t=e.target.closest(".lg-thumb-item");if(!t)return;e.preventDefault(),e.stopPropagation();const n=t.getAttribute("data-lg-item-id"),l=parseInt(n,10);return!isNaN(l)&&r&&r.slide(l,!1,!1),!1},!0),e._lgThumbnailClickHandler=c,!e.classList.contains("photos-needed")){let n,l;e.addEventListener("click",n=n=>{if(n.target.closest(".lg-image"))return n.preventDefault(),e.querySelector(".lg-inline")||1===t?e.querySelector(".lg-maximize")?.click():S()||r.goToNextSlide(),!1}),e._lgImageClickHandler=n,e.addEventListener("click",l=t=>{t.target.closest(".lg-thumb-item")||t.target.closest(".lg-thumb")||t.target.closest(".lg-inner")&&!t.target.closest(".lg-image")&&(t.preventDefault(),e.querySelector(".lg-inline")||e.querySelector(".lg-maximize")?.click())}),e._lgInnerClickHandler=l,function(e){if(e._lgInlineSwipeHandlers)return;const t=()=>{const e=document.scrollingElement;return e&&"number"==typeof e.scrollTop?e.scrollTop:window.pageYOffset||window.scrollY||0};let n=0,l=0,i=0,o=0,r=null,a=!1;const c=()=>{n=0,l=0,i=0,o=0,r=null,a=!1},s=e=>{if(!e.touches||1!==e.touches.length)return;if(e.target.closest("video, audio, input[type=range], .lg-video-cont"))return;const c=e.touches[0];n=c.clientX,l=c.clientY,i=Date.now(),o=t(),r=null,a=!0},d=e=>{if(!a||!e.touches||1!==e.touches.length)return;const t=e.touches[0],i=t.clientX-n,o=t.clientY-l;if(!r){if(Math.abs(i)<12&&Math.abs(o)<12)return;r=Math.abs(o)>Math.abs(i)?"y":"x"}},u=s=>{if(!a||!s.changedTouches||1!==s.changedTouches.length)return void c();const d=s.changedTouches[0],u=d.clientX-n,g=d.clientY-l,m=Date.now()-i,h=Math.abs(t()-o),p=r?"y"===r:Math.abs(g)>Math.abs(u);m>600||h>4?c():Math.abs(g)<40||p&&(e.querySelector(".lg-inline")||(s.cancelable&&s.preventDefault(),e.querySelector(".lg-maximize")?.click()),c())},g=()=>c();e.addEventListener("touchstart",s,{passive:!0,capture:!0}),e.addEventListener("touchmove",d,{passive:!0,capture:!0}),e.addEventListener("touchend",u,{passive:!1,capture:!0}),e.addEventListener("touchcancel",g,{capture:!0}),e._lgInlineSwipeHandlers={onTouchStart:s,onTouchMove:d,onTouchEnd:u,onTouchCancel:g}}(e)}}function C(){const e=document.getElementById("inline-gallery-container");if(y&&(L(y),y=null),e&&(delete e.lgData,e._lgThumbnailClickHandler&&(e.removeEventListener("click",e._lgThumbnailClickHandler,!0),delete e._lgThumbnailClickHandler),e._lgImageClickHandler&&(e.removeEventListener("click",e._lgImageClickHandler),delete e._lgImageClickHandler),e._lgInnerClickHandler&&(e.removeEventListener("click",e._lgInnerClickHandler),delete e._lgInnerClickHandler),e._lgInlineFullscreenHandler&&(e.removeEventListener("click",e._lgInlineFullscreenHandler),delete e._lgInlineFullscreenHandler),e._lgInlineSwipeHandlers)){const{onTouchStart:t,onTouchMove:n,onTouchEnd:l,onTouchCancel:i}=e._lgInlineSwipeHandlers;e.removeEventListener("touchstart",t,!0),e.removeEventListener("touchmove",n,!0),e.removeEventListener("touchend",l,!0),e.removeEventListener("touchcancel",i,!0),delete e._lgInlineSwipeHandlers}document.querySelectorAll(".light-gallery").forEach(e=>{e._lgThumbnailClickHandler&&(e.removeEventListener("click",e._lgThumbnailClickHandler,!0),delete e._lgThumbnailClickHandler),e.lgData&&L(e.lgData),delete e.lgData}
1),document.querySelectorAll(".lg-container").forEach(e=>{e._lgThumbnailClickHandler&&(e.removeEventListener("click",e._lgThumbnailClickHandler,!0),delete e._lgThumbnailClickHandler)}),b={},v=!1,E(!1)}function D(){if(!document.querySelector(".lgallery-item"))return;k||(k=!0,document.addEventListener("click",e=>{const t=e.target.closest("#inline-gallery-container");if(!t)return;const n=t.classList.contains("photos-needed"),l=t.classList.contains("souscription-needed");(n||l)&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),l?(0,u.P)(u.A.SUBSCRIPTION,{...(0,p.OZ)(t)}):n&&(0,u.P)(u.A.PHOTOS,{...(0,p.OZ)(t)}))},!0));const e=document.querySelectorAll(".light-gallery"),t=Array.from(e).filter(e=>!e.lgData);e.length>0&&0===t.length||(document.getElementById("inline-gallery-container")&&A(),T(),function(){if(v)return;const e=document.getElementById("profile-infos-tabs");e&&(v=!0,e.querySelectorAll('button[data-bs-toggle="tab"]').forEach(e=>{e.addEventListener("shown.bs.tab",e=>{"#tabalbums"===e.target.getAttribute("data-bs-target")&&T()})}))}(),f||(f=!0,document.addEventListener("click",e=>{const t=e.target.closest("a.play-video");if(!t)return;const n=t.dataset.idvideo??t.getAttribute("data-idvideo");if(n)try{(0,d.IN)(n)}catch{}},!1),document.addEventListener("click",e=>{e.target.closest('.lg-toolbar .bouton-like-photogalerie a[href="#"]')&&e.preventDefault()},!1),document.addEventListener("displayLikeMedias",async e=>{const{memberId:t,mediaid:n,mediatype:l,lgId:i}=e?.detail||{};let o;try{const e=await Promise.resolve((0,d._D)(t,n,l));o=await(0,h.U)(e)}catch{return}if(!o)return;const r=i?document.querySelector(`#lg-container-${i}`):document;let a=!1;r?.querySelectorAll(".bouton-like-photogalerie").forEach(e=>{e.innerHTML=o,e.classList.remove("d-none"),e.style.removeProperty("display"),e.dataset.mediaid=String(n??""),e.dataset.mediatype=String(l??""),e.dataset.memberId=String(t??""),a=!0}),a&&(0,m.ensureTooltips)(r||document)})))}document.addEventListener("turbo:before-cache",C)},55318(e,t,n){const l=n(98634).b;n.d(t,["MU",0,()=>l,"OZ",0,e=>(e=>{const t=(e=>e?"function"==typeof e.closest?e:e.parentElement&&"function"==typeof e.parentElement.closest?e.parentElement:null:null)(e);return!!t&&Boolean(t.closest(l))})(e)?{container:l,backdropRoot:l}:{}])},72774(e,t,n){var l=n(44663),i=n(72974),o=n(99958);const r=Object.freeze({SUBSCRIPTION:"subscription",PHOTOS:"photos",CERTIFICATION:"certification"}),a=Object.freeze({[r.SUBSCRIPTION]:{titleKey:"subscriptionTitle",messageKey:"subscriptionRequiredDialogMessage",href:"/souscription"},[r.PHOTOS]:{titleKey:"profilePhotosTitle",messageKey:"photosRequiredDialogMessage",href:"/photo/update"},[r.CERTIFICATION]:{titleKey:"profileCertificationTitle",messageKey:"certificationRequiredDialogMessage",href:"/gestionprofil/certificate"}});n.d(t,["A",0,r,"P",0,(e,t={})=>{const n=a[e];if(!n)return;const{displayConfirmDialogApi:r=i.t1,...c}=t;return(0,o.RO)((0,l.t)(n.titleKey),(0,l.t)(n.messageKey),n.href,{displayConfirmDialogApi:r,...c})}])},98634(e,t,n){const l="containerForWebcam",i=`#${l}`;((...e)=>Array.from(new Set(e.flatMap(e=>String(e||"").trim().split(/\s+/)).filter(Boolean))))("chat-webcam-global-surface","webcam-surface-root","webcam-global-root","top-0 start-0 end-0 bottom-0 position-absolute").join(" "),n.d(t,["b",0,"#containerForPrivateDialogue","o",0,l,"oQ",0,i])},42028(e,t,n){let l;n.d(t,{X:()=>r});const i=/Android.+Mobile|iPhone|iPod|Opera Mini|Mobile Safari/i,o=/iPad|Tablet|Android(?!.*Mobile)|Kindle|Silk/i;function r({treatTabletAsMobile:e=!1}={}){const t="undefined"!=typeof navigator?navigator.userAgentData:null;if(!0===t?.mobile)return!0;const n=String(("undefined"!=typeof navigator?navigator.userAgent:"")||"");if(i.test(n))return!0;if(e&&o.test(n))return!0;const r=void 0!==l?l:"undefined"==typeof document?l=null:(l=document.getElementById("media-query-detector"),l);return r?!r.offsetParent:"undefined"!=typeof window&&(!!window.matchMedia?.("(max-width: 767.98px)")?.matches||window.innerWidth<768)}}}]);
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.