PageSourceSearch

https://www.haiku-futon.com/wp-content/plugins/tm-woocommerce-pack…/jquery.rd-material-tabs.min.js?ver=1.0.2

js haiku-futon.com collected 2026-09-25 10:52:06 UTC 13,339 bytes, 1 lines download raw bytes

1(function(){!function(t,e,s){var n,i,o,a;o=-1!==navigator.appVersion.indexOf("MSIE"),i=o?parseInt(navigator.appVersion.split("MSIE")[1]):null,a="ontouchstart"in s,n=function(){function n(n,i){this.options=t.extend(!0,{},this.Defaults,i),this.$element=t(n),this.$list=this.$element.find(".rd-material-tabs__list"),this.$content=this.$element.find(".rd-material-tabs__container"),this.$win=t(s),this.$doc=t(e),this.activeIndex=0,this.settings={stageClass:"rd-material-tabs__stage",stageOuterClass:"rd-material-tabs__stage-outer",itemClass:"rd-material-tab"},this.state={isTouched:!1,isDragged:!1,isSwiping:!1},this.touches={prevX:null,list:!1},this.initialize()}return n.prototype.Defaults={itemSelector:"div",margin:20,marginContent:0,items:3,touchRatio:1,speed:500,easing:"cubic-bezier(0.005, 0.300, 0.200, 1.000)",stagePadding:0,dragContent:!0,dragList:!0,responsive:null,callbacks:{onDragStart:!1,onDragEnd:!1,onChangeStart:!1,onChangeEnd:!1,onBeforeInit:!1,onInit:!1}},n.prototype.initialize=function(){var t;(t=this).options.callbacks.onBeforeInit&&t.options.callbacks.onBeforeInit.call(this,t),t.setVendor(t),t.createDOM(t),t.initHandlers(t),a||t.canMoveCursor(),t.setWidth(t,!0),t.setWidth(t,!1),t.moveTo(t.activeIndex),t.options.callbacks.onInit&&t.options.callbacks.onInit.call(this,t)},n.prototype.createDOM=function(e){var s;return e.$content.find(">"+e.options.itemSelector).addClass(e.settings.itemClass),s=e.transform(e,0),e.$content.wrapInner(t("<div/>",{class:e.settings.stageClass,style:e.vendorName+"transform:"+s[e.vendorName+"transform"]})).wrapInner(t("<div/>",{class:e.settings.stageOuterClass})),e.$list.find("li").addClass(e.settings.itemClass),e.$list.wrapInner(t("<div/>",{class:e.settings.stageClass,style:e.vendorName+"transform:"+s[e.vendorName+"transform"]})).wrapInner(t("<div/>",{class:e.settings.stageOuterClass}))},n.prototype.setWidth=function(e,s){var n,i,o,a,r,c,l;if(s?(i=(c=e.$list.find("."+e.settings.stageClass)).find("."+e.settings.itemClass),(r=e.getOption("stagePadding"))>0&&e.getOption("dragList")&&c.css({"padding-left":r,"padding-right":r}),l=e.getWidth(e,e.$list.find("."+e.settings.stageOuterClass)),a=e.getOption("margin"),o=(l-e.getOption("items")*a)/e.getOption("items"),itemsWidth=0,i&&i.length&&(i.each(function(){itemsWidth+=t(this).outerWidth()+a}),i.css({"margin-right":e.px(a)})),c[0].style.width=e.px(itemsWidth+r)):(i=(c=e.$content.find("."+e.settings.stageClass)).find("."+e.settings.itemClass),r=0,o=e.getWidth(e,e.$content.find("."+e.settings.stageOuterClass)),a=e.getOption("marginContent"),n=0,i&&i.length&&(i.css({width:e.px(o),"margin-right":e.px(a)}),n=i.length),c[0].style.width=e.px((o+a)*n+a+r)),s&&!e.getOption("dragList"))return e.setListTranslate(e,0),c.css({"padding-left":0,"padding-right":0,width:"auto"}),void(i&&i.length&&i.removeAttr("style"))},n.prototype.resize=function(t){return t.setWidth(t,!0),t.setWidth(t,!1),setTimeout(function(){return t.moveTo(t.activeIndex)},300)},n.prototype.initHandlers=function(e){e.$win.on("resize",t.proxy(e.resize,this,e)),a?e.$element.on("touchstart.rd.mt",t.proxy(e.onTouchStart,this,e)):(e.$element.on("mousedown.rd.mt",t.proxy(e.onTouchStart,this,e)),e.$element.on("mouseleave.rd.mt",t.proxy(e.onTouchEnd,this,e)))},n.prototype.onTouchEnd=function(e,s){var n,i,o,r,c;if(e.state.isTouched){if(e.$doc.off(".rd.mt"),e.changing=!1,s.originalEvent&&(s=s.originalEvent),e.state.isTrigerred=!1,e.state.isDragged){if(a||e.$element.removeClass("rd-material-tabs-grab"),t(e.touches.targetEl).one("click.rd.mt",function(){return!1}),e.touches.endTime=Date.now(),c=e.touches.endTime-e.touches.startTime,e.touches.prevX=null,e.state.isDragged=!1,e.touches.list&&e.getOption("dragList"))r=e.state.isSwiping?c>20?e.touches.diff/(c/200):e.touches.diff:c>100?e.touches.diff/(c/1e3):e.touches.diff*(c/15),e.touches.velocity=0,e.touches.velocity=r/(c/50)*e.getOption("touchRatio"),0!==e.touches.velocity&&(e.setListTransition(e,e.options.speed),(o=e.getListTranslate(e)+e.touches.velocity)>0?o=0:o<e.getMaxTranslate(e,e.$list)&&(o=e.getMaxTranslate(e,e.$list)),e.setListTranslate(e,o));else if(!e.touches.list&&e.getOption("dragContent")){if(e.setContentTransition(e,e.options.speed),e.setListTransition(e,e.options.speed),"left"===e.touches.direction&&0===e.activeIndex||"right"===e.touches.direction&&e.activeIndex===e.$content.find("."+e.settings.itemClass).length-1)return void e.moveTo(e.activeIndex);i=e.activeIndex,e.state.isSwiping?"left"===e.touches.direction?i=e.activeIndex-1:"right"===e.touches.direction&&(i=e.activeIndex+1):Math.abs(e.touches.diff)>e.getContentItemWidth(e)/3&&("left"===e.touches.direction?i=e.activeIndex-1:"right"===e.touches.direction&&(i=e.activeIndex+1)),e.moveTo(i)}}else e.state.isDragged||e.touches.list&&(n=t(s.target),("A"===s.target.tagName||n.parents("."+e.settings.itemClass+" a").length)&&(e.setContentTransition(e,e.options.speed),e.setListTransition(e,e.options.speed),i=n.parents("."+e.settings.itemClass).index(),e.moveTo(i)));e.state.isTouched=!1,e.options.callbacks.onDragEnd&&e.options.callbacks.onDragEnd.call(this,e)}},n.prototype.onDrag=function(t,e){var s,n,i,o,r;if(t.state.isTouched){if(e.originalEvent&&(e=e.originalEvent),t.touches.currentX="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,t.touches.currentY="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,null===t.touches.prevX&&(t.touches.prevX=t.touches.currentX),i=t.touches.diff=t.touches.currentX-t.touches.startX,0!==(i*=t.getOption("touchRatio"))&&!t.state.isTrigerred){if(s=t.touches.startX-t.touches.currentX,n=t.touches.startY-t.touches.currentY,Math.abs(s)<Math.abs(n))return void t.onTouchEnd(t,e);e.preventDefault(),!a&&(t.touches.list&&t.getOption("dragList")||!t.touches.list&&t.getOption("dragContent"))&&t.$element.addClass("rd-material-tabs-grab"),Math.abs(i)>0&&(t.state.isDragged=!0),t.state.isTrigerred=!0}
1t.touches.direction=i>0?"left":"right",t.touches.currentTranslate=i+t.touches.startTranslate,t.touches.prevDirection!==t.touches.direction&&(t.touches.startTime=Date.now()),t.touches.endTime=Date.now(),r=t.touches.endTime-t.touches.startTime,o=t.touches.list?8:4,Math.abs(t.touches.currentX-t.touches.prevX)>o||r<100&&Math.abs(t.touches.currentX-t.touches.prevX)>2?t.state.isSwiping=!0:t.state.isSwiping=!1,t.touches.prevX=t.touches.currentX,t.touches.prevDirection=t.touches.direction,t.touches.list&&t.getOption("dragList")?t.setListTranslate(t,t.touches.currentTranslate):!t.touches.list&&t.getOption("dragContent")&&t.setContentTranslate(t,t.touches.currentTranslate)}},n.prototype.onTouchStart=function(e,s){var n,i;s.originalEvent&&(s=s.originalEvent),(1===s.which||a)&&(e.state.isTouched=!0,(n=e.$element.find("[onclick]")).length&&n.removeAttr("onclick"),i=t(s.target),e.touches.list=e.$list.find(i).length>0,e.touches.list&&e.$list.find("a").on("click.rd.mt touchstart.rd.mt",function(t){return t.preventDefault()}),e.touches.startX=e.touches.currentX="touchstart"===s.type?s.targetTouches[0].pageX:s.pageX,e.touches.startY=e.touches.currentY="touchstart"===s.type?s.targetTouches[0].pageY:s.pageY,e.touches.startTime=new Date,e.touches.targetEl=s.target||s.srcElement,a||"IMG"!==e.touches.targetEl.tagName&&"A"!==e.touches.targetEl.tagName||s.preventDefault(),e.$doc.on("mouseup.rd.mt touchend.rd.mt touchcancel.rd.mt",t.proxy(e.onTouchEnd,this,e)),e.$doc.one("mousemove.rd.mt touchmove.rd.mt",t.proxy(function(s){var n,i;if(e.options.callbacks.onDragStart&&e.options.callbacks.onDragStart.call(this,e),s.originalEvent&&(s=s.originalEvent),e.touches.currentX="touchmove"===s.type?s.targetTouches[0].pageX:s.pageX,e.touches.currentY="touchmove"===s.type?s.targetTouches[0].pageY:s.pageY,n=e.touches.startX-e.touches.currentX,i=e.touches.startY-e.touches.currentY,!(Math.abs(n)<Math.abs(i)))return s.preventDefault(),e.touches.list?(e.touches.startTranslate=e.getListTranslate(e),e.setListTransition(e,0)):(e.touches.startTranslate=e.getContentTranslate(e),e.setContentTransition(e,0)),e.$doc.on("mousemove.rd.mt touchmove.rd.mt",t.proxy(e.onDrag,this,e)),0===n?(e.state.isTrigerred=!1,void e.$doc.trigger("mousemove.rd.mt touchmove.rd.mt")):(Math.abs(n)>1&&(e.state.isDragged=!0),!a&&(e.touches.list&&e.getOption("dragList")||!e.touches.list&&e.getOption("dragContent"))&&e.$element.addClass("rd-material-tabs-grab"),this);e.onTouchEnd(e,s)})))},n.prototype.getWidth=function(t,e){return e.outerWidth()},n.prototype.getContentItemWidth=function(t){return t.getWidth(t,t.$content.find("."+t.settings.itemClass))},n.prototype.getListItemWidth=function(t){return t.getWidth(t,t.$list.find("."+t.settings.itemClass))},n.prototype.moveListTo=function(e,s){var n;n=0,stage=e.$list.find("."+e.settings.stageClass),item=stage.find("."+e.settings.itemClass),item&&item.length&&item.each(function(i){i<s&&(n-=t(this).outerWidth()+e.getOption("margin"))}),n<e.getMaxTranslate(e,e.$list)&&(n=e.getMaxTranslate(e,e.$list)),e.setListTranslate(e,n)},n.prototype.moveTo=function(t){var e;t!==this.activeIndex&&this.options.callbacks.onChangeStart&&this.options.callbacks.onChangeStart.call(this),e=-(this.getContentItemWidth(this)*t+this.getOption("marginContent")*t),this.setContentTranslate(this,e),this.getOption("dragList")&&this.moveListTo(this,t),this.updateActive(this,t)},n.prototype.canMoveCursor=function(){var t;(t=this).$list.on("mouseenter",function(){t.getOption("dragList")?t.$element.addClass("rd-material-tabs-canMove"):t.$element.removeClass("rd-material-tabs-canMove")}),t.$list.on("mouseleave",function(){t.$element.removeClass("rd-material-tabs-canMove")}),t.$content.on("mouseenter",function(){t.getOption("dragContent")?t.$element.addClass("rd-material-tabs-canMove"):t.$element.removeClass("rd-material-tabs-canMove")}),t.$content.on("mouseleave",function(){t.$element.removeClass("rd-material-tabs-canMove")})},n.prototype.px=function(t){return t+"px"},n.prototype.transform=function(t,e){var s;return s={},o&&i<10||!1===t.isPerspective()?s[t.vendorName+"transform"]="translate("+t.px(e)+", 0)":s[t.vendorName+"transform"]="translate3d("+t.px(e)+", 0, 0
1)",s},n.prototype.updateActive=function(t,e){var s,n;s=t.getContentItemWidth(t),n=t.getContentTranslate(t),null===e&&(e=t.activeIndex=Math.round(Math.abs(n/s))),t.$element.find("."+t.settings.itemClass+"-active").removeClass(t.settings.itemClass+"-active"),t.$list.find("."+t.settings.itemClass).eq(e).addClass(t.settings.itemClass+"-active"),t.$content.find("."+t.settings.itemClass).eq(e).addClass(t.settings.itemClass+"-active"),e!==t.activeIndex&&(t.activeIndex=e,t.options.callbacks.onChangeEnd&&t.options.callbacks.onChangeEnd.call(this,t))},n.prototype.getActiveIndex=function(t){return t.$content.find("."+t.settings.itemClass+"-active").index()},n.prototype.getTranslate=function(t,e){var s,n,i;return n=e.css(t.vendorName+"transform"),s=n.replace(/[^0-9\-.,]/g,"").split(","),i=s[12]||s[4],s[13]||s[5],parseInt(i)},n.prototype.getListTranslate=function(t){return t.getTranslate(t,t.$list.find("."+t.settings.stageClass))},n.prototype.getContentTranslate=function(t){return t.getTranslate(t,t.$content.find("."+t.settings.stageClass))},n.prototype.setTransition=function(e,s,n){t(s).css(e.vendorName+"transition",n/1e3+"s all "+e.options.easing)},n.prototype.setListTransition=function(t,e){t.setTransition(t,t.$list.find("."+t.settings.stageClass),e)},n.prototype.setContentTransition=function(t,e){t.setTransition(t,t.$content.find("."+t.settings.stageClass),e)},n.prototype.setTranslate=function(t,e,s){var n;n=t.transform(t,s),e.css(t.vendorName+"transform",n[t.vendorName+"transform"])},n.prototype.setListTranslate=function(t,e){t.setTranslate(t,t.$list.find("."+t.settings.stageClass),e)},n.prototype.setContentTranslate=function(t,e){t.setTranslate(t,t.$content.find("."+t.settings.stageClass),e)},n.prototype.getMaxTranslate=function(t,e){return t.getWidth(t,e.find("."+t.settings.stageOuterClass))-t.getWidth(t,e.find("."+t.settings.stageClass))},n.prototype.setVendor=function(){var t;t=this.isTransform(),this.vendorName=t.replace(/Transform/i,""),this.vendorName=""!==this.vendorName?"-"+this.vendorName.toLowerCase()+"-":""},n.prototype.isStyleSupported=function(t){var s,n,i,o;s=e.createElement("div"),n=t;for(i in n)if(o=n[i],void 0!==s.style[o])return s=null,[o,i];return!1},n.prototype.isPerspective=function(){return this.isStyleSupported(["perspective","webkitPerspective","MozPerspective","OPerspective","MsPerspective"])[0]},n.prototype.isTransform=function(){return this.isStyleSupported(["transform","WebkitTransform","MozTransform","OTransform","msTransform"])[0]},n.prototype.getOption=function(t){var e,s;if(null!==this.options.responsive){for(e in this.options.responsive)e<=this.$win.width()&&(s=e);return null!==this.options.responsive[s][t]?this.options.responsive[s][t]:this.options[t]}return this.options[t]},n}(),t.fn.extend({RDMaterialTabs:function(e){return this.each(function(){var s;if(!(s=t(this)).data("RDMaterialTabs"))return s.data("RDMaterialTabs",new n(this,e))})}}),s.RDMaterialTabs=n}(window.jQuery,document,window),"undefined"!=typeof module&&null!==module?module.exports=window.RDMaterialTabs:"function"==typeof define&&define.amd&&define(["jquery"],function(){"use strict";return window.RDMaterialTabs})}).call(this),jQuery(window).load(function(){var t=jQuery(".rd-material-tabs");t.RDMaterialTabs({marginContent:t.data("margin"),margin:t.data("margin")})});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.