PageSourceSearch

https://jbs.org/wp-content/plugins/alura-blocks/src/js/globals.min.js?ver=1

js jbs.org collected 2026-09-24 17:57:28 UTC 11,942 bytes, 1 lines download raw bytes

1let kftBlocks;!function(t){"use strict";kftBlocks={init(){this.rowFullWidth(),this.animateElement(),this.videoPopup(),this.accordionBlock(),this.videoBackground(),this.parallaxBg(),this.googleMap(),this.counterBox(),this.countdown(),this.progressBar(),this.blogBlocks(),this.productBlocks(),this.productCategoriesBlocks(),this.InstagramBlock()},animateElement(){const t=[].slice.call(document.querySelectorAll(".kft-animated")),e=new IntersectionObserver(function(t,i){t.forEach(function(t){if(t.isIntersecting){let i=t.target,a=i.className,o=0,n="2s",s=0;if(a.indexOf("kft-animate--delay-")>-1&&(o=a.split("kft-animate--delay-")[1].split(" ")[0],i.style.animationDelay=o+"ms",i.classList.remove("kft-animate--delay-"+o),s+=parseInt(o)),a.indexOf("kft-animate--speed-")>-1&&(n=a.split("kft-animate--speed-")[1].split(" ")[0],i.style.animationDuration=n+"s",i.classList.remove("kft-animate--speed-"+n)),a.indexOf("kft-animate--type-")>-1){const t=a.split("kft-animate--type-")[1].split(" ")[0];s+=1e3*parseFloat(n),i.classList.remove("kft-animated"),i.classList.add("animated",t),setTimeout(function(t,e){t.classList.remove("animated","kft-animated","kft-animate--type-"+e,e),t.style.animationDelay="",t.style.animationDuration=""},s,i,t)}e.unobserve(i)}})});t.forEach(function(t){e.observe(t)})},videoPopup(){if(!t.magnificPopup)return!1;t(".kft-video-button__content-button > .video-btn").magnificPopup({type:"iframe",preloader:!1,fixedContentPos:!1})},accordionBlock(){t(".kft-accordions").each(function(){const e=void 0!==t(this).data("close")&&!0===t(this).data("close")?1e4:0;t(this).find(".kft-accordion-item__title-inner, .kft-accordion-item__icon").off("click").on("click",function(e){const i=t(this).closest(".kft-accordions"),a=t(this).closest(".kft-accordion-item"),o=void 0!==i.data("colapse")&&!0===i.data("colapse");!1===o?a.find(".kft-accordion-item__title-inner").hasClass("is-active")?(i.find(">.kft-accordion-item >.kft-accordion-item__content").slideUp(),i.find(">.kft-accordion-item > .kft-accordion-item__title >.kft-accordion-item__title-inner").removeClass("is-active"),i.find(">.kft-accordion-item>.kft-accordion-item--active").removeClass("kft-accordion-item--active"),a.removeClass("kft-accordion-item--active")):(i.find(">.kft-accordion-item >.kft-accordion-item__content").slideUp(),i.find(">.kft-accordion-item > .kft-accordion-item__title > .kft-accordion-item__title-inner").removeClass("is-active"),i.find(">.kft-accordion-item--active").removeClass("kft-accordion-item--active"),a.find(">.kft-accordion-item__content").stop().slideDown("normal",function(){t(this).css({height:""})}),a.find(".kft-accordion-item__title-inner").addClass("is-active"),a.addClass("kft-accordion-item--active")):!0===o&&(a.find(".kft-accordion-item__title-inner").hasClass("is-active")?(a.find(">.kft-accordion-item__content").stop().slideUp(),a.find(".kft-accordion-item__title-inner").removeClass("is-active"),a.removeClass("kft-accordion-item--active")):(a.find(">.kft-accordion-item__content").stop().slideDown("normal",function(){t(this).css({height:""})}),a.find(".kft-accordion-item__title-inner").addClass("is-active"),a.addClass("kft-accordion-item--active"))),e.preventDefault()}).eq(e).trigger("click")})},videoBackground(){function e(t){let e,i,a,o,n=t.innerWidth(),s=t.innerHeight();n/s<1.77777778?(e=1.77777778*s,i=s):(e=n,i=n*(1/1.77777778)),a=-Math.round((e-n)/2)+"px",o=-Math.round((i-s)/2)+"px",e+="px",i+="px",t.find(".kft-bg-youtube iframe, .kft-bg-vimeo iframe").css({maxWidth:"1000%",width:e,height:i,marginLeft:a,marginTop:o})}function i(){const e=t(".kft-background--video-mp4"),i=e.find("> video"),a=i.videoWidth,o=i.videoHeight,n=(a/o).toFixed(2),s=e.innerWidth(),r=e.innerHeight();if(s/a>r/o)var c=s,d=Math.ceil(c/n);else d=r,c=Math.ceil(d*n);i.css({maxWidth:"1000%",width:c,height:d})}t(".kft-background--video").each(function(){var a;e(a=t(this)),i(),t(window).on("resize",function(){e(a),i()})})},parallaxBg(){function e(){const e=t(".kft-background--image");0!=e.length&&e.each(function(){const i=e.get(0).className,a=t(this);if(i.indexOf("has-parallax-")>-1){let e=0,o=t(window).scrollTop(),n=a.offset().top,s=a.offset().top;if(s+a.outerHeight(!0)<o||s>o+t(window).height())return;e=i.split("has-parallax-")[1].split(" ")[0],a.css("backgroundPosition","50% "+Math.round((n-o)*e)+"px")}})}e(),t(window).on("scroll resize",e).trigger("prlFunc")},viewport(t){const e=document;return"BackCompat"===e.compatMode?"height"==t?e.body.clientHeight:e.body.clientWidth:"height"==t?e.documentElement.clientHeight:e.documentElement.clientWidth},rowFullWidth(){function e(){t("div[data-kft-fullwidth]").each(function(){const e=t(this).parent();0===e.find(">.kft-row-full").length&&e.prepend('<div class="kft-row-full"></div>');const i=e.find(">.kft-row-full");if(!i)return;const a=i.get(0).getBoundingClientRect();t(this).css({maxWidth:"none",left:-a.left+"px"}),"wrapper"==t(this).attr("data-kft-fullwidth")?t(this).css({width:a.width+"px",paddingLeft:a.left+"px",paddingRight:kftBlocks.viewport("width")-a.width-a.left+"px"}):t(this).css({width:kftBlocks.viewport("width")+"px",paddingLeft:"0px",paddingRight:"0px"}),i.remove()})}e(),t(window).on("resize",function(){e()})},googleMap(){t(".kft-google-map__inner").each(function(){const e=t(this);let i="",a="";e.data("styles")&&(i=JSON.parse(e.attr("data-styles")));const o=e.find(".kft-google-map__marker");if(o.length)a=[],o.each(function(){a.push(t(this).data())});else if(e.attr("data-markers"))try{a=JSON.parse(e.attr("data-markers"))}catch(t){}const n={div:e[0],lat:parseFloat(e.attr("data-lat")),lng:parseFloat(e.attr("data-lng")),zoom:parseInt(e.attr("data-zoom"),10),zoomControl:"true"===e.attr("data-zoom-buttons"),zoomControlOpt:{style:"DEFAULT",position:"RIGHT_BOTTOM"},mapTypeControl:"true"===e.attr("data-map-type"),streetViewControl:"true"===e.attr("data-street
1-view"),fullscreenControl:"true"===e.attr("data-fullscreen"),scrollwheel:"true"===e.attr("data-scroll-wheel"),draggable:"true"===e.attr("data-draggable"),styles:i},s=new window.GMaps(n),r=e.attr("data-gesture-handling");s&&"cooperative"===r&&s.setOptions({gestureHandling:r,scrollwheel:n.scrollwheel?null:n.scrollwheel}),a&&a.length&&s.addMarkers(a)})},counterBox(){const t=document.querySelectorAll(".kft-counter-box__number-inner"),e=new IntersectionObserver(function(t,i){t.forEach(function(t){if(t.isIntersecting){const i=t.target,a=i.dataset.count;a&&jQuery({countNum:i.textContent="0"}).animate({countNum:a},{duration:1500,easing:"linear",step(){i.textContent=Math.floor(this.countNum)},complete(){i.textContent=this.countNum}}),e.unobserve(i)}})});t.forEach(function(t){e.observe(t)})},countdown(){function e(t,e){const i=parseInt(e/parseInt(t.data("max-val"))*100,10),a=parseInt(t.attr("r"),10),o=Math.PI*(2*a);t.attr("stroke-dasharray",o);const n=i/100*o;t.css({strokeDashoffset:n})}t(".kft-countdown-timer").each(function(){t(this).find(".seconds, .minutes").parent().find(".kft-countdown-timer__circle").prepend('<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none" viewBox="0 0 100 100" version="1.1" height="100%" width="100%"><circle r="47" cx="50" cy="50" fill="transparent" stroke-dasharray="295.3097094374406" stroke-dashoffset="0" data-max-val="60" style="stroke-dashoffset: 0px;"></circle></svg >'),t(this).find(".hours").parent().find(".kft-countdown-timer__circle").prepend('<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none" viewBox="0 0 100 100" version="1.1" height="100%" width="100%"><circle r="47" cx="50" cy="50" fill="transparent" stroke-dasharray="295.3097094374406" stroke-dashoffset="0" data-max-val="24" style="stroke-dashoffset: 0px;"></circle></svg >'),t(this).find(".days").parent().find(".kft-countdown-timer__circle").prepend('<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none" viewBox="0 0 100 100" version="1.1" height="100%" width="100%"><circle r="47" cx="50" cy="50" fill="transparent" stroke-dasharray="295.3097094374406" stroke-dashoffset="0" data-max-val="365" style="stroke-dashoffset: 0px;"></circle></svg >');const i=t(this),a=function(){const a=Date.parse(i.data("final"))/1e3,o=Math.floor(t.now()/1e3),n=i.find(".days"),s=i.find(".hours"),r=i.find(".minutes"),c=i.find(".seconds");let d=a-o;if(d>0){let t=Math.floor(d/86400);d-=60*t*60*24;let i=Math.floor(d/3600);d-=60*i*60;let a=Math.floor(d/60);d-=60*a,e(n.parent().find("circle"),t),e(s.parent().find("circle"),i),e(r.parent().find("circle"),a),e(c.parent().find("circle"),d),t<10&&(t="0"+t),i<10&&(i="0"+i),a<10&&(a="0"+a),d<10&&(d="0"+d),n<1||"00"==t?n.parent().hide():n.text(t),s.text(i),r.text(a),c.text(d)}};setInterval(a,1e3),a()})},progressBar(){const t=document.querySelectorAll(".kft-progress-bar"),e=new IntersectionObserver(function(t,i){t.forEach(function(t){if(t.isIntersecting){const i=t.target,a=i.querySelector(".kft-progress-bar__inner-content");a&&jQuery(a).css({width:"5%"}).stop().animate({width:a.dataset.count+"%"},{duration:parseInt(a.dataset.speed),easing:"easeInOutQuart",step(t,e){e.now/e.end>.2&&jQuery(a).find(".kft-progress-bar__label-inner").text(parseInt(e.now)+(jQuery(a).data("suffix")||"")).css({opacity:e.now/e.end})}}).find(".kft-progress-bar__label-inner").text("0").css({opacity:0}),e.unobserve(i)}})});t.forEach(function(t){if(!t.querySelector(".kft-progress-bar__inner-content").dataset.speed)return!1;e.observe(t)})},blogBlocks(){t(".kft-blogs").each(function(){if(t(this).hasClass("kft-blogs--masonry")){const e=t(this).find(".kft-blogs__inner");void 0!==t.fn.isotope&&e.imagesLoaded(function(){e.isotope({gutter:0,isOriginLeft:!t("body").hasClass("rtl")})})}if(t(this).hasClass("has-load-more")){const e=t(this),i=e.data("atts");e.on("click","a.load-more",function(){let a=t(this),o=a.attr("data-paged"),n=e.find(".kft-blogs__inner");return!a.hasClass("loading")&&(a.addClass("loading"),t.ajax({type:"POST",timeout:3e4,url:kft_settings.ajax_uri,data:{action:"kft_blogs_load_items",paged:o,atts:i},error(t,e){},success(i){a.removeClass("loading"),a.attr("data-paged",++o),0!=i&&""!=i?e.hasClass("kft-blogs--masonry")?void 0!==t.fn.isotope&&(n.isotope("insert",t(i)),n.imagesLoaded().progress(function(){n.isotope("layout")})):n.append(i):a.parent().remove()}}),!1)})}})},productBlocks(){t(".kft-products").each(function(){if(t(this).hasClass("is-masonry")){const e=t(this).find(".kft-products__inner");void 0!==t.fn.isotope&&e.imagesLoaded(function(){e.isotope({gutter:0,isOriginLeft:!t("body").hasClass("rtl")})})}if(t(this).hasClass("has-load-more")){const e=t(this),i=e.data("atts");e.on("click","a.load-more",function(){let a=t(this),o=a.attr("data-paged"),n=e.find(".kft-products__inner");return!a.hasClass("loading")&&(a.addClass("loading"),t.ajax({type:"POST",timeout:3e4,url:kft_settings.ajax_uri,data:{action:"kft_render_block_core_products_items",paged:o,atts:i},error(t,e){},success(i){a.removeClass("loading"),a.attr("data-paged",++o),0!=i&&""!=i?e.hasClass("is-masonry")?(n.isotope("insert",t(i)),void 0!==t.fn.isotope&&n.imagesLoaded().progress(function(){n.isotope("layout")})):n.append(i):a.parent().remove()}}),!1)})}})},productCategoriesBlocks(){t(".kft-product-categories").each(function(){if(t(this).hasClass("is-masonry")){const e=t(this).find(".kft-product-categories__inner");void 0!==t.fn.isotope&&e.imagesLoaded(function(){e.isotope({gutter:0,isOriginLeft:!t("body").hasClass("rtl")})})}})},InstagramBlock(){t(".kft-instagram-block").each(function(){if(t(this).hasClass("slider")){const e=t(this).find(".kft-instagram"),i=t(this).data("dot"),a=t(this).data("nav"),o=1==t(this).data("autoplay"),n=t(this).data("loop");e.imagesLoaded(function(){e.flickity({imagesLoaded:!0,draggable:!0,dragThreshold:5,wrapAround:n||!1,contain:!0,cellAlign:"left",prevNextButtons:a||!1,percentPosition:!0,pageDots:i||!1,rightToLeft:!!t("body").hasClass("rtl"),autoPlay:o,arrowShape:{x0:10,x1:60,y1:50,x2:65,y2:45,x3:20}})})}})}},t(document).ready(function(){kftBlocks.init()})}(jQuery);

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.