From 7faa0606193f4993c364cf6244432f85665f4596 Mon Sep 17 00:00:00 2001 From: ganlanyuan Date: Thu, 2 Aug 2018 14:35:43 -0400 Subject: [PATCH] reset padding for non-loop, update tests --- dist/min/tiny-slider.js | 2 +- dist/sourcemaps/tiny-slider.js.map | 2 +- dist/tiny-slider.js | 27 ++++++++++++------------ src/tiny-slider.js | 27 ++++++++++++------------ src/tiny-slider.module.js | 27 ++++++++++++------------ tests/js/tests-async-es5.js | 33 ++++++++++++------------------ tests/js/tests-async.js | 9 ++------ 7 files changed, 59 insertions(+), 68 deletions(-) diff --git a/dist/min/tiny-slider.js b/dist/min/tiny-slider.js index c3657944..ad862b56 100644 --- a/dist/min/tiny-slider.js +++ b/dist/min/tiny-slider.js @@ -1,2 +1,2 @@ -var tns=function(){var t=window,wi=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(t){return setTimeout(t,16)},e=window,Ci=e.cancelAnimationFrame||e.mozCancelAnimationFrame||function(t){clearTimeout(t)};function Mi(){for(var t,e,n,i=arguments[0]||{},a=1,r=arguments.length;a";return r.innerHTML=o,a.appendChild(r),n.appendChild(a),t=Math.abs(a.getBoundingClientRect().left-r.children[67].getBoundingClientRect().left)<2,n.fake?Li(n,i):a.remove(),t}(),n),I=e.tMQ?Ai(e.tMQ):Ti(e,"tMQ",(r=document,o=ki(),x=Ei(o),b=r.createElement("div"),w=r.createElement("style"),C="@media all and (min-width:1px){.tns-mq-test{position:absolute}}",w.type="text/css",b.className="tns-mq-test",o.appendChild(w),o.appendChild(b),w.styleSheet?w.styleSheet.cssText=C:w.appendChild(r.createTextNode(C)),a=window.getComputedStyle?window.getComputedStyle(b).position:b.currentStyle.position,o.fake?Li(o,x):b.remove(),"absolute"===a),n),T=e.tTf?Ai(e.tTf):Ti(e,"tTf",ji("transform"),n),k=e.t3D?Ai(e.t3D):Ti(e,"t3D",function(t){if(!t)return!1;if(!window.getComputedStyle)return!1;var e,n=document,i=ki(),a=Ei(i),r=n.createElement("p"),o=9-Ht&&(e=t);return e}:function(){return Et||V?Math.max(0,Ot-Math.ceil(wt)):Ot-1},jt=ln(hn("startIndex")),Ft=jt,Qt=0,Vt=mt?null:qt(),Xt=h.swipeAngle,Yt=!Xt||"?",Kt=!1,Ut=h.onInit,Gt=new Xi,Jt=" tns-slider tns-"+h.mode,_t=it.id||(ft=window.tnsId,window.tnsId=ft?ft+1:1,"tns"+window.tnsId),Zt=hn("disable"),$t=!1,te=h.freezable,ee=!(!te||mt)&&kn(),ne=!1,ie={click:ni,keydown:function(t){switch((t=ci(t)).keyCode){case v:case m:case l:Te.disabled||ni(t,-1);break;case y:case g:case c:ke.disabled||ni(t,1);break;case d:ei("first",t);break;case f:ei("last",t)}}},ae={click:function(t){Kt&&ti();var e=(t=ci(t)).target||t.srcElement;for(;e!==Ne&&!Hi(e,"data-nav");)e=e.parentNode;Hi(e,"data-nav")&&ei(Oe=[].indexOf.call(Ee,e),t)},keydown:function(t){var e=D.activeElement;if(!Hi(e,"data-nav"))return;var n=(t=ci(t)).keyCode,i=[].indexOf.call(Ee,e),a=Ie.length,r=Ie.indexOf(i);h.navContainer&&(a=st,r=i);function o(t){return h.navContainer?t:Ie[t]}switch(n){case v:case l:0"," animation"];if(he||pe)var _e,Ze={},$e={},tn=!1,en=0,nn=tt?function(t,e){return t.x-e.x}:function(t,e){return t.y-e.y};if(he)var an=hn("touch");if(pe)var rn=hn("mouseDrag");un(Zt||ee),T&&(Rt=T,Wt="translate",k?(Wt+=tt?"3d(":"3d(0px, ",zt=tt?", 0px, 0px)":", 0px)"):(Wt+=tt?"X(":"Y(",zt=")")),function(){!function(){vn("gutter");et.className="tns-outer",nt.className="tns-inner",nt.id=_t+"-iw",Lt&&(nt.className+=" tns-ah");""===it.id&&(it.id=_t);Jt+=A||mt?" tns-subpixel":" tns-no-subpixel",Jt+=M?" tns-calc":" tns-no-calc",V&&(Jt+=" tns-"+h.axis);if(it.className+=Jt,V){var t=D.createElement("div");t.className="tns-ovh",et.appendChild(t),t.appendChild(nt)}else et.appendChild(nt);at.insertBefore(et,it),nt.appendChild(it)}();for(var t=0;t .tns-item","font-size:"+p.getComputedStyle(ot[0]).fontSize+";",Di(Nt)),Ni(Nt,"#"+_t,"font-size:0;",Di(Nt))):Ii(ot,function(t,e){var n;t.style.marginLeft=(n=e,M?M+"("+100*n+"% / "+Ot+")":100*n/Ot+"%")})),I){var i=pn(h.edgePadding,h.gutter,h.fixedWidth,h.speed);Ni(Nt,"#"+_t+"-iw",i,Di(Nt)),V&&(i=tt&&!mt?"width:"+mn(h.fixedWidth,h.gutter,h.items)+";":"",E&&(i+=bn(Tt)),Ni(Nt,"#"+_t,i,Di(Nt))),i=tt&&!mt?yn(h.fixedWidth,h.gutter,h.items):"",h.gutter&&(i+=gn(h.gutter)),V||(E&&(i+=bn(Tt)),N&&(i+=wn(Tt))),i&&Ni(Nt,"#"+_t+" > .tns-item",i,Di(Nt))}else{nt.style.cssText=pn(gt,xt,yt),V&&tt&&!mt&&(it.style.width=mn(yt,xt,wt));var i=tt&&!mt?yn(yt,xt,wt):"";xt&&(i+=gn(xt)),i&&Ni(Nt,"#"+_t+" > .tns-item",i,Di(Nt))}if(F&&I)for(var a in F){a=parseInt(a);var r=F[a],i="",o="",s="",u="",l=mt?null:hn("items",a),c=hn("fixedWidth",a),f=hn("speed",a),d=hn("edgePadding",a),v=hn("gutter",a);("edgePadding"in r||"gutter"in r)&&(o="#"+_t+"-iw{"+pn(d,v,c,f)+"}"),V&&tt&&!mt&&("fixedWidth"in r||"items"in r||yt&&"gutter"in r)&&(s="width:"+mn(c,v,l)+";"),E&&"speed"in r&&(s+=bn(f)),s&&(s="#"+_t+"{"+s+"}"),("fixedWidth"in r||yt&&"gutter"in r||!V&&"items"in r)&&(u+=yn(c,v,l)),"gutter"in r&&(u+=gn(v)),!V&&"speed"in r&&(E&&(u+=bn(f)),N&&(u+=wn(f))),u&&(u="#"+_t+" > .tns-item{"+u+"}"),(i=o+s+u)&&Nt.insertRule("@media (min-width: "+a/16+"em) {"+i+"}",Nt.cssRules.length)}})(),Cn(),mt||Mn();F&&En();if(V&&O){var u={};u[O]=ti,Qi(it,u)}an&&Qi(it,ue);rn&&Qi(it,le);At&&Qi(D,se);"inner"===Q?Gt.on("outerResized",function(){Tn(),Gt.emit("innerLoaded",bi())}):(F||yt||mt||!tt)&&Qi(p,{resize:An});"outer"===Q?Gt.on("innerLoaded",Hn):!Lt&&V||Zt||Hn();mt||Bn();Zt?In():ee&&Dn();Gt.on("indexChanged",Rn),"function"==typeof Ut&&Ut(bi());"inner"===Q&&Gt.emit("innerLoaded",bi());$=!0}();var on=Et?V?function(){var t=Qt,e=Vt;t+=Ct,e-=Ct,gt?(t+=1,e-=1):yt&&bt%(yt+xt)&&(e-=1),Bt&&(e=parseInt(i)&&t in F[i]&&(n=F[i][t]);return"slideBy"===t&&"page"===n&&(n=hn("items")),V||"slideBy"!==t&&"items"!==t||(n=Math.floor(n)),n}function pn(t,e,n,i){var a="";if(t){var r=t;e&&(r-=e),a=tt?"margin: 0 "+r+"px 0 "+t+"px;":"margin: "+t+"px 0 "+r+"px 0;"}else if(e&&!n){var o="-"+e+"px";a="margin: 0 "+(tt?o+" 0 0":"0 "+o+" 0")+";"}return E&&i&&(a+=bn(i)),a}function mn(t,e,n){return t?(t+e)*Ot+"px":M?M+"("+100*Ot+"% / "+n+")":100*Ot/n+"%"}function yn(t,e,n){var i;if(t)i=t+e+"px";else{V||(n=Math.floor(n));var a=V?Ot:n;i=M?M+"(100% / "+a+")":100/a+"%"}return i="width:"+i,"inner"!==Q?i+";":i+" !important;"}function gn(t){var e="";!1!==t&&(e=(tt?"padding-":"margin-")+(tt?"right":"bottom")+": "+t+"px;");return e}function xn(t,e){var n=t.substring(0,t.length-e).toLowerCase();return n&&(n="-"+n+"-"),n}function bn(t){return xn(E,18)+"transition-duration:"+t/1e3+"s;"}function wn(t){return xn(N,17)+"animation-duration:"+t/1e3+"s;"}function Cn(){if(vn("autoHeight")||!V||mt||!tt){var t=it.querySelectorAll("img");Ii(t,function(t){var e=t.src;e.indexOf("data:image")<0?(Qi(t,ge),t.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",t.src=e):Oi(t,ye)}),wi(function(){Pn(function(t){for(var e=[],n=0,i=t.length;n'+Je[0]+t+Je[1]+Xe[0]+""),Ke=et.querySelector("[data-action]")),Ke&&Qi(Ke,{click:ui}),Fe&&(oi(),Ye&&Qi(it,re),Ge&&Qi(it,oe))}if(fe){var e=V?Bt:0;if(Ne){Pi(Ne,{"aria-label":"Carousel Pagination"}),Ee=Ne.children;for(var n=0;n';a='
'+a+"
",et.insertAdjacentHTML("afterbegin",a),Ne=et.querySelector(".tns-nav"),Ee=Ne.children}if(xi(),E){var o=E.substring(0,E.length-18).toLowerCase(),s="transition: all "+Tt/1e3+"s";o&&(s="-"+o+"-"+s),Ni(Nt,"[aria-controls^="+_t+"-item]",s,Di(Nt))}Pi(Ee[Se],{tabindex:"0","aria-selected":"true"}),Oi(Ee[Se],Pe),Qi(Ne,ae)}ce&&(Me||Te&&ke?(Me&&(Te=Me.children[0],ke=Me.children[1],Pi(Me,{"aria-label":"Carousel Navigation",tabindex:"0"}),Pi(Me.children,{"aria-controls":_t,tabindex:"-1"})),Pi(Te,{"data-controls":"prev"}),Pi(ke,{"data-controls":"next"})):(et.insertAdjacentHTML("afterbegin",'
"),Me=et.querySelector(".tns-controls"),Te=Me.children[0],ke=Me.children[1]),xe=Fn(Te),be=Fn(ke),Xn(),Me?Qi(Me,ie):(Qi(Te,ie),Qi(ke,ie))),Ln()}function An(t){wi(function(){Tn(ci(t))})}function Tn(t){if($){"outer"===Q&&Gt.emit("outerResized",bi(t)),ut=fn();var e,n,i,a,r,o=yt,s=wt,u=Zt,l=ee,c=At,f=Lt,d=we,v=Ce,h=Le,p=an,m=rn,y=Fe,g=Ye,x=Ge,b=Xe,w=jt,C=Z,M=!1;if(!I)var A=xt,T=gt;if(yt=hn("fixedWidth"),gt=hn("edgePadding"),xt=hn("gutter"),Zt=hn("disable"),Ct=hn("slideBy"),Tt=hn("speed"),Lt=hn("autoHeight"),At=hn("arrowKeys"),we=hn("controls"),Ce=hn("controlsText"),Le=hn("nav"),an=hn("touch"),rn=hn("mouseDrag"),Fe=hn("autoplay"),Xe=hn("autoplayText"),Qe=hn("autoplayTimeout"),Ye=hn("autoplayHoverPause"),Ge=hn("autoplayResetOnVisibility"),un(Zt),F&&(En(),(e=C!==Z)&&Gt.emit("newBreakpointStart",bi(t))),bt=dn(),tt&&!mt||Zt||(qn(),tt||(gi(),M=!0)),(yt||mt)&&(Ht=Kn(),Vt=qt()),(e||yt)&&(i=(wt=hn("items"))!==s)&&(yt||mt||(Vt=qt()),on()),e&&(Zt!==u&&(Zt?In():function(){if(!$t)return;if(Nt.disabled=!1,it.className+=Jt,Gn(),Et)for(var t=Bt;t--;)V&&zi(ot[t]),zi(ot[Ot-t-1]);if(!V)for(var e=jt,n=jt+st;e .tns-item",N,Di(Nt))}!Lt&&V||Hn(),M&&(Gn(),Ft=jt)}e&&Gt.emit("newBreakpointEnd",bi(t))}}function kn(){return yt||mt?Et?(yt?(yt+xt)*st:lt[st])-xt<=bt:!Ht:st<=wt}function En(){for(var t in Z=0,F)(t=parseInt(t))<=ut&&(Z=t)}function Ln(){!Fe&&Ke&&Wi(Ke),!Le&&Ne&&Wi(Ne),!we&&Me&&Wi(Me)}function Nn(){Fe&&Ke&&zi(Ke),Le&&Ne&&zi(Ne),we&&Me&&zi(Me)}function Dn(){if(!ne){if(gt&&(nt.style.margin="0px"),Bt)for(var t="tns-transparent",e=Bt;e--;)V&&Oi(ot[e],t),Oi(ot[Ot-e-1],t);Ln(),ne=!0}}function In(){if(!$t){if(Nt.disabled=!0,it.className=it.className.replace(Jt.substring(1),""),Ri(it,["style"]),Et)for(var t=Bt;t--;)V&&Wi(ot[t]),Wi(ot[Ot-t-1]);if(tt&&V||Ri(nt,["style"]),!V)for(var e=jt,n=jt+st;e=lt[lt.length-1])jt=Vt;else for(var n=0;n=lt[n];)e>lt[jt=n]&&a<0&&(jt+=1),n++}Zn(i,a),Gt.emit(di(i)?"touchEnd":"dragEnd",bi(i))}):(mi(),Yt&&ni(i,0";return r.innerHTML=o,a.appendChild(r),n.appendChild(a),t=Math.abs(a.getBoundingClientRect().left-r.children[67].getBoundingClientRect().left)<2,n.fake?Li(n,i):a.remove(),t}(),n),I=e.tMQ?Ai(e.tMQ):Ti(e,"tMQ",(r=document,o=ki(),x=Ei(o),b=r.createElement("div"),w=r.createElement("style"),C="@media all and (min-width:1px){.tns-mq-test{position:absolute}}",w.type="text/css",b.className="tns-mq-test",o.appendChild(w),o.appendChild(b),w.styleSheet?w.styleSheet.cssText=C:w.appendChild(r.createTextNode(C)),a=window.getComputedStyle?window.getComputedStyle(b).position:b.currentStyle.position,o.fake?Li(o,x):b.remove(),"absolute"===a),n),T=e.tTf?Ai(e.tTf):Ti(e,"tTf",ji("transform"),n),k=e.t3D?Ai(e.t3D):Ti(e,"t3D",function(t){if(!t)return!1;if(!window.getComputedStyle)return!1;var e,n=document,i=ki(),a=Ei(i),r=n.createElement("p"),o=9-Ht&&(e=t);return e}:function(){return Et||V?Math.max(0,Ot-Math.ceil(wt)):Ot-1},jt=ln(hn("startIndex")),Ft=jt,Qt=0,Vt=mt?null:qt(),Xt=h.swipeAngle,Yt=!Xt||"?",Kt=!1,Ut=h.onInit,Gt=new Xi,Jt=" tns-slider tns-"+h.mode,_t=it.id||(ft=window.tnsId,window.tnsId=ft?ft+1:1,"tns"+window.tnsId),Zt=hn("disable"),$t=!1,te=h.freezable,ee=!(!te||mt)&&kn(),ne=!1,ie={click:ni,keydown:function(t){switch((t=ci(t)).keyCode){case v:case m:case l:Te.disabled||ni(t,-1);break;case y:case g:case c:ke.disabled||ni(t,1);break;case d:ei("first",t);break;case f:ei("last",t)}}},ae={click:function(t){Kt&&ti();var e=(t=ci(t)).target||t.srcElement;for(;e!==Ne&&!Hi(e,"data-nav");)e=e.parentNode;Hi(e,"data-nav")&&ei(Oe=[].indexOf.call(Ee,e),t)},keydown:function(t){var e=D.activeElement;if(!Hi(e,"data-nav"))return;var n=(t=ci(t)).keyCode,i=[].indexOf.call(Ee,e),a=Ie.length,r=Ie.indexOf(i);h.navContainer&&(a=st,r=i);function o(t){return h.navContainer?t:Ie[t]}switch(n){case v:case l:0"," animation"];if(he||pe)var _e,Ze={},$e={},tn=!1,en=0,nn=tt?function(t,e){return t.x-e.x}:function(t,e){return t.y-e.y};if(he)var an=hn("touch");if(pe)var rn=hn("mouseDrag");un(Zt||ee),T&&(Rt=T,Wt="translate",k?(Wt+=tt?"3d(":"3d(0px, ",zt=tt?", 0px, 0px)":", 0px)"):(Wt+=tt?"X(":"Y(",zt=")")),function(){!function(){vn("gutter");et.className="tns-outer",nt.className="tns-inner",nt.id=_t+"-iw",Lt&&(nt.className+=" tns-ah");""===it.id&&(it.id=_t);Jt+=A||mt?" tns-subpixel":" tns-no-subpixel",Jt+=M?" tns-calc":" tns-no-calc",V&&(Jt+=" tns-"+h.axis);if(it.className+=Jt,V){var t=D.createElement("div");t.className="tns-ovh",et.appendChild(t),t.appendChild(nt)}else et.appendChild(nt);at.insertBefore(et,it),nt.appendChild(it)}();for(var t=0;t .tns-item","font-size:"+p.getComputedStyle(ot[0]).fontSize+";",Di(Nt)),Ni(Nt,"#"+_t,"font-size:0;",Di(Nt))):Ii(ot,function(t,e){var n;t.style.marginLeft=(n=e,M?M+"("+100*n+"% / "+Ot+")":100*n/Ot+"%")})),I){var i=pn(h.edgePadding,h.gutter,h.fixedWidth,h.speed);Ni(Nt,"#"+_t+"-iw",i,Di(Nt)),V&&(i=tt&&!mt?"width:"+mn(h.fixedWidth,h.gutter,h.items)+";":"",E&&(i+=bn(Tt)),Ni(Nt,"#"+_t,i,Di(Nt))),i=tt&&!mt?yn(h.fixedWidth,h.gutter,h.items):"",h.gutter&&(i+=gn(h.gutter)),V||(E&&(i+=bn(Tt)),N&&(i+=wn(Tt))),i&&Ni(Nt,"#"+_t+" > .tns-item",i,Di(Nt))}else{nt.style.cssText=pn(gt,xt,yt),V&&tt&&!mt&&(it.style.width=mn(yt,xt,wt));var i=tt&&!mt?yn(yt,xt,wt):"";xt&&(i+=gn(xt)),i&&Ni(Nt,"#"+_t+" > .tns-item",i,Di(Nt))}if(F&&I)for(var a in F){a=parseInt(a);var r=F[a],i="",o="",s="",u="",l=mt?null:hn("items",a),c=hn("fixedWidth",a),f=hn("speed",a),d=hn("edgePadding",a),v=hn("gutter",a);("edgePadding"in r||"gutter"in r)&&(o="#"+_t+"-iw{"+pn(d,v,c,f)+"}"),V&&tt&&!mt&&("fixedWidth"in r||"items"in r||yt&&"gutter"in r)&&(s="width:"+mn(c,v,l)+";"),E&&"speed"in r&&(s+=bn(f)),s&&(s="#"+_t+"{"+s+"}"),("fixedWidth"in r||yt&&"gutter"in r||!V&&"items"in r)&&(u+=yn(c,v,l)),"gutter"in r&&(u+=gn(v)),!V&&"speed"in r&&(E&&(u+=bn(f)),N&&(u+=wn(f))),u&&(u="#"+_t+" > .tns-item{"+u+"}"),(i=o+s+u)&&Nt.insertRule("@media (min-width: "+a/16+"em) {"+i+"}",Nt.cssRules.length)}})(),Cn(),mt||Mn();F&&En();if(V&&O){var u={};u[O]=ti,Qi(it,u)}an&&Qi(it,ue);rn&&Qi(it,le);At&&Qi(D,se);"inner"===Q?Gt.on("outerResized",function(){Tn(),Gt.emit("innerLoaded",bi())}):(F||yt||mt||!tt)&&Qi(p,{resize:An});"outer"===Q?Gt.on("innerLoaded",Hn):!Lt&&V||Zt||Hn();mt||Bn();Zt?In():ee&&Dn();Gt.on("indexChanged",Rn),"function"==typeof Ut&&Ut(bi());"inner"===Q&&Gt.emit("innerLoaded",bi());$=!0}();var on=Et?V?function(){var t=Qt,e=Vt;t+=Ct,e-=Ct,gt?(t+=1,e-=1):yt&&bt%(yt+xt)&&(e-=1),Bt&&(e=parseInt(i)&&t in F[i]&&(n=F[i][t]);return"slideBy"===t&&"page"===n&&(n=hn("items")),V||"slideBy"!==t&&"items"!==t||(n=Math.floor(n)),n}function pn(t,e,n,i){var a="";if(t){var r=t;e&&(r-=e),a=tt?"margin: 0 "+r+"px 0 "+t+"px;":"margin: "+t+"px 0 "+r+"px 0;"}else if(e&&!n){var o="-"+e+"px";a="margin: 0 "+(tt?o+" 0 0":"0 "+o+" 0")+";"}return E&&i&&(a+=bn(i)),a}function mn(t,e,n){return t?(t+e)*Ot+"px":M?M+"("+100*Ot+"% / "+n+")":100*Ot/n+"%"}function yn(t,e,n){var i;if(t)i=t+e+"px";else{V||(n=Math.floor(n));var a=V?Ot:n;i=M?M+"(100% / "+a+")":100/a+"%"}return i="width:"+i,"inner"!==Q?i+";":i+" !important;"}function gn(t){var e="";!1!==t&&(e=(tt?"padding-":"margin-")+(tt?"right":"bottom")+": "+t+"px;");return e}function xn(t,e){var n=t.substring(0,t.length-e).toLowerCase();return n&&(n="-"+n+"-"),n}function bn(t){return xn(E,18)+"transition-duration:"+t/1e3+"s;"}function wn(t){return xn(N,17)+"animation-duration:"+t/1e3+"s;"}function Cn(){if(vn("autoHeight")||!V||mt||!tt){var t=it.querySelectorAll("img");Ii(t,function(t){var e=t.src;e.indexOf("data:image")<0?(Qi(t,ge),t.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",t.src=e):Oi(t,ye)}),wi(function(){Pn(function(t){for(var e=[],n=0,i=t.length;n'+Je[0]+t+Je[1]+Xe[0]+""),Ke=et.querySelector("[data-action]")),Ke&&Qi(Ke,{click:ui}),Fe&&(oi(),Ye&&Qi(it,re),Ge&&Qi(it,oe))}if(fe){var e=V?Bt:0;if(Ne){Pi(Ne,{"aria-label":"Carousel Pagination"}),Ee=Ne.children;for(var n=0;n';a='
'+a+"
",et.insertAdjacentHTML("afterbegin",a),Ne=et.querySelector(".tns-nav"),Ee=Ne.children}if(xi(),E){var o=E.substring(0,E.length-18).toLowerCase(),s="transition: all "+Tt/1e3+"s";o&&(s="-"+o+"-"+s),Ni(Nt,"[aria-controls^="+_t+"-item]",s,Di(Nt))}Pi(Ee[Se],{tabindex:"0","aria-selected":"true"}),Oi(Ee[Se],Pe),Qi(Ne,ae)}ce&&(Me||Te&&ke?(Me&&(Te=Me.children[0],ke=Me.children[1],Pi(Me,{"aria-label":"Carousel Navigation",tabindex:"0"}),Pi(Me.children,{"aria-controls":_t,tabindex:"-1"})),Pi(Te,{"data-controls":"prev"}),Pi(ke,{"data-controls":"next"})):(et.insertAdjacentHTML("afterbegin",'
"),Me=et.querySelector(".tns-controls"),Te=Me.children[0],ke=Me.children[1]),xe=Fn(Te),be=Fn(ke),Xn(),Me?Qi(Me,ie):(Qi(Te,ie),Qi(ke,ie))),Ln()}function An(t){wi(function(){Tn(ci(t))})}function Tn(t){if($){"outer"===Q&&Gt.emit("outerResized",bi(t)),ut=fn();var e,n,i,a,r,o=yt,s=wt,u=Zt,l=ee,c=At,f=Lt,d=we,v=Ce,h=Le,p=an,m=rn,y=Fe,g=Ye,x=Ge,b=Xe,w=jt,C=Z,M=!1;if(!I)var A=xt,T=gt;if(yt=hn("fixedWidth"),gt=hn("edgePadding"),xt=hn("gutter"),Zt=hn("disable"),Ct=hn("slideBy"),Tt=hn("speed"),Lt=hn("autoHeight"),At=hn("arrowKeys"),we=hn("controls"),Ce=hn("controlsText"),Le=hn("nav"),an=hn("touch"),rn=hn("mouseDrag"),Fe=hn("autoplay"),Xe=hn("autoplayText"),Qe=hn("autoplayTimeout"),Ye=hn("autoplayHoverPause"),Ge=hn("autoplayResetOnVisibility"),un(Zt),F&&(En(),(e=C!==Z)&&Gt.emit("newBreakpointStart",bi(t))),bt=dn(),tt&&!mt||Zt||(qn(),tt||(gi(),M=!0)),(yt||mt)&&(Ht=Kn(),Vt=qt()),(e||yt)&&(i=(wt=hn("items"))!==s)&&(yt||mt||(Vt=qt()),on()),e&&(Zt!==u&&(Zt?In():function(){if(!$t)return;if(Nt.disabled=!1,it.className+=Jt,Gn(),Et)for(var t=Bt;t--;)V&&zi(ot[t]),zi(ot[Ot-t-1]);if(!V)for(var e=jt,n=jt+st;e .tns-item",N,Di(Nt))}!Lt&&V||Hn(),M&&(Gn(),Ft=jt)}e&&Gt.emit("newBreakpointEnd",bi(t))}}function kn(){return yt||mt?Et?(yt?(yt+xt)*st:lt[st])-xt<=bt:!Ht:st<=wt}function En(){for(var t in Z=0,F)(t=parseInt(t))<=ut&&(Z=t)}function Ln(){!Fe&&Ke&&Wi(Ke),!Le&&Ne&&Wi(Ne),!we&&Me&&Wi(Me)}function Nn(){Fe&&Ke&&zi(Ke),Le&&Ne&&zi(Ne),we&&Me&&zi(Me)}function Dn(){if(!ne){if(gt&&(nt.style.margin="0px"),Bt)for(var t="tns-transparent",e=Bt;e--;)V&&Oi(ot[e],t),Oi(ot[Ot-e-1],t);Ln(),ne=!0}}function In(){if(!$t){if(Nt.disabled=!0,it.className=it.className.replace(Jt.substring(1),""),Ri(it,["style"]),Et)for(var t=Bt;t--;)V&&Wi(ot[t]),Wi(ot[Ot-t-1]);if(tt&&V||Ri(nt,["style"]),!V)for(var e=jt,n=jt+st;e=lt[lt.length-1])jt=Vt;else for(var n=0;n=lt[n];)e>lt[jt=n]&&a<0&&(jt+=1),n++}Zn(i,a),Gt.emit(di(i)?"touchEnd":"dragEnd",bi(i))}):(mi(),Yt&&ni(i,0= 0 ? JSON.parse(value) : value;\n}\n\nfunction setLocalStorage(storage, key, value, access) {\n if (access) { storage.setItem(key, value); }\n return value;\n}\n\nfunction getSlideId() {\n var id = window.tnsId;\n window.tnsId = !id ? 1 : id + 1;\n \n return 'tns' + window.tnsId;\n}\n\nfunction getBody () {\n var doc = document,\n body = doc.body;\n\n if (!body) {\n body = doc.createElement('body');\n body.fake = true;\n }\n\n return body;\n}\n\nvar docElement = document.documentElement;\n\nfunction setFakeBody (body) {\n var docOverflow = '';\n if (body.fake) {\n docOverflow = docElement.style.overflow;\n //avoid crashing IE8, if background image is used\n body.style.background = '';\n //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible\n body.style.overflow = docElement.style.overflow = 'hidden';\n docElement.appendChild(body);\n }\n\n return docOverflow;\n}\n\nfunction resetFakeBody (body, docOverflow) {\n if (body.fake) {\n body.remove();\n docElement.style.overflow = docOverflow;\n // Trigger layout so kinetic scrolling isn't disabled in iOS6+\n // eslint-disable-next-line\n docElement.offsetHeight;\n }\n}\n\n// get css-calc \n\nfunction calc() {\n var doc = document, \n body = getBody(),\n docOverflow = setFakeBody(body),\n div = doc.createElement('div'), \n result = false;\n\n body.appendChild(div);\n try {\n var str = '(10px * 10)',\n vals = ['calc' + str, '-moz-calc' + str, '-webkit-calc' + str],\n val;\n for (var i = 0; i < 3; i++) {\n val = vals[i];\n div.style.width = val;\n if (div.offsetWidth === 100) { \n result = val.replace(str, ''); \n break;\n }\n }\n } catch (e) {}\n \n body.fake ? resetFakeBody(body, docOverflow) : div.remove();\n\n return result;\n}\n\n// get subpixel support value\n\nfunction percentageLayout() {\n // check subpixel layout supporting\n var doc = document,\n body = getBody(),\n docOverflow = setFakeBody(body),\n wrapper = doc.createElement('div'),\n outer = doc.createElement('div'),\n str = '',\n count = 70,\n perPage = 3,\n supported = false;\n\n wrapper.className = \"tns-t-subp2\";\n outer.className = \"tns-t-ct\";\n\n for (var i = 0; i < count; i++) {\n str += '
';\n }\n\n outer.innerHTML = str;\n wrapper.appendChild(outer);\n body.appendChild(wrapper);\n\n supported = Math.abs(wrapper.getBoundingClientRect().left - outer.children[count - perPage].getBoundingClientRect().left) < 2;\n\n body.fake ? resetFakeBody(body, docOverflow) : wrapper.remove();\n\n return supported;\n}\n\nfunction mediaquerySupport () {\n var doc = document,\n body = getBody(),\n docOverflow = setFakeBody(body),\n div = doc.createElement('div'),\n style = doc.createElement('style'),\n rule = '@media all and (min-width:1px){.tns-mq-test{position:absolute}}',\n position;\n\n style.type = 'text/css';\n div.className = 'tns-mq-test';\n\n body.appendChild(style);\n body.appendChild(div);\n\n if (style.styleSheet) {\n style.styleSheet.cssText = rule;\n } else {\n style.appendChild(doc.createTextNode(rule));\n }\n\n position = window.getComputedStyle ? window.getComputedStyle(div).position : div.currentStyle['position'];\n\n body.fake ? resetFakeBody(body, docOverflow) : div.remove();\n\n return position === \"absolute\";\n}\n\n// create and append style sheet\nfunction createStyleSheet (media) {\n // Create the