PageSourceSearch

https://adriasolapastor.com/wp-content/plugins/nextbricks/elements/js/bc_stripe_megamenu.min.js?ver=1.10.1

js adriasolapastor.com collected 2026-10-04 13:26:42 UTC 7,477 bytes, 8 lines download raw bytes

1function manipularTabIndex(t){t.hasAttribute("tabindex")&&"-1"===t.getAttribute("tabindex")?t.removeAttribute("tabindex"):t.setAttribute("tabindex","-1");let e=t.children;for(let t=0;t<e.length;t++)manipularTabIndex(e[t]);}
2var brickspreview=window.location.href.includes("brickspreview");function stripemegamenu(){function t(t){this.element=t;var e=t.get(0).getAttribute("data-skipclass");(this.mainNavigation=this.element.find(".bc-stripe__main-nav")),e?(this.mainNavigationItems=this.mainNavigation.find(".bc-stripe__has-dropdown:not(."+e+")")):(this.mainNavigationItems=this.mainNavigation.find(".bc-stripe__has-dropdown")),(this.dropdownList=this.element.find(".bc-stripe__dropdown-list")),(this.dropdownWrappers=this.dropdownList.find(".bc-stripe__dropdown")),(this.dropdownItems=this.dropdownList.find(".bc-stripe__content")),(this.dropdownBg=this.dropdownList.find(".bc-stripe__bg-layer")),(this.mq=this.checkMq()),this.mainNavigationItems.each(function(t){var e=jQuery(this).html().toLowerCase();if(/<!---->/.test(e))
3var i=jQuery(this).children(),e=jQuery(i).html().toLowerCase();var r="dropdown_"+t;jQuery(this).attr("data-content",r),jQuery(".bc-stripe__dropdown").eq(t).attr("id",r)}),this.bindEvents(),(function t(t){if(window.location.href.includes("brickspreview")&&t&&t.data("breakpoint")&&1==t.data("enablemobilemenu")){var e=parseFloat(jQuery(t).data("breakpoint"));function i(){jQuery(window).width()<=e?jQuery(t).attr("data-responsive","bc-stripe-responsive"):jQuery(t).removeAttr("data-responsive")}
4i.bind(this)(),jQuery(window).resize(i.bind(this))}})(t)}(t.prototype.checkMq=function(){return window.getComputedStyle(this.element.get(0),"::before").getPropertyValue("content").replace(/'/g,"").replace(/"/g,"").split(", ")}),(t.prototype.bindEvents=function(){var t=this;function e(t){var e=t.closest(".bc-stripe");"true"===t.closest(".bc-stripe").querySelector(".bc-core-burguer button").getAttribute("aria-expanded")?e.setAttribute("data-open","bc-stripe--opened"):e.removeAttribute("data-open","bc-stripe--opened")}
5this.mainNavigationItems.each(function(){if(brickspreview){var e=jQuery(this),i=e.closest(".bc-stripe").find(".bc-stripe__dropdown-list").find("#"+e.data("content").replace(/[^\w\s]/gi,"")).find(".bc-stripe__content").get(0);if(i&&i.hasAttribute("data-edit"))t.showDropdown(e);else{var r=!1;if((jQuery(".bc-stripe__dropdown-list .bc-stripe__content[data-edit]").each(function(){return(r=!0),!1}),!r&&i)){var o=i.closest(".bc-stripe__dropdown-list");o.setAttribute("data-builder-hidden","true")}else if(i){var o=i.closest(".bc-stripe__dropdown-list");o.removeAttribute("data-builder-hidden")}}}}),brickspreview||(this.mainNavigationItems.focus(function(e){t.hideDropdown();var i=jQuery(this),r=i.closest(".bc-stripe").find(".bc-stripe__dropdown-list").find("#"+i.data("c
5ontent").replace(/[^\w\s]/gi,"")).get(0),o=t.mainNavigationItems.index(i),s=t.mainNavigationItems.eq(o).get(0);jQuery(this).keydown(function(e){if(13==e.which){t.showDropdown(jQuery(this)),setTimeout(function(){var t=Array.from(r.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).find(function(t){return t.parentElement&&!t.parentElement.classList.contains("bc-stripe__label")});t&&t.focus()},100),r.addEventListener("focusout",function(e){!r.contains(e.relatedTarget)&&(t.hideDropdown(),s&&s.focus())});var i=!0;jQuery(document).on("keydown.enterPressed",function(e){27==e.which&&i&&(t.hideDropdown(),(i=!1))})}})}).focusout(function(e){var i=jQuery(this).closest(".bc-stripe").find(".bc-stripe__dropdown-list").find("#"+jQuery(this).data("content")).get(0);i.contains(e.relatedTarget)||t.hideDropdown(),i.addEventListener("focusout",function(e){var r;!i.contains(e.relatedTarget)&&(r=jQuery(this)).is(":last-child")&&t.hideDropdown()})}).mousemove(function(e){t.showDropdown(jQuery(this))}).mouseleave(function(){setTimeout(function(){0==t.mainNavigation.find(".bc-stripe__has-dropdown:hover").length&&0==t.element.find(".bc-stripe__dropdown-list:hover").length&&t.hideDropdown()},50)}),this.dropdownList.mouseleave(function(){setTimeout(function(){0==t.mainNavigation.find(".bc-stripe__has-dropdown:hover").length&&0==t.element.find(".bc-stripe__dropdown-list:hover").length&&t.hideDropdown()},50)}),this.mainNavigationItems.on("touchstart",function(e){var i=t.dropdownList.find("#"+jQuery(this).data("content")),r=t.element[0],o=i[0];(r.hasAttribute("bc-stripe__is-dropdown-visible")&&o.hasAttribute("bc-stripe__is-dropdown-visible"))||(e.preventDefault(),t.showDropdown(jQuery(this)))}),jQuery(this.element).on("click",".bc-stripe__coreburguer",function(t){t.preventDefault(),e(this)}),document.addEventListener("keydown",function(t){"Escape"===t.key&&document.querySelectorAll(".bc-stripe__coreburguer button").forEach((i)=>{if("true"===i.getAttribute("aria-expanded")){let r=i.classList;r.length>0&&(t=`${r[0]}--opened`),i.classList.toggle(t),i.setAttribute("aria-expanded","false"),e(i)}})}))}),(t.prototype.showDropdown=function(t){if(((this.mq=this.checkMq()),"desktop"==this.mq)){var e=this,i=this.dropdownList.find("#"+t.data("content"));(r=i.innerHeight()),(n=i.children(".bc-stripe__content").innerWidth());var o=(function t(t){for(var e=0,i=t.parent();i.length&&!i.is("body");){var r=0,o=0;i.hasClass("bc-stripe__main-nav")&&((r=parseInt(i.css("padding-left"),10)),(o=i.offset().left)),(e+=(isNaN(r)?0:r)+(isNaN(o)?0:o)),(i=i.parent())}
6return e})(t),s=t.offset().left+t.innerWidth()/2-n/2-o;this.updateDropdown(i,parseInt(r),n,parseInt(s)),this.element.find("[bc-stripe__active=true]").removeAttr("bc-stripe__active"),i.attr("bc-stripe__active",!0).removeAttr("bc-stripe__move-left bc-stripe__move-right").prevAll().attr("bc-stripe__move-left",!0).end().nextAll().attr("bc-stripe__move-right",!0),t.attr("bc-stripe__active",!0),this.element[0].hasAttribute("bc-stripe__is-dropdown-visible")||setTimeout(function(){e.element.attr("bc-stripe__is-dropdown-visible",!0)},10)}}),(t.prototype.updateDropdown=function(t,e,i,r){this.dropdownList.css({"-moz-transform":"translateX("+r+"px)","-webkit-transform":"translateX("+r+"px)","-ms-transform":"translateX("+r+"px)","-o-transform":"translateX("+r+"px)",transform:"translateX("+r+"px)",width:i+"px",height:e+"px",}),this.dropdownBg.css({"-moz-transform":"scaleX("+i+") scaleY("+e+")","-webkit-transform":"scaleX("+i+") scaleY("+e+")","-ms-transform":"scaleX("+i+") scaleY("+e+")","-o-transform":"scaleX("+i+") scaleY("+e+")",transform:"scaleX("+i+") scaleY("+e+")",})}),(t.prototype.hideDropdown=function(){(this.mq=this.checkMq()),"desktop"==this.mq&&this.element.removeAttr("bc-stripe__is-dropdown-visible").find("[bc-stripe__active=true]").removeAttr("bc-stripe__active").end().find("[bc-stripe__move-left=true]").removeAttr("bc-stripe__move-left").end().find("[bc-stripe__move-right=true]").removeAttr("bc-stripe__move-right")}),(t.prototype.resetDropdown=function(){(this.mq=this.checkMq()),"mobile"==this.mq&&this.dropdownList.removeAttr("style")});var e=[];
6if(jQuery(".bc-stripe").length>0){jQuery(".bc-stripe").each(function(){e.push(new t(jQuery(this)))});var i=!1;function r(){e.forEach(function(t){t.resetDropdown()}),(i=!1)}
7r(),jQuery(window).on("resize",function(){i||((i=!0),window.requestAnimationFrame?window.requestAnimationFrame(r):setTimeout(r,300))})}}
8document.addEventListener("DOMContentLoaded",function(t){window.location.href.includes("brickspreview")?setTimeout(function(){stripemegamenu()},2e3):bricksIsFrontend&&stripemegamenu()})

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.