{"version":3,"sources":["webpack:///./app/javascript/packs/tour_navbar.js"],"names":["document","addEventListener","$","click","e","this","addClass","siblings","each","removeClass","on","stopPropagation","find","first","target","closest","length","icon","attr"],"mappings":"+EAAA,YACAA,SAASC,iBAAiB,mBAAmB,WAEvBC,EAAE,kBACRC,OAAM,SAASC,GACvBF,EAAEG,MAAMC,SAAS,UACjBJ,EAAEG,MAAME,WAAWC,MAAK,WACpBN,EAAEG,MAAMI,YAAY,SACxB,GACJ,IAGAP,EAAE,sCAAsCQ,GAAG,CACvC,MAAS,SAASN,GACdA,EAAEO,iBACN,EACA,WAAc,SAASP,GACnBF,EAAEG,MAAMO,KAAK,qBAAqBC,QAAQP,SAAS,OACvD,EACA,WAAc,SAASF,GACnBF,EAAEG,MAAMO,KAAK,qBAAqBC,QAAQJ,YAAY,OAC1D,IAIJP,EAAEF,UAAUU,GAAG,SAAS,SAASN,GACxBF,EAAEE,EAAEU,QAAQC,QAAQ,kBAAkBC,QACvCd,EAAE,0BAA0BO,YAAY,OAEhD,IAGAP,EAAE,kBAAkBQ,GAAG,SAAS,WAC5B,IAAIO,EAAOf,EAAE,sBACyB,SAAlCA,EAAEG,MAAMa,KAAK,iBACbD,EAAKC,KAAK,MAAO,8BAEjBD,EAAKC,KAAK,MAAO,4BAEzB,GACJ,G","file":"js/17-950004e7ac146209b938.chunk.js","sourcesContent":["// Adds/Removes 'active' class from nav-item in Tour Secondary Navbar\ndocument.addEventListener(\"turbolinks:load\", function() {\n // Tour nav items\n let tourNavItem = $('.tour-nav-item')\n tourNavItem.click(function(e){\n $(this).addClass('active');\n $(this).siblings().each(function(){\n $(this).removeClass('active');\n });\n });\n\n // Dropdown submenus\n $('.dropdown-menu .dropdown-menu-item').on({\n \"click\": function(e) {\n e.stopPropagation();\n },\n \"mouseenter\": function(e) {\n $(this).find('.dropdown-submenu').first().addClass('show');\n },\n \"mouseleave\": function(e) {\n $(this).find('.dropdown-submenu').first().removeClass('show');\n }\n });\n\n // Cerrar dropdowns al hacer clic fuera\n $(document).on('click', function(e) {\n if (!$(e.target).closest('.dropdown-menu').length) {\n $('.dropdown-submenu.show').removeClass('show');\n }\n });\n\n // Manejar clic en el botón del navbar en móvil\n $('#navbarToggler').on('click', function() {\n let icon = $('#navbarTogglerIcon');\n if ($(this).attr('aria-expanded') === 'true') {\n icon.attr('src', '/assets/icon-nav_close.svg');\n } else {\n icon.attr('src', '/assets/icon-nav_open.svg');\n }\n });\n});"],"sourceRoot":""}