-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
2 lines (2 loc) · 33.7 KB
/
index.js
1
2
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("iscroll",[],e):"object"==typeof exports?exports.iscroll=e():t.iscroll=e()}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return t[i].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(38),r=i(o);e.default=r.default},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){t.exports=!n(9)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var i=n(11),o=n(30),r=n(25),s=Object.defineProperty;e.f=n(2)?Object.defineProperty:function(t,e,n){if(i(t),e=r(e,!0),i(n),o)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var i=n(57),o=n(16);t.exports=function(t){return i(o(t))}},function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e,n){var i=n(4),o=n(14);t.exports=n(2)?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var i=n(23)("wks"),o=n(15),r=n(1).Symbol,s="function"==typeof r,a=t.exports=function(t){return i[t]||(i[t]=s&&r[t]||(s?r:o)("Symbol."+t))};a.store=i},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var i=n(35),o=n(17);t.exports=Object.keys||function(t){return i(t,o)}},function(t,e,n){var i=n(13);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var i=n(1),o=n(6),r=n(54),s=n(7),a="prototype",u=function(t,e,n){var c,l,f,h=t&u.F,p=t&u.G,d=t&u.S,v=t&u.P,y=t&u.B,m=t&u.W,b=p?o:o[e]||(o[e]={}),g=b[a],x=p?i:d?i[e]:(i[e]||{})[a];p&&(n=e);for(c in n)l=!h&&x&&void 0!==x[c],l&&c in b||(f=l?x[c]:n[c],b[c]=p&&"function"!=typeof x[c]?n[c]:y&&l?r(f,i):m&&x[c]==f?function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e[a]=t[a],e}(f):v&&"function"==typeof f?r(Function.call,f):f,v&&((b.virtual||(b.virtual={}))[c]=f,t&u.R&&g&&!g[c]&&s(g,c,f)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){t.exports={}},function(t,e){t.exports=!0},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var i=n(4).f,o=n(3),r=n(8)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,r)&&i(t,r,{configurable:!0,value:e})}},function(t,e,n){var i=n(23)("keys"),o=n(15);t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e,n){var i=n(1),o="__core-js_shared__",r=i[o]||(i[o]={});t.exports=function(t){return r[t]||(r[t]={})}},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},function(t,e,n){var i=n(13);t.exports=function(t,e){if(!i(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!i(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!i(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!i(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var i=n(1),o=n(6),r=n(19),s=n(27),a=n(4).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=r?{}:i.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:s.f(t)})}},function(t,e,n){e.f=n(8)},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var i=n(13),o=n(1).document,r=i(o)&&i(o.createElement);t.exports=function(t){return r?o.createElement(t):{}}},function(t,e,n){t.exports=!n(2)&&!n(9)(function(){return 7!=Object.defineProperty(n(29)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";var i=n(19),o=n(12),r=n(36),s=n(7),a=n(3),u=n(18),c=n(59),l=n(21),f=n(66),h=n(8)("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",v="keys",y="values",m=function(){return this};t.exports=function(t,e,n,b,g,x,w){c(n,e,b);var T,S,_,E=function(t){if(!p&&t in M)return M[t];switch(t){case v:return function(){return new n(this,t)};case y:return function(){return new n(this,t)}}return function(){return new n(this,t)}},P=e+" Iterator",k=g==y,O=!1,M=t.prototype,j=M[h]||M[d]||g&&M[g],Y=j||E(g),X=g?k?E("entries"):Y:void 0,A="Array"==e?M.entries||j:j;if(A&&(_=f(A.call(new t)),_!==Object.prototype&&(l(_,P,!0),i||a(_,h)||s(_,h,m))),k&&j&&j.name!==y&&(O=!0,Y=function(){return j.call(this)}),i&&!w||!p&&!O&&M[h]||s(M,h,Y),u[e]=Y,u[P]=m,g)if(T={values:k?Y:E(y),keys:x?Y:E(v),entries:X},w)for(S in T)S in M||r(M,S,T[S]);else o(o.P+o.F*(p||O),e,T);return T}},function(t,e,n){var i=n(11),o=n(63),r=n(17),s=n(22)("IE_PROTO"),a=function(){},u="prototype",c=function(){var t,e=n(29)("iframe"),i=r.length,o="<",s=">";for(e.style.display="none",n(56).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+s+"document.F=Object"+o+"/script"+s),t.close(),c=t.F;i--;)delete c[u][r[i]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(a[u]=i(t),n=new a,a[u]=null,n[s]=t):n=c(),void 0===e?n:o(n,e)}},function(t,e,n){var i=n(35),o=n(17).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,o)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var i=n(3),o=n(5),r=n(53)(!1),s=n(22)("IE_PROTO");t.exports=function(t,e){var n,a=o(t),u=0,c=[];for(n in a)n!=s&&i(a,n)&&c.push(n);for(;e.length>u;)i(a,n=e[u++])&&(~r(c,n)||c.push(n));return c}},function(t,e,n){t.exports=n(7)},function(t,e,n){var i=n(16);t.exports=function(t){return Object(i(t))}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=void 0;var o=n(44),r=i(o),s=n(45),a=i(s),u=n(39),c=i(u),l=n(80),f=i(l),h=function(){function t(e,n){(0,r.default)(this,t),this.wrapper="string"==typeof e?document.querySelector(e):e,this.scroller=this.wrapper.children[0],this.scrollerStyle=this.scroller.style,this.options={disablePointer:!c.default.hasPointer,disableTouch:c.default.hasPointer||!c.default.hasTouch,disbaleMouse:c.default.hasPointer||c.default.hasTouch,startX:0,startY:0,scrollY:!0,directionLockThreshold:5,momentum:!0,bounce:!0,bounceTime:600,bounceEasing:"",preventDefault:!0,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT)$/},HWCompositing:!0,useTransition:!0,useTransform:!0,bindToWrapper:"undefined"==typeof window.onmousedown},c.default.extend(this.options,n),this.translateZ=this.options.HWCompositing&&c.default.hasPerspective?" translateZ(0)":"",this.options.useTransition=c.default.hasTransition&&this.options.useTransition,this.options.useTransform=c.default.hasTransform&&this.options.useTransform,this.options.eventPassthrough=this.options.eventPassthrough===!0?"vertical":this.options.eventPassthrough,this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault,this.options.scrollY="vertical"!==this.options.eventPassthrough&&this.options.scrollY,this.options.scrollX="horizontal"!==this.options.eventPassthrough&&this.options.scrollX,this.options.freeScroll=this.options.freeScroll&&!this.options.eventPassthrough,this.options.directionLockThreshold=this.options.eventPassthrough?0:this.options.directionLockThreshold,this.options.bounceEasing="string"==typeof this.options.bounceEasing?c.default.ease[this.options.bounceEasing]||c.default.ease.circular:this.options.bounceEasing,this.options.resizePolling=void 0===this.options.resizePolling?60:this.options.resizePolling,this.options.tap===!0&&(this.options.tap="tap"),this.options.useTransition||this.options.useTransform||/relative|absolute/i.test(this.scrollerStyle.position)||(this.scrollerStyle.position="relative"),this.x=0,this.y=0,this.directionX=0,this.directionY=0,this._events={},this._init(),this.refresh(),this.scrollTo(this.options.startX,this.options.startY),this.enable()}return(0,a.default)(t,[{key:"_init",value:function(){this._initEvents()}},{key:"destroy",value:function(){this._initEvents(!0),clearTimeout(this.resizeTimeout),this.resizeTimeout=null,this._execEvent("destroy")}},{key:"_transitionEnd",value:function(t){t.target===this.scroller&&this.isInTransition&&(this._transitionTime(),this.resetPosition(this.options.bounceTime)||(this.isInTransition=!1,this._execEvent("scrollEnd")))}},{key:"_start",value:function(t){if(1!==c.default.eventType[t.type]){var e=void 0;if(e=t.which?t.button:t.button<2?0:4===t.button?1:2,0!==e)return}if(this.enabled&&(!this.initiated||c.default.eventType[t.type]===this.initiated)){this.options.preventDefault||c.default.isBadAndroid||c.default.preventDefaultException(t.target,this.options.preventDefaultException)||t.preventDefault();var n=t.touches?t.touches[0]:t;if(this.initiated=c.default.eventType[t.type],this.moved=!1,this.distX=0,this.distY=0,this.directionX=0,this.directionY=0,this.directionLocked=0,this.startTime=c.default.getTime(),this.options.useTransition&&this.isInTransition){this._transitionTime(),this.isInTransition=!1;var i=this.getComputedPosition();this._translate(Math.round(i.x),Math.round(i.y)),this._execEvent("scrollEnd")}else!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,this._execEvent("scrollEnd"));this.startX=this.x,this.startY=this.y,this.absStartX=this.x,this.absStartY=this.y,this.pointX=n.pageX,this.pointY=n.pageY,this._execEvent("beforeScrollStart")}}},{key:"_move",value:function(t){if(this.enabled&&c.default.eventType[t.type]===this.initiated){this.options.preventDefault&&t.preventDefault();var e=t.touches?t.touches[0]:t,n=e.pageX-this.pointX,i=e.pageY-this.pointY,o=c.default.getTime();this.pointX=e.pageX,this.pointY=e.pageY,this.distX+=n,this.distY+=i;var r=Math.abs(this.distX),s=Math.abs(this.distY);if(!(o-this.endTime>300&&r<10&&s<10)){if(this.directionLocked||this.options.freeScroll||(r>s+this.options.directionLockThreshold?this.directionLocked="h":s>=r+this.options.directionLockThreshold?this.directionLocked="v":this.directionLocked="n"),"h"===this.directionLocked){if("vertical"===this.options.eventPassthrough)t.preventDefault();else if("horizontal"===this.options.eventPassthrough)return void(this.initiated=!1);i=0}else if("v"===this.directionLocked){if("horizontal"===this.options.eventPassthrough)t.preventDefault();else if("vertical"===this.options.eventPassthrough)return void(this.initiated=!1);n=0}n=this.hasHorizontalScroll?n:0,i=this.hasVerticalScroll?i:0;var a=this.x+n,u=this.y+i;(a>0||a<this.maxScrollX)&&(a=this.options.bounce?this.x+n/3:a>0?0:this.maxScrollX),(u>0||u<this.maxScrollY)&&(u=this.options.bounce?this.y+i/3:u>0?0:this.maxScrollY),n>0?this.directionX=1:n<0?this.directionX=-1:this.directionX=0,i>0?this.directionY=1:n<0?this.directionY=-1:this.directionY=0,this.moved||this._execEvent("scrollStart"),this.moved=!0,this._translate(a,u),o-this.startTime>300&&(this.startTime=o,this.startX=this.x,this.startY=this.y)}}}},{key:"_end",value:function(t){if(this.enabled&&c.default.eventType[t.type]===this.initiated){this.options.preventDefault&&!c.default.preventDefaultException(t.target,this.options.preventDefaultException)&&t.preventDefault();var e=c.default.getTime()-this.startTime,n=Math.round(this.x),i=Math.round(this.y),o=Math.abs(n-this.startX),r=Math.abs(i-this.startY),s=0,a="";if(this.isInTransition=0,this.initiated=0,this.endTime=c.default.getTime(),!this.resetPosition(this.options.bounceTime)){if(this.scrollTo(n,i),!this.moved)return this.options.tap&&c.default.tap(t,this.options.tap),this.options.click&&c.default.click(t),void this._execEvent("scrollCancel");if(this._events.flick&&e<200&&o<100&&r<100)return void this._execEvent("flick");if(this.options.momentum&&e<300){var u={destination:n,duration:0};this.hasHorizontalScroll&&(u=c.default.momentum(this.x,this.startX,e,this.maxScrollX,this.options.bounce?this.wrapperWidth:0));var l={destination:i,duration:0};this.hasVerticalScroll&&(l=c.default.momentum(this.y,this.startY,e,this.maxScrollY,this.options.bounce?this.wrapperHeight:0)),n=u.destination,i=l.destination,s=Math.max(u.duration,l.duration),this.isInTransition=1}return n!==this.x||i!==this.y?((n>0||n<this.maxScrollX||i>0||i<this.maxScrollY)&&(a=c.default.ease.quadratic),void this.scrollTo(n,i,s,a)):void this._execEvent("scrollEnd")}}}},{key:"_resize",value:function(){var t=this;clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(function(){t.refresh()},this.options.resizePolling)}},{key:"resetPosition",value:function(t){var e=this.x,n=this.y;return t=t||0,!this.hasHorizontalScroll||e>0?e=0:e<this.maxScrollX&&(e=this.maxScrollX),!this.hasVerticalScroll||n>0?n=0:n<this.maxScrollY&&(n=this.maxScrollY),(e!==this.x||n!==this.y)&&(this.scrollTo(e,n,t,this.options.bounceEasing),!0)}},{key:"disbale",value:function(){this.enabled=!1}},{key:"enable",value:function(){this.enabled=!0}},{key:"refresh",value:function(){c.default.getRect(this.wrapper),this.wrapperWidth=this.wrapper.clientWidth,this.wrapperHeight=this.wrapper.clientHeight;var t=c.default.getRect(this.scroller);console.log(t),this.scrollerWidth=t.width,this.scrollerHeight=t.height,this.maxScrollX=this.wrapperWidth-this.scrollerWidth,this.maxScrollY=this.wrapperHeight-this.scrollerHeight,this.hasHorizontalScroll=this.options.scrollX&&this.maxScrollX<0,this.hasVerticalScroll=this.options.scrollY&&this.maxScrollY<0,this.hasHorizontalScroll||(this.maxScrollX=0,this.scrollerWidth=this.wrapperWidth),this.hasVerticalScroll||(this.maxScrollY=0,this.scrollerHeight=this.wrapperHeight),this.endTime=0,this.directionX=0,this.directionY=0,this.wrapperOffset=c.default.offset(this.wrapper),this._execEvent("refresh"),this.resetPosition()}},{key:"on",value:function(t,e){this._events[t]||(this._events[t]=[]),this._events[t].push(e)}},{key:"off",value:function(t,e){if(this._events[t]){var n=this._events[t].indexOf(e);n>-1&&this._events[t].splice(n,1)}}},{key:"_execEvent",value:function(t){for(var e=this,n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];this._events[t]&&this._events[t].forEach(function(t){t.apply(e,i)})}},{key:"scrollBy",value:function(t,e,n,i){t=this.x+t,e=this.y+e,n=n||0,this.scrollTo(t,e,n,i)}},{key:"scrollTo",value:function(t,e,n,i){i=i||c.default.ease.circular,this.isInTransition=this.options.useTransition&&n>0;var o=this.options.useTransition&&i.style;!n||o?(o&&(this._transitionTimingFunction(i.style),this._transitionTime(n)),this._translate(t,e)):(console.log(i),this._animate(t,e,n,i.fn))}},{key:"scrollToElement",value:function(t,e,n,i,o){if(t=t.nodeType?t:this.scroller.querySelector(t)){var r=c.default.offset(t);r.left-=this.wrapperOffset.left,r.top-=this.wrapperOffset.top;var s=c.default.getRects(t),a=c.default.getRect(this.wrapper);n===!0&&(n=Math.round(s.width/2-a.width/2)),i===!0&&(i=Math.round(s.height/2-a.height/2)),r.left-=n||0,r.top-=i||0,r.left>0?r.left=0:r.left<this.maxScrollX&&(r.left=this.maxScrollX),r.top>0?r.top=0:r.top<this.maxScrollY&&(r.top=this.maxScrollY),e=void 0===e||null===e||("auto"===e?Math.max(Math.abs(this.x-r.left),Math.abs(this.y-r.top)):e),console.log(o),this.scrollTo(r.left,r.top,e,o)}}},{key:"_transitionTime",value:function(t){if(t=t||0,this.options.useTransition){var e=c.default.style.transitionDuration;e&&(this.scrollerStyle[e]=t+"ms",!t&&c.default.isBadAndroid&&(this.scrollerStyle[e]="0.0001ms",c.default.rAF(function(){"0.0001ms"===self.scrollerStyle[e]&&(self.scrollerStyle[e]="0s")})))}}},{key:"_transitionTimingFunction",value:function(t){this.scrollerStyle[c.default.style.transitionTimingFunction]=t}},{key:"_translate",value:function(t,e){this.options.useTransform?this.scrollerStyle[c.default.style.transform]="translate("+t+"px, "+e+"px)"+this.translateZ:(t=Math.round(t),e=Math.round(e),this.scrollerStyle.left=t+"px",this.scrollerStyle.top=e+"px"),this.x=t,this.y=e}},{key:"_initEvents",value:function(t){var e=t?c.default.removeEvent:c.default.addEvent,n=this.options.bindToWrapper?this.wrapper:window;e(window,"orientationchange",this),e(window,"resize",this),this.options.click&&e(this.wrapper,"click",this,!0),this.options.disableMouse||(e(this.wrapper,"mousedown",this),e(n,"mousemove",this),e(n,"mousecancel",this),e(n,"mouseup",this)),c.default.hasPointer&&!this.options.disablePointer&&(e(this.wrapper,c.default.prefixPointerEvent("pointerdown"),this),e(n,c.default.prefixPointerEvent("pointermove"),this),e(n,c.default.prefixPointerEvent("pointercancel"),this),e(n,c.default.prefixPointerEvent("pointerup"),this)),c.default.hasTouch&&!this.options.disableTouch&&(e(this.wrapper,"touchstart",this),e(n,"touchmove",this),e(n,"touchcancel",this),e(n,"touchend",this)),e(this.scroller,"transitionend",this),e(this.scroller,"webkitTransitionEnd",this),e(this.scroller,"oTransitionEnd",this),e(this.scroller,"MSTransitionEnd",this)}},{key:"getComputedPosition",value:function(){var t=window.getComputedStyle(this.scroller,null),e=void 0,n=void 0;return this.options.useTransform?(t=t[c.default.style.transform].split(")")[0].split(", "),e=+(t[12]||t[4]),n=+(t[13]||t[5])):(e=+t.left.replace(/[^-\d]/g,""),n=+t.top.replace(/[^-\d]/g,"")),{x:e,y:n}}},{key:"_animate",value:function(t,e,n,i){var o=this,r=this.x,s=this.y,a=c.default.getTime(),u=a+n,l=function l(){var f=c.default.getTime();if(f>=u)return o.isAnimating=!1,o._translate(t,e),void(o.resetPosition(o.options.bounceTime)||o._execEvent("scrollEnd"));f=(f-a)/n;var h=i(f),p=(t-r)*h+r,d=(e-s)*h+s;o._translate(p,d),o.isAnimating&&c.default.rAF(function(){l()})};this.isAnimating=!0,l()}},{key:"handleEvent",value:function(t){switch(t.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(t);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(t);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(t);break;case"orientationchange":case"resize":this._resize();break;case"transitionend":case"webkitTransitionEnd":case"oTransitionEnd":case"MSTransitionEnd":this._transitionEnd(t);break;case"wheel":case"DOMMouseScroll":case"mousewheel":this._wheel(t);break;case"keydown":this._key(t);break;case"click":this.enabled&&!t._constructed&&(t.preventDefault(),t.stopPropagation())}}}]),t}();h.version=f.default.version,h.utils=c.default,e.default=h;e.VERSION=f.default.version},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(46),r=i(o),s=n(41),a=i(s),u={};u.rAF=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)};var c=document.createElement("div").style,l=["t","webkitT","MozT","msT","OT"].map(function(t){return t+"ransform"}).filter(function(t){return t in c}).map(function(t){return t.replace(/(t|T)ransform/g,"")}),f=function(t){return l.length&&l[0]?""+l[0]+t.charAt(0).toUpperCase()+t.substr(1):t};u.getTime=Date.now||function(){return(new Date).getTime()},u.extend=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];var o=n.length;if(!o)return t;for(var r=0;r<o;r++)for(var s=n[r],u=(0,a.default)(s),c=u.length,l=0;l<c;l++){var f=u[l];t[f]=s[f]}return t},u.addEvent=function(t,e,n,i){t.addEventListener(e,n,!!i)},u.removeEvent=function(t,e,n,i){t.removeEventListener(e,n,!!i)},u.prefixPointerEvent=function(t){return window.MSPointerEvent?"MSPointer"+t.charAt(7).toUpperCase()+t.substr(8):t},u.momentum=function(t,e,n,i,o,r){var s=t-e,a=Math.abs(s)/n;r=void 0===r?6e-4:r;var u=t+a*a/(2*r)*(s<0?-1:1),c=a/r;return u<i?(u=o?i-o/2.5*(a/8):i,s=Math.abs(u-t),c=s/a):u>0&&(u=o?o/2.5*(a/8):0,s=Math.abs(t)+u,c=s/a),{destination:Math.round(u),duration:c}};var h=f("transform");u.extend(u,{hasTransform:h in c,hasPerspective:f("perspective")in c,hasTransition:f("transition")in c,hasTouch:"ontouchstart"in window,hasPointer:!(!window.PointerEvent&&!window.MSPointerEvent)}),u.isBadAndroid=function(){var t=window.navigator.appVersion;if(/Android/.test(t)&&!/Chrome\/\d/.test(t)){var e=t.match(/Safari\/(\d+.\d)/);return!(e&&"object"===("undefined"==typeof e?"undefined":(0,r.default)(e))&&e.length>=2)||parseFloat(e[1])<535.19}return!1}(),u.extend(u.style={},{transform:h,transitionTimingFunction:f("transitionTimingFunction"),transitionDuration:f("transitionDuration"),transitionDelay:f("transitionDelay"),transformOrigin:f("transformOrigin")});var p=void 0!==document.createElement("div").classList;u.hasClass=function(t,e){return p?t.classList.contains(e):new RegExp("(^|\\s)"+e+"($|\\s)").test(t.className)},u.addClass=function(t){for(var e,n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return p?(e=t.classList).add.apply(e,i):t.className=i.filter(function(t){return!!t}).reduce(function(t,e){return new RegExp("(^|\\s)"+e+"($|\\s)").test(t)?t:""+t+(t.length?" ":"")+e},t.className)},u.removeClass=function(t){for(var e,n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return p?(e=t.classList).remove.apply(e,i):t.className=t.className.split(/\s+/).filter(function(t){return i.indexOf(t)===-1}).join(" ")},u.offset=function(t){var e=void 0,n=void 0;do e=-t.offsetLeft,n=-t.offsetTop,t=t.offsetParent;while(t);return{left:e,top:n}},u.preventDefaultException=function(t,e){for(var n=(0,a.default)(e),i=n.length,o=0;o<i;o++)if(e[n[o]].test(t[o]))return!0;return!1},u.extend(u.eventType={},{touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2,pointerdown:3,pointermove:3,pointerup:3,MSPointerDown:3,MSPointerMove:3,MSPointerUp:3}),u.extend(u.ease={},{quadratic:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(t){return t*(2-t)}},circular:{style:"cubic-bezier(0.1, 0.57, 0.1, 1)",fn:function(t){return Math.sqrt(1- --t*t)}},back:{style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",fn:function(t){var e=4;return--t*t*((e+1)*t+e)+1}},bounce:{style:"",fn:function(t){return t/=1,t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},elastic:{style:"",fn:function(t){var e=.22,n=.4;return 0===t?0:1===Number(t)?1:n*Math.pow(2,-10*t)*Math.sin((t-e/4)*(2*Math.PI)/e)+1}}}),u.tap=function(t,e){var n=document.createEvent("Event");n.initEvent(e,!0,!0),n.pageX=t.pageX,n.pageY=t.pageY,t.target.dispatchEvent(n)},u.click=function(t){var e=t.target;if(!/(SELECT|INPUT|TEXTAREA)/i.test(e.tagName)){var n=document.createEvent(window.MouseEvent?"MouseEvents":"Event");n.initEvent("click",!0,!0),n.view=t.view||window,n.detail=1,n.screenX=e.screenX||0,n.screenY=e.screenY||0,n.clientX=e.clientX||0,n.clientY=e.clientY||0,n.ctrlKey=!!t.ctrlKey,n.altKey=!!t.altKey,n.shiftKey=!!t.shiftKey,n.metaKey=!!t.metaKey,n.button=0,n.relatedTarget=null,n._constructed=!0,e.dispatchEvent(n)}},u.getRect=function(t){if(t instanceof SVGElement){var e=t.getBoundingClientRect();return{top:e.top,left:e.left,width:e.width,height:e.height}}return{top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight}},e.default=u},function(t,e,n){t.exports={default:n(47),__esModule:!0}},function(t,e,n){t.exports={default:n(48),__esModule:!0}},function(t,e,n){t.exports={default:n(49),__esModule:!0}},function(t,e,n){t.exports={default:n(50),__esModule:!0}},function(t,e){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=n(40),r=i(o);e.default=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,r.default)(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}()},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=n(43),r=i(o),s=n(42),a=i(s),u="function"==typeof a.default&&"symbol"==typeof r.default?function(t){return typeof t}:function(t){return t&&"function"==typeof a.default&&t.constructor===a.default&&t!==a.default.prototype?"symbol":typeof t};e.default="function"==typeof a.default&&"symbol"===u(r.default)?function(t){return"undefined"==typeof t?"undefined":u(t)}:function(t){return t&&"function"==typeof a.default&&t.constructor===a.default&&t!==a.default.prototype?"symbol":"undefined"==typeof t?"undefined":u(t)}},function(t,e,n){n(72);var i=n(6).Object;t.exports=function(t,e,n){return i.defineProperty(t,e,n)}},function(t,e,n){n(73),t.exports=n(6).Object.keys},function(t,e,n){n(76),n(74),n(77),n(78),t.exports=n(6).Symbol},function(t,e,n){n(75),n(79),t.exports=n(27).f("iterator")},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=function(){}},function(t,e,n){var i=n(5),o=n(70),r=n(69);t.exports=function(t){return function(e,n,s){var a,u=i(e),c=o(u.length),l=r(s,c);if(t&&n!=n){for(;c>l;)if(a=u[l++],a!=a)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var i=n(51);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,o){return t.call(e,n,i,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var i=n(10),o=n(34),r=n(20);t.exports=function(t){var e=i(t),n=o.f;if(n)for(var s,a=n(t),u=r.f,c=0;a.length>c;)u.call(t,s=a[c++])&&e.push(s);return e}},function(t,e,n){t.exports=n(1).document&&document.documentElement},function(t,e,n){var i=n(28);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e,n){var i=n(28);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,n){"use strict";var i=n(32),o=n(14),r=n(21),s={};n(7)(s,n(8)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=i(s,{next:o(1,n)}),r(t,e+" Iterator")}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var i=n(10),o=n(5);t.exports=function(t,e){for(var n,r=o(t),s=i(r),a=s.length,u=0;a>u;)if(r[n=s[u++]]===e)return n}},function(t,e,n){var i=n(15)("meta"),o=n(13),r=n(3),s=n(4).f,a=0,u=Object.isExtensible||function(){return!0},c=!n(9)(function(){return u(Object.preventExtensions({}))}),l=function(t){s(t,i,{value:{i:"O"+ ++a,w:{}}})},f=function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!r(t,i)){if(!u(t))return"F";if(!e)return"E";l(t)}return t[i].i},h=function(t,e){if(!r(t,i)){if(!u(t))return!0;if(!e)return!1;l(t)}return t[i].w},p=function(t){return c&&d.NEED&&u(t)&&!r(t,i)&&l(t),t},d=t.exports={KEY:i,NEED:!1,fastKey:f,getWeak:h,onFreeze:p}},function(t,e,n){var i=n(4),o=n(11),r=n(10);t.exports=n(2)?Object.defineProperties:function(t,e){o(t);for(var n,s=r(e),a=s.length,u=0;a>u;)i.f(t,n=s[u++],e[n]);return t}},function(t,e,n){var i=n(20),o=n(14),r=n(5),s=n(25),a=n(3),u=n(30),c=Object.getOwnPropertyDescriptor;e.f=n(2)?c:function(t,e){if(t=r(t),e=s(e,!0),u)try{return c(t,e)}catch(t){}if(a(t,e))return o(!i.f.call(t,e),t[e])}},function(t,e,n){var i=n(5),o=n(33).f,r={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return o(t)}catch(t){return s.slice()}};t.exports.f=function(t){return s&&"[object Window]"==r.call(t)?a(t):o(i(t))}},function(t,e,n){var i=n(3),o=n(37),r=n(22)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),i(t,r)?t[r]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,n){var i=n(12),o=n(6),r=n(9);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],s={};s[t]=e(n),i(i.S+i.F*r(function(){n(1)}),"Object",s)}},function(t,e,n){var i=n(24),o=n(16);t.exports=function(t){return function(e,n){var r,s,a=String(o(e)),u=i(n),c=a.length;return u<0||u>=c?t?"":void 0:(r=a.charCodeAt(u),r<55296||r>56319||u+1===c||(s=a.charCodeAt(u+1))<56320||s>57343?t?a.charAt(u):r:t?a.slice(u,u+2):(r-55296<<10)+(s-56320)+65536)}}},function(t,e,n){var i=n(24),o=Math.max,r=Math.min;t.exports=function(t,e){return t=i(t),t<0?o(t+e,0):r(t,e)}},function(t,e,n){var i=n(24),o=Math.min;t.exports=function(t){return t>0?o(i(t),9007199254740991):0}},function(t,e,n){"use strict";var i=n(52),o=n(60),r=n(18),s=n(5);t.exports=n(31)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):"keys"==e?o(0,n):"values"==e?o(0,t[n]):o(0,[n,t[n]])},"values"),r.Arguments=r.Array,i("keys"),i("values"),i("entries")},function(t,e,n){var i=n(12);i(i.S+i.F*!n(2),"Object",{defineProperty:n(4).f})},function(t,e,n){var i=n(37),o=n(10);n(67)("keys",function(){return function(t){return o(i(t))}})},function(t,e){},function(t,e,n){"use strict";var i=n(68)(!0);n(31)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var i=n(1),o=n(3),r=n(2),s=n(12),a=n(36),u=n(62).KEY,c=n(9),l=n(23),f=n(21),h=n(15),p=n(8),d=n(27),v=n(26),y=n(61),m=n(55),b=n(58),g=n(11),x=n(5),w=n(25),T=n(14),S=n(32),_=n(65),E=n(64),P=n(4),k=n(10),O=E.f,M=P.f,j=_.f,Y=i.Symbol,X=i.JSON,A=X&&X.stringify,D="prototype",F=p("_hidden"),L=p("toPrimitive"),z={}.propertyIsEnumerable,I=l("symbol-registry"),C=l("symbols"),N=l("op-symbols"),R=Object[D],W="function"==typeof Y,H=i.QObject,K=!H||!H[D]||!H[D].findChild,q=r&&c(function(){return 7!=S(M({},"a",{get:function(){return M(this,"a",{value:7}).a}})).a})?function(t,e,n){var i=O(R,e);i&&delete R[e],M(t,e,n),i&&t!==R&&M(R,e,i)}:M,V=function(t){var e=C[t]=S(Y[D]);return e._k=t,e},B=W&&"symbol"==typeof Y.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof Y},U=function(t,e,n){return t===R&&U(N,e,n),g(t),e=w(e,!0),g(n),o(C,e)?(n.enumerable?(o(t,F)&&t[F][e]&&(t[F][e]=!1),n=S(n,{enumerable:T(0,!1)})):(o(t,F)||M(t,F,T(1,{})),t[F][e]=!0),q(t,e,n)):M(t,e,n)},G=function(t,e){g(t);for(var n,i=m(e=x(e)),o=0,r=i.length;r>o;)U(t,n=i[o++],e[n]);return t},J=function(t,e){return void 0===e?S(t):G(S(t),e)},Z=function(t){var e=z.call(this,t=w(t,!0));return!(this===R&&o(C,t)&&!o(N,t))&&(!(e||!o(this,t)||!o(C,t)||o(this,F)&&this[F][t])||e)},$=function(t,e){if(t=x(t),e=w(e,!0),t!==R||!o(C,e)||o(N,e)){var n=O(t,e);return!n||!o(C,e)||o(t,F)&&t[F][e]||(n.enumerable=!0),n}},Q=function(t){for(var e,n=j(x(t)),i=[],r=0;n.length>r;)o(C,e=n[r++])||e==F||e==u||i.push(e);return i},tt=function(t){for(var e,n=t===R,i=j(n?N:x(t)),r=[],s=0;i.length>s;)!o(C,e=i[s++])||n&&!o(R,e)||r.push(C[e]);return r};W||(Y=function(){if(this instanceof Y)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),e=function(n){this===R&&e.call(N,n),o(this,F)&&o(this[F],t)&&(this[F][t]=!1),q(this,t,T(1,n));
};return r&&K&&q(R,t,{configurable:!0,set:e}),V(t)},a(Y[D],"toString",function(){return this._k}),E.f=$,P.f=U,n(33).f=_.f=Q,n(20).f=Z,n(34).f=tt,r&&!n(19)&&a(R,"propertyIsEnumerable",Z,!0),d.f=function(t){return V(p(t))}),s(s.G+s.W+s.F*!W,{Symbol:Y});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)p(et[nt++]);for(var et=k(p.store),nt=0;et.length>nt;)v(et[nt++]);s(s.S+s.F*!W,"Symbol",{for:function(t){return o(I,t+="")?I[t]:I[t]=Y(t)},keyFor:function(t){if(B(t))return y(I,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){K=!0},useSimple:function(){K=!1}}),s(s.S+s.F*!W,"Object",{create:J,defineProperty:U,defineProperties:G,getOwnPropertyDescriptor:$,getOwnPropertyNames:Q,getOwnPropertySymbols:tt}),X&&s(s.S+s.F*(!W||c(function(){var t=Y();return"[null]"!=A([t])||"{}"!=A({a:t})||"{}"!=A(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!B(t)){for(var e,n,i=[t],o=1;arguments.length>o;)i.push(arguments[o++]);return e=i[1],"function"==typeof e&&(n=e),!n&&b(e)||(e=function(t,e){if(n&&(e=n.call(this,t,e)),!B(e))return e}),i[1]=e,A.apply(X,i)}}}),Y[D][L]||n(7)(Y[D],L,Y[D].valueOf),f(Y,"Symbol"),f(Math,"Math",!0),f(i.JSON,"JSON",!0)},function(t,e,n){n(26)("asyncIterator")},function(t,e,n){n(26)("observable")},function(t,e,n){n(71);for(var i=n(1),o=n(7),r=n(18),s=n(8)("toStringTag"),a=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],u=0;u<5;u++){var c=a[u],l=i[c],f=l&&l.prototype;f&&!f[s]&&o(f,s,c),r[c]=r.Array}},function(t,e){t.exports={name:"iscroll-es6",version:"0.0.3",description:"IScroll in ES6",main:"index.js",scripts:{dev:"webpack --config webpack.config.js --watch --progress --colors",build:"webpack --config webpack.config.js",lint:"eslint --ext .js src"},keywords:["IScroll"],author:"liril <god@liril.net>",repository:{type:"git",url:"https://github.com/liril-net/iscroll-es6.git"},bugs:{url:"https://github.com/liril-net/iscroll-es6/issues"},license:"ISC",devDependencies:{"babel-core":"^6.0.0","babel-eslint":"^7.1.1","babel-loader":"^6.0.0","babel-plugin-transform-runtime":"^6.0.0","babel-preset-es2015":"^6.0.0","babel-preset-stage-2":"^6.0.0","babel-register":"^6.0.0",eslint:"^3.7.1","eslint-config-airbnb-base":"^8.0.0","eslint-friendly-formatter":"^2.0.5","eslint-import-resolver-webpack":"^0.6.0","eslint-loader":"^1.5.0","eslint-plugin-import":"^1.16.0","json-loader":"^0.5.4",webpack:"^1.13.2"}}}])});