%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/tradesc/www/relax/wp-content/plugins/theplus_elementor_addon/assets/js/extra/
Upload File :
Create Path :
Current File : /home/tradesc/www/relax/wp-content/plugins/theplus_elementor_addon/assets/js/extra/pagescroll2id.js

/*Page scroll(1.5.8)*/
!function(M,b,s){var a,w,l,n,i,o,r,c,u,h,e,g,t="mPageScroll2id",y="mPS2id",f={scrollSpeed:1e3,autoScrollSpeed:!0,scrollEasing:"easeInOutQuint",scrollingEasing:"easeOutQuint",pageEndSmoothScroll:!0,layout:"vertical",offset:0,highlightSelector:!1,clickedClass:y+"-clicked",targetClass:y+"-target",highlightClass:y+"-highlight",forceSingleHighlight:!1,keepHighlightUntilNext:!1,highlightByNextTarget:!1,disablePluginBelow:!1,clickEvents:!0,appendHash:!1,onStart:function(){},onComplete:function(){},defaultSelector:!1,live:!0,liveSelector:!1},d=0,p={init:function(e){e=M.extend(!0,{},f,e);if(M(s).data(y,e),w=M(s).data(y),!this.selector){var t="__"+y;this.each(function(){var e=M(this);e.hasClass(t)||e.addClass(t)}),this.selector="."+t}w.liveSelector&&(this.selector+=","+w.liveSelector),a=a?a+","+this.selector:this.selector,w.defaultSelector&&("object"==typeof M(a)&&0!==M(a).length||(a=".m_PageScroll2id,a[rel~='m_PageScroll2id'],.page-scroll-to-id,a[rel~='page-scroll-to-id'],._ps2id")),w.clickEvents&&M(s).undelegate("."+y).delegate(a,"click."+y,function(e){if(_._isDisabled.call(null))_._removeClasses.call(null);else{var t=M(this),a=t.attr("href"),l=t.prop("href");a&&-1!==a.indexOf("#/")||(_._reset.call(null),h=t.data("ps2id-offset")||0,_._isValid.call(null,a,l)&&_._findTarget.call(null,a)&&(e.preventDefault(),n="selector",i=t,_._setClasses.call(null,!0),_._scrollTo.call(null)))}}),M(b).unbind("."+y).bind("scroll."+y+" resize."+y,function(){if(_._isDisabled.call(null))_._removeClasses.call(null);else{var n=M("._"+y+"-t");n.each(function(e){var t=M(this),a=t.attr("id"),l=_._findHighlight.call(null,a);_._setClasses.call(null,!1,t,l),e==n.length-1&&_._extendClasses.call(null)})}}),l=!0,_._setup.call(null),_._live.call(null)},scrollTo:function(e,t){if(_._isDisabled.call(null))_._removeClasses.call(null);else if(e&&void 0!==e){_._isInit.call(null);var a={layout:w.layout,offset:w.offset,clicked:!1};t=M.extend(!0,{},a,t);_._reset.call(null),c=t.layout,u=t.offset,e=-1!==e.indexOf("#")?e:"#"+e,_._isValid.call(null,e)&&_._findTarget.call(null,e)&&(n="scrollTo",(i=t.clicked)&&_._setClasses.call(null,!0),_._scrollTo.call(null))}},destroy:function(){M(b).unbind("."+y),M(s).undelegate("."+y).removeData(y),M("._"+y+"-t").removeData(y),_._removeClasses.call(null,!0)}},_={_isDisabled:function(){var e=b,t="inner",a=w.disablePluginBelow instanceof Array?[w.disablePluginBelow[0]||0,w.disablePluginBelow[1]||0]:[w.disablePluginBelow||0,0];return"innerWidth"in b||(t="client",e=s.documentElement||s.body),e[t+"Width"]<=a[0]||e[t+"Height"]<=a[1]},_isValid:function(e,t){if(e){var a=-1!==(t=t||e).indexOf("#/")?t.split("#/")[0]:t.split("#")[0],l=b.location.toString().split("#")[0];return"#"!==e&&-1!==e.indexOf("#")&&(""===a||decodeURIComponent(a)===decodeURIComponent(l))}},_setup:function(){var i=_._highlightSelector(),o=1,r=0;return M(i).each(function(){var e=M(this),t=e.attr("href"),a=e.prop("href");if(_._isValid.call(null,t,a)){var l=-1!==t.indexOf("#/")?t.split("#/")[1]:t.split("#")[1],n=M("#"+l);if(0<n.length){w.highlightByNextTarget&&n!==r&&(r?r.data(y,{tn:n}):n.data(y,{tn:"0"}),r=n),n.hasClass("_"+y+"-t")||n.addClass("_"+y+"-t"),n.data(y,{i:o}),e.hasClass("_"+y+"-h")||e.addClass("_"+y+"-h");var s=_._findHighlight.call(null,l);_._setClasses.call(null,!1,n,s),d=o,++o==M(i).length&&_._extendClasses.call(null)}}})},_highlightSelector:function(){return w.highlightSelector&&""!==w.highlightSelector?w.highlightSelector:a},_findTarget:function(e){var t=-1!==e.indexOf("#/")?e.split("#/")[1]:e.split("#")[1],a=M("#"+t);if(a.length<1||"fixed"===a.css("position")){if("top"!==t)return;a=M("body")}return o=a,c||(c=w.layout),u=_._setOffset.call(null),(r=[(a.offset().top-u[0]).toString(),(a.offset().left-u[1]).toString()])[0]=r[0]<0?0:r[0],r[1]=r[1]<0?0:r[1],r},_setOffset:function(){var e,t,a,l;switch(u||(u=w.offset?w.offset:0),h&&(u=h),typeof u){case"object":case"string":0<(t=[(e=[u.y?u.y:u,u.x?u.x:u])[0]instanceof jQuery?e[0]:M(e[0]),e[1]instanceof jQuery?e[1]:M(e[1])])[0].length?(a=t[0].height(),"fixed"===t[0].css("position")&&(a+=t[0][0].offsetTop)):a=!isNaN(parseFloat(e[0]))&&isFinite(e[0])?parseInt(e[0]):0,0<t[1].length?(l=t[1].width(),"fixed"===t[1].css("position")&&(l+=t[1][0].offsetLeft)):l=!isNaN(parseFloat(e[1]))&&isFinite(e[1])?parseInt(e[1]):0;break;case"function":(e=u.call(null))instanceof Array?(a=e[0],l=e[1]):a=l=e;break;default:a=l=parseInt(u)}return[a,l]},_findHighlight:function(e){var t=b.location,a=t.toString().split("#")[0],l=t.pathname;return M("._"+y+"-h[href='#"+e+"'],._"+y+"-h[href='"+a+"#"+e+"'],._"+y+"-h[href='"+l+"#"+e+"'],._"+y+"-h[href='#/"+e+"'],._"+y+"-h[href='"+a+"#/"+e+"'],._"+y+"-h[href='"+l+"#/"+e+"']")},_setClasses:function(e,t,a){var l=w.clickedClass,n=w.targetClass,s=w.highlightClass;e&&l&&""!==l?(M("."+l).removeClass(l),i.addClass(l)):t&&n&&""!==n&&a&&s&&""!==s&&(_._currentTarget.call(null,t)?(t.addClass(n),a.addClass(s)):(!w.keepHighlightUntilNext||1<M("."+s).length)&&(t.removeClass(n),a.removeClass(s)))},_extendClasses:function(){var e=w.targetClass,t=w.highlightClass,a=M("."+e),l=M("."+t),n=e+"-first",s=e+"-last",i=t+"-first",o=t+"-last";M("._"+y+"-t").removeClass(n+" "+s),M("._"+y+"-h").removeClass(i+" "+o),w.forceSingleHighlight?w.keepHighlightUntilNext&&1<a.length?(a.slice(0,1).removeClass(e),l.slice(0,1).removeClass(t)):(a.slice(1).removeClass(e),l.slice(1).removeClass(t)):(a.slice(0,1).addClass(n).end().slice(-1).addClass(s),l.slice(0,1).addClass(i).end().slice(-1).addClass(o))},_removeClasses:function(e){M("."+w.clickedClass).removeClass(w.clickedClass),M("."+w.targetClass).removeClass(w.targetClass+" "+w.targetClass+"-first "+w.targetClass+"-last"),M("."+w.highlightClass).removeClass(w.highlightClass+" "+w.highlightClass+"-first "+w.highlightClass+"-last"),e&&(M("._"+y+"-t").removeClass("_"+y+"-t"),M("._"+y+"-h").removeClass("_"+y+"-h"))},_currentTarget:function(e){var t=w["target_"+e.data(y).i],a=e.data("ps2id-target"),l=a&&M(a)[0]?M(a)[0].getBoundingClientRect():e[0].getBoundingClientRect();if(void 0!==t){var n=e.offset().top,s=e.offset().left,i=t.from?t.from+n:n,o=t.to?t.to+n:n,r=t.fromX?t.fromX+s:s,c=t.toX?t.toX+s:s;return l.top>=o&&l.top<=i&&l.left>=c&&l.left<=r}var u=M(b).height(),h=M(b).width(),g=a?M(a).height():e.height(),f=a?M(a).width():e.width(),d=1+g/u,p=d,_=g<u?d*(u/g):d,C=1+f/h,v=C,m=f<h?C*(h/f):C,S=[l.top<=u/p,l.bottom>=u/_,l.left<=h/v,l.right>=h/m];if(w.highlightByNextTarget){var I=e.data(y).tn;if(I){var O=I[0].getBoundingClientRect();"vertical"===w.layout?S=[l.top<=u/2,O.top>u/2,1,1]:"horizontal"===w.layout&&(S=[1,1,l.left<=h/2,O.left>h/2])}}return S[0]&&S[1]&&S[2]&&S[3]},_scrollTo:function(){g=_._scrollSpeed.call(null),r=w.pageEndSmoothScroll?_._pageEndSmoothScroll.call(null):r;var e=M("html,body"),t=w.autoScrollSpeed?_._autoScrollSpeed.call(null):g,a=e.is(":animated")?w.scrollingEasing:w.scrollEasing,l=M(b).scrollTop(),n=M(b).scrollLeft();switch(c){case"horizontal":n!=r[1]&&(_._callbacks.call(null,"onStart"),e.stop().animate({scrollLeft:r[1]},t,a).promise().then(function(){_._callbacks.call(null,"onComplete")}));break;case"auto":if(l!=r[0]||n!=r[1])if(_._callbacks.call(null,"onStart"),navigator.userAgent.match(/(iPod|iPhone|iPad|Android)/)){var s;e.stop().animate({pageYOffset:r[0],pageXOffset:r[1]},{duration:t,easing:a,step:function(e,t){"pageXOffset"==t.prop?s=e:"pageYOffset"==t.prop&&b.scrollTo(s,e)}}).promise().then(function(){_._callbacks.call(null,"onComplete")})}else e.stop().animate({scrollTop:r[0],scrollLeft:r[1]},t,a).promise().then(function(){_._callbacks.call(null,"onComplete")});break;default:l!=r[0]&&(_._callbacks.call(null,"onStart"),e.stop().animate({scrollTop:r[0]},t,a).promise().then(function(){_._callbacks.call(null,"onComplete")}))}},_pageEndSmoothScroll:function(){var e=M(s).height(),t=M(s).width(),a=M(b).height(),l=M(b).width();return[e-r[0]<a?e-a:r[0],t-r[1]<l?t-l:r[1]]},_scrollSpeed:function(){var l=w.scrollSpeed;return i&&i.length&&i.add(i.parent()).each(function(){var e=M(this);if(e.attr("class")){var t=e.attr("class").split(" ");for(var a in t)if(String(t[a]).match(/^ps2id-speed-\d+$/)){l=t[a].split("ps2id-speed-")[1];break}}}),parseInt(l)},_autoScrollSpeed:function(){var e=M(b).scrollTop(),t=M(b).scrollLeft(),a=M(s).height(),l=M(s).width(),n=[g+g*Math.floor(Math.abs(r[0]-e)/a*100)/100,g+g*Math.floor(Math.abs(r[1]-t)/l*100)/100];return Math.max.apply(Math,n)},_callbacks:function(e){if(w)switch(this[y]={trigger:n,clicked:i,target:o,scrollTo:{y:r[0],x:r[1]}},e){case"onStart":if(w.appendHash&&b.history&&b.history.pushState&&i&&i.length){var t="#"+i.attr("href").split("#")[1];t!==b.location.hash&&history.pushState("","",t)}w.onStart.call(null,this[y]);break;case"onComplete":w.onComplete.call(null,this[y])}},_reset:function(){c=u=h=!1},_isInit:function(){l||p.init.apply(this)},_live:function(){e=setTimeout(function(){w.live?M(_._highlightSelector()).length!==d&&_._setup.call(null):e&&clearTimeout(e),_._live.call(null)},1e3)},_easing:function(){function t(e){var t=7.5625,a=2.75;return e<1/a?t*e*e:e<2/a?t*(e-=1.5/a)*e+.75:e<2.5/a?t*(e-=2.25/a)*e+.9375:t*(e-=2.625/a)*e+.984375}M.easing.easeInQuad=M.easing.easeInQuad||function(e){return e*e},M.easing.easeOutQuad=M.easing.easeOutQuad||function(e){return 1-(1-e)*(1-e)},M.easing.easeInOutQuad=M.easing.easeInOutQuad||function(e){return e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2},M.easing.easeInCubic=M.easing.easeInCubic||function(e){return e*e*e},M.easing.easeOutCubic=M.easing.easeOutCubic||function(e){return 1-Math.pow(1-e,3)},M.easing.easeInOutCubic=M.easing.easeInOutCubic||function(e){return e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2},M.easing.easeInQuart=M.easing.easeInQuart||function(e){return e*e*e*e},M.easing.easeOutQuart=M.easing.easeOutQuart||function(e){return 1-Math.pow(1-e,4)},M.easing.easeInOutQuart=M.easing.easeInOutQuart||function(e){return e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2},M.easing.easeInQuint=M.easing.easeInQuint||function(e){return e*e*e*e*e},M.easing.easeOutQuint=M.easing.easeOutQuint||function(e){return 1-Math.pow(1-e,5)},M.easing.easeInOutQuint=M.easing.easeInOutQuint||function(e){return e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2},M.easing.easeInExpo=M.easing.easeInExpo||function(e){return 0===e?0:Math.pow(2,10*e-10)},M.easing.easeOutExpo=M.easing.easeOutExpo||function(e){return 1===e?1:1-Math.pow(2,-10*e)},M.easing.easeInOutExpo=M.easing.easeInOutExpo||function(e){return 0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2},M.easing.easeInSine=M.easing.easeInSine||function(e){return 1-Math.cos(e*Math.PI/2)},M.easing.easeOutSine=M.easing.easeOutSine||function(e){return Math.sin(e*Math.PI/2)},M.easing.easeInOutSine=M.easing.easeInOutSine||function(e){return-(Math.cos(Math.PI*e)-1)/2},M.easing.easeInCirc=M.easing.easeInCirc||function(e){return 1-Math.sqrt(1-Math.pow(e,2))},M.easing.easeOutCirc=M.easing.easeOutCirc||function(e){return Math.sqrt(1-Math.pow(e-1,2))},M.easing.easeInOutCirc=M.easing.easeInOutCirc||function(e){return e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2},M.easing.easeInElastic=M.easing.easeInElastic||function(e){return 0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*(2*Math.PI/3))},M.easing.easeOutElastic=M.easing.easeOutElastic||function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*(2*Math.PI/3))+1},M.easing.easeInOutElastic=M.easing.easeInOutElastic||function(e){return 0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*(2*Math.PI/4.5))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*(2*Math.PI/4.5))/2+1},M.easing.easeInBack=M.easing.easeInBack||function(e){return 2.70158*e*e*e-1.70158*e*e},M.easing.easeOutBack=M.easing.easeOutBack||function(e){return 1+2.70158*Math.pow(e-1,3)+1.70158*Math.pow(e-1,2)},M.easing.easeInOutBack=M.easing.easeInOutBack||function(e){return e<.5?Math.pow(2*e,2)*(7.189819*e-2.5949095)/2:(Math.pow(2*e-2,2)*(3.5949095*(2*e-2)+2.5949095)+2)/2},M.easing.easeInBounce=M.easing.easeInBounce||function(e){return 1-t(1-e)},M.easing.easeOutBounce=M.easing.easeOutBounce||t,M.easing.easeInOutBounce=M.easing.easeInOutBounce||function(e){return e<.5?(1-t(1-2*e))/2:(1+t(2*e-1))/2}}};_._easing.call(),M.fn[t]=function(e){return p[e]?p[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void M.error("Method "+e+" does not exist"):p.init.apply(this,arguments)},M[t]=function(e){return p[e]?p[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void M.error("Method "+e+" does not exist"):p.init.apply(this,arguments)},M[t].defaults=f}(jQuery,window,document);

Zerion Mini Shell 1.0