Файловый менеджер - Редактировать - /home/kunzqhe/www/wp-content/themes/themify-ultra/themify/js/modules/themify.carousel.min.js
Назад
'use strict';(function(k,r){const h={},w={},x=themify_vars.s_v,y=k.url+"/css/swiper/",z=k.jsUrl+"swiper/",v=function(a,c){const g=a.parentNode,m=g.closest(".swiper-slide");!1!==c&&a.classList.remove("tf_svg_lazy");g.classList.remove("tf_lazy");g.parentNode.classList.remove("tf_lazy");m.classList.remove("tf_lazy");m.classList.add("tf_swiper_lazy_done")},A=function(a){var c=k.parseVideo(a);let g;if("youtube"===c.type||"vimeo"===c.type){g=r.createElement("iframe");a=(a=a.split("?")[1])?new URLSearchParams(a): !1;if("youtube"===c.type){c="https://www.youtube.com/embed/"+c.id+"?autohide=1&border=0&wmode=opaque&playsinline=1";if(a){var m=a.get("t");const g=a.get("list");m&&(c+="&start="+m);g&&(c+="&list="+g)}m="accelerometer;encrypted-media;gyroscope;picture-in-picture;autoplay"}else c="//player.vimeo.com/video/"+c.id+"?portrait=0&title=0&badge=0",m="fullscreen;autoplay";c+=a&&a.get("autoplay")?"&autoplay=1":"";g.className="tf_abs";g.setAttribute("allow",m);g.setAttribute("src",c)}else g=r.createElement("video"), g.setAttribute("webkit-playsinline","1"),g.setAttribute("playsinline","1"),g.src=a,g.controls=!0;g.className+=" tf_w tf_h";return g},C=function(){k.trigger("tf_swiper_transition_start_begin",[this,this.activeIndex]);if(this.activeIndex>this.params.slidesPerView&&"auto"!==this.params.slidesPerView){const a=this.activeIndex+this.params.slidesPerView;new Image;for(let c=this.activeIndex;c<a;++c)if(this.slides[c]){k.trigger("tf_swiper_start_slide_begin",[this,this.slides[c]]);let a=this.slides[c].getElementsByClassName("tf_svg_lazy"); for(let c=a.length-1;-1<c;--c)if(a[c].hasAttribute("data-tf-src")){let g=a[c].getAttribute("data-tf-src");void 0===w[a[c]]&&(w[a[c]]=!0,a[c].src=g)}else v(a[c]);k.trigger("tf_swiper_start_slide_end",[this,this.slides[c]])}}k.trigger("tf_swiper_transition_start_end",[this,this.activeIndex])},B=function(){k.trigger("tf_swiper_transition_end_begin",[this,this.activeIndex]);var a=this.activeIndex+("auto"!==this.params.slidesPerView?this.params.slidesPerView:this.el.getElementsByClassName("swiper-slide-visible").length); const c=this.params.autoplay&&this.params.autoplay.enabled,g=!1!==this.params.lazy,m=this.params.thumbs&&this.params.thumbs.swiper&&this.params.thumbs.swiper.params.autoplay?this.params.thumbs.swiper.autoplay:!1,h=this.el.dataset.stopped?!0:!1,b=this;a="flip"===this.params.effect?this.slides.length:a;for(let n="flip"===this.params.effect?0:this.activeIndex;n<a;++n)if(this.slides[n]){k.trigger("tf_swiper_end_slide_begin",[this,this.slides[n],g]);if(!0===g){var p=this.slides[n].getElementsByClassName("tf_svg_lazy"), l=p.length;if(0<l){!1===h&&(c&&b.autoplay.stop(),!1!==m&&m.stop());for(let a=l-1;-1<a;--a)p[a]&&(p[a].hasAttribute("data-lazy")?(k.lazyScroll(p[a],!0),k.imagesLoad(p[a],function(d){v(d.elements[0],!1);k.trigger("tf_swiper_lazy_start",[b,b.slides[n],d.elements[0]]);0===a&&(b.params.autoHeight&&b.updateAutoHeight(b.params.speed,!1),b.updateSize(),b.updateSlides(),!1===h&&(c&&b.autoplay.start(),!1!==m&&m.start()));k.trigger("tf_swiper_lazy_end",[b,b.slides[n],d.elements[0]])})):(v(p[a]),0===a&&!1=== h&&(c&&b.autoplay.start(),!1!==m&&m.start())))}else this.slides[n].classList.remove("tf_lazy"),(p=this.slides[n].getElementsByClassName("tf_lazy")[0])&&p.classList.remove("tf_lazy")}p=this.slides[n].querySelectorAll(".video-wrap[data-url]");l=p.length;if(0<l){!1===h&&(c&&b.autoplay.stop(),!1!==m&&m.stop());for(--l;-1<l;--l)p[l].appendChild(A(p[l].getAttribute("data-url"))),p[l].removeAttribute("data-url"),p[l].classList.remove("tf_lazy");b.params.autoHeight&&b.updateAutoHeight(b.params.speed,!1); b.updateSize();b.updateSlides();!1===h&&(c&&b.autoplay.start(),!1!==m&&m.start())}k.trigger("tf_swiper_end_slide_end",[this,this.slides[n],g])}k.trigger("tf_swiper_transition_end",[this,this.activeIndex])},D=function(){B.call(this);if(this.params.autoplay&&this.params.autoplay.enabled&&!0===this.params.autoplay.disableOnInteraction){const a=this,c=a.params.thumbs&&a.params.thumbs.swiper?a.params.thumbs.swiper:!1;a.el.addEventListener("mouseenter",function(){a.autoplay.stop();!1!==c&&c.params.autoplay&& a.params.thumbs.swiper.autoplay.stop();this.dataset.stopped||this.addEventListener("mouseleave",function(){a.autoplay.start();!1!==c&&c.params.autoplay&&a.params.thumbs.swiper.autoplay.start()},{passive:!0,once:!0})},{passive:!0});!1!==c&&c.el.addEventListener("mouseenter",function(){a.autoplay.stop();this.addEventListener("mouseleave",function(){a.autoplay.start()},{passive:!0,once:!0})},{passive:!0})}this.el.classList.remove("tf_lazy");this.el.parentNode.classList.remove("tf_lazy");this.params.onInit&& this.params.onInit.call(this);k.triggerEvent(this.el,"tf_carousel_init",this);k.trigger("tf_swiper_init",this);jQuery.fn.fullpage&&jQuery.fn.fullpage.reBuild()},E=function(a,c){for(let g=a.length-1;-1<g;--g)if(a[g].classList.contains("swiper-process")||a[g].classList.contains("swiper-container-initialized")){let c=a[g].swiper;c&&c.params.autoHeight&&c.updateAutoHeight(c.params.speed,!1)}else a[g].classList.add("swiper-process"),k.isRTL&&a[g].setAttribute("dir","rtl"),themify_vars.lz&&k.lazyScroll(a[g].querySelectorAll("[data-lazy]"), !0),k.imagesLoad(a[g],function(m){let t=!1,b=m.elements[0],p=b.getElementsByClassName("swiper-slide").length,l=[],n=function(){if(!b.classList.contains("swiper-container-initialized")){for(var a=l.length-1;-1<a;--a)if(!0!==h[l[a]])return!1;var c=d.controllers?r.createElement("a"):!1;if(!1!==d.slider_nav||!1!==d.pager||!1!==c){a=r.createElement("div");a.className="tf_carousel_nav_wrap carousel-nav-wrap";if(!1!==d.slider_nav){var f=r.createElement("a");const b=r.createElement("a");f.className="tf_box tf_overflow carousel-prev"; b.className="tf_box tf_overflow carousel-next";f.href="#";b.href="#";a.appendChild(f);a.appendChild(b);e.navigation={disabledClass:"disabled",nextEl:b,prevEl:f}}if(!1!==d.pager&&(f=r.createElement("div"),f.className="tf_clear tf_textc carousel-pager",a.appendChild(f),e.pagination={el:f,type:d.page_type&&"image_pagination"!==d.page_type?d.page_type:"bullets",bulletElement:"a",modifierClass:"tf_carousel_",bulletClass:"tf_carousel_bullet",currentClass:"selected",bulletActiveClass:"selected",clickable:!0}, "image_pagination"===d.page_type||"1"===b.getAttribute("data-page-num"))){const a="image_pagination"===d.page_type?b.querySelectorAll("[data-swiper-thumb]"):null;e.pagination.renderBullet=function(b,c){let d="";null!==a?a[b]&&(d='<img importance="low" decoding="async" src="'+a[b].getAttribute("data-swiper-thumb")+'">'):d=b+1;return'<a class="'+c+'">'+d+"</a>"}}!1!==c&&(c.className="tf_slider_controller tf_box tf_rel",c.href="#",c.addEventListener("click",function(a){a.preventDefault();a.stopPropagation(); a=b.swiper.parent?b.swiper.parent:b;const c=a.swiper.autoplay,d=a.swiper.thumbs&&a.swiper.thumbs.swiper?a.swiper.thumbs.swiper:null;this.classList.contains("paused")?(this.classList.remove("paused"),a.dataset.stopped=!1,c.start(),d&&(d.$el[0].dataset.stopped=!1,d.autoplay.start())):(this.classList.add("paused"),a.dataset.stopped=!0,c.stop(),d&&(d.$el[0].dataset.stopped=!0,d.autoplay.stop()))}),a.appendChild(c));d.nav_out?(c=b.nextElementSibling,null!==c&&c.classList.contains("tf_lazy")?c.after(a): b.after(a)):b.parentNode.appendChild(a)}if(t){const a="string"===typeof t?"next"===t?b.nextElementSibling:r.getElementsByClassName(t)[0]:t;if(a)if(a.swiper)e.thumbs={swiper:a.swiper,multipleActiveThumbs:!1},a.swiper.parent=b;else return a.addEventListener("tf_carousel_init",function(d){b.classList.contains("swiper-container-initialized")||(e.thumbs={swiper:this.swiper,multipleActiveThumbs:!1},a.swiper.parent=b,b.firstElementChild.classList.remove("tf_lazy"),new TF_Swiper(b,e),b.classList.remove("swiper-process"))}, {once:!0,passive:!0}),a.hasAttribute("data-lazy")&&k.lazyScroll([a],!0),!1}b.firstElementChild.classList.remove("tf_lazy");new TF_Swiper(b,e);b.classList.remove("swiper-process")}};m=function(a){if(a){const b=a.split(",");for(let a=b.length-1;-1<a;--a)h[b[a]+"-css"]||(l.push(b[a]+"-css"),k.LoadCss(b[a],b[a].indexOf("v=")?!1:null,null,null,function(){h[b[a]+"-css"]=!0;1<p&&n()}))}};var f=b.getAttribute("data-speed");"slow"===f?f=4:"fast"===f?f=.5:"normal"===f&&(f=1);const d=c?c:{wrapvar:b.hasAttribute("data-wrapvar")? 0!==parseInt(b.getAttribute("data-wrapvar")):!0,pause_hover:b.hasAttribute("data-pause_hover")?0!==parseInt(b.getAttribute("data-pause_hover")):!0,auto:b.getAttribute("data-auto"),autoRevers:b.getAttribute("data-auto-reverse"),scroll:b.getAttribute("data-scroll"),space:b.getAttribute("data-space")||0,effect:b.getAttribute("data-effect"),speed:f,height:b.getAttribute("data-height"),horizontal:b.getAttribute("data-horizontal"),visible:b.getAttribute("data-visible"),pager:b.hasAttribute("data-pager")? 0!==parseInt(b.getAttribute("data-pager")):!0,slider_nav:b.hasAttribute("data-slider_nav")?0!==parseInt(b.getAttribute("data-slider_nav")):!0,nav_out:b.getAttribute("data-nav_out"),controllers:1===parseInt(b.getAttribute("data-controller")),direction:b.getAttribute("data-direction"),keyboard:b.getAttribute("data-keyboard"),parallax:b.getAttribute("data-parallax"),mousewheel:b.getAttribute("data-mousewheel"),scrollbar:b.getAttribute("data-scrollbar"),freeMode:b.getAttribute("data-freeMode"),thumbs:b.getAttribute("data-thumbs"), page_type:b.getAttribute("data-page_type"),center:b.getAttribute("data-center"),mob_visible:a[g].getAttribute("data-mob-visible"),tab_visible:a[g].getAttribute("data-tab-visible"),breakpoints_mobile:a[g].getAttribute("data-mbreakpoints"),breakpoints_tablet:a[g].getAttribute("data-tbreakpoints"),lazy:0!==parseInt(b.getAttribute("data-lazy-scroll")),has_timer:b.getAttribute("data-timer"),css_url:b.getAttribute("data-css_url"),centered:b.getAttribute("data-centered")},e={direction:d.direction?d.direction: "horizontal",mousewheel:!!d.mousewheel,keyboard:!!d.keyboard,parallax:!!d.parallax,freeMode:!!d.freeMode,loop:!1!==d.wrapvar,autoHeight:!(d.height&&"variable"!==d.height),slidesPerView:"auto"===d.visible?d.visible:0<d.visible?parseInt(d.visible):1,slidesPerGroup:0<d.scroll?parseInt(d.scroll):1,speed:d.speed?10<=parseFloat(d.speed)?1*d.speed:1E3*d.speed:500,centeredSlides:"true"===d.centered,watchSlidesProgress:!0,on:{init:D}};k.is_builder_active&&(e.simulateTouch=!1);if(1>=p){m(d.css_url);k.lazyScroll(b.querySelectorAll("[data-lazy]"), !0);m=b.querySelectorAll(".tf_lazy,.tf_svg_lazy");if(f=b.querySelector(".video-wrap[data-url]"))f.appendChild(A(f.getAttribute("data-url"))),f.removeAttribute("data-url");for(f=m.length-1;-1<f;--f)m[f].classList.remove("tf_lazy","tf_svg_lazy");b.classList.add("swiper-container-initialized");c&&c.onInit&&c.onInit.call()}else{if(themify_vars.lz||!1!==d.lazy){f=b.querySelectorAll(".tf_lazy:not(.swiper-wrapper)");for(var q=f.length-1;-1<q;--q)f[q].classList.remove("tf_lazy");e.preloadImages=!1;e.on.transitionStart= C}else e.lazy=!1,k.lazyScroll(b.querySelectorAll("[data-lazy]"),!0);d.onInit&&(e.onInit=d.onInit);e.on.transitionEnd=B;f=d.effect?d.effect:"";f=!f||"crossfade"!==f&&"cover-fade"!==f&&"uncover-fade"!==f?f:"fade";!f||"scroll"===f||"fade"!==f&&"flip"!==f&&"cube"!==f&&"coverflow"!==f?e.effect="":(e.effect=f,"fade"===f||"flip"===f||"cube"===f?(e.slidesPerView=e.slidesPerGroup=1,d.mob_visible=d.tab_visible=0):"coverflow"===f&&2>e.slidesPerView&&(e.slidesPerView=2),"fade"!==f&&(e[f+"Effect"]={slideShadows:!1}, "cube"===f&&(e[f+"Effect"].shadow=!1)),h[e.effect]||l.push(e.effect));if("auto"===e.slidesPerView)!1!==d.lazy&&(e.watchSlidesVisibility=!0);else{e.slidesPerView>p&&(e.slidesPerView=p);e.slidesPerGroup>e.slidesPerView&&(e.slidesPerGroup=e.slidesPerView);f=parseInt(e.slidesPerView);q=parseInt(d.tab_visible);let a=parseInt(d.breakpoints_tablet),b=parseInt(d.mob_visible),c=parseInt(d.breakpoints_mobile);2<f&&(b||(b=2,c=680),q||(a=1024,q=4>=f?2:3));if(0<b||0<q)e.breakpoints={},0<b&&q!==b&&(e.breakpoints[c]= {slidesPerView:b,slidesPerGroup:b}),0<q&&q!==f&&(e.breakpoints[a]={slidesPerView:q,slidesPerGroup:q})}0<d.space&&(1<e.slidesPerView||"auto"===e.slidesPerView)&&(e.spaceBetween=parseFloat(d.space));if(!0!==d.horizontal&&("continuously"===d.effect||d.auto&&"0"!==d.auto&&"off"!==d.auto)){f="continuously"===d.effect?.5:parseFloat(d.auto);e.autoplay={reverseDirection:!!d.autoRevers,delay:1E3<=f?f:1E3*f,disableOnInteraction:!(!d.pause_hover&&void 0!==d.pause_hover)};if(d.has_timer){const a=r.createElement("div"), d=e.autoplay.delay;a.className="tf_sw_timer tf_abs";b.appendChild(a);e.on.slideChangeTransitionStart=function(b){let c=0;const e=function(){100>c&&(requestAnimationFrame(e),a.style.width=c+"%",++c)};setTimeout(function(){},d);e()}}h.autoplay||l.push("autoplay")}!0!==e.mousewheel||h.mousewheel||l.push("mousewheel");!0!==e.keyboard||h.keyboard||l.push("keyboard");!0!==e.parallax||h.parallax||l.push("parallax");d.thumbs&&("string"!==typeof d.thumbs||"next"===d.thumbs&&null!==b.nextElementSibling&&b.nextElementSibling.classList.contains("swiper-container")|| "next"!==d.thumbs&&r.getElementsByClassName(d.thumbs)[0]?(h.thumbs||l.push("thumbs"),t=d.thumbs):delete d.thumbs);d.scrollbar&&(h.scrollbar||l.push("scrollbar"),e.scrollbar={draggable:!0,hide:!0,el:d.scrollbar});"vertical"!==e.direction||h["vertical-css"]||l.push("vertical-css");"scroll"===e.effect||""===e.effect||h[e.effect+"-css"]||l.push(e.effect+"-css");m(d.css_url);"vertical"!==e.direction||h["vertical-css"]||k.LoadCss(y+"vertical.css",null,null,null,function(){h["vertical-css"]=!0;n()});""=== e.effect||"scroll"===e.effect||"coverflow"===e.effect||h[e.effect+"-css"]?"coverflow"===e.effect&&(h[e.effect+"-css"]=!0,n()):k.LoadCss(y+"effects/"+e.effect+".css",null,null,null,function(){h[e.effect+"-css"]=!0;n()});if(0<l.length){m=!1;for(let a=l.length-1;-1<a;--a)h[l[a]]||-1!==l[a].indexOf("-css")||(m=!0,k.LoadAsync((l[a]===e.effect?z+"effects/":z+"modules/")+l[a]+".min.js",function(){h[l[a]]=!0;n()},x,null,function(){return!!h[l[a]]}));!1===m&&n()}else n()}})},u=function(a,c){!0===h.swiper&& !0===h.swiper_css&&!0===h.imagesLoad&&E(a,c)};k.on("tf_carousel_init",function(a,c){a instanceof jQuery?a=a.get():void 0===a.length&&(a=[a]);"object"!==typeof c&&(c=!1);h.swiper_css||k.LoadCss(k.css_modules.sw,null,null,null,function(){h.swiper_css=!0;u(a,c)});h.imagesLoad||k.imagesLoad(function(){h.imagesLoad=!0;u(a,c)});h.swiper||k.LoadAsync(k.js_modules.sw,function(){h.swiper=!0;u(a,c)},x,null,function(){return"undefined"!==typeof TF_Swiper&&"undefined"!==typeof TF_Swiper.Utils});u(a,c)})})(Themify, document);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка