1(function(){"use strict";const e=30;BX.namespace("BX.Landing");BX.Landing.Cookies=function(e){this.storageKey="bxCookies-v34";this.storage=window.localStorage;this.currentStorage=this.storage;this.enable=e.enable===true;this.onlyInformation=e.onlyInformation===true;this.siteId=parseInt(e.siteId);this.availableCodes=e.availableCodes||[];this.idButtonOpt=e.idButtonOpt||"bx-landing-cookies-opt";this.idButtonOptLink=e.idButtonOptLink||"bx-landing-cookies-opt-link";this.idButtonAccept=e.idButtonAccept||"bx-landing-cookies-accept";this.idAgreementPopup=e.idAgreementPopup||"bx-landing-cookies-popup";this.idCookiesNotice=e.idCookiesNotice||"bx-landing-cookies-popup-notice";this.idAgreementSmallPopup=e.idAgreementSmallPopup||"bx-landing-cookies-popup-warning";this.classNameMainAgreement=e.classNameMainAgreement||"bx-landing-cookies-main-agreement";this.classNameAnalyticAgreements=e.classNameAnalyticAgreements||"bx-landing-cookies-system-agreements";this.classNameTechnicalAgreements=e.classNameTechnicalAgreements||"bx-landing-cookies-technical-agreements";this.classNameOtherAgreements=e.classNameOtherAgreements||"bx-landing-cookies-other-agreements";this.classNameButtonSave=e.classNameButtonSave||"bx-landing-cookies-button-save";this.classNameButtonCancel=e.classNameButtonCancel||"bx-landing-cookies-button-cancel";this.classNameButtonCancelSmall=e.classNameButtonCancelSmall||"bx-landing-cookies-button-cancel-second";this.classNameButtonClose=e.classNameButtonClose||"bx-landing-cookies-button-close";this.classNameCookiesSwitcher=e.classNameCookiesSwitcher||"bx-landing-cookies-switcher";this.messages=e.messages||{};this.agreementAjaxPath=e.agreementAjaxPath||"/";this.overlay=BX.create("div",{attrs:{className:"bx-landing-cookies-popup-overlay"}});this.cookiesNotice=BX(this.idCookiesNotice);this.cookiesNoticeHovered=false;this.cookiesNoticeFocused=false;this.cookiesNoticeDismissed=false;this.acceptedAgreements=Object.create(null);this.agreementsChckRefs=Object.create(null);this.agreementTitleIds=Object.create(null);this.focusTrap=null;this.announcer=null;this.popupTrigger=null;this.escapeHandler=BX.delegate(this.onPopupKeyDown,this);this.popupModified=false;this.popupInited=false;this.popupOpened=false;this.dataLoaded=false;this.agreementsRequestActive=false;this.idMainAgreementContainer=null;this.idAnalyticAgreementsContainer=null;this.idTechnicalAgreementsContainer=null;this.idOtherAgreementsContainer=null;this.idButtonSave=null;this.idButtonCancel=null;this.idButtonClose=null;this.idButtonSwitcher=null;if(!this.enable){this.enableAllCookies()}else{if(BX(this.idButtonOpt)&&BX(this.idAgreementPopup)){BX.bind(BX(this.idButtonOpt),"click",BX.delegate(this.openPopup,this))}if(BX(this.idButtonOptLink)&&BX(this.idAgreementPopup)){BX.bind(BX(this.idButtonOptLink),"click",BX.delegate(this.openPopup,this))}if(BX(this.idButtonAccept)){BX.bind(BX(this.idButtonAccept),"click",BX.delegate(this.onClickAccept,this))}if(this.cookiesNotice){BX.bind(this.cookiesNotice,"mouseenter",BX.delegate(this.onCookiesNoticeHover,this));BX.bind(this.cookiesNotice,"mouseleave",BX.delegate(this.onCookiesNoticeUnhover,this));BX.bind(this.cookiesNotice,"focus",BX.delegate(this.onCookiesNoticeFocus,this));BX.bind(this.cookiesNotice,"blur",BX.delegate(this.onCookiesNoticeBlur,this));BX.bind(this.cookiesNotice,"keydown",BX.delegate(this.onCookiesNoticeKeyDown,this));BX.bind(this.cookiesNotice,"click",BX.delegate(this.openPopup,this))}this.actualizeFromStorage()}};BX.Landing.Cookies.prototype={getAvailableHooks:function(){let e=[];this.availableCodes.map((function(t){if(!BX.util.in_array(t,e)){e.push(t)}}));return e},enableAllCookies:function(){let e=this.getAvailableHooks();this.setStorage(e);this.hideSmallPopup();this.showCookiesNotice()},disableAllCookies:function(){this.setStorage([])},actualizeFromStorage:function(){let e=this.getStorage(true);if(e!==null){this.showCookiesNotice()}else{this.showSmallPopup();this.initializeSmallPopup()}this.fireEvent(e||[])},initializeSmallPopup:function(){if(this.idAgreementSmallPopup){this.idButtonCancelSecond=BX(this.idAgreementSmallPopup).querySelector("."+this.classNameButtonCancelSmall)}if(this.idButtonCancelSecond){BX.bind(BX(this.idButtonCancelSecond),"click",BX.delegate(this.cancelPopup,this))}},initializePopup:function(){if(this.popupInited){return}this.popupInited=true;if(this.classNameMainAgreement){if(BX(this.idAgreementPopup)){this.idMainAgreementContainer=BX(this.idAgreementPopup).querySelector("."+this.classNameMainAgreement);this.idAnalyticAgreementsContainer=BX(this.idAgreementPopup).querySelector("."+this.classNameAnalyticAgreements);this.idTechnicalAgreementsContainer=BX(this.idAgreementPopup).querySelector("."+this.classNameTechnicalAgreements);this.idOtherAgreementsContainer=BX(this.idAgreementPopup).querySelector("."+this.classNameOtherAgreements);this.idButtonClose=BX(this.idAgreementPopup).querySelector("."+this.classNameButtonClose);this.idButtonSave=BX(this.idAgreementPopup).querySelector("."+this.classNameButtonSave);this.idButtonCancel=BX(this.idAgreementPopup).querySelector("."+this.classNameButtonCancel);this.idButtonSwitcher=[].slice.call(BX(this.idAgreementPopup).querySelectorAll("."+this.classNameCookiesSwitcher));this.focusTrap=this.createFocusTrap(BX(this.idAgreementPopup));this.announcer=this.createAnnouncer(BX(this.idAgreementPopup))}if(this.idButtonClose){BX.bind(BX(this.idButtonClose),"click",BX.delegate(this.onClickCloseIcon,this))}if(this.idButtonSave){BX.bind(BX(this.idButtonSave),"click",BX.delegate(this.savePopup,this))}if(this.idButtonCancel){BX.bind(BX(this.idButtonCancel),"click",BX.delegate(this.cancelPopup,this))}if(this.idButtonSwitcher){this.idButtonSwitcher.map(function(e){BX.bind(BX(e),"click",this.switchAgreements.bind(this,BX.data(BX(e),"type")))}.bind(this))}}}
1,createFocusTrap:function(e){if(!BX.UI||!BX.UI.Accessibility||!BX.UI.Accessibility.FocusTrap){return null}return new BX.UI.Accessibility.FocusTrap(e,{initialFocus:"container",restoreFocus:false,isolateOutside:true})},createAnnouncer:function(e){if(!BX.UI||!BX.UI.Accessibility||!BX.UI.Accessibility.LiveAnnouncer){return null}return new BX.UI.Accessibility.LiveAnnouncer({container:e})},enterModalMode:function(){if(this.focusTrap){this.focusTrap.activate()}BX.bind(document,"keydown",this.escapeHandler)},exitModalMode:function(){BX.unbind(document,"keydown",this.escapeHandler);if(this.focusTrap){this.focusTrap.deactivate()}},onPopupKeyDown:function(e){if(e.key==="Escape"){this.closePopup()}},setPopupBusy:function(e){if(!BX(this.idAgreementPopup)){return}if(e){BX(this.idAgreementPopup).setAttribute("aria-busy","true")}else{BX(this.idAgreementPopup).removeAttribute("aria-busy")}},markPopupReady:function(){if(!this.popupOpened){return}this.setPopupBusy(false);this.announce(this.messages.agreementsReady)},markPopupFailed:function(){if(!this.popupOpened){return}if(this.idMainAgreementContainer){this.idMainAgreementContainer.textContent=this.messages.agreementsError||""}this.toggleAgreementsGroups(false);this.setPopupBusy(false);this.announce(this.messages.agreementsError,"assertive")},toggleAgreementsGroups:function(e){[this.idAnalyticAgreementsContainer,this.idTechnicalAgreementsContainer,this.idOtherAgreementsContainer].forEach(function(t){if(!t||!t.parentNode){return}if(e){BX.show(t.parentNode)}else{this.hideAgreementsGroup(t)}}.bind(this))},hideAgreementsGroup:function(e){if(!e||!e.parentNode){return}this.keepFocusInsidePopup(e.parentNode);BX.hide(e.parentNode)},keepFocusInsidePopup:function(e){if(!e.contains(document.activeElement)){return}let t=BX(this.idAgreementPopup);if(t){this.focusNode(t)}},announce:function(e,t){if(!e||!this.announcer){return}this.announcer.announce(e,t||"polite")},loadAgreements:function(){if(!this.idMainAgreementContainer||this.dataLoaded){this.initCheckboxes();this.setPopupBusy(false);return}if(this.agreementsRequestActive){return}this.agreementsRequestActive=true;this.toggleAgreementsGroups(true);this.idMainAgreementContainer.innerHTML="...";BX.ajax({url:this.agreementAjaxPath+"?action=landing.api.cookies.getAgreements",method:"POST",dataType:"json",timeout:e,data:{siteId:this.siteId},onsuccess:function(e){this.agreementsRequestActive=false;if(!e.data){this.markPopupFailed();return}if(e.data["main"]){this.idMainAgreementContainer.innerHTML=e.data["main"]["AGREEMENT_TEXT"]}let t=false;if(e.data["analytic"]&&this.idAnalyticAgreementsContainer){t=true;this.buildAgreements(this.idAnalyticAgreementsContainer,e.data["analytic"])}else if(this.idAnalyticAgreementsContainer){this.hideAgreementsGroup(this.idAnalyticAgreementsContainer)}if(e.data["technical"]&&this.idTechnicalAgreementsContainer){t=true;this.buildAgreements(this.idTechnicalAgreementsContainer,e.data["technical"])}else if(this.idTechnicalAgreementsContainer){this.hideAgreementsGroup(this.idTechnicalAgreementsContainer)}if(e.data["other"]&&this.idOtherAgreementsContainer){t=true;this.buildAgreements(this.idOtherAgreementsContainer,e.data["other"])}else if(this.idOtherAgreementsContainer){this.hideAgreementsGroup(this.idOtherAgreementsContainer)}if(t){this.initCheckboxes()}this.markPopupReady();this.dataLoaded=true}.bind(this),onfailure:function(){this.agreementsRequestActive=false;this.markPopupFailed()}.bind(this)})},openPopup:function(e){if(this.popupOpened){return}this.initializePopup();if(BX(this.idAgreementPopup)){this.popupTrigger=e?e.currentTarget:null;this.popupOpened=true;this.setPopupBusy(true);BX.show(BX(this.idAgreementPopup));this.showOverlay();this.enterModalMode();this.hideSmallPopup();this.loadAgreements()}},closePopup:function(){this.popupOpened=false;this.setPopupModified(false);if(BX(this.idAgreementPopup)){this.exitModalMode();this.hideOverlay();BX.hide(BX(this.idAgreementPopup))}this.hideSmallPopup();this.showCookiesNotice();this.returnFocus(this.popupTrigger)},savePopup:function(){if(this.popupModified){let e=this.getAcceptedAgreements();this.setStorage(e)}else{this.enableAllCookies()}this.closePopup()},cancelPopup:function(){if(this.popupModified){let e=this.currentStorage;this.setStorage(e)}else{this.disableAllCookies()}this.showSmallPopup();this.closePopup()},onClickCloseIcon:function(){this.closePopup()},onClickAccept:function(e){this.enableAllCookies();this.returnFocus(e?e.currentTarget:null)},returnFocus:function(e){let t=this.resolveFocusTarget(e);if(t){this.focusNode(t)}},resolveFocusTarget:function(e){if(this.isVisible(e)){return e}if(this.isVisible(this.cookiesNotice)){return this.cookiesNotice}return this.resolveMainLandmark()||document.body},resolveMainLandmark:function(){let e=["main",'[role="main"]'];for(let t=0;t<e.length;t++){let i=document.querySelectorAll(e[t]);for(let e=0;e<i.length;e++){if(this.isVisible(i[e])){return i[e]}}}return null},isVisible:function(e){if(!e||e.getClientRects().length===0){return false}return window.getComputedStyle(e).visibility==="visible"},focusNode:function(e){if(e.tabIndex<0&&!e.hasAttribute("tabindex")){let t=function(){BX.unbind(e,"blur",t);e.removeAttribute("tabindex")};e.setAttribute("tabindex","-1");BX.bind(e,"blur",t)}e.focus({preventScroll:true})},setPopupModified:function(e){this.popupModified=e;if(this.idButtonSave){this.idButtonSave.textContent=this.popupModified?this.messages.acceptModified:this.messages.acceptAll}if(this.idButtonCancel){this.idButtonCancel.textContent=this.popupModified?this.messages.declineModified:this.messages.declineAll}},getStorage:function(e){let t=this.storage.getItem(this.storageKey);if(t){t=JSON.parse(t)}if(e===true){return t}return t||[]},setStorage:function(e){this.fireEvent(e);this.storage.setItem(this.storageKey,JSON.stringify(e));
1BX.ajax({url:this.agreementAjaxPath+"?action=landing.api.cookies.acceptAgreements",method:"POST",dataType:"json",data:{siteId:this.siteId,accepted:e}})},fireEvent:function(e){BX.onCustomEvent("BX.Landing.Cookies:onAccept",[e])},switchAgreements:function(e){if(!this.idButtonSwitcher){return}let t={};this.idButtonSwitcher.map((function(e){let i=BX(e).getAttribute("data-type");t[i]=BX(e).getAttribute("data-state")==="true"}));let i=t[e]===true;for(let t in this.agreementsChckRefs){let s=BX.UI.Switcher.getById(t);if(s){let n=s.getNode().getAttribute("data-type");if(n===e){s.check(i);this.acceptAgreement(t,i);this.syncSwitcherState(t)}}}this.actualizeAgreementsSwitcher();this.setPopupModified(true)},actualizeAgreementsSwitcher:function(){if(this.idButtonSwitcher){let e={};for(let t in this.agreementsChckRefs){let i=BX.UI.Switcher.getById(t);if(i){let t=i.getNode().getAttribute("data-type");if(i.isChecked()){e[t]=true}}}this.idButtonSwitcher.map(function(t){let i=BX.data(BX(t),"type");if(e[i]===true){BX(t).textContent=this.messages.switcherOff;BX(t).setAttribute("data-state",false)}else{BX(t).textContent=this.messages.switcherOn;BX(t).setAttribute("data-state",true)}}.bind(this))}},acceptAgreement:function(e,t){this.acceptedAgreements[e]=t},getAcceptedAgreements:function(){let e=[];for(let t in this.acceptedAgreements){if(this.acceptedAgreements[t]===true){e.push(t)}}return e},initCheckboxes:function(){let e=this.getStorage();this.currentStorage=this.getStorage();for(let t in this.agreementsChckRefs){let i=BX.UI.Switcher.getById(t);if(i){let s=BX.util.in_array(t,e)||i.getNode().getAttribute("data-type")!=="analytic";i.check(s);this.acceptAgreement(t,s);this.syncSwitcherState(t)}}this.actualizeAgreementsSwitcher()},buildAgreements:function(e,t){let i=[];for(let e in t){this.agreementsChckRefs[e]=BX.create("span",{attrs:{className:"ui-switcher ui-switcher-size-sm","data-type":t[e]["TYPE"],"data-switcher":'{"id":"'+e+'"}'},events:{click:function(e,t){if(this.rejectDisabledSwitcherActivation(e,t)){return}this.acceptAgreement(e,!BX.UI.Switcher.getById(e).isChecked());this.setPopupModified(true);setTimeout(function(){this.syncSwitcherState(e);this.actualizeAgreementsSwitcher()}.bind(this),0)}.bind(this,e),keydown:this.onSwitcherKeyDown.bind(this,e)}});i.push(BX.create("div",{attrs:{className:"bx-landing-cookies-analytics-block"+(t[e]["TYPE"]!=="analytic"?" bx-landing-cookies-analytics-block-disabled":"")},children:[BX.create("div",{attrs:{className:"bx-landing-cookies-analytics-header"},children:[BX.create("div",{attrs:{className:"bx-landing-cookies-analytics-title",id:this.getAgreementTitleId(e)},html:t[e]["TITLE"]}),this.agreementsChckRefs[e]]}),BX.create("div",{attrs:{className:"bx-landing-cookies-analytics-content"},html:t[e]["CONTENT"]})]}))}e.appendChild(BX.create("div",{children:i}));BX.UI.Switcher.initByClassName();for(let e in t){this.initSwitcherSemantics(e)}},getAgreementTitleId:function(e){if(!this.agreementTitleIds[e]){let t=Object.keys(this.agreementTitleIds).length+1;this.agreementTitleIds[e]="bx-landing-cookies-agreement-title-"+String(e).replace(/[^A-Za-z0-9_-]/g,"-")+"-"+t}return this.agreementTitleIds[e]},initSwitcherSemantics:function(e){let t=this.agreementsChckRefs[e];if(!t){return}t.setAttribute("role","switch");t.setAttribute("tabindex","0");t.setAttribute("aria-labelledby",this.getAgreementTitleId(e));if(this.isAgreementSwitcherDisabled(e)){t.setAttribute("aria-disabled","true")}this.syncSwitcherState(e)},isAgreementSwitcherDisabled:function(e){let t=this.agreementsChckRefs[e];return!!t&&t.getAttribute("data-type")!=="analytic"},rejectDisabledSwitcherActivation:function(e,t){if(!this.isAgreementSwitcherDisabled(e)){return false}t.preventDefault();t.stopImmediatePropagation();return true},syncSwitcherState:function(e){let t=this.agreementsChckRefs[e];let i=BX.UI.Switcher.getById(e);if(t&&i){t.setAttribute("aria-checked",i.isChecked()?"true":"false")}},onSwitcherKeyDown:function(e,t){if(t.key!==" "&&t.key!=="Enter"){return}if(this.isAgreementSwitcherDisabled(e)){return}t.preventDefault();t.currentTarget.click()},showCookiesNotice:function(){if(this.cookiesNotice&&BX(this.idAgreementSmallPopup)&&!this.onlyInformation){this.cookiesNotice.style.display="flex"}}
1,onCookiesNoticeKeyDown:function(e){if(e.key!=="Escape"){return}this.cookiesNoticeDismissed=true;this.actualizeCookiesNoticeText()},onCookiesNoticeHover:function(){this.cookiesNoticeHovered=true;this.cookiesNoticeDismissed=false;this.actualizeCookiesNoticeText()},onCookiesNoticeUnhover:function(){this.cookiesNoticeHovered=false;this.actualizeCookiesNoticeText()},onCookiesNoticeFocus:function(){this.cookiesNoticeFocused=this.isKeyboardFocus(this.cookiesNotice);this.cookiesNoticeDismissed=false;this.actualizeCookiesNoticeText()},isKeyboardFocus:function(e){try{return e.matches(":focus-visible")}catch(e){return true}},onCookiesNoticeBlur:function(){this.cookiesNoticeFocused=false;this.actualizeCookiesNoticeText()},actualizeCookiesNoticeText:function(){let e=!this.cookiesNoticeDismissed&&(this.cookiesNoticeHovered||this.cookiesNoticeFocused);if(e){this.showCookiesNoticeText()}else{this.hideCookiesNoticeText()}},showCookiesNoticeText:function(){if(this.isCookiesNoticeTextShown()){return}this.cookiesNotice.classList.add("bx-landing-cookies-popup-notice-full");let e=this.cookiesNotice.querySelector(".bx-landing-cookies-popup-notice-text").offsetWidth;this.cookiesNotice.style.width=this.cookiesNotice.offsetWidth+e+"px"},hideCookiesNoticeText:function(){if(!this.isCookiesNoticeTextShown()){return}this.cookiesNotice.style.width="27px";this.cookiesNotice.classList.remove("bx-landing-cookies-popup-notice-full")},isCookiesNoticeTextShown:function(){return this.cookiesNotice.classList.contains("bx-landing-cookies-popup-notice-full")},showOverlay:function(){document.body.append(this.overlay)},hideOverlay:function(){this.overlay.remove()},showSmallPopup:function(){if(BX(this.idAgreementSmallPopup)){BX(this.idAgreementSmallPopup).style.display="block"}},hideSmallPopup:function(){if(BX(this.idAgreementSmallPopup)){BX(this.idAgreementSmallPopup).style.display="none"}}}})(); 2//# sourceMappingURL=script.map.js
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.