1class Sticky{constructor(e){this.id=e&&e.id||"aruba-sticky-bar",this.cookie={cookieName:e&&e.cookieName||"ArubaSticky",cookieValue:e&&e.cookieValue||1,exdays:e&&e.exdays||7},this.breakpoints=e&&e.breakpoints||{},this.callBacks=e&&e.callBacks||{},this.css="#"+this.id+"{display:none;position:fixed;left:50%;bottom:0;transform:translateX(-50%);z-index:90000;width:96%;max-width:1398px;background-color:#0a2a2d;font-family:inherit}#aruba-fibra-sticky-bar.sticky-visible{display:block}#"+this.id+"-close-btn{display:block;position:absolute;top:-5px;right:-5px;font-weight:normal;color:#fff;text-decoration:none;cursor:pointer;font-size:42px;z-index:3;border:0;background:0 0;padding:0 10px;text-shadow:1px 0 5px #0a2a2d;line-height:1.075}@media (prefers-reduced-motion:no-preference){#"+this.id+"{display:block;opacity:0;transition:visibility .4s ease-in-out,opacity .4s ease-in-out;visibility:hidden;}#"+this.id+".sticky-visible{visibility:visible;opacity:1;transition:opacity .4s ease-in-out}}@media (max-width:767px){#"+this.id+"{position:-webkit-sticky;left:0;transform:none;width:100%;height:auto}}",this.cssBanner=e&&e.cssBanner||null,this.debug=e&&e.debug||0,this.footerEl=e&&e.footerEl||null,this.hideOnFooter=e&&e.hideOnFooter||1,this.htmlBanner=e&&e.htmlBanner||null,this.isShown=null,this.lang=e&&e.lang||"it",this.site=e&&e.site||window.location.hostname,this.stickyBarOptions=this.responsiveOptions(),this.viewAfterScroll=e&&e.viewAfterScroll||0,this.allowedURLs=e&&e.allowedURLs||null,this.deniedURLs=e&&e.deniedURLs||null,this.arubaStickyInit()}arubaStickyInit(){if(this.debug&&console.log("Init for site "+this.site+" and lang "+this.lang),this.checkCookie(this.cookie.cookieName))this.debug&&console.log("Found cookie, sticky bar not to be loaded");else if(this.checkURLs()){this.stickyBarOptions=this.responsiveOptions();var e,t;(e=document.createElement("div")).id=this.id,e.innerHTML=this.htmlBanner,this.htmlBanner&&this.cssBanner?(t=this.animatedGleam(e,this.cssBanner),this.closeButton("",e,this.closeSticky.bind(this)),this.appendStyle(t),this.appendBar(e),this.eventClick(""),(!this.viewAfterScroll||this.viewAfterScroll<=0)&&this.showSticky(),window.addEventListener("resize",this.handlePageResize.bind(this)),document.addEventListener("scroll",this.handlePageScroll.bind(this))):this.debug&&console.log("htmlBanner && cssbanner options are not declared!")}else this.debug&&console.log("The stickybar is not configured to be shown on this page.")}checkURLs(){const e=new URL(window.location).pathname;return"*"===this.allowedURLs?(this.debug&&console.log("Sticky bar is shown on all pages"),this.isShown=!0):Array.isArray(this.allowedURLs)?(this.debug&&console.log("Sticky bar is shown just on the pages: "+this.allowedURLs.join(", ")),this.isShown=this.strInArray(this.allowedURLs,e)):"*"===this.deniedURLs?(this.debug&&console.log("Sticky bar is hidden on all pages"),this.isShown=!1):Array.isArray(this.deniedURLs)?(this.debug&&console.log("Sticky bar is hidden just on the pages: "+this.deniedURLs.join(", ")),this.isShown=!this.strInArray(this.deniedURLs,e)):(this.debug&&console.log("Sticky bar is shown on all pages"),this.isShown=!0),this.isShown}strInArray(e,t){for(let i=0;i<e.length;i++)if(t.startsWith(e[i]))return this.debug&&console.log(t,e[i],t.startsWith(e[i])),!0;return!1}animatedGleam(e,t){var i=document.createElement("div");return i.id=this.id+"-animation-container",t+="#"+this.id+"-animation-container{display:none;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;background:-webkit-linear-gradient(45deg,transparent,transparent,rgba(255,255,255,.5),transparent,transparent 80%);background-size:400%;background-position:0;margin:0}#"+this.id+".sticky-visible #"+this.id+"-animation-container{display:block}@media (prefers-reduced-motion:no-preference){#"+this.id+" #"+this.id+"-animation-container{animation:ArubaFibraStickyHighlight 6s 1;animation-fill-mode:forwards;display:none}@keyframes ArubaFibraStickyHighlight{0%{background-position:100%}33%{background-position:0}66%{background-position:100%}100%{background-position:0}}",e.appendChild(i),t}eventClick(e){var t=this,i=e||document.getElementById(this.id).textContent,n=document.querySelectorAll(".action--"+this.id+"-cta");if(n)for(var s=0;s<n.length;s++){n[s].addEventListener("click",(function(e){if(t.debug&&console.log("On debug mode remove the action of the link unsing: e.preventDefault();",this),t.sendAnalytics(this,i),t.callBacks)for(var n in t.callBacks)"function"==typeof t.callBacks[n]&&t.callBacks[n]()}),!1)}}closeButton(e,t,i){var n=document.createElement("button");n.innerHTML='<span class="sr-only">'+e+'</span><span aria-hidden="true">×</span>',n.id=this.id+"-close-btn",n.addEventListener("click",(function(e){e.preventDefault(),i(),n.removeEventListener("click",(function(){return null}),!1)}),!1),t.appendChild(n)}handlePageResize=e=>{this.stickyBarOptions=this.responsiveOptions};responsiveOptions(){var e={viewAfterScroll:this.viewAfterScroll||0,hideOnFooter:this.hideOnFooter||null,footerEl:this.footerEl||null,callBack:this.callBacks||null};if(this.breakpoints)for(var t in this.breakpoints){var i=window.innerWidth||document.documentElement.clientWidth;if(i<768)for(var n in this.breakpoints.mobile)this.stickyBarOptions[n]=this.breakpoints.mobile[n];if(i<=1199&&i>=768)for(n in this.breakpoints.tablet)this.stickyBarOptions[n]=this.breakpoints.tablet[n]}return this.debug&&console.log("sticky bar local options object",e),e}handlePageScroll=e=>{this.showStickyOnPage()};showStickyOnPage(){var e=document.body.scrollTop||document.documentElement.scrollTop,t=Math.max(document.body.offsetHeight,document.documentElement.offsetHeight),i=window.innerHeight+window.scrollY>=t;if(this.hideOnFooter&&this.footerEl){var n=document.querySelectorAll(this.footerEl);
1if(n&&n[0]){var s=n[0].getBoundingClientRect();if(s.top&&s.left>=0&&s.right<=(window.innerWidth||document.documentElement.clientWidth)&&s.top<=(window.innerHeight||document.documentElement.clientHeight))return void this.hideSticky()}}this.hideOnFooter&&i?this.hideSticky():this.viewAfterScroll&&this.viewAfterScroll>0?e>=this.viewAfterScroll?this.showSticky():this.hideSticky():this.showSticky()}sendAnalytics(e,t){this.debug&&console.log("Trying to send analytics event for site "+this.site+"...");var i=e.getAttribute("href");if((""==i||null==i||i.toLowerCase().startsWith("javascript:"))&&(i="Target URL not defined"),window.google_tag_manager){this.debug&&console.log("Google Tag Manager is active for "+this.site+", event will be sent through dataLayer object");try{this.debug&&console.log("dataLayer.push({\n'event': 'cta_click',\n'type': 'sticky bar',\n'name': '"+this.removeHTMLTag(t)+",\n'link_text': '"+this.removeHTMLTag(e.innerHTML)+"',\n'link_url': '"+i+"'\n'index': ''\n});"),dataLayer.push({event:"cta_click",type:"sticky bar",name:this.removeHTMLTag(t),link_text:this.removeHTMLTag(e.innerHTML),link_url:i,index:""})}catch(e){console.log(e)}}else this.debug&&console.log("Analytics are specified for the site "+this.site+", however nor GTM or GA script seem to work...")}appendBar(e){(document.body||document.getElementsByTagName("body")[0]).appendChild(e)}appendStyle(e){var t,i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");if(n.id=this.id+"-style",document.getElementById(this.id+"-style")){var s=document.getElementById(this.id+"-style");null===(t=null==s?void 0:s.parentElement)||void 0===t||t.removeChild(s)}n.appendChild(document.createTextNode(this.css+e)),i.appendChild(n)}showSticky(){var e=document.getElementById(this.id);e&&e.classList.add("sticky-visible")}hideSticky(){var e=document.getElementById(this.id);e&&e.classList.remove("sticky-visible")}closeSticky(){var e,t,i=document.getElementById(this.id),n=document.getElementById(this.id+"-style");this.setCookie(this.cookie.cookieName,this.cookie.cookieValue,this.cookie.exdays),i&&(null===(e=i.parentNode)||void 0===e||e.removeChild(i)),n&&(null===(t=n.parentNode)||void 0===t||t.removeChild(n)),document.removeEventListener("scroll",this.handlePageScroll.bind(this)),window.removeEventListener("resize",this.handlePageResize.bind(this))}checkCookie(e){return""!==this.getCookie(e)}getCookie(e){for(var t=e+"=",i=document.cookie.split(";"),n=0;n<i.length;n++){for(var s=i[n];" "===s.charAt(0);)s=s.substring(1);if(0===s.indexOf(t))return s.substring(t.length,s.length)}return""}setCookie(e,t,i){var n=new Date;n.setTime(n.getTime()+24*i*60*60*1e3);var s="expires="+n.toUTCString();document.cookie=e+"="+t+";"+s+"; path=/;"}removeHTMLTag(e){return e.includes("<span")?e.split("<span")[0]:e.replace(/(<([^>]+)>)/gi,"")}}
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.