File: /var/www/html/wptoho/wp-content/themes/themify-ultra/themify/js/modules/swiper/effects/cube.min.js
(t=>{TF_Swiper_Cube=class{constructor(t,e){this.params={shadowOffset:20,shadowScale:.94,...e.cubeEffect},Object.assign(e,{slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0});const s=e.breakpoints;if(s)for(let t in s){let a=s[t];a.slidesPerGroup=e.slidesPerGroup,a.slidesPerView=e.slidesPerView,a.spaceBetween=e.spaceBetween}t.el.classList.add("tf_sw_3d")}createSlideShadows(t,e,s,a){let r="tf_sw_shadow",o=r+"_"+(a?"left":"top"),l=r+"_"+(a?"right":"bottom"),d=t.constructor.createElement,i=e.tfClass(o)[0],f=e.tfClass(l)[0],_=document.createDocumentFragment();i||(i=d("div",`${r} ${o} tf_abs_t tf_w tf_h`),_.appendChild(i)),f||(f=d("div",`${r} ${l} tf_abs_t tf_w tf_h`),_.appendChild(f)),i.style.opacity=-s>0?-s:0,f.style.opacity=s>0?s:0,e.appendChild(_)}recreateShadows(t){const e=t.isHorizontal(),s=t.slides;for(let a=s.length-1;a>-1;--a){let r=s[a],o=r.progress;o>1?o=1:o<-1&&(o=-1),this.createSlideShadows(t,r,o,e)}}setTranslate(e){const{el:s,wrapperEl:a,slides:r,width:o,height:l,rtlTranslate:d,size:i}=e,f=this.params,_=e.isHorizontal(),c=e.constructor.browser,h=(c.isSafari||c.isWebView)&&c.needPerspectiveFix?-i/2:0,n=f.shadow,{PI:w,abs:$}=t;let p,b=0;if(!0===n){const t=_?e.wrapperEl:s,a=e.constructor.createElement,r="tf_sw_cube_shadow",l=t.tfClass(r)[0];l||(l=a("div",r+" tf_abs_b tf_w tf_h"),t.appendChild(l)),_&&(l.style.height=o+"px")}for(let t=0;t<r.length;++t){let s=r[t],a=90*t,o=~~(a/360),l=s.progress,c=0,h=0,n=0;d&&(a*=-1,o*=-1),l>1?l=1:l<-1&&(l=-1),t%4==0?(c=4*-o*i,n=0):(t-1)%4==0?(c=0,n=4*-o*i):(t-2)%4==0?(c=i+4*o*i,n=i):(t-3)%4==0&&(c=-i,n=3*i+4*i*o),!1===_?(h=c,c=0):d&&(c*=-1),l<=1&&l>-1&&(b=a+90*l*(d?-1:1)),s.style.transform=`rotateX(${_?0:-a}deg) rotateY(${_?a:0}deg) translate3d(${c}px,${h}px,${n}px)`,f.slideShadows&&this.createSlideShadows(e,s,l,_)}if(a.style.transformOrigin=`50% 50% -${i/2}px`,!0===n)if(_)p.style.transform=`translate3d(0,${o/2+f.shadowOffset}px, ${-o/2}px) rotateX(90deg) rotateZ(0) scale(${f.shadowScale})`;else{const e=$(b)-90*~~($(b)/90),s=1.5-(t.sin(2*e*w/360)/2+t.cos(2*e*w/360)/2),a=f.shadowScale,r=a/s;p.style.transform=`scale3d(${a},1, ${r}) translate3d(0, ${l/2+f.shadowOffset}px, ${-l/2/r}px) rotateX(-90deg)`}a.style.transform=`translate3d(0,0,${h}px) rotateX(${_?0:b}deg) rotateY(${_?-b:0}deg)`}setTransition(t,e){const{el:s,slides:a}=t,r=e+"ms",o=this.params.shadow;for(let t=a.length-1;t>-1;--t){let e=a[t];if(e.style.transitionDuration=r,!0===o)for(let t=e.tfClass("tf_sw_shadow"),s=t.length-1;s>-1;--s)t[s].style.transitionDuration=r}if(!0===o&&!t.isHorizontal()){const t=s.tfClass("tf_sw_cube_shadow")[0];t&&(t.style.transitionDuration=r)}}}})(Math);