<\/div>");var r=$(n).attr("id"),i=$(n).attr("data-wdgt-toast-class-position"),t=$(n).attr("data-wdgt-toast-delay");i=i.replace(/\s\s+/g," ");selectorToastContainer=selectorWrapper+" ."+i.split(" ").join(".");$(selectorToastContainer).length==0&&$(selectorWrapper).append("
<\/div>");$(selectorToastContainer).prepend(n);$("#"+r).addClass("showing").addClass("show").delay(150).queue(function(){$(this).removeClass("showing").dequeue()});$('[data-wdgt-dismiss="toast"]').off("click").on("click",function(){var n=$(this).closest(".toast").attr("id");initHideCustomToast(n)});t!=""&&t!=undefined&&(t=parseInt(t),setTimeout(()=>{initHideCustomToast(r)},t))}function initHideCustomToast(n){$("#"+n).addClass("showing").delay(150).queue(function(){$(this).remove().dequeue()})}function createCustomModalFromHtml(n){initShowCustomModal(n.htmlContent,n.modalIdSelector);n.isConfirmation==!1&&handleSubmitCustomModalForm(n)}function initShowCustomModal(n,t){selector="#widget-rodrigue-wrapper";$("#widget-rodrigue-wrapper").length==0&&$("body").append("
<\/div>");$(selector).append(n);var i=`
`;$(selector).append(i);$("#"+t).addClass("show").show();$("body").addClass("widget-modal-open");$(".widget-modal-backdrop").addClass("show");$("#"+t).find('[data-wdgt-dismiss="modal"]').off("click").on("click",function(){var n=$(this).closest("widget-modal").attr("id");initHideCustomModal(n)})}function initHideCustomModal(n){$("#"+n).removeClass("show").hide();$(".widget-modal-backdrop").remove();$("body").removeClass("widget-modal-open")}function createModal(n,t){document.body.insertAdjacentHTML("beforeend",n);let i=document.getElementById(t);if(i){const n=new WgtModal(i);n.show()}else console.error(`Dom element with id '${t}' not found`)}function closeModal(n){const t=WgtModal.instances[n];t?t.destroy():console.error(`Modal instance with id '${idModale}' not found`)}function handleSubmitCustomModalForm(n){let t=document.getElementById(n.formIdSelector);t.onsubmit=async i=>{i.preventDefault();let u=new FormData(t),r={};for(const[n,t]of u){let i=t=="on"?!0:t;if(n.includes("[")){let t=n.split("[")[0],u=n.split("[")[1].split("]")[0],f=n.split(".")[1];console.log(t);console.log(u);console.log(f);r[t]==null&&(r[t]=[]);r[t][u]==null&&r[t].push({});r[t][u][f]=i}else r[n]=i}sendCustomModalResponse(n.iframeSelector,n.modalIdSelector,JSON.stringify(r))}}async function handleChangeCallNewContent(n,t){await fetch(n).then(n=>n.text()).then(n=>$(t).html(n))}async function handleCallDotNetMethodAsync(n){var t={action:"callDotNetMethod",args:[...arguments]};return sendMessageToIframe(n,t),new Promise(function(n){window.addEventListener("message",function t(i){i.data.action=="callDotNetMethodResponse"&&(n(i.data.response),window.removeEventListener("click",t))})})}function sendConfirmationModalResponse(n,t,i){var u={action:"confirmation",response:i},r;sendMessageToIframe(n,u);initHideCustomModal(t);r=document.getElementById(t);r.remove()}function sendCustomModalResponse(n,t,i){var u={action:"customResponse",response:i},r;initHideCustomModal(t);sendMessageToIframe(n,u);r=document.getElementById(t);r.remove()}function sendMessageToIframe(n,t){var i=document.querySelector(n);i.contentWindow.postMessage(t,"*")}function initWidgetModals(){document.querySelectorAll(".wgt-modal").forEach(n=>{new WgtModal(n)});document.addEventListener("click",n=>{Object.values(WgtModal.instances).forEach(t=>{n.target!==t.element||t.isStatic||t.hide()})})}var sWOffersUrl="https://widgets.themisweb.fr/offers/v208/",SphereOffers;(function(){function u(n,t){var r=!1,i;for(typeof n!="object"&&(n=n.toString().split(".")),typeof t!="object"&&(t=t.toString().split(".")),i=0;i
<\/iframe > ");f(t);document.getElementById("sWOffers_"+o).onload=function(){e(t);$(window).resize()};window.removeEventListener("message",i);window.addEventListener("message",i)}function i(n){switch(n.data.action){case"resize":$("#sWOffers_"+decodeURIComponent(n.data.selector).replace(/[^a-zA-Z0-9]/g,"")).css({height:n.data.height})}typeof sendIframeSize!="undefined"&&sendIframeSize()}function f(n){var t="";t+='