function fix(n){n.onerror=null;n.src="/UI/img/blank.gif";n.style.display="none"}function link(n,t){var n=n.getElementsByTagName("a");t=t||0;t<n.length&&(self.location=n[t].href)}(function(){function r(r){r?n&&Boursier.html.applyRefresh(u?1:n,i):t&&(Boursier.html.disableRefresh(),setTimeout(function(){u=!0},n*1e3))}var t,n,i,u=!1,f=function(n){return String(n).search(/^\s*\d+\s*$/)!=-1},e=function(n){return parseInt(n,10)};typeof document.visibilityState!="undefined"?window.addEventListener("visibilitychange",function(){r(document.visibilityState==="visible")},!1):(window.addEventListener("blur",function(){r(!1)},!1),window.addEventListener("focus",function(){r(!0)},!1));window.Boursier={supportPassive:function(){var t=!1,n;try{n=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassive",null,n);window.removeEventListener("testPassive",null,n)}catch(i){}return t}(),html:{applyRefresh:function(r,u){(r=isNaN(r)?n:r)&&(i=u||i,n=r,t=setTimeout(function(){self.location=i||self.location},r*1e3))},disableRefresh:function(i){t!==undefined&&(clearTimeout(t),t=undefined,i&&(n=0))}},callback:{},tools:{paramToObj:function(n,t){var r;if(typeof n!="string")return!1;var s={},c=t||";",u=n.split(c),l=u.length,h,i,o;for(r=0;r<l;r++)o=u[r].indexOf("="),h=u[r].substring(0,o),i=u[r].substring(o+1),i=f(i)?e(i):i,s[h]=i;return s},disableCopy:function(){document.oncopy=function(){return!1}}}}})();BC.AJAX.initTradingPage=function(){BC.AJAX.InitOnglets.call(this);BC.adjustResponsiveCharts(500)};BC.initHeader=function(){$("#box-connection .connected").length?($("html").removeClass("not-logged"),$("html").addClass("logged")):($("html").removeClass("logged"),$("html").addClass("not-logged"))};BC.initToggle=function(){const n=Array.from(document.getElementsByClassName("toggle-button"));n.forEach(function(n){n.addEventListener("click",function(n){const i=this.getAttribute("data-toggle-element"),r=i.split(" "),u=this.getAttribute("data-toggle-class"),t=this.getAttribute("data-flip");r.forEach(function(n){var i=document.querySelector(n);if(i&&(i.classList.toggle(u),t!==null)){const n=document.querySelectorAll(t)[0],i=n.querySelector("form");n.style.minHeight=i.clientHeight+"px"}});n.preventDefault()},!1)})};BC.AJAX.initHeaderConnection=function(){var u=document.getElementById("user-menu"),o=document.getElementById("m-infos");u&&o.appendChild(u);BC.initHeader();BC.initToggle();var f=document.getElementById("form-search__toggle"),e=document.getElementById("connection__toggle"),i=document.getElementById("form-search"),r=document.getElementById("box-connection").querySelectorAll(".inner")[0],n=document.getElementById("search-overlay"),t=document.getElementById("connection-overlay");f&&f.addEventListener("click",function(u){i.classList.toggle("visible");n.classList.toggle("visible");r.classList.remove("visible");t.classList.remove("visible");u.preventDefault()},!1);e&&e.addEventListener("click",function(u){r.classList.toggle("visible");t.classList.toggle("visible");i.classList.remove("visible");n.classList.remove("visible");u.preventDefault()},!1);n.addEventListener("click",function(t){i.classList.remove("visible");n.classList.remove("visible");t.preventDefault()},!1);t.addEventListener("click",function(n){r.classList.remove("visible");t.classList.remove("visible");n.preventDefault()},!1)};$(document).on("click",".m-profil",function(){$(this).toggleClass("open")});BC.applyConnection=function(){var n=Array.prototype.slice.call(arguments,0);$("#"+n.join(",#")).click(function(){var n=$("#connect-me");if(n.length)return n.click(),!1})};BC.AJAX.InitOnglets=function(){var n=$(this);$(".tabs",n).each(function(){var t=$(this),c=$("> .tab",t),r=t.next("div.tabs-content:eq(0)"),f=this.id||null,o=$.cookie(f),i=t.attr("data-script")?nw.tools.paramToObj(t.attr("data-script")):{},n={currentClass:"on",disabledClass:"off",nbTabs:c.length,url:"",index:0,defaut:i.defaut===0?0:i.defaut||"undefined",mode:i.mode||"none",event:i.event||"click",autoSize:i.autosize?!0:!1},u=function(t){r.find("> div:eq("+t+") div").data("ajax-href")&&(window.dispatchEvent(new CustomEvent("scroll")),window.dispatchEvent(new CustomEvent("scroll")));c.filter("."+n.currentClass).removeClass(n.currentClass).end().filter(":eq("+t+")").addClass(n.currentClass)},e=function(t){n.mode==="async"&&t.url!==""?(r.empty(),$.ajax({url:t.url,success:function(t){r.removeClass("box b-error").html(t);u(n.index);nw.tools.stopLoading(r)},error:function(){r.addClass("box b-error").html(" D&eacute;sol&eacute;, une erreur est survenue.");nw.tools.stopLoading(r)}})):n.mode==="sync"?r.children("div:not(.tabs-content-visible)").css({visibility:"hidden",height:0}).filter(":eq("+t.index+")").css({visibility:"visible",height:""}):n.mode==="img"&&BC.adjustChartUrl(r.find("img")[0],t.url)};if(i.start=i.start|0,o&&(n.defaut=Math.max(0,o-i.start)),typeof n.defaut!="undefined"&&n.defaut>-1&&u(n.defaut),t.delegate(".tab."+n.disabledClass,n.event,function(){return!1}),n.mode==="async")t.delegate(".tab:not(."+n.disabledClass+")",n.event,function(){var i=$(this);return n.index=t.find(".tab").index(i),n.url=nw.tools.paramToObj(i.find("a").attr("data-script")).url,u(n.index),e({url:n.url}),!1});else if(n.mode==="sync")typeof n.defaut!="undefined"&&n.defaut>-1&&e({index:n.defaut}),t.delegate(".tab:not(."+n.disabledClass+")",n.event,function(){var i=$(this);return n.index=t.find(".tab").index(i),u(n.index),e({index:n.index}),f&&$.cookie(f,n.index,{expires:365,path:"/"}),!1});else if(n.mode==="img")o||n.defaut!=="undefined"||(n.defaut=0,u(n.defaut)),typeof n.defaut!="undefined"&&n.defaut>-1&&(n.url=nw.tools.paramToObj(t.find("> .tab:eq("+n.defaut+")").find("a").attr("data-script")).url,e({url:n.url})),t.delegate(".tab:not(."+n.disabledClass+")",n.event,function(){var r=$(this),o=r.find("a");return n.index=t.find(".tab").index(r),n.url=nw.tools.paramToObj(o.attr("data-script")).url,u(n.index),e({url:n.url}),f&&$.cookie(f,n.index+i.start,{expires:365,path:"/"}),!1});else if(n.mode.substring(0,4)==="form"){var l=n.mode.split(":"),s=l.length===2?$("#"+l[1]):t.parents("form:eq(0)"),h=nw.tools.paramToObj(t.attr("data-script")).name;t.delegate(".tab:not(."+n.disabledClass+")",n.event,function(){var t=$(this),i=t.find("a"),n=nw.tools.paramToObj(i.attr("data-script")).val;return $('input[name="'+h+'"]',s).length||s.append('<input type="hidden" name="'+h+'" value="'+n+'" />'),s.find('input[name="'+h+'"]').val(n).end().submit(),!1})}})};BC.adjustChartUrl=function(n,t){var s=t||n.src,f=/(.+?&d=)(\d+,\d+(,\d+)?)(.+)/,r=f.exec(s),h=$("#tabs-mini-graph .tab .title"),o;if(h.each(function(){var e=$(this),s=e.attr("data-script"),r=f.exec(s),o;if(r){var u=$(n).width()|0,i=r[2].split(","),h=i[0]/i[1],c=u/h|0;u!=i[0]&&u>0&&(i[0]=u,i[1]=c,o=r[1]+i.join(",")+r[4],e.attr("data-script",o),t=null)}}),r){var e=$(n),u=e.parent().width()|0,i=r[2].split(","),c=i[0]/i[1],l=e.data("height")||u/c|0;u!=i[0]&&u>0?(i[0]=u,i[1]=l,o=r[1]+i.join(",")+r[4],n.src=o,n.onload=function(){this.style.visibility="visible"},t=null):n.style.visibility="visible"}t&&(n.src=t)};BC.adjustResponsiveChartsTimer=-1;BC.adjustResponsiveCharts=function(n){clearTimeout(BC.adjustResponsiveChartsTimer);BC.adjustResponsiveChartsTimer=setTimeout(function(){$(".adjustable img").each(function(){BC.adjustChartUrl(this)});BC.adjustResponsiveChartsTimer=-1},n||0)};jQuery.cookie=function(n,t,i){var u,r,f,e;return arguments.length>1&&String(t)!=="[object Object]"?(i=jQuery.extend({},i),(t===null||t===undefined)&&(i.expires=-1),typeof i.expires=="number"&&(u=i.expires,r=i.expires=new Date,r.setDate(r.getDate()+u)),t=String(t),document.cookie=[encodeURIComponent(n),"=",i.raw?t:encodeURIComponent(t),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")):(i=t||{},e=i.raw?function(n){return n}:decodeURIComponent,(f=new RegExp("(?:^|; )"+encodeURIComponent(n)+"=([^;]*)").exec(document.cookie))?e(f[1]):null)};jQuery.cookieEx=function(n,t,i){var e=arguments.length==1,f,o,u,r;if((n=n.split(":")).length==2){for(r=($.cookie(n[0])||"").split("&"),u=0;u<r.length;u++)if(f=r[u].split("="),n[1]==f[0]){if(e)return f[1];o=!!(r[u]=f[0]+"="+t);break}e||(o||r.push(n[1]+"="+t),t=$.grep(r,function(n){return!!n.split("=")[1]}).join("&"))}return e?$.cookie(n[0]):$.cookie(n[0],t,i)};BC.AJAX.initConnection=function(){$("#mConnection").modal("toggle");$("#modals .close").click(function(){$("#modals form").find("input, textarea").val("");$("#modals form").find("input").removeClass("input-validation-error");$("span.myerror").html("");$("#modals").empty();$(".modal-backdrop").remove()});window.__initPrivacy&&__initPrivacy()}