Gigabyte Gaming Laptops at ANTOnline: Up to $1,050 off in September 2022

more

A new week means new savings on laptops, desktops, monitors, and more – we’ve pictured the HP Slim S01 10th-Gen. i5 Desktop PC for $549.99 ($100 off). Shop Now at HP

  • Get an extra 5% off desktops priced over $999 via code “5GAMER2022.”
  • Get an extra 10% off desktops priced over $1,399 via code “10GAMER2022.”

";css=parseEl.childNodes[0].style;while(i--){if(v=css[props[i]])rules[props[i]]=parse(v)}return rules}container[emile]=function(el,style,opts,after){el=typeof el=="string"?document.getElementById(el):el;opts=opts||{};var target=normalize(style),comp=el.currentStyle?el.currentStyle:getComputedStyle(el,null),prop,current={},start=+new Date,dur=opts.duration||200,finish=start+dur,interval,easing=opts.easing||function(pos){return-Math.cos(pos*Math.PI)/2+0.5};for(prop in target){current[prop]=parse(comp[prop])}interval=setInterval(function(){var time=+new Date,pos=time>finish?1:(time-start)/dur;for(prop in target){el.style[prop]=target[prop].f(current[prop].v,target[prop].v,easing(pos))+target[prop].u}if(time>finish){clearInterval(interval);opts.after&&opts.after();after&&setTimeout(after,1)}},10)}})("animate",DN); /* user_content_control */ DN.commentControl=function(commentForm){this.form=commentForm;this.element=DN.get("textarea.user-content-entry",this.form,true);var savedBody=this.element.getAttribute("data-saved-body");if(savedBody===null)savedBody="";if(savedBody!==""){this.element.value=this.element.getAttribute("data-saved-body")}this.xhr=null;if(this.form.getAttribute("data-type")=="comment"){this.baseURL=document.location.protocol+"//"+document.location.hostname+"/comments/";this.contentType="comment";this.maxLength=1000}this.timeoutId=null;this.foundImageURL=null;this.foundImageCacheURL=null;this.foundURLMatches=0;this.fetchingImages=false;this.handleContentChange=function(e){window.clearTimeout(this.timeoutId);this.adjustHeight();this.checkLength();if(this.contentType=="deal"){this.checkForURLs()}var thisObj=this;this.timeoutId=window.setTimeout(function(){thisObj.doContentPost(false,true)},2000)};this.adjustHeight=function(e){var minHeight=this.element.getAttribute("data-min-height")*1;if(minHeight===0){this.element.setAttribute("data-min-height",this.element.offsetHeight);minHeight=this.element.offsetHeight}if(minHeight>0&&this.element.offsetHeight>minHeight){var newHeight=0;while(this.element.offsetHeight>minHeight&&this.element.offsetHeight>=this.element.scrollHeight){newHeight=this.element.offsetHeight-1;this.element.style.height=newHeight+"px";if(this.element.offsetHeight>newHeight)break}}if(this.element.scrollHeight>this.element.offsetHeight){if(this.element.scrollHeight999){strRemaining=remaining.toString().substring(0,1)+","+remaining.toString().substring(1,4)}counterText.innerHTML=strRemaining;if(remaining>=20){DN.removeClass(counterText,"user-content-length-too-warn");DN.removeClass(counterText,"user-content-length-too-long")}else if(remaining>=0){DN.addClass(counterText,"user-content-length-too-warn");DN.removeClass(counterText,"user-content-length-too-long")}else{DN.removeClass(counterText,"user-content-length-too-warn");DN.addClass(counterText,"user-content-length-too-long")}if(remaining<1000){this.enablePost()}else{this.disablePost()}}if(this.element.value.length>this.maxLength){return false}else{return true}};this.checkForURLs=function(e){if(this.contentType!="deal")return;if(!this.fetchingImages&&DN.get("user_content_entry_image_override_url").value===""){var matchesFound=null;try{var urlRegex=null;if(document.activeElement==this.element){urlRegex=/(\[url=https?:\/\/[^\]]+\].+?\[\/url\]|\[url\]https?:\/\/[^\[]+\[\/url\]|[^=\]]https?:\/\/.+?( |\.$))/gi}else{urlRegex=/(\[url=https?:\/\/[^\]]+\].+?\[\/url\]|\[url\]https?:\/\/[^\[]+\[\/url\]|[^=\]]https?:\/\/.+?( |\.$|$))/gi}matchesFound=this.element.value.match(urlRegex)}catch(ex){console.log(ex)}if(matchesFound&&(matchesFound.length!=this.foundURLMatches||!this.foundImageURL)){this.foundURLMatches=matchesFound.length;this.fetchImages(e)}else if(document.activeElement!==this.element){this.updateImageSelector()}}};this.checkImageUrl=function(){var params="check_image=1&image="+encodeURIComponent(DN.get("user_content_entry_image_override_url",this.form).value);this.xhr=new DN.xhr(this.baseURL,this.handleResponse,params,this)};this.disablePost=function(){DN.get(".user-content-entry-submit",this.form,null).disabled=true;DN.addClass(DN.get(".user-content-entry-submit",this.form,null),"button-disabled")};this.enablePost=function(){DN.removeClass(DN.get(".user-content-entry-submit",this.form,null),"button-disabled");DN.get(".user-content-entry-submit",this.form,null).disabled=false};this.fetchImages=function(e){if(!this.element.value||this.contentType!="deal")return;this.fetchingImages=true;this.disablePost();DN.removeClass(DN.get(".user-content-entry-spinner",this.form),"hidden");var params="check_urls=1&body="+encodeURIComponent(this.element.value);this.xhr=new DN.xhr(this.baseURL,this.handleResponse,params,this)};this.handlePostClick=function(e){if(e){DN.preventDefault(e)}if(this.timeoutId){window.clearTimeout(this.timeoutId)}if(DN.get(".user-content-entry-submit",this.form,null).disabled===true){return}if(this.element.value.length<=0){this.showError("Please enter a comment.")}else if(this.element.value.length>this.maxLength){this.showError("Comments must be less than 1,000 characters in length.")}else{this.hideError();DN.get(".user-content-entry-counter",this.form,true).style.display="none";DN.get(".user-content-entry-spinner",this.form,true).style.display="inline-block";DN.get(".user-content-entry-submit",this.form,null).disabled=true;DN.addClass(DN.get(".user-content-entry-submit",this.form,null),"button-disabled");this.postAuth.fetch()}};this.handlePost=function(responseText){if(responseText){var data=JSON.parse(responseText);if(data["post_auth"]){this.doContentPost(data["post_auth"])}else{this.showError("Sorry, we failed to post your comment. (PAFETCH)")}}else{this.showError()}};this.doContentPost=function(postAuth,saveOnly){var params="";if(this.contentType=="deal"){params+="headline="+encodeURIComponent(DN.get(".user-content-subject",this.form,true).value);params+="&body="+encodeURIComponent(this.element.value);params+="&channel="+encodeURIComponent(DN.get(".user-content-channel",this.form,true).value);var imageURL="";if(DN.get("user_content_entry_image_override_url",this.form).value){imageURL=DN.get("user_content_entry_image_override_url",this.form).value}else if(this.foundImageURL){imageURL=this.foundImageURL}params+="&image="+imageURL}else{var contentURI=DN.get("input[name=content_uri]",this.form,true);if(contentURI&&contentURI.value!==""&&this.element.value!==""){params+="content_uri="+encodeURIComponent(contentURI.value);params+="&comment="+encodeURIComponent(this.element.value);if(!saveOnly){var errorReport=DN.get("user-content-report-error");if(errorReport){params+="&report_error="+(errorReport.checked?1:0)}}}}if(params!==""){if(postAuth){params+="&post_auth="+postAuth}if(saveOnly){params+="&save=1"}this.xhr=new DN.xhr(this.baseURL,this.handleResponse,params,this)}else{if(!saveOnly){this.showError("Sorry, something has gone wrong. Please reload the page and try again. (FRM)")}}};this.updateImageSelector=function(){DN.addClass(DN.get(".user-content-entry-spinner",this.form),"hidden");if(this.foundImageURL){DN.get(".user-content-entry-image-source",this.form).innerHTML="";DN.removeClass(DN.get(".user-content-entry-image-source",this.form),"hidden");DN.addClass(DN.get(".user-content-entry-required-message",this.form),"hidden");DN.removeClass(DN.get(".user-content-entry-override-message",this.form),"hidden")}else{DN.addClass(DN.get(".user-content-entry-override-message",this.form),"hidden");DN.removeClass(DN.get(".user-content-entry-required-message",this.form),"hidden");this.fetchingImages=false}this.enablePost()};this.handleResponse=function(responseText){if(responseText!==undefined&&responseText!==""){var data={success:false};try{data=JSON.parse(responseText)}catch(e){}if(data["success"]){if(data["url_check"]){var newImage="";if(data["page_data"]&&data["page_data"]["image"]){this.foundImageURL=data["page_data"]["image"];this.foundImageCacheURL=data["page_data"]["image_cache"]}else if(data["default_image"]){this.foundImageURL=data["default_image"];this.foundImageCacheURL=data["default_image"]}this.updateImageSelector()}else{if(data["deal_created"]){this.element.value="";this.form.reset();this.checkLength()}var commentList=DN.get(".user-comment-list",null,true);if(data["html"]&&commentList){var newEl=document.createElement("div");newEl.innerHTML=data["html"];newEl.style.opacity=0;commentList.insertBefore(newEl,commentList.firstChild);DN.get("user-comment-well").style.display="block";DN.scrollTo(newEl);newEl.style.opacity=0;DN.animate(newEl,"opacity:1",{duration:250});this.element.value="";this.form.reset();this.checkLength();var commentCount=DN.getAll(".user-comment-count");if(commentCount.length>0){var regexp=/([0-9]+) comment/;var dataParts=regexp.exec(commentCount[0].innerHTML);var curNum=0;if(dataParts!==null){curNum=parseInt(dataParts[1],10)}curNum++;var newCount="";if(curNum==1){newCount="1 comment"}else{newCount=curNum+" comments"}for(var x=0;x0){var curBody=this.element.value;var newBody="";var newText="";if(surroundText.length==1){this.element.selectionEnd=this.element.selectionStart;newText=surroundText[0]}else{if(this.element.selectionStart==this.element.selectionEnd){newText=surroundText[0]+surroundText[2]+surroundText[1]}else{newText=surroundText[0]+curBody.substring(this.element.selectionStart,this.element.selectionEnd)+surroundText[1]}}newBody=curBody.substring(0,this.element.selectionStart);newBody+=newText;newBody+=curBody.substring(this.element.selectionEnd,curBody.length);this.element.value=newBody}this.element.focus()};if(this.element.attachEvent){DN.event.bind(this.element,"keyup",this.handleContentChange,this,true);DN.event.bind(this.element,"paste",this.handleContentChange,this,true)}else{DN.event.bind(this.element,"input",this.handleContentChange,this,true)}if(this.contentType=="deal"){DN.event.bind(this.element,"blur",this.checkForURLs,this,true)}var toolbarButtons=DN.get(".toolbar-button",this.form);if(toolbarButtons&&toolbarButtons.length){DN.event.bind(toolbarButtons,"click",this.handleToolbarClick,this,true)}DN.event.bind(window,"unload",function(e){this.doContentPost(false,true)},this,true);this.postAuth=new DN.PostAuth(this.handlePost,this);DN.event.bind(this.form,"submit",this.handlePostClick,this,true);this.adjustHeight();this.checkLength();if(this.contentType=="comment"&&document.location.hash&&document.location.hash=="#post-comment"){this.element.focus();DN.scrollTo(this.element);window.setTimeout(function(el){DN.scrollTo(el)},1500,this.element)}};DN.postCommentAnchorClick=function(e){DN.get(".user-content-body").focus()};DN.onDOMReady.bind(function(){try{DN.createObjects("commentObjects",".user-content-entry-form",DN.commentControl,false)}catch(e){console.log(e)}DN.event.bind(DN.getAll("a[href="#post-comment"]"),"click",DN.postCommentAnchorClick)}); /* single-use-coupon */ DN.singleUseCoupon=function(elem,singleUseCouponMetaId,offerId,fetchCallback,context,actionCallback){this.elem=elem;this.singleUseCouponMetaId=singleUseCouponMetaId;this.offerId=offerId;this.coupon={};this.errors=[];this.fetchCallback=fetchCallback;this.actionCallback=actionCallback;if(typeof context=="undefined"){this.context=null}else{this.context=context}this.get_coupon=function(evt){evt.preventDefault();if(typeof this.actionCallback!="undefined"){this.actionCallback.call(this.context,this)}var newXHR=DN.xhr("/async/coupons/",function(responseText){if(responseText&&responseText.length!==""){var data=JSON.parse(responseText);if(data.coupon){this.coupon=data.coupon}if(data.errors){this.errors=data.errors}this.fetchCallback.call(this.context,this)}},"campaign_id="+this.singleUseCouponMetaId+"&offer_id="+this.offerId,this,{"Accept":"application/json, */*; q=0.1","Content-Accept":"application/json"})};if(this.elem){DN.event.bind(this.elem,"click",this.get_coupon,this)}}; /* button-content */ function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i0;x--){items.remove(x)}this.submitButton.disabled=false;this.request(this.handleDataFetch)}},{key:"handleDataFetch",value:function handleDataFetch(responseText){if(responseText!==undefined){var data=JSON.parse(responseText);if(data.success){var post_auth=DN.get("error-post_auth");if(post_auth){post_auth.value=data.post_auth}var items=DN.get("error-item");if(data.items.length===0){data.items.push({text:data.headline})}for(var n=0;n0){DN.event.bind(links,"click",this.show,this)}}}]);return Feedback}();scopeVar.Feedback=new Feedback})(DN);DN.onDOMReady.bind(function(){DN.Feedback.addListeners()}); /* tiny_slider */ function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i button",parent),"click",function(evt){var controls=this.getAttribute("data-controls");slider.goTo(controls,evt)})}this.el.style.display="block"}}]);return TinySlider}();scopeVar.initSliders=function(){DN.createObjects("sliders",".tiny-slider",TinySlider)};scopeVar.onDOMReady.bind(function(){scopeVar.initSliders()})})(DN); /* tiny-slider/tiny-slider */ var tns=function(){var win=window;var raf=win.requestAnimationFrame||win.webkitRequestAnimationFrame||win.mozRequestAnimationFrame||win.msRequestAnimationFrame||function(cb){return setTimeout(cb,16)};var win$1=window;var caf=win$1.cancelAnimationFrame||win$1.mozCancelAnimationFrame||function(id){clearTimeout(id)};function extend(){var obj,name,copy,target=arguments[0]||{},i=1,length=arguments.length;for(;i=0?JSON.parse(value):value}function setLocalStorage(storage,key,value,access){if(access){try{storage.setItem(key,value)}catch(e){}}return value}function getSlideId(){var id=window.tnsId;window.tnsId=!id?1:id+1;return"tns"+window.tnsId}function getBody(){var doc=document,body=doc.body;if(!body){body=doc.createElement("body");body.fake=true}return body}var docElement=document.documentElement;function setFakeBody(body){var docOverflow="";if(body.fake){docOverflow=docElement.style.overflow;body.style.background="";body.style.overflow=docElement.style.overflow="hidden";docElement.appendChild(body)}return docOverflow}function resetFakeBody(body,docOverflow){if(body.fake){body.remove();docElement.style.overflow=docOverflow;docElement.offsetHeight}}function calc(){var doc=document,body=getBody(),docOverflow=setFakeBody(body),div=doc.createElement("div"),result=false;body.appendChild(div);try{var str="(10px * 10)",vals=["calc"+str,"-moz-calc"+str,"-webkit-calc"+str],val;for(var i=0;i<3;i++){val=vals[i];div.style.width=val;if(div.offsetWidth===100){result=val.replace(str,"");break}}}catch(e){}body.fake?resetFakeBody(body,docOverflow):div.remove();return result}function percentageLayout(){var doc=document,body=getBody(),docOverflow=setFakeBody(body),wrapper=doc.createElement("div"),outer=doc.createElement("div"),str="",count=70,perPage=3,supported=false;wrapper.className="tns-t-subp2";outer.className="tns-t-ct";for(var i=0;i

"}outer.innerHTML=str;wrapper.appendChild(outer);body.appendChild(wrapper);supported=Math.abs(wrapper.getBoundingClientRect().left-outer.children[count-perPage].getBoundingClientRect().left)<2;body.fake?resetFakeBody(body,docOverflow):wrapper.remove();return supported}function mediaquerySupport(){var doc=document,body=getBody(),docOverflow=setFakeBody(body),div=doc.createElement("div"),style=doc.createElement("style"),rule="@media all and (min-width:1px){.tns-mq-test{position:absolute}}",position;style.type="text/css";div.className="tns-mq-test";body.appendChild(style);body.appendChild(div);if(style.styleSheet){style.styleSheet.cssText=rule}else{style.appendChild(doc.createTextNode(rule))}position=window.getComputedStyle?window.getComputedStyle(div).position:div.currentStyle["position"];body.fake?resetFakeBody(body,docOverflow):div.remove();return position==="absolute"}function createStyleSheet(media){var style=document.createElement("style");if(media){style.setAttribute("media",media)}document.querySelector("head").appendChild(style);return style.sheet?style.sheet:style.styleSheet}function addCSSRule(sheet,selector,rules,index){"insertRule"in sheet?sheet.insertRule(selector+"{"+rules+"}",index):sheet.addRule(selector,rules,index)}function removeCSSRule(sheet,index){"deleteRule"in sheet?sheet.deleteRule(index):sheet.removeRule(index)}function getCssRulesLength(sheet){var rule="insertRule"in sheet?sheet.cssRules:sheet.rules;return rule.length}function toDegree(y,x){return Math.atan2(y,x)*(180/Math.PI)}function getTouchDirection(angle,range){var direction=false,gap=Math.abs(90-Math.abs(angle));if(gap>=90-range){direction="horizontal"}else if(gap<=range){direction="vertical"}return direction}function forEach(arr,callback,scope){for(var i=0,l=arr.length;i=0};var addClass=classListSupport?function(el,str){if(!hasClass(el,str)){el.classList.add(str)}}:function(el,str){if(!hasClass(el,str)){el.className+=" "+str}};var removeClass=classListSupport?function(el,str){if(hasClass(el,str)){el.classList.remove(str)}}:function(el,str){if(hasClass(el,str)){el.className=el.className.replace(str,"")}};function hasAttr(el,attr){return el.hasAttribute(attr)}function getAttr(el,attr){return el.getAttribute(attr)}function isNodeList(el){return typeof el.item!=="undefined"}function setAttrs(els,attrs){els=isNodeList(els)||els instanceof Array?els:[els];if(Object.prototype.toString.call(attrs)!=="[object Object]"){return}for(var i=els.length;i--;){for(var key in attrs){els[i].setAttribute(key,attrs[key])}}}function removeAttrs(els,attrs){els=isNodeList(els)||els instanceof Array?els:[els];attrs=attrs instanceof Array?attrs:[attrs];var attrLength=attrs.length;for(var i=els.length;i--;){for(var j=attrLength;j--;){els[i].removeAttribute(attrs[j])}}}function arrayFromNodeList(nl){var arr=[];for(var i=0,l=nl.length;i9?"-"+tf.slice(0,-9).toLowerCase()+"-":"";cssTF+="transform";body.insertBefore(el,null);el.style[tf]="translate3d(1px,1px,1px)";has3d=window.getComputedStyle(el).getPropertyValue(cssTF);body.fake?resetFakeBody(body,docOverflow):el.remove();return has3d!==undefined&&has3d.length>0&&has3d!=="none"}function getEndProperty(propIn,propOut){var endProp=false;if(/^Webkit/.test(propIn)){endProp="webkit"+propOut+"End"}else if(/^O/.test(propIn)){endProp="o"+propOut+"End"}else if(propIn){endProp=propOut.toLowerCase()+"end"}return endProp}var supportsPassive=false;try{var opts=Object.defineProperty({},"passive",{get:function(){supportsPassive=true}});window.addEventListener("test",null,opts)}catch(e){}var passiveOption=supportsPassive?{passive:true}:false;function addEvents(el,obj,preventScrolling){for(var prop in obj){var option=["touchstart","touchmove"].indexOf(prop)>=0&&!preventScrolling?passiveOption:false;el.addEventListener(prop,obj[prop],option)}}function removeEvents(el,obj){for(var prop in obj){var option=["touchstart","touchmove"].indexOf(prop)>=0?passiveOption:false;el.removeEventListener(prop,obj[prop],option)}}function Events(){return{topics:{},on:function(eventName,fn){this.topics[eventName]=this.topics[eventName]||[];this.topics[eventName].push(fn)},off:function(eventName,fn){if(this.topics[eventName]){for(var i=0;i=0?"%":"px",to=to.replace(unit,""),from=Number(element.style[attr].replace(prefix,"").replace(postfix,"").replace(unit,"")),positionTick=(to-from)/duration*tick,running;setTimeout(moveElement,tick);function moveElement(){duration-=tick;from+=positionTick;element.style[attr]=prefix+from+unit+postfix;if(duration>0){setTimeout(moveElement,tick)}else{callback()}}}if(!Object.keys){Object.keys=function(object){var keys=[];for(var name in object){if(Object.prototype.hasOwnProperty.call(object,name)){keys.push(name)}}return keys}}if(!("remove"in Element.prototype)){Element.prototype.remove=function(){if(this.parentNode){this.parentNode.removeChild(this)}}}var tns=function(options){options=extend({container:".slider",mode:"carousel",axis:"horizontal",items:1,gutter:0,edgePadding:0,fixedWidth:false,autoWidth:false,viewportMax:false,slideBy:1,center:false,controls:true,controlsPosition:"top",controlsText:["prev","next"],controlsContainer:false,prevButton:false,nextButton:false,nav:true,navPosition:"top",navContainer:false,navAsThumbnails:false,arrowKeys:false,speed:300,autoplay:false,autoplayPosition:"top",autoplayTimeout:5000,autoplayDirection:"forward",autoplayText:["start","stop"],autoplayHoverPause:false,autoplayButton:false,autoplayButtonOutput:true,autoplayResetOnVisibility:true,animateIn:"tns-fadeIn",animateOut:"tns-fadeOut",animateNormal:"tns-normal",animateDelay:false,loop:true,rewind:false,autoHeight:false,responsive:false,lazyload:false,lazyloadSelector:".tns-lazy-img",touch:true,mouseDrag:false,swipeAngle:15,nested:false,preventActionWhenRunning:false,preventScrollOnTouch:false,freezable:true,onInit:false,useLocalStorage:true},options||{});var doc=document,win=window,KEYS={ENTER:13,SPACE:32,LEFT:37,RIGHT:39},tnsStorage={},localStorageAccess=options.useLocalStorage;if(localStorageAccess){var browserInfo=navigator.userAgent;var uid=new Date;try{tnsStorage=win.localStorage;if(tnsStorage){tnsStorage.setItem(uid,uid);localStorageAccess=tnsStorage.getItem(uid)==uid;tnsStorage.removeItem(uid)}else{localStorageAccess=false}if(!localStorageAccess){tnsStorage={}}}catch(e){localStorageAccess=false}if(localStorageAccess){if(tnsStorage["tnsApp"]&&tnsStorage["tnsApp"]!==browserInfo){["tC","tPL","tMQ","tTf","t3D","tTDu","tTDe","tADu","tADe","tTE","tAE"].forEach(function(item){tnsStorage.removeItem(item)})}localStorage["tnsApp"]=browserInfo}}var CALC=tnsStorage["tC"]?checkStorageValue(tnsStorage["tC"]):setLocalStorage(tnsStorage,"tC",calc(),localStorageAccess),PERCENTAGELAYOUT=tnsStorage["tPL"]?checkStorageValue(tnsStorage["tPL"]):setLocalStorage(tnsStorage,"tPL",percentageLayout(),localStorageAccess),CSSMQ=tnsStorage["tMQ"]?checkStorageValue(tnsStorage["tMQ"]):setLocalStorage(tnsStorage,"tMQ",mediaquerySupport(),localStorageAccess),TRANSFORM=tnsStorage["tTf"]?checkStorageValue(tnsStorage["tTf"]):setLocalStorage(tnsStorage,"tTf",whichProperty("transform"),localStorageAccess),HAS3DTRANSFORMS=tnsStorage["t3D"]?checkStorageValue(tnsStorage["t3D"]):setLocalStorage(tnsStorage,"t3D",has3DTransforms(TRANSFORM),localStorageAccess),TRANSITIONDURATION=tnsStorage["tTDu"]?checkStorageValue(tnsStorage["tTDu"]):setLocalStorage(tnsStorage,"tTDu",whichProperty("transitionDuration"),localStorageAccess),TRANSITIONDELAY=tnsStorage["tTDe"]?checkStorageValue(tnsStorage["tTDe"]):setLocalStorage(tnsStorage,"tTDe",whichProperty("transitionDelay"),localStorageAccess),ANIMATIONDURATION=tnsStorage["tADu"]?checkStorageValue(tnsStorage["tADu"]):setLocalStorage(tnsStorage,"tADu",whichProperty("animationDuration"),localStorageAccess),ANIMATIONDELAY=tnsStorage["tADe"]?checkStorageValue(tnsStorage["tADe"]):setLocalStorage(tnsStorage,"tADe",whichProperty("animationDelay"),localStorageAccess),TRANSITIONEND=tnsStorage["tTE"]?checkStorageValue(tnsStorage["tTE"]):setLocalStorage(tnsStorage,"tTE",getEndProperty(TRANSITIONDURATION,"Transition"),localStorageAccess),ANIMATIONEND=tnsStorage["tAE"]?checkStorageValue(tnsStorage["tAE"]):setLocalStorage(tnsStorage,"tAE",getEndProperty(ANIMATIONDURATION,"Animation"),localStorageAccess);var supportConsoleWarn=win.console&&typeof win.console.warn==="function",tnsList=["container","controlsContainer","prevButton","nextButton","navContainer","autoplayButton"],optionsElements={};tnsList.forEach(function(item){if(typeof options[item]==="string"){var str=options[item],el=doc.querySelector(str);optionsElements[item]=str;if(el&&el.nodeName){options[item]=el}else{if(supportConsoleWarn){console.warn("Can't find",options[item])}return}}});if(options.container.children.length<1){if(supportConsoleWarn){console.warn("No slides found in",options.container)}return}var responsive=options.responsive,nested=options.nested,carousel=options.mode==="carousel"?true:false;if(responsive){if(0 in responsive){options=extend(options,responsive[0]);delete responsive[0]}var responsiveTem={};for(var key in responsive){var val=responsive[key];val=typeof val==="number"?{items:val}:val;responsiveTem[key]=val}responsive=responsiveTem;responsiveTem=null}function updateOptions(obj){for(var key in obj){if(!carousel){if(key==="slideBy"){obj[key]="page"}if(key==="edgePadding"){obj[key]=false}if(key==="autoHeight"){obj[key]=false}}if(key==="responsive"){updateOptions(obj[key])}}}if(!carousel){updateOptions(options)}if(!carousel){options.axis="horizontal";options.slideBy="page";options.edgePadding=false;var animateIn=options.animateIn,animateOut=options.animateOut,animateDelay=options.animateDelay,animateNormal=options.animateNormal}var horizontal=options.axis==="horizontal"?true:false,outerWrapper=doc.createElement("div"),innerWrapper=doc.createElement("div"),middleWrapper,container=options.container,containerParent=container.parentNode,containerHTML=container.outerHTML,slideItems=container.children,slideCount=slideItems.length,breakpointZone,windowWidth=getWindowWidth(),isOn=false;if(responsive){setBreakpointZone()}if(carousel){container.className+=" tns-vpfix"}var autoWidth=options.autoWidth,fixedWidth=getOption("fixedWidth"),edgePadding=getOption("edgePadding"),gutter=getOption("gutter"),viewport=getViewportWidth(),center=getOption("center"),items=!autoWidth?Math.floor(getOption("items")):1,slideBy=getOption("slideBy"),viewportMax=options.viewportMax||options.fixedWidthViewportWidth,arrowKeys=getOption("arrowKeys"),speed=getOption("speed"),rewind=options.rewind,loop=rewind?false:options.loop,autoHeight=getOption("autoHeight"),controls=getOption("controls"),controlsText=getOption("controlsText"),nav=getOption("nav"),touch=getOption("touch"),mouseDrag=getOption("mouseDrag"),autoplay=getOption("autoplay"),autoplayTimeout=getOption("autoplayTimeout"),autoplayText=getOption("autoplayText"),autoplayHoverPause=getOption("autoplayHoverPause"),autoplayResetOnVisibility=getOption("autoplayResetOnVisibility"),sheet=createStyleSheet(),lazyload=options.lazyload,lazyloadSelector=options.lazyloadSelector,slidePositions,slideItemsOut=[],cloneCount=loop?getCloneCountForLoop():0,slideCountNew=!carousel?slideCount+cloneCount:slideCount+cloneCount*2,hasRightDeadZone=(fixedWidth||autoWidth)&&!loop?true:false,rightBoundary=fixedWidth?getRightBoundary():null,updateIndexBeforeTransform=!carousel||!loop?true:false,transformAttr=horizontal?"left":"top",transformPrefix="",transformPostfix="",getIndexMax=function(){if(fixedWidth){return function(){return center&&!loop?slideCount-1:Math.ceil(-rightBoundary/(fixedWidth+gutter))}}else if(autoWidth){return function(){for(var i=slideCountNew,result=i-1;i--;){if(slidePositions[i]>-rightBoundary){return i}}}}else{return function(){if(center&&carousel&&!loop){return slideCount-1}else{return loop||carousel?Math.max(0,slideCountNew-Math.ceil(items)):slideCountNew-1}}}}(),index=getStartIndex(getOption("startIndex")),indexCached=index,displayIndex=getCurrentSlide(),indexMin=0,indexMax=!autoWidth?getIndexMax():null,resizeTimer,preventActionWhenRunning=options.preventActionWhenRunning,swipeAngle=options.swipeAngle,moveDirectionExpected=swipeAngle?"?":true,running=false,onInit=options.onInit,events=new Events,newContainerClasses=" tns-slider tns-"+options.mode,slideId=container.id||getSlideId(),disable=getOption("disable"),disabled=false,freezable=options.freezable,freeze=freezable&&!autoWidth?getFreeze():false,frozen=false,controlsEvents={"click":onControlsClick,"keydown":onControlsKeydown},navEvents={"click":onNavClick,"keydown":onNavKeydown},hoverEvents={"mouseover":mouseoverPause,"mouseout":mouseoutRestart},visibilityEvent={"visibilitychange":onVisibilityChange},docmentKeydownEvent={"keydown":onDocumentKeydown},touchEvents={"touchstart":onPanStart,"touchmove":onPanMove,"touchend":onPanEnd,"touchcancel":onPanEnd},dragEvents={"mousedown":onPanStart,"mousemove":onPanMove,"mouseup":onPanEnd,"mouseleave":onPanEnd},hasControls=hasOption("controls"),hasNav=hasOption("nav"),navAsThumbnails=autoWidth?true:options.navAsThumbnails,hasAutoplay=hasOption("autoplay"),hasTouch=hasOption("touch"),hasMouseDrag=hasOption("mouseDrag"),slideActiveClass="tns-slide-active",imgCompleteClass="tns-complete",imgEvents={"load":onImgLoaded,"error":onImgFailed},imgsComplete,liveregionCurrent,preventScroll=options.preventScrollOnTouch==="force"?true:false;if(hasControls){var controlsContainer=options.controlsContainer,controlsContainerHTML=options.controlsContainer?options.controlsContainer.outerHTML:"",prevButton=options.prevButton,nextButton=options.nextButton,prevButtonHTML=options.prevButton?options.prevButton.outerHTML:"",nextButtonHTML=options.nextButton?options.nextButton.outerHTML:"",prevIsButton,nextIsButton}if(hasNav){var navContainer=options.navContainer,navContainerHTML=options.navContainer?options.navContainer.outerHTML:"",navItems,pages=autoWidth?slideCount:getPages(),pagesCached=0,navClicked=-1,navCurrentIndex=getCurrentNavIndex(),navCurrentIndexCached=navCurrentIndex,navActiveClass="tns-nav-active",navStr="Carousel Page ",navStrCurrent=" (Current Slide)"}if(hasAutoplay){var autoplayDirection=options.autoplayDirection==="forward"?1:-1,autoplayButton=options.autoplayButton,autoplayButtonHTML=options.autoplayButton?options.autoplayButton.outerHTML:"",autoplayHtmlStrings=[""," animation"],autoplayTimer,animating,autoplayHoverPaused,autoplayUserPaused,autoplayVisibilityPaused}if(hasTouch||hasMouseDrag){var initPosition={},lastPosition={},translateInit,disX,disY,panStart=false,rafIndex,getDist=horizontal?function(a,b){return a.x-b.x}:function(a,b){return a.y-b.y}}if(!autoWidth){resetVariblesWhenDisable(disable||freeze)}if(TRANSFORM){transformAttr=TRANSFORM;transformPrefix="translate";if(HAS3DTRANSFORMS){transformPrefix+=horizontal?"3d(":"3d(0px, ";transformPostfix=horizontal?", 0px, 0px)":", 0px)"}else{transformPrefix+=horizontal?"X(":"Y(";transformPostfix=")"}}if(carousel){container.className=container.className.replace("tns-vpfix","")}initStructure();initSheet();initSliderTransform();function resetVariblesWhenDisable(condition){if(condition){controls=nav=touch=mouseDrag=arrowKeys=autoplay=autoplayHoverPause=autoplayResetOnVisibility=false}}function getCurrentSlide(){var tem=carousel?index-cloneCount:index;while(tem<0){tem+=slideCount}return tem%slideCount+1}function getStartIndex(ind){ind=ind?Math.max(0,Math.min(loop?slideCount-1:slideCount-items,ind)):0;return carousel?ind+cloneCount:ind}function getAbsIndex(i){if(i==null){i=index}if(carousel){i-=cloneCount}while(i<0){i+=slideCount}return Math.floor(i%slideCount)}function getCurrentNavIndex(){var absIndex=getAbsIndex(),result;result=navAsThumbnails?absIndex:fixedWidth||autoWidth?Math.ceil((absIndex+1)*pages/slideCount-1):Math.floor(absIndex/items);if(!loop&&carousel&&index===indexMax){result=pages-1}return result}function getItemsMax(){if(autoWidth||fixedWidth&&!viewportMax){return slideCount-1}else{var str=fixedWidth?"fixedWidth":"items",arr=[];if(fixedWidth||options[str]=parseInt(bp)){if(item in responsive[bp]){result=responsive[bp][item]}}}}if(item==="slideBy"&&result==="page"){result=getOption("items")}if(!carousel&&(item==="slideBy"||item==="items")){result=Math.floor(result)}return result}}function getSlideMarginLeft(i){return CALC?CALC+"("+i*100+"% / "+slideCountNew+")":i*100/slideCountNew+"%"}function getInnerWrapperStyles(edgePaddingTem,gutterTem,fixedWidthTem,speedTem,autoHeightBP){var str="";if(edgePaddingTem!==undefined){var gap=edgePaddingTem;if(gutterTem){gap-=gutterTem}str=horizontal?"margin: 0 "+gap+"px 0 "+edgePaddingTem+"px;":"margin: "+edgePaddingTem+"px 0 "+gap+"px 0;"}else if(gutterTem&&!fixedWidthTem){var gutterTemUnit="-"+gutterTem+"px",dir=horizontal?gutterTemUnit+" 0 0":"0 "+gutterTemUnit+" 0";str="margin: 0 "+dir+";"}if(!carousel&&autoHeightBP&&TRANSITIONDURATION&&speedTem){str+=getTransitionDurationStyle(speedTem)}return str}function getContainerWidth(fixedWidthTem,gutterTem,itemsTem){if(fixedWidthTem){return(fixedWidthTem+gutterTem)*slideCountNew+"px"}else{return CALC?CALC+"("+slideCountNew*100+"% / "+itemsTem+")":slideCountNew*100/itemsTem+"%"}}function getSlideWidthStyle(fixedWidthTem,gutterTem,itemsTem){var width;if(fixedWidthTem){width=fixedWidthTem+gutterTem+"px"}else{if(!carousel){itemsTem=Math.floor(itemsTem)}var dividend=carousel?slideCountNew:itemsTem;width=CALC?CALC+"(100% / "+dividend+")":100/dividend+"%"}width="width:"+width;return nested!=="inner"?width+";":width+" !important;"}function getSlideGutterStyle(gutterTem){var str="";if(gutterTem!==false){var prop=horizontal?"padding-":"margin-",dir=horizontal?"right":"bottom";str=prop+dir+": "+gutterTem+"px;"}return str}function getCSSPrefix(name,num){var prefix=name.substring(0,name.length-num).toLowerCase();if(prefix){prefix="-"+prefix+"-"}return prefix}function getTransitionDurationStyle(speed){return getCSSPrefix(TRANSITIONDURATION,18)+"transition-duration:"+speed/1000+"s;"}function getAnimationDurationStyle(speed){return getCSSPrefix(ANIMATIONDURATION,17)+"animation-duration:"+speed/1000+"s;"}function initStructure(){var classOuter="tns-outer",classInner="tns-inner",hasGutter=hasOption("gutter");outerWrapper.className=classOuter;innerWrapper.className=classInner;outerWrapper.id=slideId+"-ow";innerWrapper.id=slideId+"-iw";if(container.id===""){container.id=slideId}newContainerClasses+=PERCENTAGELAYOUT||autoWidth?" tns-subpixel":" tns-no-subpixel";newContainerClasses+=CALC?" tns-calc":" tns-no-calc";if(autoWidth){newContainerClasses+=" tns-autowidth"}newContainerClasses+=" tns-"+options.axis;container.className+=newContainerClasses;if(carousel){middleWrapper=doc.createElement("div");middleWrapper.id=slideId+"-mw";middleWrapper.className="tns-ovh";outerWrapper.appendChild(middleWrapper);middleWrapper.appendChild(innerWrapper)}else{outerWrapper.appendChild(innerWrapper)}if(autoHeight){var wp=middleWrapper?middleWrapper:innerWrapper;wp.className+=" tns-ah"}containerParent.insertBefore(outerWrapper,container);innerWrapper.appendChild(container);forEach(slideItems,function(item,i){addClass(item,"tns-item");if(!item.id){item.id=slideId+"-item"+i}if(!carousel&&animateNormal){addClass(item,animateNormal)}setAttrs(item,{"aria-hidden":"true","tabindex":"-1"})});if(cloneCount){var fragmentBefore=doc.createDocumentFragment(),fragmentAfter=doc.createDocumentFragment();for(var j=cloneCount;j--;){var num=j%slideCount,cloneFirst=slideItems[num].cloneNode(true);removeAttrs(cloneFirst,"id");fragmentAfter.insertBefore(cloneFirst,fragmentAfter.firstChild);if(carousel){var cloneLast=slideItems[slideCount-1-num].cloneNode(true);removeAttrs(cloneLast,"id");fragmentBefore.appendChild(cloneLast)}}container.insertBefore(fragmentBefore,container.firstChild);container.appendChild(fragmentAfter);slideItems=container.children}}function initSliderTransform(){if(hasOption("autoHeight")||autoWidth||!horizontal){var imgs=container.querySelectorAll("img");forEach(imgs,function(img){var src=img.src;if(src&&src.indexOf("data:image")<0){addEvents(img,imgEvents);img.src="";img.src=src;addClass(img,"loading")}else if(!lazyload){imgLoaded(img)}});raf(function(){imgsLoadedCheck(arrayFromNodeList(imgs),function(){imgsComplete=true})});if(!autoWidth&&horizontal){imgs=getImageArray(index,Math.min(index+items-1,slideCountNew-1))}lazyload?initSliderTransformStyleCheck():raf(function(){imgsLoadedCheck(arrayFromNodeList(imgs),initSliderTransformStyleCheck)})}else{if(carousel){doContainerTransformSilent()}initTools();initEvents()}}function initSliderTransformStyleCheck(){if(autoWidth){var num=loop?index:slideCount-1;(function stylesApplicationCheck(){slideItems[num-1].getBoundingClientRect().right.toFixed(2)===slideItems[num].getBoundingClientRect().left.toFixed(2)?initSliderTransformCore():setTimeout(function(){stylesApplicationCheck()},16)})()}else{initSliderTransformCore()}}function initSliderTransformCore(){if(!horizontal||autoWidth){setSlidePositions();if(autoWidth){rightBoundary=getRightBoundary();if(freezable){freeze=getFreeze()}indexMax=getIndexMax();resetVariblesWhenDisable(disable||freeze)}else{updateContentWrapperHeight()}}if(carousel){doContainerTransformSilent()}initTools();initEvents()}function initSheet(){if(!carousel){for(var i=index,l=index+Math.min(slideCount,items);i .tns-item","font-size:"+win.getComputedStyle(slideItems[0]).fontSize+";",getCssRulesLength(sheet));addCSSRule(sheet,"#"+slideId,"font-size:0;",getCssRulesLength(sheet))}else if(carousel){forEach(slideItems,function(slide,i){slide.style.marginLeft=getSlideMarginLeft(i)})}}if(CSSMQ){if(TRANSITIONDURATION){var str=middleWrapper&&options.autoHeight?getTransitionDurationStyle(options.speed):"";addCSSRule(sheet,"#"+slideId+"-mw",str,getCssRulesLength(sheet))}str=getInnerWrapperStyles(options.edgePadding,options.gutter,options.fixedWidth,options.speed,options.autoHeight);addCSSRule(sheet,"#"+slideId+"-iw",str,getCssRulesLength(sheet));if(carousel){str=horizontal&&!autoWidth?"width:"+getContainerWidth(options.fixedWidth,options.gutter,options.items)+";":"";if(TRANSITIONDURATION){str+=getTransitionDurationStyle(speed)}addCSSRule(sheet,"#"+slideId,str,getCssRulesLength(sheet))}str=horizontal&&!autoWidth?getSlideWidthStyle(options.fixedWidth,options.gutter,options.items):"";if(options.gutter){str+=getSlideGutterStyle(options.gutter)}if(!carousel){if(TRANSITIONDURATION){str+=getTransitionDurationStyle(speed)}if(ANIMATIONDURATION){str+=getAnimationDurationStyle(speed)}}if(str){addCSSRule(sheet,"#"+slideId+" > .tns-item",str,getCssRulesLength(sheet))}}else{update_carousel_transition_duration();innerWrapper.style.cssText=getInnerWrapperStyles(edgePadding,gutter,fixedWidth,autoHeight);if(carousel&&horizontal&&!autoWidth){container.style.width=getContainerWidth(fixedWidth,gutter,items)}var str=horizontal&&!autoWidth?getSlideWidthStyle(fixedWidth,gutter,items):"";if(gutter){str+=getSlideGutterStyle(gutter)}if(str){addCSSRule(sheet,"#"+slideId+" > .tns-item",str,getCssRulesLength(sheet))}}if(responsive&&CSSMQ){for(var bp in responsive){bp=parseInt(bp);var opts=responsive[bp],str="",middleWrapperStr="",innerWrapperStr="",containerStr="",slideStr="",itemsBP=!autoWidth?getOption("items",bp):null,fixedWidthBP=getOption("fixedWidth",bp),speedBP=getOption("speed",bp),edgePaddingBP=getOption("edgePadding",bp),autoHeightBP=getOption("autoHeight",bp),gutterBP=getOption("gutter",bp);if(TRANSITIONDURATION&&middleWrapper&&getOption("autoHeight",bp)&&"speed"in opts){middleWrapperStr="#"+slideId+"-mw{"+getTransitionDurationStyle(speedBP)+"}"}if("edgePadding"in opts||"gutter"in opts){innerWrapperStr="#"+slideId+"-iw{"+getInnerWrapperStyles(edgePaddingBP,gutterBP,fixedWidthBP,speedBP,autoHeightBP)+"}"}if(carousel&&horizontal&&!autoWidth&&("fixedWidth"in opts||"items"in opts||fixedWidth&&"gutter"in opts)){containerStr="width:"+getContainerWidth(fixedWidthBP,gutterBP,itemsBP)+";"}if(TRANSITIONDURATION&&"speed"in opts){containerStr+=getTransitionDurationStyle(speedBP)}if(containerStr){containerStr="#"+slideId+"{"+containerStr+"}"}if("fixedWidth"in opts||fixedWidth&&"gutter"in opts||!carousel&&"items"in opts){slideStr+=getSlideWidthStyle(fixedWidthBP,gutterBP,itemsBP)}if("gutter"in opts){slideStr+=getSlideGutterStyle(gutterBP)}if(!carousel&&"speed"in opts){if(TRANSITIONDURATION){slideStr+=getTransitionDurationStyle(speedBP)}if(ANIMATIONDURATION){slideStr+=getAnimationDurationStyle(speedBP)}}if(slideStr){slideStr="#"+slideId+" > .tns-item{"+slideStr+"}"}str=middleWrapperStr+innerWrapperStr+containerStr+slideStr;if(str){sheet.insertRule("@media (min-width: "+bp/16+"em) {"+str+"}",sheet.cssRules.length)}}}}function initTools(){updateSlideStatus();outerWrapper.insertAdjacentHTML("afterbegin","

slide "+getLiveRegionStr()+" of "+slideCount+"

");liveregionCurrent=outerWrapper.querySelector(".tns-liveregion .current");if(hasAutoplay){var txt=autoplay?"stop":"start";if(autoplayButton){setAttrs(autoplayButton,{"data-action":txt})}else if(options.autoplayButtonOutput){outerWrapper.insertAdjacentHTML(getInsertPosition(options.autoplayPosition),"");autoplayButton=outerWrapper.querySelector("[data-action]")}if(autoplayButton){addEvents(autoplayButton,{"click":toggleAutoplay})}if(autoplay){startAutoplay();if(autoplayHoverPause){addEvents(container,hoverEvents)}if(autoplayResetOnVisibility){addEvents(container,visibilityEvent)}}}if(hasNav){var initIndex=!carousel?0:cloneCount;if(navContainer){setAttrs(navContainer,{"aria-label":"Carousel Pagination"});navItems=navContainer.children;forEach(navItems,function(item,i){setAttrs(item,{"data-nav":i,"tabindex":"-1","aria-label":navStr+(i+1),"aria-controls":slideId})})}else{var navHtml="",hiddenStr=navAsThumbnails?"":"style=\"display:none\"";for(var i=0;i"}navHtml="

"+navHtml+"

";outerWrapper.insertAdjacentHTML(getInsertPosition(options.navPosition),navHtml);navContainer=outerWrapper.querySelector(".tns-nav");navItems=navContainer.children}updateNavVisibility();if(TRANSITIONDURATION){var prefix=TRANSITIONDURATION.substring(0,TRANSITIONDURATION.length-18).toLowerCase(),str="transition: all "+speed/1000+"s";if(prefix){str="-"+prefix+"-"+str}addCSSRule(sheet,"[aria-controls^="+slideId+"-item]",str,getCssRulesLength(sheet))}setAttrs(navItems[navCurrentIndex],{"aria-label":navStr+(navCurrentIndex+1)+navStrCurrent});removeAttrs(navItems[navCurrentIndex],"tabindex");addClass(navItems[navCurrentIndex],navActiveClass);addEvents(navContainer,navEvents)}if(hasControls){if(!controlsContainer&&(!prevButton||!nextButton)){outerWrapper.insertAdjacentHTML(getInsertPosition(options.controlsPosition),"

");controlsContainer=outerWrapper.querySelector(".tns-controls")}if(!prevButton||!nextButton){prevButton=controlsContainer.children[0];nextButton=controlsContainer.children[1]}if(options.controlsContainer){setAttrs(controlsContainer,{"aria-label":"Carousel Navigation","tabindex":"0"})}if(options.controlsContainer||options.prevButton&&options.nextButton){setAttrs([prevButton,nextButton],{"aria-controls":slideId,"tabindex":"-1"})}if(options.controlsContainer||options.prevButton&&options.nextButton){setAttrs(prevButton,{"data-controls":"prev"});setAttrs(nextButton,{"data-controls":"next"})}prevIsButton=isButton(prevButton);nextIsButton=isButton(nextButton);updateControlsStatus();if(controlsContainer){addEvents(controlsContainer,controlsEvents)}else{addEvents(prevButton,controlsEvents);addEvents(nextButton,controlsEvents)}}disableUI()}function initEvents(){if(carousel&&TRANSITIONEND){var eve={};eve[TRANSITIONEND]=onTransitionEnd;addEvents(container,eve)}if(touch){addEvents(container,touchEvents,options.preventScrollOnTouch)}if(mouseDrag){addEvents(container,dragEvents)}if(arrowKeys){addEvents(doc,docmentKeydownEvent)}if(nested==="inner"){events.on("outerResized",function(){resizeTasks();events.emit("innerLoaded",info())})}else if(responsive||fixedWidth||autoWidth||autoHeight||!horizontal){addEvents(win,{"resize":onResize})}if(autoHeight){if(nested==="outer"){events.on("innerLoaded",doAutoHeight)}else if(!disable){doAutoHeight()}}doLazyLoad();if(disable){disableSlider()}else if(freeze){freezeSlider()}events.on("indexChanged",additionalUpdates);if(nested==="inner"){events.emit("innerLoaded",info())}if(typeof onInit==="function"){onInit(info())}isOn=true}function destroy(){sheet.disabled=true;if(sheet.ownerNode){sheet.ownerNode.remove()}removeEvents(win,{"resize":onResize});if(arrowKeys){removeEvents(doc,docmentKeydownEvent)}if(controlsContainer){removeEvents(controlsContainer,controlsEvents)}if(navContainer){removeEvents(navContainer,navEvents)}removeEvents(container,hoverEvents);removeEvents(container,visibilityEvent);if(autoplayButton){removeEvents(autoplayButton,{"click":toggleAutoplay})}if(autoplay){clearInterval(autoplayTimer)}if(carousel&&TRANSITIONEND){var eve={};eve[TRANSITIONEND]=onTransitionEnd;removeEvents(container,eve)}if(touch){removeEvents(container,touchEvents)}if(mouseDrag){removeEvents(container,dragEvents)}var htmlList=[containerHTML,controlsContainerHTML,prevButtonHTML,nextButtonHTML,navContainerHTML,autoplayButtonHTML];tnsList.forEach(function(item,i){var el=item==="container"?outerWrapper:options[item];if(typeof el==="object"){var prevEl=el.previousElementSibling?el.previousElementSibling:false,parentEl=el.parentNode;el.outerHTML=htmlList[i];options[item]=prevEl?prevEl.nextElementSibling:parentEl.firstElementChild}});tnsList=animateIn=animateOut=animateDelay=animateNormal=horizontal=outerWrapper=innerWrapper=container=containerParent=containerHTML=slideItems=slideCount=breakpointZone=windowWidth=autoWidth=fixedWidth=edgePadding=gutter=viewport=items=slideBy=viewportMax=arrowKeys=speed=rewind=loop=autoHeight=sheet=lazyload=slidePositions=slideItemsOut=cloneCount=slideCountNew=hasRightDeadZone=rightBoundary=updateIndexBeforeTransform=transformAttr=transformPrefix=transformPostfix=getIndexMax=index=indexCached=indexMin=indexMax=resizeTimer=swipeAngle=moveDirectionExpected=running=onInit=events=newContainerClasses=slideId=disable=disabled=freezable=freeze=frozen=controlsEvents=navEvents=hoverEvents=visibilityEvent=docmentKeydownEvent=touchEvents=dragEvents=hasControls=hasNav=navAsThumbnails=hasAutoplay=hasTouch=hasMouseDrag=slideActiveClass=imgCompleteClass=imgEvents=imgsComplete=controls=controlsText=controlsContainer=controlsContainerHTML=prevButton=nextButton=prevIsButton=nextIsButton=nav=navContainer=navContainerHTML=navItems=pages=pagesCached=navClicked=navCurrentIndex=navCurrentIndexCached=navActiveClass=navStr=navStrCurrent=autoplay=autoplayTimeout=autoplayDirection=autoplayText=autoplayHoverPause=autoplayButton=autoplayButtonHTML=autoplayResetOnVisibility=autoplayHtmlStrings=autoplayTimer=animating=autoplayHoverPaused=autoplayUserPaused=autoplayVisibilityPaused=initPosition=lastPosition=translateInit=disX=disY=panStart=rafIndex=getDist=touch=mouseDrag=null;for(var a in this){if(a!=="rebuild"){this[a]=null}}isOn=false}function onResize(e){raf(function(){resizeTasks(getEvent(e))})}function resizeTasks(e){if(!isOn){return}if(nested==="outer"){events.emit("outerResized",info(e))}windowWidth=getWindowWidth();var bpChanged,breakpointZoneTem=breakpointZone,needContainerTransform=false;if(responsive){setBreakpointZone();bpChanged=breakpointZoneTem!==breakpointZone;if(bpChanged){events.emit("newBreakpointStart",info(e))}}var indChanged,itemsChanged,itemsTem=items,disableTem=disable,freezeTem=freeze,arrowKeysTem=arrowKeys,controlsTem=controls,navTem=nav,touchTem=touch,mouseDragTem=mouseDrag,autoplayTem=autoplay,autoplayHoverPauseTem=autoplayHoverPause,autoplayResetOnVisibilityTem=autoplayResetOnVisibility,indexTem=index;if(bpChanged){var fixedWidthTem=fixedWidth,autoHeightTem=autoHeight,controlsTextTem=controlsText,centerTem=center,autoplayTextTem=autoplayText;if(!CSSMQ){var gutterTem=gutter,edgePaddingTem=edgePadding}}arrowKeys=getOption("arrowKeys");controls=getOption("controls");nav=getOption("nav");touch=getOption("touch");center=getOption("center");mouseDrag=getOption("mouseDrag");autoplay=getOption("autoplay");autoplayHoverPause=getOption("autoplayHoverPause");autoplayResetOnVisibility=getOption("autoplayResetOnVisibility");if(bpChanged){disable=getOption("disable");fixedWidth=getOption("fixedWidth");speed=getOption("speed");autoHeight=getOption("autoHeight");controlsText=getOption("controlsText");autoplayText=getOption("autoplayText");autoplayTimeout=getOption("autoplayTimeout");if(!CSSMQ){edgePadding=getOption("edgePadding");gutter=getOption("gutter")}}resetVariblesWhenDisable(disable);viewport=getViewportWidth();if((!horizontal||autoWidth)&&!disable){setSlidePositions();if(!horizontal){updateContentWrapperHeight();needContainerTransform=true}}if(fixedWidth||autoWidth){rightBoundary=getRightBoundary();indexMax=getIndexMax()}if(bpChanged||fixedWidth){items=getOption("items");slideBy=getOption("slideBy");itemsChanged=items!==itemsTem;if(itemsChanged){if(!fixedWidth&&!autoWidth){indexMax=getIndexMax()}updateIndex()}}if(bpChanged){if(disable!==disableTem){if(disable){disableSlider()}else{enableSlider()}}}if(freezable&&(bpChanged||fixedWidth||autoWidth)){freeze=getFreeze();if(freeze!==freezeTem){if(freeze){doContainerTransform(getContainerTransformValue(getStartIndex(0)));freezeSlider()}else{unfreezeSlider();needContainerTransform=true}}}resetVariblesWhenDisable(disable||freeze);if(!autoplay){autoplayHoverPause=autoplayResetOnVisibility=false}if(arrowKeys!==arrowKeysTem){arrowKeys?addEvents(doc,docmentKeydownEvent):removeEvents(doc,docmentKeydownEvent)}if(controls!==controlsTem){if(controls){if(controlsContainer){showElement(controlsContainer)}else{if(prevButton){showElement(prevButton)}if(nextButton){showElement(nextButton)}}}else{if(controlsContainer){hideElement(controlsContainer)}else{if(prevButton){hideElement(prevButton)}if(nextButton){hideElement(nextButton)}}}}if(nav!==navTem){nav?showElement(navContainer):hideElement(navContainer)}if(touch!==touchTem){touch?addEvents(container,touchEvents,options.preventScrollOnTouch):removeEvents(container,touchEvents)}if(mouseDrag!==mouseDragTem){mouseDrag?addEvents(container,dragEvents):removeEvents(container,dragEvents)}if(autoplay!==autoplayTem){if(autoplay){if(autoplayButton){showElement(autoplayButton)}if(!animating&&!autoplayUserPaused){startAutoplay()}}else{if(autoplayButton){hideElement(autoplayButton)}if(animating){stopAutoplay()}}}if(autoplayHoverPause!==autoplayHoverPauseTem){autoplayHoverPause?addEvents(container,hoverEvents):removeEvents(container,hoverEvents)}if(autoplayResetOnVisibility!==autoplayResetOnVisibilityTem){autoplayResetOnVisibility?addEvents(doc,visibilityEvent):removeEvents(doc,visibilityEvent)}if(bpChanged){if(fixedWidth!==fixedWidthTem||center!==centerTem){needContainerTransform=true}if(autoHeight!==autoHeightTem){if(!autoHeight){innerWrapper.style.height=""}}if(controls&&controlsText!==controlsTextTem){prevButton.innerHTML=controlsText[0];nextButton.innerHTML=controlsText[1]}if(autoplayButton&&autoplayText!==autoplayTextTem){var i=autoplay?1:0,html=autoplayButton.innerHTML,len=html.length-autoplayTextTem[i].length;if(html.substring(len)===autoplayTextTem[i]){autoplayButton.innerHTML=html.substring(0,len)+autoplayText[i]}}}else{if(center&&(fixedWidth||autoWidth)){needContainerTransform=true}}if(itemsChanged||fixedWidth&&!autoWidth){pages=getPages();updateNavVisibility()}indChanged=index!==indexTem;if(indChanged){events.emit("indexChanged",info());needContainerTransform=true}else if(itemsChanged){if(!indChanged){additionalUpdates()}}else if(fixedWidth||autoWidth){doLazyLoad();updateSlideStatus();updateLiveRegion()}if(itemsChanged||!carousel){updateGallerySlidePositions()}if(!disable&&!freeze){if(bpChanged&&!CSSMQ){if(autoHeight!==autoheightTem||speed!==speedTem){update_carousel_transition_duration()}if(edgePadding!==edgePaddingTem||gutter!==gutterTem){innerWrapper.style.cssText=getInnerWrapperStyles(edgePadding,gutter,fixedWidth,speed,autoHeight)}if(horizontal){if(carousel){container.style.width=getContainerWidth(fixedWidth,gutter,items)}var str=getSlideWidthStyle(fixedWidth,gutter,items)+getSlideGutterStyle(gutter);removeCSSRule(sheet,getCssRulesLength(sheet)-1);addCSSRule(sheet,"#"+slideId+" > .tns-item",str,getCssRulesLength(sheet))}}if(autoHeight){doAutoHeight()}if(needContainerTransform){doContainerTransformSilent();indexCached=index}}if(bpChanged){events.emit("newBreakpointEnd",info(e))}}function getFreeze(){if(!fixedWidth&&!autoWidth){var a=center?items-(items-1)/2:items;return slideCount<=a}var width=fixedWidth?(fixedWidth+gutter)*slideCount:slidePositions[slideCount],vp=edgePadding?viewport+edgePadding*2:viewport+gutter;if(center){vp-=fixedWidth?(viewport-fixedWidth)/2:(viewport-(slidePositions[index+1]-slidePositions[index]-gutter))/2}return width<=vp}function setBreakpointZone(){breakpointZone=0;for(var bp in responsive){bp=parseInt(bp);if(windowWidth>=bp){breakpointZone=bp}}}var updateIndex=function(){return loop?carousel?function(){var leftEdge=indexMin,rightEdge=indexMax;leftEdge+=slideBy;rightEdge-=slideBy;if(edgePadding){leftEdge+=1;rightEdge-=1}else if(fixedWidth){if((viewport+gutter)%(fixedWidth+gutter)){rightEdge-=1}}if(cloneCount){if(index>rightEdge){index-=slideCount}else if(indexindexMax){while(index>=indexMin+slideCount){index-=slideCount}}else if(index=0.5){end=i}}})}else{if(fixedWidth){var cell=fixedWidth+gutter;if(center||edgePadding){start=Math.floor(rangestart/cell);end=Math.ceil(rangeend/cell-1)}else{end=start+Math.ceil(viewport/cell)-1}}else{if(center||edgePadding){var a=items-1;if(center){start-=a/2;end=index+a/2}else{end=index+a}if(edgePadding){var b=edgePadding*items/viewport;start-=b;end+=b}start=Math.floor(start);end=Math.ceil(end)}else{end=start+items-1}}start=Math.max(start,0);end=Math.min(end,slideCountNew-1)}return[start,end]}function doLazyLoad(){if(lazyload&&!disable){getImageArray.apply(null,getVisibleSlideRange()).forEach(function(img){if(!hasClass(img,imgCompleteClass)){var eve={};eve[TRANSITIONEND]=function(e){e.stopPropagation()};addEvents(img,eve);addEvents(img,imgEvents);img.src=getAttr(img,"data-src");var srcset=getAttr(img,"data-srcset");if(srcset){img.srcset=srcset}addClass(img,"loading")}})}}function onImgLoaded(e){imgLoaded(getTarget(e))}function onImgFailed(e){imgFailed(getTarget(e))}function imgLoaded(img){addClass(img,"loaded");imgCompleted(img)}function imgFailed(img){addClass(img,"failed");imgCompleted(img)}function imgCompleted(img){addClass(img,"tns-complete");removeClass(img,"loading");removeEvents(img,imgEvents)}function getImageArray(start,end){var imgs=[];while(start<=end){forEach(slideItems[start].querySelectorAll("img"),function(img){imgs.push(img)});start++}return imgs}function doAutoHeight(){var imgs=getImageArray.apply(null,getVisibleSlideRange());raf(function(){imgsLoadedCheck(imgs,updateInnerWrapperHeight)})}function imgsLoadedCheck(imgs,cb){if(imgsComplete){return cb()}imgs.forEach(function(img,index){if(hasClass(img,imgCompleteClass)){imgs.splice(index,1)}});if(!imgs.length){return cb()}raf(function(){imgsLoadedCheck(imgs,cb)})}function additionalUpdates(){doLazyLoad();updateSlideStatus();updateLiveRegion();updateControlsStatus();updateNavStatus()}function update_carousel_transition_duration(){if(carousel&&autoHeight){middleWrapper.style[TRANSITIONDURATION]=speed/1000+"s"}}function getMaxSlideHeight(slideStart,slideRange){var heights=[];for(var i=slideStart,l=Math.min(slideStart+slideRange,slideCountNew);i=start&&i<=end){if(hasAttr(item,"aria-hidden")){removeAttrs(item,["aria-hidden","tabindex"]);addClass(item,slideActiveClass)}}else{if(!hasAttr(item,"aria-hidden")){setAttrs(item,{"aria-hidden":"true","tabindex":"-1"});removeClass(item,slideActiveClass)}}})}function updateGallerySlidePositions(){var l=index+Math.min(slideCount,items);for(var i=slideCountNew;i--;){var item=slideItems[i];if(i>=index&&i=0?navClicked:getCurrentNavIndex();navClicked=-1;if(navCurrentIndex!==navCurrentIndexCached){var navPrev=navItems[navCurrentIndexCached],navCurrent=navItems[navCurrentIndex];setAttrs(navPrev,{"tabindex":"-1","aria-label":navStr+(navCurrentIndexCached+1)});removeClass(navPrev,navActiveClass);setAttrs(navCurrent,{"aria-label":navStr+(navCurrentIndex+1)+navStrCurrent});removeAttrs(navCurrent,"tabindex");addClass(navCurrent,navActiveClass);navCurrentIndexCached=navCurrentIndex}}}function getLowerCaseNodeName(el){return el.nodeName.toLowerCase()}function isButton(el){return getLowerCaseNodeName(el)==="button"}function isAriaDisabled(el){return el.getAttribute("aria-disabled")==="true"}function disEnableElement(isButton,el,val){if(isButton){el.disabled=val}else{el.setAttribute("aria-disabled",val.toString())}}function updateControlsStatus(){if(!controls||rewind||loop){return}var prevDisabled=prevIsButton?prevButton.disabled:isAriaDisabled(prevButton),nextDisabled=nextIsButton?nextButton.disabled:isAriaDisabled(nextButton),disablePrev=index<=indexMin?true:false,disableNext=!rewind&&index>=indexMax?true:false;if(disablePrev&&!prevDisabled){disEnableElement(prevIsButton,prevButton,true)}if(!disablePrev&&prevDisabled){disEnableElement(prevIsButton,prevButton,false)}if(disableNext&&!nextDisabled){disEnableElement(nextIsButton,nextButton,true)}if(!disableNext&&nextDisabled){disEnableElement(nextIsButton,nextButton,false)}}function resetDuration(el,str){if(TRANSITIONDURATION){el.style[TRANSITIONDURATION]=str}}function getSliderWidth(){return fixedWidth?(fixedWidth+gutter)*slideCountNew:slidePositions[slideCountNew]}function getCenterGap(num){if(num==null){num=index}var gap=edgePadding?gutter:0;return autoWidth?(viewport-gap-(slidePositions[num+1]-slidePositions[num]-gutter))/2:fixedWidth?(viewport-fixedWidth)/2:(items-1)/2}function getRightBoundary(){var gap=edgePadding?gutter:0,result=viewport+gap-getSliderWidth();if(center&&!loop){result=fixedWidth?-(fixedWidth+gutter)*(slideCountNew-1)-getCenterGap():getCenterGap(slideCountNew-1)-slidePositions[slideCountNew-1]}if(result>0){result=0}return result}function getContainerTransformValue(num){if(num==null){num=index}var val;if(horizontal&&!autoWidth){if(fixedWidth){val=-(fixedWidth+gutter)*num;if(center){val+=getCenterGap()}}else{var denominator=TRANSFORM?slideCountNew:items;if(center){num-=getCenterGap()}val=-num*100/denominator}}else{val=-slidePositions[num];if(center&&autoWidth){val+=getCenterGap()}}if(hasRightDeadZone){val=Math.max(val,rightBoundary)}val+=horizontal&&!autoWidth&&!fixedWidth?"%":"px";return val}function doContainerTransformSilent(val){resetDuration(container,"0s");doContainerTransform(val)}function doContainerTransform(val){if(val==null){val=getContainerTransformValue()}container.style[transformAttr]=transformPrefix+val+transformPostfix}function animateSlide(number,classOut,classIn,isOut){var l=number+items;if(!loop){l=Math.min(l,slideCountNew)}for(var i=number;i=0){stopAutoplay()}running=true;transformCore()}}function strTrans(str){return str.toLowerCase().replace(/-/g,"")}function onTransitionEnd(event){if(carousel||running){events.emit("transitionEnd",info(event));if(!carousel&&slideItemsOut.length>0){for(var i=0;i0?1:-1;indexGap+=index+indexGap-slideCount>=indexMin?slideCount*factor:slideCount*2*factor*-1}index+=indexGap;if(carousel&&loop){if(indexindexMax){index-=slideCount}}if(getAbsIndex(index)!==getAbsIndex(indexCached)){render(e)}}}function onControlsClick(e,dir){if(running){if(preventActionWhenRunning){return}else{onTransitionEnd()}}var passEventObject;if(!dir){e=getEvent(e);var target=getTarget(e);while(target!==controlsContainer&&[prevButton,nextButton].indexOf(target)<0){target=target.parentNode}var targetIn=[prevButton,nextButton].indexOf(target);if(targetIn>=0){passEventObject=true;dir=targetIn===0?-1:1}}if(rewind){if(index===indexMin&&dir===-1){goTo("last",e);return}else if(index===indexMax&&dir===1){goTo("first",e);return}}if(dir){index+=slideBy*dir;if(autoWidth){index=Math.floor(index)}render(passEventObject||e&&e.type==="keydown"?e:null)}}function onNavClick(e){if(running){if(preventActionWhenRunning){return}else{onTransitionEnd()}}e=getEvent(e);var target=getTarget(e),navIndex;while(target!==navContainer&&!hasAttr(target,"data-nav")){target=target.parentNode}if(hasAttr(target,"data-nav")){var navIndex=navClicked=Number(getAttr(target,"data-nav")),targetIndexBase=fixedWidth||autoWidth?navIndex*slideCount/pages:navIndex*items,targetIndex=navAsThumbnails?navIndex:Math.min(Math.ceil(targetIndexBase),slideCount-1);goTo(targetIndex,e);if(navCurrentIndex===navIndex){if(animating){stopAutoplay()}navClicked=-1}}}function setAutoplayTimer(){autoplayTimer=setInterval(function(){onControlsClick(null,autoplayDirection)},autoplayTimeout);animating=true}function stopAutoplayTimer(){clearInterval(autoplayTimer);animating=false}function updateAutoplayButton(action,txt){setAttrs(autoplayButton,{"data-action":action});autoplayButton.innerHTML=autoplayHtmlStrings[0]+action+autoplayHtmlStrings[1]+txt}function startAutoplay(){setAutoplayTimer();if(autoplayButton){updateAutoplayButton("stop",autoplayText[1])}}function stopAutoplay(){stopAutoplayTimer();if(autoplayButton){updateAutoplayButton("start",autoplayText[0])}}function play(){if(autoplay&&!animating){startAutoplay();autoplayUserPaused=false}}function pause(){if(animating){stopAutoplay();autoplayUserPaused=true}}function toggleAutoplay(){if(animating){stopAutoplay();autoplayUserPaused=true}else{startAutoplay();autoplayUserPaused=false}}function onVisibilityChange(){if(doc.hidden){if(animating){stopAutoplayTimer();autoplayVisibilityPaused=true}}else if(autoplayVisibilityPaused){setAutoplayTimer();autoplayVisibilityPaused=false}}function mouseoverPause(){if(animating){stopAutoplayTimer();autoplayHoverPaused=true}}function mouseoutRestart(){if(autoplayHoverPaused){setAutoplayTimer();autoplayHoverPaused=false}}function onDocumentKeydown(e){e=getEvent(e);var keyIndex=[KEYS.LEFT,KEYS.RIGHT].indexOf(e.keyCode);if(keyIndex>=0){onControlsClick(e,keyIndex===0?-1:1)}}function onControlsKeydown(e){e=getEvent(e);var keyIndex=[KEYS.LEFT,KEYS.RIGHT].indexOf(e.keyCode);if(keyIndex>=0){if(keyIndex===0){if(!prevButton.disabled){onControlsClick(e,-1)}}else if(!nextButton.disabled){onControlsClick(e,1)}}}function setFocus(el){el.focus()}function onNavKeydown(e){e=getEvent(e);var curElement=doc.activeElement;if(!hasAttr(curElement,"data-nav")){return}var keyIndex=[KEYS.LEFT,KEYS.RIGHT,KEYS.ENTER,KEYS.SPACE].indexOf(e.keyCode),navIndex=Number(getAttr(curElement,"data-nav"));if(keyIndex>=0){if(keyIndex===0){if(navIndex>0){setFocus(navItems[navIndex-1])}}else if(keyIndex===1){if(navIndex=0}function preventDefaultBehavior(e){e.preventDefault?e.preventDefault():e.returnValue=false}function getMoveDirectionExpected(){return getTouchDirection(toDegree(lastPosition.y-initPosition.y,lastPosition.x-initPosition.x),swipeAngle)===options.axis}function onPanStart(e){if(running){if(preventActionWhenRunning){return}else{onTransitionEnd()}}if(autoplay&&animating){stopAutoplayTimer()}panStart=true;if(rafIndex){caf(rafIndex);rafIndex=null}var $=getEvent(e);events.emit(isTouchEvent(e)?"touchStart":"dragStart",info(e));if(!isTouchEvent(e)&&["img","a"].indexOf(getLowerCaseNodeName(getTarget(e)))>=0){preventDefaultBehavior(e)}lastPosition.x=initPosition.x=$.clientX;lastPosition.y=initPosition.y=$.clientY;if(carousel){translateInit=parseFloat(container.style[transformAttr].replace(transformPrefix,""));resetDuration(container,"0s")}}function onPanMove(e){if(panStart){var $=getEvent(e);lastPosition.x=$.clientX;lastPosition.y=$.clientY;if(carousel){if(!rafIndex){rafIndex=raf(function(){panUpdate(e)})}}else{if(moveDirectionExpected==="?"){moveDirectionExpected=getMoveDirectionExpected()}if(moveDirectionExpected){preventScroll=true}}if(preventScroll){e.preventDefault()}}}function panUpdate(e){if(!moveDirectionExpected){panStart=false;return}caf(rafIndex);if(panStart){rafIndex=raf(function(){panUpdate(e)})}if(moveDirectionExpected==="?"){moveDirectionExpected=getMoveDirectionExpected()}if(moveDirectionExpected){if(!preventScroll&&isTouchEvent(e)){preventScroll=true}try{if(e.type){events.emit(isTouchEvent(e)?"touchMove":"dragMove",info(e))}}catch(err){}var x=translateInit,dist=getDist(lastPosition,initPosition);if(!horizontal||fixedWidth||autoWidth){x+=dist;x+="px"}else{var percentageX=TRANSFORM?dist*items*100/((viewport+gutter)*slideCountNew):dist*100/(viewport+gutter);x+=percentageX;x+="%"}container.style[transformAttr]=transformPrefix+x+transformPostfix}}function onPanEnd(e){if(panStart){if(rafIndex){caf(rafIndex);rafIndex=null}if(carousel){resetDuration(container,"")}panStart=false;var $=getEvent(e);lastPosition.x=$.clientX;lastPosition.y=$.clientY;var dist=getDist(lastPosition,initPosition);if(Math.abs(dist)){if(!isTouchEvent(e)){var target=getTarget(e);addEvents(target,{"click":function preventClick(e){preventDefaultBehavior(e);removeEvents(target,{"click":preventClick})}})}if(carousel){rafIndex=raf(function(){if(horizontal&&!autoWidth){var indexMoved=-dist*items/(viewport+gutter);indexMoved=dist>0?Math.floor(indexMoved):Math.ceil(indexMoved);index+=indexMoved}else{var moved=-(translateInit+dist);if(moved<=0){index=indexMin}else if(moved>=slidePositions[slideCountNew-1]){index=indexMax}else{var i=0;while(i=slidePositions[i]){index=i;if(moved>slidePositions[i]&&dist<0){index+=1}i++}}}render(e,dist);events.emit(isTouchEvent(e)?"touchEnd":"dragEnd",info(e))})}else{if(moveDirectionExpected){onControlsClick(e,dist>0?-1:1)}}}}if(options.preventScrollOnTouch==="auto"){preventScroll=false}if(swipeAngle){moveDirectionExpected="?"}if(autoplay&&!animating){setAutoplayTimer()}}function updateContentWrapperHeight(){var wp=middleWrapper?middleWrapper:innerWrapper;wp.style.height=slidePositions[index+items]-slidePositions[index]+"px"}function getPages(){var rough=fixedWidth?(fixedWidth+gutter)*slideCount/viewport:slideCount/items;return Math.min(Math.ceil(rough),slideCount)}function updateNavVisibility(){if(!nav||navAsThumbnails){return}if(pages!==pagesCached){var min=pagesCached,max=pages,fn=showElement;if(pagesCached>pages){min=pages;max=pagesCached;fn=hideElement}while(minSaved!

(undo)";this.contentElement.parentNode.insertBefore(newEl,this.contentElement);DN.event.bind(DN.get(".remove-content",this.contentElement.parentNode),"click",DN.saveContentHandler.clickHandler)}}DN.saveContentHandler.afterSave.fire(this.contentElement)}var newText;var savedCountElements=DN.getAll(".saved-count");for(var x=0;x0){DN.removeClass(savedCountLinkElements[x],"saved-count-link-hidden")}else{DN.addClass(savedCountLinkElements[x],"saved-count-link-hidden")}}var savedCount=DN.get("header-saved-count");if(savedCount){var savedCountText=data["saved_count_fmt"];if(data["saved_count"]>9){savedCountText="9+"}if(parseInt(data["saved_count"],0)===0){DN.swapClass(savedCount,"heart-number-saved","heart-number-unsaved");DN.swapClass(savedCount,"heart-number-saved-shift","heart-number-unsaved")}else{DN.swapClass(savedCount,"heart-number-unsaved","heart-number-saved");if(data["saved_count"]>9){data["saved_count"]="9+";DN.swapClass(savedCount,"heart-number-unsaved","heart-number-saved-shift");DN.swapClass(savedCount,"heart-number-saved","heart-number-saved-shift")}else{DN.swapClass(savedCount,"heart-number-unsaved","heart-number-saved");DN.swapClass(savedCount,"heart-number-saved-shift","heart-number-saved")}}savedCount.innerHTML=savedCountText}var savedTabBar=DN.get("saved-tab-bar");if(savedTabBar){selTab=DN.get(".sel .txt",savedTabBar,true);if(selTab){newText=selTab.innerHTML.substr(0,selTab.innerHTML.indexOf("(")+1)+data["saved_count_fmt"]+")";selTab.innerHTML=newText}}}else{if(data["not_logged_in"]){DN.loginForm.show.call(this.contentElement)}else{if(!data["error"]||data["error"]===""){data["error"]="An unknown error occured"}this.showError(data["error"])}}}else{this.showError("An unknown error occurred")}};this.showError=function(error){alert(error)}};if(!DN.saveContentHandler){DN.saveContentHandler={objCache:{},afterSave:new DN.customEvent({passArgs:true}),afterUnsave:new DN.customEvent({passArgs:true}),afterChange:new DN.customEvent({passArgs:true}),addListeners:function(){var links=DN.getAll(".save-content");for(n=0;ndocument.documentElement.scrollTop+document.documentElement.clientHeight){block="end"}if(block){card.scrollIntoView({behavior:"smooth",block:block})}};this.card.classList.add("expanded");this.media.classList.add("details");this.card.setAttribute("aria-expanded","true");this.setStyle(this.expandButton,"display","none");this.setStyle(this.collapseButton,"display","inline-block");if(this.cta&&this.ctaDisabled){this.cta.removeAttribute("disabled")}window.setTimeout(scrollIntoView,100)}},{key:"setStyle",value:function setStyle(elem,style,value){if(elem){elem.style[style]=value}}},{key:"loadDetails",value:function loadDetails(responseText){try{var response=JSON.parse(responseText)}catch(error){var response=null}if(response){DN.loadDNJson(this.detailsContainer,response);this.detailsLoaded=true;this.revealDetails()}}}]);return ContentCard}();scopeVar.ContentCard=ContentCard})(DN);DN.onDOMReady.bind(function(){DN.createObjects("contentCards",".content-card",DN.ContentCard)}); /* get_code */ DN.getCode=function(el){this.handleClick=function(e){var href=this.el.getAttribute("data-href");if(!href){href=this.el.getAttribute("href")}var permalink=this.el.getAttribute("data-permalink");if(permalink&&href){DN.preventDefault(e);window.open(permalink);window.location.href=href}};this.el=el;DN.event.bind(el,"click",this.handleClick,this)};DN.onDOMReady.bind(function(){DN.createObjects("getCodeObjects",".get-code",DN.getCode,false)}); /* views */ DN.contentViewTracker=function(){this.content={};this.viewed={};this.sent={};this.scrollTimer=null;this.sendTimer=null;this.init=function(){if(typeof publicationID=="undefined"||publicationID===null||publicationID===0){return}var contentElements=DN.getAll(".article, .content-view");for(var x=0;xviewTop&&c.center=200){this.makeRequest(content);content={};count=0}}if(count>0){this.makeRequest(content);this.viewed={}}};this.makeRequest=function(content){var url=document.location.protocol+"//"+document.location.hostname+"/lw/views.php";var data={publicationID:publicationID,content:content};data=DN.addStdLogData(data);data=JSON.stringify(data);try{DN.xhr(url,null,data)}catch(e){}};this.init()};DN.onDOMReady.bind(function(){if(!DN.contentViewTrackerObject){DN.contentViewTrackerObject=new DN.contentViewTracker}else{DN.contentViewTrackerObject.init()}}); /* lightbox_pop */ function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i0){for(var i=0;i0){for(var h=0;h=this.step_timeout){clearInterval(this.interval);this.interval=null;this.activateStep(this.error_step_name)}}else{if(!DN.empty(this.interval)){clearInterval(this.interval);this.interval=null}for(var i in this.steps){if(i===step_name){DN.addClass(this.steps[i],"dnwizard-step-active");this.active_step=step_name;this.stepActivated.fire(step_name)}else{DN.removeClass(this.steps[i],"dnwizard-step-active")}}this.hideBar()}}},{key:"cancelStep",value:function cancelStep(deactivate_loadingbar){if(typeof deactivate_loadingbar==="undefined"){deactivate_loadingbar=true}if(!DN.empty(this.interval)){clearInterval(this.interval);this.interval=null}if(deactivate_loadingbar){this.hideBar()}}},{key:"showBar",value:function showBar(){this.initializeObject("loadingbar",this.loadingbar_id,DN.loadingBars);if(this.loadingbar){this.loadingbar.show()}}},{key:"hideBar",value:function hideBar(){this.initializeObject("loadingbar",this.loadingbar_id,DN.loadingBars);if(this.loadingbar){this.loadingbar.hide()}}},{key:"initializeObject",value:function initializeObject(property_name,object_name,object_container){if(!this[property_name]){if(object_container&&typeof object_container==="object"){if(object_container.hasOwnProperty(object_name)){this[property_name]=object_container[object_name]}}}}},{key:"initialize",value:function initialize(){this.steps={};this.steps_status={};this.default_step=null;var step_name=null;var step_status=0;var step_default=0;var steps=DN.getAll(".dnwizard-step",this.elem);if(steps&&steps.length>0){for(var i=0;i=o.length)return{done:true};return{done:false,value:o[i++]}},e:function(e){throw e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var normalCompletion=true,didErr=false,err;return{s:function(){it=o[Symbol.iterator]()},n:function(){var step=it.next();normalCompletion=step.done;return step},e:function(e){didErr=true;err=e},f:function(){try{if(!normalCompletion&&it.return!=null)it.return()}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i0){for(var x=0;x0){for(var i=0;i0){for(var j=0;j0){for(var x=0;x0){for(var x=0;x0){for(var y=0;y0){for(var j=0;j0){var step_index=0;if(step||this.wizard.active_step){if(step){step_index=steps.indexOf(step)}else if(this.wizard.active_step){step_index=steps.indexOf(this.wizard.active_step)}if(step_index>=0){step_index++}}if(step_index>=0&&steps[step_index]){next_step=steps[step_index]}else{next_step=false}}if(!DN.hasOwnProperty("onboardpreferences")||!DN.onboardpreferences){if(next_step==="entry"||next_step==="preferences"||next_step==="success"){next_step=this.getNextStep(next_step)}}else if(userLoggedIn&&(next_step==="entry"||next_step==="account")){next_step=this.getNextStep(next_step)}else if(userHasPref&&(next_step==="preferences"||next_step==="success")){if(next_step==="preferences"||!this.pref_changed){next_step=this.getNextStep(next_step)}}else if(!userHasPref&&next_step==="success"){next_step=this.getNextStep(next_step)}if(next_step==="entry"||next_step==="success"){var cookie_name=this.entry_cookie_name;if(next_step==="success"){cookie_name=this.success_cookie_name}var cookie=DN.getCookie(cookie_name);if(!DN.empty(cookie)){next_step=this.getNextStep(next_step)}}return next_step}}]);return Onboard}();scopeVar.Onboard=new Onboard})(DN); /* modal/onboard-login */ DN.loginForm={show:function(e){if(DN.hasOwnProperty("Onboard")){if(typeof e!=="object"){if(typeof this==="object"&&this instanceof HTMLElement){e={currentTarget:this}}}DN.Onboard.toggle(e)}}}; /* widgets/newsletter */ DN.NewsletterSignup=function(baseElement){this.baseElement=DN.get(baseElement);if(baseElement.tagName=="FORM"){this.element=this.baseElement}else{this.element=DN.get("form",this.baseElement)}this.onSuccess=new DN.customEvent({passArgs:true});this.onFailure=new DN.customEvent;this.onSubmit=new DN.customEvent;this.shown=false;this.scrollTimer=null;this.source="";this.source_type="";this.lastResponse={};this.campaignCheckbox=false;this.closeEl=false;this.closeCookieName=false;this.baseURL=document.location.protocol+"//"+document.location.hostname+"/async/newsletter/signup/";this.data={};this.submitForm=function(responseText){if(responseText){var data=JSON.parse(responseText);if(data["post_auth"]){var queryData="";for(var i in this.data){if(queryData.length>0){queryData+="&"}queryData+=i+"=";if(i=="campaign"){queryData+=this.data[i].join(",")}else{queryData+=encodeURIComponent(this.data[i])}}queryData+="&post_auth="+encodeURIComponent(data["post_auth"]);var buttons=DN.getAll(".button, input[type=submit]",this.element);if(buttons){for(var x=0;xdocument.body.scrollTop){viewTop=document.documentElement.scrollTop}else{viewTop=document.body.scrollTop}if(document.documentElement&&document.documentElement.clientHeight>document.body.clientHeight){viewBottom=viewTop+document.body.clientHeight}else{viewBottom=viewTop+document.documentElement.clientHeight}var center=region.top+region.height/2;if(center>viewTop&¢er


Share post on

Coupon

Air Wick Scented Oil Warmer 2 Pack ONLY $2.09 at Target! in September 2022

I am a huge air freshener fan, especially Air Wick products. Right now you...

By Alfred Keen
Coupon

Hydro Flask 12-oz. Cooler Cup for $12 in September 2022

Use coupon code "LEAFPILE" for the best price we could find by $6. Buy...

By Alfred Keen
Coupon

KN95 Face Masks 25-Pack for $3.79 in September 2022

Head over to Amazon where you will find these KN95 Face Masks 25-Pack on...

By Alfred Keen
Coupon

Deuter Vista Spot Pack for $22 in September 2022

Coupon code "LEAFPILE" cuts it to $38 off list price. Buy Now at Moosejaw...

By Alfred Keen
Coupon

Amazons Best Subscription Boxes for Valentines Day! in September 2022

Amazons Best Subscription...

By Alfred Keen
Coupon

Puma Women’s Shoes $24.99 in September 2022

Through September 23rd, score Puma Ella Lace Up Shoes for a great price at...

By Alfred Keen
Coupon

Whitmor Over the Door Shoe Shelves Huge Price Drop on Amazon! in September 2022

Whitmor Over the...

By Alfred Keen
Coupon

Ninja Pro Blender $31! in September 2022

Stop by Bed Bath & Beyond for a great deal on this Nutri Ninja...

By Alfred Keen

Latest Posts

Coupon

Air Wick Scented Oil Warmer 2 Pack ONLY $2.09 at Target! in September 2022

I am a huge air freshener fan, especially Air Wick products. Right now you...

By Alfred Keen
Coupon

Hydro Flask 12-oz. Cooler Cup for $12 in September 2022

Use coupon code "LEAFPILE" for the best price we could find by $6. Buy...

By Alfred Keen
Coupon

Puma Women’s Shoes $24.99 in September 2022

Through September 23rd, score Puma Ella Lace Up Shoes for a great price at...

By Alfred Keen
Coupon

Amazons Best Subscription Boxes for Valentines Day! in September 2022

Amazons Best Subscription...

By Alfred Keen
Coupon

Deuter Vista Spot Pack for $22 in September 2022

Coupon code "LEAFPILE" cuts it to $38 off list price. Buy Now at Moosejaw...

By Alfred Keen
Coupon

KN95 Face Masks 25-Pack for $3.79 in September 2022

Head over to Amazon where you will find these KN95 Face Masks 25-Pack on...

By Alfred Keen
Coupon

Children’s Place Puffer Jacket $19.99 Shipped in September 2022

Head over to The Children’s Place where they are having a sale on Kids Puffer Jackets!...

By Alfred Keen
Coupon

Hisense 43-Inch Smart Android TV with Voice Remote PRICE DROP at Amazon! in September 2022

Amazon has this...

By Alfred Keen