!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=81)}({81:function(e,t){!function(e,t){e.behaviors.bestFares={attach:function(e){console.log("Loaded -- Best fares");var n=document.getElementById("crsls-best-fares"),r=document.querySelectorAll(".crslsb");n&&r.length&&(n.textContent=r[0].textContent,t("bestFares",r).forEach((function(e){e.addEventListener("click",(function(){n.textContent=e.textContent,r.forEach((function(e){e.classList.remove("active")})),e.classList.add("active")}),!1)})));var o=document.querySelectorAll(".bf_body.slider-images .slide-inner");o&&t("bestFaresSlider",o).forEach((function(e){for(var t=e.querySelectorAll(".item-content"),n=e.querySelectorAll(".slider-indicator span"),r=new IntersectionObserver((function(e,t){e.forEach((function(e){var t=e.target.dataset.cardNumber;e.intersectionRatio>=.6?n[t].classList.add("selected"):n[t].classList.remove("selected")}))}),{root:e,rootMargin:"12px",threshold:.6}),o=0;o<t.length;o++)r.observe(t[o])}));var c=document.getElementById("crslc-best-fares");n&&c&&t("bestFares",c).forEach((function(e){e.addEventListener("slide.bs.carousel",(function(e){var t=e.relatedTarget.id,o=document.getElementById("".concat(t,"-btn"));o&&(n.textContent=o.textContent,r.forEach((function(e){e.classList.remove("active")})),o.classList.add("active"))}))}))}}}(Drupal,once)}});
//# sourceMappingURL=best-fares.js.map