{"version":3,"file":"app.js","names":["$","Drupal","drupalSettings","behaviors","stickyNavbar","attach","context","settings","$navbar","stickyClass","shadowClass","hideClass","lastScrollTop","addClass","window","on","currentScrollTop","this","scrollTop","removeClass","textCounter","counterText","length","each","$this","hasAnimated","animateCounter","element","rect","getBoundingClientRect","viewportHeight","innerHeight","document","documentElement","clientHeight","elementCenter","top","height","viewportCenter","threshold","rawText","text","trim","hasCommas","indexOf","numericValue","replace","finalVal","parseInt","currentValue","animate","duration","easing","step","now","displayVal","Math","floor","toString","toLocaleString","complete","removeFixedTopIfLoggedIn","user","uid","fadeDownAnimation","hasClass","elements","animateElements","index","$el","offset","setTimeout","showLetsConnectBlock","fadeIn","randomslideonCarousel","$carouselItems","randomIndex","random","eq","bsCarouselIndicators","$carousel","$indicatorsContainer","find","children","activeClass","indicator","attr","append","searchOverlay","fadeOut","event","target","closest","key","bootstrapNavFix","$dropdown","$link","first","$toggleButton","off","innerWidth","e","slickInit","not","$slider","$wrapper","showArrows","undefined","data","config","autoplay","autoplaySpeed","arrows","dots","infinite","slidesToShow","slidesToScroll","adaptiveHeight","prevArrow","nextArrow","dotsClass","mobileBreakpoint","tabletBreakpoint","mobileSlides","tabletSlides","desktopSlides","responsive","breakpoint","console","log","css","slick","error","solutionsCollapsibleScroll","targetId","$target","navbarHeight","outerHeight","offsetPosition","jQuery"],"sources":["app.js"],"mappings":"CAAA,SAAWA,EAAGC,EAAQC,GACpBD,EAAOE,UAAUC,aAAe,CAC9BC,OAAQ,SAAUC,EAASC,GACzB,IAAIC,EAAUR,EAAE,UAAWM,GACvBG,EAAc,YACdC,EAAc,SAEdC,EAAY,gBACZC,EAAgB,EAGpBJ,EAAQK,SALc,qBAOtBb,EAAEc,QAAQC,GAAG,UAAU,WACrB,IAAIC,EAAmBhB,EAAEiB,MAAMC,YAG3BF,EAAmB,IACrBR,EAAQK,SAASJ,GAAaI,SAASH,GAGnCM,EAAmBJ,GAAiBI,EAAmB,IAEzDR,EAAQK,SAASF,GAG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,CAEA,IAEEZ,EAAQzF,GAAG,QAAQ,WACjBiH,QAAQC,IAAI,qBACZzB,EAAQ0B,IAAI,aAAc,WAAWA,IAAI,UAAW,KACpDlI,EAAE,gBACCkI,IAAI,UAAW,KACfA,IAAI,aAAc,UACvB,IAEA1B,EAAQ2B,MAAMtB,GAAQhG,SAAS,oBACjC,CAAE,MAAOuH,GACPJ,QAAQI,MAAM,qCAAsCA,EACtD,CACF,GACJ,GAGFnI,EAAOE,UAAUkI,2BAA6B,CAC5ChI,OAAQ,SAAUC,EAASC,GAEzBP,EAAE,gDAAiDM,GAASiB,MAC1D,WAEMvB,EAAEiB,MAAMgD,SAAS,6BAKrBjE,EAAEiB,MAAMJ,SAAS,2BAGjBb,EAAEiB,MAAMF,GAAG,SAAS,WAElB,MAAMuH,EAAWtI,EAAEiB,MAAM2F,KAAK,aACxB2B,EAAUvI,EAAEsI,GAGlB/D,YAAW,WAGT,MACMiE,EADUxI,EAAE,WACWyI,cAIvBC,EADkBH,EAAQjE,SAASlC,IACAoG,EAAe,GAGxDxI,EAAE,cAAckD,QACd,CACEhC,UAAWwH,GAEb,IAEJ,GAAG,IACL,IACF,GAEJ,EAEH,CArbD,CAqbGC,OAAQ1I,OAAQC","ignoreList":[],"sourcesContent":["(function ($, Drupal, drupalSettings) {\n Drupal.behaviors.stickyNavbar = {\n attach: function (context, settings) {\n var $navbar = $(\".navbar\", context);\n var stickyClass = \"fixed-top\";\n var shadowClass = \"shadow\"; // Bootstrap shadow class\n var transitionClass = \"navbar-transition\"; // Custom transition class\n var hideClass = \"navbar-hidden\"; // New class for hiding the navbar\n var lastScrollTop = 0; // Track last scroll position\n\n // Ensure transition class is applied at start\n $navbar.addClass(transitionClass);\n\n $(window).on(\"scroll\", function () {\n var currentScrollTop = $(this).scrollTop();\n\n // When scrolled more than threshold, add sticky classes\n if (currentScrollTop > 50) {\n $navbar.addClass(stickyClass).addClass(shadowClass);\n\n // Determine scroll direction\n if (currentScrollTop > lastScrollTop && currentScrollTop > 150) {\n // Scrolling DOWN and past the initial threshold\n $navbar.addClass(hideClass);\n } else {\n // Scrolling UP\n $navbar.removeClass(hideClass);\n }\n } else {\n // At the top of the page\n $navbar\n .removeClass(stickyClass)\n .removeClass(shadowClass)\n .removeClass(hideClass);\n }\n\n // Update last scroll position\n lastScrollTop = currentScrollTop;\n });\n },\n };\n\n Drupal.behaviors.textCounter = {\n attach: function (context, settings) {\n var counterText = $(\".counter-text\", context);\n\n if ($(counterText).length) {\n $(counterText).each(function () {\n var $this = $(this);\n var hasAnimated = false; // Prevents multiple animations\n\n function isInViewport(element) {\n var rect = element.getBoundingClientRect();\n var viewportHeight =\n window.innerHeight || document.documentElement.clientHeight;\n\n // Check if the element's center is close to the middle of the viewport\n var elementCenter = rect.top + rect.height / 2;\n var viewportCenter = viewportHeight / 2;\n var threshold = viewportHeight * 0.1; // Adjust threshold (10% of viewport height)\n\n return (\n elementCenter >= viewportCenter - threshold &&\n elementCenter <= viewportCenter + threshold\n );\n }\n\n function animateCounter() {\n if (hasAnimated) return; // Prevent re-triggering\n if (!isInViewport($this[0])) return; // Ensure it's in the middle\n\n hasAnimated = true; // Mark as animated\n\n // Original text (may contain commas, or may not)\n var rawText = $this.text().trim();\n // Check whether the original text has at least one comma\n var hasCommas = rawText.indexOf(\",\") !== -1;\n\n // Strip commas to parse the integer\n var numericValue = rawText.replace(/,/g, \"\");\n var finalVal = parseInt(numericValue, 10) || 0;\n\n // Start the display at \"0\"\n $this.text(\"0\");\n\n // Animate from 0 to finalVal\n $({ currentValue: 0 }).animate(\n { currentValue: finalVal },\n {\n duration: 2000,\n easing: \"swing\",\n step: function (now) {\n var displayVal = Math.floor(now).toString();\n if (hasCommas) {\n displayVal = Math.floor(now).toLocaleString();\n }\n $this.text(displayVal);\n },\n complete: function () {\n var displayVal = finalVal.toString();\n if (hasCommas) {\n displayVal = finalVal.toLocaleString();\n }\n $this.text(displayVal);\n },\n }\n );\n }\n\n // Initial check when the page loads\n animateCounter();\n\n // Check on scroll\n $(window).on(\"scroll\", function () {\n animateCounter();\n });\n });\n }\n },\n };\n\n Drupal.behaviors.removeFixedTopIfLoggedIn = {\n attach: function (context) {\n // Check if a user is logged in by verifying user UID exists\n if (\n drupalSettings.user &&\n typeof drupalSettings.user.uid !== \"undefined\" &&\n drupalSettings.user.uid !== 0\n ) {\n $(\"nav.navbar\", context).removeClass(\"fixed-top\");\n }\n },\n };\n\n Drupal.behaviors.fadeDownAnimation = {\n attach: function (context, settings) {\n // Check if we're inside the Gutenberg editor and exit early\n if ($(\"body\").hasClass(\"gutenberg-editor-page\")) {\n return;\n }\n\n let elements = $(\".fade-down\", context);\n\n function animateElements() {\n elements.each(function (index) {\n let $el = $(this);\n if (\n $el.offset().top <\n $(window).scrollTop() + $(window).height() - 50\n ) {\n setTimeout(function () {\n $el.addClass(\"visible\");\n }, index * 60); // Delay each element by 100ms\n }\n });\n }\n\n // Run the function when scrolling or loading\n $(window).on(\"load scroll\", function () {\n animateElements();\n });\n\n // Trigger animations on AJAX-loaded content\n animateElements();\n },\n };\n\n Drupal.behaviors.showLetsConnectBlock = {\n attach: function (context, settings) {\n $(window).on(\"scroll\", function () {\n $(\"#block-skylaraesb5-letsconnect\", context).fadeIn(800);\n });\n },\n };\n\n Drupal.behaviors.randomslideonCarousel = {\n attach: function (context, settings) {\n var $carouselItems = $(\".carousel-item\", context);\n if ($carouselItems.length > 0) {\n // Remove 'active' class from all items\n $carouselItems.removeClass(\"active\");\n\n // Select a random item to add 'active' class\n var randomIndex = Math.floor(Math.random() * $carouselItems.length);\n $carouselItems.eq(randomIndex).addClass(\"active\");\n }\n },\n };\n\n Drupal.behaviors.bsCarouselIndicators = {\n attach: function (context, settings) {\n $(\".carousel\", context).each(function () {\n var $carousel = $(this);\n var $indicatorsContainer = $carousel.find(\".carousel-indicators\");\n\n // Ensure the indicators container exists and is empty\n if (\n $indicatorsContainer.length === 0 ||\n $indicatorsContainer.children().length > 0\n ) {\n return;\n }\n\n var $slides = $carousel.find(\".carousel-inner .carousel-item\");\n\n // Populate indicators\n $slides.each(function (index) {\n var activeClass = index === 0 ? \" active\" : \"\";\n var indicator = ``;\n $indicatorsContainer.append(indicator);\n });\n });\n },\n };\n\n Drupal.behaviors.searchOverlay = {\n attach: function (context, settings) {\n // Open overlay when clicking the search trigger\n $(\"#search-trigger\", context).on(\"click\", function () {\n $(\"#search-overlay\").fadeIn();\n });\n\n // Close overlay when clicking the close button\n $(\".close-overlay\", context).on(\"click\", function () {\n $(\"#search-overlay\").fadeOut();\n });\n\n // Close overlay when clicking outside of search-overlay-content\n $(\"#search-overlay\", context).on(\"click\", function (event) {\n if (!$(event.target).closest(\".search-overlay-content\").length) {\n $(\"#search-overlay\").fadeOut();\n }\n });\n\n // Close overlay when pressing the Escape key\n $(document).on(\"keydown\", function (event) {\n if (event.key === \"Escape\") {\n $(\"#search-overlay\").fadeOut();\n }\n });\n },\n };\n\n Drupal.behaviors.bootstrapNavFix = {\n attach: function (context, settings) {\n // Only apply hover effects on desktop (devices wider than 992px)\n const isDesktop = () => window.innerWidth >= 992;\n\n // Handle dropdowns with links\n $(\".navbar-nav .dropdown\", context).each(function () {\n let $dropdown = $(this);\n let $link = $dropdown.children(\"a\").first();\n let $toggleButton = $dropdown.children(\".dropdown-toggle\");\n\n // Remove any previously bound events to prevent duplication\n $dropdown.off(\"mouseenter mouseleave\");\n $link.off(\"click\");\n $toggleButton.off(\"click\");\n\n // Desktop-only hover behavior\n if (isDesktop()) {\n // Handle hover behavior on the entire dropdown item\n $dropdown.on(\"mouseenter\", function () {\n $dropdown.addClass(\"active show\");\n $dropdown.children(\".dropdown-menu\").addClass(\"show\");\n });\n\n // Hide dropdown when mouse leaves\n $dropdown.on(\"mouseleave\", function () {\n $dropdown.removeClass(\"active show\");\n $dropdown.children(\".dropdown-menu\").removeClass(\"show\");\n });\n }\n\n // The toggle button already has Bootstrap's data-bs-toggle=\"dropdown\"\n // which will handle mobile dropdown toggling\n });\n\n // Close dropdowns when clicking outside\n $(document).on(\"click\", function (e) {\n if (!$(e.target).closest(\".navbar-nav .dropdown\").length) {\n $(\".navbar-nav .dropdown\").removeClass(\"show active\");\n $(\".navbar-nav .dropdown-menu\").removeClass(\"show\");\n }\n });\n\n // Update behavior when window is resized\n $(window).on(\"resize\", function () {\n Drupal.behaviors.bootstrapNavFix.attach(context, settings);\n });\n },\n };\n Drupal.behaviors.slickInit = {\n attach: function (context, settings) {\n $(\".slick-slider\", context)\n .not(\".slick-initialized\")\n .each(function () {\n let $slider = $(this);\n let $wrapper = $slider.closest(\".slick-slider-wrapper\");\n\n // Get basic configuration\n const showArrows =\n $slider.data(\"arrows\") !== undefined\n ? $slider.data(\"arrows\")\n : true;\n\n let config = {\n autoplay:\n $slider.data(\"autoplay\") !== undefined\n ? $slider.data(\"autoplay\")\n : true,\n autoplaySpeed: $slider.data(\"autoplay-speed\") || 3000,\n arrows: showArrows,\n dots:\n $slider.data(\"dots\") !== undefined ? $slider.data(\"dots\") : true,\n infinite:\n $slider.data(\"infinite\") !== undefined\n ? $slider.data(\"infinite\")\n : true,\n slidesToShow: $slider.data(\"slides-to-show\") || 1,\n slidesToScroll: $slider.data(\"slides-to-scroll\") || 1,\n adaptiveHeight:\n $slider.data(\"adaptive-height\") !== undefined\n ? $slider.data(\"adaptive-height\")\n : true,\n };\n\n // Only set custom arrows if arrows are enabled\n if (showArrows) {\n config.prevArrow = $wrapper.find(\".slick-prev\");\n config.nextArrow = $wrapper.find(\".slick-next\");\n }\n\n // Set dots class\n config.dotsClass = \"slick-dots\";\n\n // Check if responsive settings should be used\n const useResponsive = $slider.data(\"use-responsive\") || false;\n\n if (useResponsive) {\n const mobileBreakpoint = $slider.data(\"mobile-breakpoint\") || 767;\n const tabletBreakpoint = $slider.data(\"tablet-breakpoint\") || 991;\n const mobileSlides = $slider.data(\"mobile-slides\") || 1;\n const tabletSlides = $slider.data(\"tablet-slides\") || 2;\n const desktopSlides = $slider.data(\"desktop-slides\") || 3;\n\n // Add responsive configuration\n config.responsive = [\n {\n breakpoint: mobileBreakpoint,\n settings: {\n slidesToShow: mobileSlides,\n slidesToScroll: 1,\n },\n },\n {\n breakpoint: tabletBreakpoint,\n settings: {\n slidesToShow: tabletSlides,\n slidesToScroll: 1,\n },\n },\n {\n breakpoint: 9999, // Large desktop\n settings: {\n slidesToShow: desktopSlides,\n slidesToScroll: 1,\n },\n },\n ];\n }\n\n try {\n // Ensure visibility after init\n $slider.on(\"init\", function () {\n console.log(\"Slick Initialized\");\n $slider.css(\"visibility\", \"visible\").css(\"opacity\", \"1\");\n $(\".slick-slide\")\n .css(\"opacity\", \"1\")\n .css(\"visibility\", \"visible\");\n });\n\n $slider.slick(config).addClass(\"slick-initialized\");\n } catch (error) {\n console.error(\"Slick Slider Initialization Error:\", error);\n }\n });\n },\n };\n\n Drupal.behaviors.solutionsCollapsibleScroll = {\n attach: function (context, settings) {\n // Target the solution buttons within the collapsible content block\n $('.aes-solutions-btn[data-bs-toggle=\"collapse\"]', context).each(\n function () {\n // Skip if already processed\n if ($(this).hasClass(\"scroll-handler-attached\")) {\n return;\n }\n\n // Mark as processed\n $(this).addClass(\"scroll-handler-attached\");\n\n // Add click handler\n $(this).on(\"click\", function () {\n // Get the target collapse element ID\n const targetId = $(this).data(\"bs-target\");\n const $target = $(targetId);\n\n // Wait for the collapse animation to complete\n setTimeout(function () {\n // Always account for navbar height regardless of current scroll position\n // This ensures proper offset even when starting from the top of the page\n const $navbar = $(\".navbar\");\n const navbarHeight = $navbar.outerHeight();\n\n // Calculate position with offset\n const elementPosition = $target.offset().top;\n const offsetPosition = elementPosition - navbarHeight - 20; // 20px extra padding\n\n // Scroll to the element\n $(\"html, body\").animate(\n {\n scrollTop: offsetPosition,\n },\n 500\n );\n }, 350); // Slightly longer delay to ensure collapse animation is complete\n });\n }\n );\n },\n };\n})(jQuery, Drupal, drupalSettings);\n"]}