Dashboard
PHP:
8.4.22
OS:
Linux
User:
provencez
/
/
home
/
provencez
/
www
/
wp-content
/
plugins
/
wptouch
/
themes
/
foundation
/
modules
/
slideout
📤 Upload
📝 New File
📁 New Folder
Close
Editing: slideout.min.js
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Slideout=t()}}(function(){return function s(r,a,u){function h(n,t){if(!a[n]){if(!r[n]){var e="function"==typeof require&&require;if(!t&&e)return e(n,!0);if(l)return l(n,!0);var o=new Error("Cannot find module '"+n+"'");throw o.code="MODULE_NOT_FOUND",o}var i=a[n]={exports:{}};r[n][0].call(i.exports,function(t){var e=r[n][1][t];return h(e||t)},i,i.exports,s,r,a,u)}return a[n].exports}for(var l="function"==typeof require&&require,t=0;t<u.length;t++)h(u[t]);return h}({1:[function(t,e,n){"use strict";var o,i,s,r=t("decouple"),a=t("emitter"),u=!1,h=window.document,l=h.documentElement,c=window.navigator.msPointerEnabled,p={start:c?"MSPointerDown":"touchstart",move:c?"MSPointerMove":"touchmove",end:c?"MSPointerUp":"touchend"},f=function(){var t=/^(Webkit|Khtml|Moz|ms|O)(?=[A-Z])/,e=h.getElementsByTagName("script")[0].style;for(var n in e)if(t.test(n))return"-"+n.match(t)[0].toLowerCase()+"-";return"WebkitOpacity"in e?"-webkit-":"KhtmlOpacity"in e?"-khtml-":""}();function d(t){t=t||{},this._startOffsetX=0,this._currentOffsetX=0,this._opening=!1,this._moved=!1,this._opened=!1,this._preventOpen=!1,this._touch=void 0===t.touch||t.touch&&!0,this.panel=t.panel,this.menu=t.menu,-1===this.panel.className.search("slideout-panel")&&(this.panel.className+=" slideout-panel"),-1===this.menu.className.search("slideout-menu")&&(this.menu.className+=" slideout-menu"),this._fx=t.fx||"ease",this._duration=parseInt(t.duration,10)||300,this._tolerance=parseInt(t.tolerance,10)||70,this._padding=this._translateTo=parseInt(t.padding,10)||256,this._orientation="right"===t.side?-1:1,this._translateTo*=this._orientation,this._touch&&this._initTouchEvents()}s=a,(i=d).prototype=function(t,e){for(var n in e)e[n]&&(t[n]=e[n]);return t}(i.prototype||{},s.prototype),d.prototype.open=function(){var t=this;return this.emit("beforeopen"),-1===l.className.search("slideout-open")&&(l.className+=" slideout-open"),this._setTransition(),this._translateXTo(this._translateTo),this._opened=!0,setTimeout(function(){t.panel.style.transition=t.panel.style["-webkit-transition"]="",t.emit("open")},this._duration+50),this},d.prototype.close=function(){var t=this;return(this.isOpen()||this._opening)&&(this.emit("beforeclose"),this._setTransition(),this._translateXTo(0),this._opened=!1,setTimeout(function(){l.className=l.className.replace(/ slideout-open/,""),t.panel.style.transition=t.panel.style["-webkit-transition"]=t.panel.style[f+"transform"]=t.panel.style.transform="",t.emit("close")},this._duration+50)),this},d.prototype.toggle=function(){return this.isOpen()?this.close():this.open()},d.prototype.isOpen=function(){return this._opened},d.prototype._translateXTo=function(t){return this._currentOffsetX=t,this.panel.style[f+"transform"]=this.panel.style.transform="translateX("+t+"px)",this},d.prototype._setTransition=function(){return this.panel.style[f+"transition"]=this.panel.style.transition=f+"transform "+this._duration+"ms "+this._fx,this},d.prototype._initTouchEvents=function(){var i=this;return this._onScrollFn=r(h,"scroll",function(){i._moved||(clearTimeout(o),u=!0,o=setTimeout(function(){u=!1},250))}),this._preventMove=function(t){i._moved&&t.preventDefault()},h.addEventListener(p.move,this._preventMove),this._resetTouchFn=function(t){void 0!==t.touches&&(i._moved=!1,i._opening=!1,i._startOffsetX=t.touches[0].pageX,i._preventOpen=!i._touch||!i.isOpen()&&0!==i.menu.clientWidth)},this.panel.addEventListener(p.start,this._resetTouchFn),this._onTouchCancelFn=function(){i._moved=!1,i._opening=!1},this.panel.addEventListener("touchcancel",this._onTouchCancelFn),this._onTouchEndFn=function(){i._moved&&(i.emit("translateend"),i._opening&&Math.abs(i._currentOffsetX)>i._tolerance?i.open():i.close()),i._moved=!1},this.panel.addEventListener(p.end,this._onTouchEndFn),this._onTouchMoveFn=function(t){if(!u&&!i._preventOpen&&void 0!==t.touches){var e=t.touches[0].clientX-i._startOffsetX,n=i._currentOffsetX=e;if(!(Math.abs(n)>i._padding)&&20<Math.abs(e)){i._opening=!0;var o=e*i._orientation;if(i._opened&&0<o||!i._opened&&o<0)return;i._moved||i.emit("translatestart"),o<=0&&(n=e+i._padding*i._orientation,i._opening=!1),i._moved||-1!==l.className.search("slideout-open")||(l.className+=" slideout-open"),i.panel.style[f+"transform"]=i.panel.style.transform="translateX("+n+"px)",i.emit("translate",n),i._moved=!0}}},this.panel.addEventListener(p.move,this._onTouchMoveFn),this},d.prototype.enableTouch=function(){return this._touch=!0,this},d.prototype.disableTouch=function(){return this._touch=!1,this},d.prototype.destroy=function(){return this.close(),h.removeEventListener(p.move,this._preventMove),this.panel.removeEventListener(p.start,this._resetTouchFn),this.panel.removeEventListener("touchcancel",this._onTouchCancelFn),this.panel.removeEventListener(p.end,this._onTouchEndFn),this.panel.removeEventListener(p.move,this._onTouchMoveFn),h.removeEventListener("scroll",this._onScrollFn),this.open=this.close=function(){},this},e.exports=d},{decouple:2,emitter:3}],2:[function(t,e,n){"use strict";var a=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)};e.exports=function(t,e,n){var o,i=!1;function s(t){o=t,i||(a(r),i=!0)}function r(){n.call(t,o),i=!1}return t.addEventListener(e,s,!1),s}},{}],3:[function(t,e,n){"use strict";n.__esModule=!0;var o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.prototype.on=function(t,e){return this._eventCollection=this._eventCollection||{},this._eventCollection[t]=this._eventCollection[t]||[],this._eventCollection[t].push(e),this},t.prototype.once=function(t,e){var n=this;function o(){n.off(t,o),e.apply(this,arguments)}return o.listener=e,this.on(t,o),this},t.prototype.off=function(t,n){var o=void 0;return this._eventCollection&&(o=this._eventCollection[t])&&(o.forEach(function(t,e){t!==n&&t.listener!==n||o.splice(e,1)}),0===o.length&&delete this._eventCollection[t]),this},t.prototype.emit=function(t){for(var e=this,n=arguments.length,o=Array(1<n?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];var s=void 0;return this._eventCollection&&(s=this._eventCollection[t])&&(s=s.slice(0),s.forEach(function(t){return t.apply(e,o)})),this},t}();n.default=o,e.exports=n.default},{}]},{},[1])(1)});
Save
Cancel