PageSourceSearch

https://www.carjet.com/cdn/js/functions_modules.min.js

js carjet.com collected 2026-09-28 08:50:11 UTC 14,064 bytes, 21 lines download raw bytes

1const activeLang="string"==typeof idioma?idioma:sIdioma;function autoId(e){for(var t="",a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",s=a.length,l=0;l<e;l++)t+=a.charAt(Math.floor(Math.random()*s));return t}function resizeThumbsContainer(){$(".gallery").each(function(){var e=0;$(this).find(".gallery-thumbs img").each(function(){e+=$(this).width()+2}),$(this).find(".gallery-thumbs").css("width",e)})}var carTypeCarousel=function(){var h;$(".jcarousel").each(function(){h=$(this),t="jc_"+autoId(6),h.addClass("loading"),h.parent().attr("id",t),void 0!==(e=h[0].hasAttribute("responsive"))&&!1!==e&&responsiveCarousel(t),e=h.find("li.hidden").length,s=h.find("li").length,s-=e,l=parseInt(h.attr("data-elements"))||2,h.attr("data-elements",l=l?s<l?s<2?2:s:l:2),"full"==h.attr("data-step-slide")?(i=l,$("#"+t+" #smallBoxes").css("transition","left 0."+(3+i)+"s ease")):i=h.attr("data-steps")?h.attr("data-steps")>l?l:parseInt(h.attr("data-steps")):1,n=Math.round(h.parent().width()/l*10)/10,r=s-l,o=h.attr("data-step-controller"),c=h.width()/r,h.find("li").each(function(){$(this).css("width",n),52<$(this).find(".nfoPriceDest").width()&&$(this).parent().addClass("bigPrice")}),d=0,h.removeClass("loading"),$("#"+t+" #smallBoxes").css("width",n*s+"px"),a=h[0].hasAttribute("infinite"),0==$("#"+t+" .jcarousel-control-prev").length?h.parent().append('<span class="jcarousel-control-prev" dir="prev"></span><span class="jcarousel-control-next" dir="next"></span>'):($("#"+t+" .jcarousel-control-prev").off("click"),$("#"+t+" .jcarousel-control-next").off("click"));var t,a,e,s,l,i,n,r,o,c,d,u,p=$("#"+t+" .jcarousel-control-prev"),f=$("#"+t+" .jcarousel-control-next"),v=(0<r?(p.on("click",function(){a?0==d?d=r:d-=i:0<d&&(d-=i),v(this)}),f.on("click",function(){a?r<=d?d=0:d+=i:d<r&&(d+=i),v(this)}),"true"==o&&h.append('<div class="container-scroll-control"><div class="scroll-control"></div></div>')):$("#"+t+" .jcarousel-control-prev").length&&(p.remove(),f.remove()),function(e){$(e).attr("dir");$("#"+t+" .jcarousel").attr("data-step",d),a||(p.removeClass("inactive"),f.removeClass("inactive"),0==d&&p.addClass("inactive"),r<=d&&f.addClass("inactive"));e="ar"===document.body.dataset.lang;$("#"+t+" #smallBoxes").css("left",e?n*d:-n*d),"true"==o&&$("#"+t+" .jcarousel .scroll-control").css("width",c*d)});$(".jcarousel li").off("click"),$("#"+t+" li").on("click",function(){$(this).hasClass("active")?$(this).removeClass("active"):$(this).addClass("active"),0<$("#"+t+" li.active").length?$("#"+t).addClass("active"):$("#"+t).removeClass("active")}),$("#"+t+" li.active").length?l<(u=$("#"+t+" li.active").index()+1)&&l<s&&(d="full"==h.attr("data-step-slide")?s-l:u-l-e,v(this)):v(d),setTimeout(function(){$(".jcarousel").removeClass("resizing")},300)})}
1,responsiveCarousel=function(id){var jcarousel=$("#"+id+" .jcarousel"),mixins=jcarousel.attr("data-mixins"),mixinsObjet=obj=eval("({"+mixins+"})"),mixinsLength=Object.values(mixinsObjet).length,lastValue;Object.keys(mixinsObjet).forEach(function(e,t){0==t?window.innerWidth<parseInt(e)&&jcarousel.attr("data-elements",Object.values(mixinsObjet)[t]):t<mixinsLength-1?window.innerWidth>=lastValue+1&&window.innerWidth<parseInt(e)&&jcarousel.attr("data-elements",Object.values(mixinsObjet)[t]):window.innerWidth>=lastValue+1&&jcarousel.attr("data-elements",Object.values(mixinsObjet)[t]),lastValue=parseInt(e)})};function newCarousel(e=".fcarousel"){("string"==typeof e?document.querySelectorAll(e):e instanceof Element?[e]:[]).forEach(p=>{if("true"!==p.dataset.initialized){p.dataset.initialized="true";var f="fc_"+autoId(6),v=p.hasAttribute("responsive");let a=p.hasAttribute("infinite");const E=parseInt(p.getAttribute("data-autoplay"),10),S=!isNaN(E)&&0<E;p.classList.add("loading"),p.parentElement.id=f,v&&responsiveNewCarousel(f);let e=Array.from(p.querySelectorAll(".fcarousel-item"));v=e.filter(e=>e.classList.contains("hidden")).length;let s=e.length-v;var v=parseInt(p.getAttribute("data-elements"))||2;let l=Math.min(Math.max(2,s),v);p.setAttribute("data-elements",l);let i;const O=p.querySelector(".fcarousel-list");"full"===p.getAttribute("data-step-slide")?(i=l,O&&(O.style.transition="left 0.6s ease")):(v=parseInt(p.getAttribute("data-steps")),i=v?Math.min(v,l):1);let n=Math.round(p.parentElement.clientWidth/l*10)/10,t=s-l,r="true"===p.getAttribute("data-step-controller"),o="true"===p.getAttribute("data-step-bullets"),c=p.clientWidth/(t||1);e.forEach(e=>{e.style.width=n+"px"}),p.classList.remove("loading"),O&&(O.style.width=n*s+"px");var h=document.getElementById(f),{prevBtn:m,nextBtn:g}=(v=p.querySelector(".fcarousel-control-prev"),f=p.querySelector(".fcarousel-control-next"),b=`
2                        <svg class="arrow" viewBox="0 0 5 10" aria-hidden="true">
3                            <path class="arrow__line" d="M1 1l4 4-4 4"></path>
4                        </svg>`,v||(p.insertAdjacentHTML("beforeend",`
5                            <div class="fcarousel-controls">
6                                <span class="fcarousel-control-prev" dir="prev">${b}</span>
7                                <span class="fcarousel-control-next" dir="next">${b}</span>
8                            </div>
9                        `),v=p.querySelector(".fcarousel-control-prev"),f=p.querySelector(".fcarousel-control-next")),{prevBtn:v,nextBtn:f});let d=0,u=null;if(S&&m.addEventListener("click",A),S&&g.addEventListener("click",A),S&&h.addEventListener("mouseenter",A),S&&h.addEventListener("mouseleave",()=>j(1e4)),0<t){if(m.addEventListener("click",function(){var e;a?(e=Math.ceil((s-l)/i)*i,(d-=i)<0&&(d=e)):0<d&&(d-=i),w()}),g.addEventListener("click",function(){a?d=d>=t?0:d+i:d<t&&(d+=i),w()}),r&&!p.querySelector(".fcarousel-scroll")&&p.insertAdjacentHTML("beforeend",'<div class="fcarousel-scroll-container"><div class="fcarousel-scroll"></div></div>'),o){var b=p.querySelector(".fcarousel-bullets-container"),v=(b&&b.remove(),document.createElement("div")),x=(v.className="fcarousel-bullets-container",document.createElement("div")),$=(x.className="fcarousel-bullets",x.innerHTML="",Math.ceil((s-l)/i)+1);for(let e=0;e<$;e++){var y=document.createElement("span");y.className="bullet",y.dataset.step=e*i,x.appendChild(y),y.addEventListener("click",function(){d=parseInt(this.dataset.step),w()})}v.appendChild(x),p.appendChild(v)}function L(){var e,t;o&&((e=p.querySelectorAll(".bullet")).forEach(e=>e.classList.remove("active")),e[t=Math.floor(d/i)])&&e[t].classList.add("active")}}else m?.remove(),g?.remove();e.forEach(e=>e.replaceWith(e.cloneNode(!0))),(e=Array.from(p.querySelectorAll(".fcarousel-item"))).forEach(e=>{e.addEventListener("click",function(){e.classList.toggle("active"),e.classList.add("loading"),h.classList.toggle("active",0<h.querySelectorAll(".fcarousel-item.active").length)})});f=p.querySelector(".fcarousel-item.active");function w(){let e=d;var t;d>s-l&&(e=s-l),p.setAttribute("data-step",d),a||(m.classList.toggle("inactive",0===d),g.classList.toggle("inactive",d>=s-l)),O&&("AR"!=activeLang?O.style.left=-(n*e)+"px":O.style.left=n*e+"px"),r&&(t=h.querySelector(".fcarousel-scroll"))&&(t.style.width=c*e+"px"),o&&"function"==typeof L&&L()}function j(e=0){S&&(u=u||setInterval(C,E))}function A(){u&&(clearInterval(u),u=null)}function C(){if(a)d=d>=t?0:d+1;else{if(!(d<t))return;d+=1}w()}f&&(b=e.indexOf(f),d="full"===p.getAttribute("data-step-slide")?Math.floor(b/i)*i:(v=b-(l-1),v=Math.max(0,Math.min(v,s-l)))),w(),S&&j(),p.carouselAPI={startAutoplay:j,stopAutoplay:A,next:()=>{d+=1,w()},prev:()=>{--d<0&&(d=0),w()}},setTimeout(()=>
9{document.querySelectorAll(".fcarousel").forEach(e=>e.classList.remove("resizing"))},300)}})}var responsiveNewCarousel=function(id){var carousel=document.querySelector(`#${id} .fcarousel`),mixins=carousel.dataset.mixins,mixinsObjet=obj=eval("({"+mixins+"})"),mixinsLength=Object.values(mixinsObjet).length,lastValue;Object.keys(mixinsObjet).forEach(function(e,t){0==t?window.innerWidth<parseInt(e)&&(carousel.dataset.elements=Object.values(mixinsObjet)[t]):t<mixinsLength-1?window.innerWidth>=lastValue+1&&window.innerWidth<parseInt(e)&&(carousel.dataset.elements=Object.values(mixinsObjet)[t]):window.innerWidth>=lastValue+1&&(carousel.dataset.elements=Object.values(mixinsObjet)[t]),lastValue=parseInt(e)})};function debounce(a,s=500){let l;return function(...e){const t=this;clearTimeout(l),l=setTimeout(()=>{a.apply(t,e)},s)}}function initCollapsibleContainers(){document.querySelectorAll(".collapsible-container").forEach(t=>{const a=t.querySelector(".collapsible-content"),s=t.querySelector(".more-info-btn");if(a&&s){const l=(a.dataset.class||"").trim().split(/\s+/).filter(Boolean),i=s.dataset.open||"Mostrar más",n=s.dataset.closed||"Ocultar",e=e=>{e?(t.classList.add("collapsed"),l.length&&a.classList.remove(...l),a.classList.contains("collapsible-content")||a.classList.add("collapsible-content"),s.textContent=i,s.setAttribute("aria-expanded","false"),a.setAttribute("aria-hidden","true")):(t.classList.remove("collapsed"),l.length&&a.classList.add(...l),a.classList.contains("collapsible-content")||a.classList.add("collapsible-content"),s.textContent=n,s.setAttribute("aria-expanded","true"),a.setAttribute("aria-hidden","false"))};s.hasAttribute("aria-expanded")||s.setAttribute("aria-expanded",t.classList.contains("collapsed")?"false":"true"),a.hasAttribute("aria-hidden")||a.setAttribute("aria-hidden",t.classList.contains("collapsed")?"true":"false"),e(t.classList.contains("collapsed")),s.addEventListener("click",()=>{e(!t.classList.contains("collapsed"))})}})}document.addEventListener("DOMContentLoaded",()=>{var e=!!window.location.host.split(".")[1]&&window.location.host.split(".")[0];function a(t,e){document.querySelectorAll('[data-target="'+e+'"]').forEach(e=>e.setAttribute("aria-expanded",t)),document.querySelectorAll('[data-rel="'+e+'"]').forEach(e=>e.setAttribute("aria-expanded",t)),0==t?$('[data-rel="'+e+'"]').slideUp(200):$('[data-rel="'+e+'"]').slideDown(200)}(("function"==typeof esMovil||"object"==typeof esMovil)&&esMovil.cualquiera()||"m"==e)&&0<$(".accordion-toggle").length&&$(".accordion-toggle").on("click",function(e){e.preventDefault();var e=$(this).attr("href"),t=$(e).attr("aria-expanded")||!1,a=$(this).parents(".panel-group").attr("id"),a=$("#"+a).find('.accordion-toggle[aria-expanded="true"]').attr("href");a&&a!=e&&($('[href="'+a+'"]').attr("aria-expanded",!1).toggleClass("collapsed"),$(a).toggle(200).attr("aria-expanded",!1).toggleClass("in")),$(this).attr("aria-expanded",!JSON.parse(t)).toggleClass("collapsed"),$(e).toggle(200).attr("aria-expanded",!JSON.parse(t)).toggleClass("in")}),document.querySelectorAll(".togglePane").forEach(t=>{a("false"!=t.getAttribute("aria-expanded"),t.dataset.target),t.addEventListener("click",e=>{e.preventDefault(),a(!("false"!=t.getAttribute("aria-expanded")),t.dataset.target)})}),0<$(".block-toggle").length&&$(".block-toggle").on("click",function(e){e.preventDefault();var e=$(this).attr("href")||$(this).attr("data-target"),t=(e.search("#")<0&&(e='[data-rel="'+e+'"]'),$(e).attr("aria-expanded")||!1);$(this).attr("aria-expanded",!JSON.parse(t)).toggleClass("collapsed"),$(e).slideToggle(200).attr("aria-expanded",!JSON.parse(t)).toggleClass("in")}),0<$(".gallery").length&&($(".gallery").each(function(){var e="gallery-"+autoId(8);$(this).attr("id",e),$(this).removeClass("loading")}),resizeThumbsContainer(),$(".gallery .gallery-thumbs img").on("click",function(){var e=$
9(this).parents(".gallery").find(".thumb img"),t=$(this).attr("src").replace("/thumbs",""),a=$(this).attr("alt")||"";e.attr("src",t).attr("alt",a)}),$(window).on("resize",resizeThumbsContainer)),$(".scroll-control .section-title").on("click",function(){$(document).scrollTop(0)}),0<document.querySelectorAll(".jcarousel").length&&(carTypeCarousel(),window.addEventListener("resize",debounce(function(e){document.querySelectorAll(".fcarousel").forEach(e=>{e.dataset.initialized="false",e.classList.add("resizing")}),carTypeCarousel()})));const t=document.querySelectorAll(".fcarousel");t&&(newCarousel(),e=debounce(function(){t.forEach(e=>{console.log("from debouncedCarousel"),e?.carouselAPI?.stopAutoplay(),e.dataset.initialized="false",e.classList.add("resizing")}),newCarousel()}),window.addEventListener("resize",e));e=document.querySelector("#feedBlog");if(e){const c=e.querySelector("section"),d=(c.classList.add("loading"),"/blog/json/"+activeLang);let r=null;async function o(){try{var t=await fetch(d);if(!t.ok)throw new Error("Error: "+t.statusText);var e=await t.text(),a=JSON.parse(e);r&&clearInterval(r);{var s=a;var l=document.createElement("div"),i=(l.className="jcarousel-wrapper float_box",document.createElement("div"));i.classList.add("jcarousel"),i.dataset.elements=4;const n=document.createElement("ul");n.id="smallBoxes",n.style.transition="left 0.6s ease 0s",s.forEach(e=>{var t=document.createElement("li");t.innerHTML=`
10                        <div class='smallBoxContainer'>
11                            <div class='card-container'>
12                                <a href='${e.link}' class='seo-link' target='_blank' title='${e.title}'>
13                                    <div class='card-img big'>
14                                        <img src='${e.image}' alt='${e.title}'>
15                                    </div>
16                                    <div class='card-title' style='height:90px'>${e.title}</div>
17                                </a>
18                            </div>
19                        </div>
20                    `,n.append(t)}),i.append(n),l.append(i),c.classList.remove("loading"),c.append(l),carTypeCarousel();return}}catch(e){c.classList.remove("loading");t=document.createElement("div");t.classList.add("alert","alert-danger"),t.innerHTML=`
21                        <p>${e}</p>`,c.appendChild(t),r=r||setInterval(()=>{c.innerHTML="",c.classList.add("loading"),o()},1e4)}}new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(o(),t.unobserve(e.target))})},{threshold:.25}).observe(e)}document.querySelector(".collapsible-container")&&initCollapsibleContainers()});

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.