!function(){var t={},n={},e={},r={};t=function(t){function n(){}function e(t,e){var r;return Object.create?r=Object.create(t):(n.prototype=t,r=new n),r.constructor=e,r}function r(t,n){if(t){if(t.nodeType)return[t];var n=n&&n.nodeType?n:document;return t&&"string"==typeof t?n.querySelectorAll(t):void 0}}for(var i=/\\?\{([^{}]+)\}/g,s="",o=/^[\s\xa0]+|[\s\xa0]+$/g,l=String.prototype.trim,u=l?function(t){return null==t?s:l.call(t)}:function(t){return null==t?s:(t+"").replace(o,s)},a=0,c=function(t){var n=t.offsetTop;return null!=t.offsetParent&&(n+=c(t.offsetParent)),n},f=function(t){var n=t.offsetLeft;return null!=t.offsetParent&&(n+=f(t.offsetParent)),n},h=({isObject:function(t){return t===Object(t)},isArray:Array.isArray||function(t){return"[object Array]"==toString.call(t)},isEmpty:function(t){if(null==t)return!0;if(this.isArray(t)||this.isString(t))return 0===t.length;for(var n in t)if(this.has(t,n))return!1;return!0},mix:function(t,n,e){for(var r in n)t[r]=n[r];return t},extend:function(t,n,r,i){if(!n||!t)return t;var s,o=n.prototype;return s=e(o,t),t.prototype=this.mix(s,t.prototype),t.superclass=e(o,n),r&&this.mix(s,r),i&&this.mix(t,i),t},startsWith:function(t,n){return 0===t.lastIndexOf(n,0)},endsWith:function(t,n){var e=t.length-n.length;return e>=0&&t.indexOf(n,e)===e},trim:u,substitute:function(t,n,e){return"string"==typeof t&&n?t.replace(e||i,function(t,e){return"\\"===t.charAt(0)?t.slice(1):void 0===n[e]?s:n[e]}):t},vendor:function(){for(var t,n=document.createElement("div").style,e=["t","webkitT","MozT","msT","OT"],r=0,i=e.length;r1?e:e[0]||null}}}),"object"==typeof module&&module.exports?e=s:s}(e),r=function(n){var r,i=t,s=e,o="Loading...",l="Pull Up To Refresh",u="Release To Refresh",a=60,c=40,f=function(t){f.superclass.constructor.call(this),this.userConfig=i.mix({upContent:l,downContent:u,pullUpHeight:a,height:c,loadingContent:o,bufferHeight:0,clsPrefix:"xs-plugin-pullup-"},t)};if(i.extend(f,s,{pluginId:"pullup",pluginInitializer:function(t){var n=this;return n.xscroll=t.render(),r=n.userConfig.clsPrefix,n.render(),n},pluginDestructor:function(){var t=this;i.remove(t.pullup),t.xscroll.off("scrollend",t._scrollEndHandler,t),t.xscroll.off("scroll",t._scrollHandler,t),t.xscroll.off("pan",t._panHandler,t),t.xscroll.boundry.resetBottom(),t.__isRender=!1,t._evtBinded=!1},pluginDisable:function(){var t=this;t.userConfig.container||i.remove(t.pullup),t.xscroll.off("scrollend",t._scrollEndHandler,t),t.xscroll.off("scroll",t._scrollHandler,t),t.xscroll.off("pan",t._panHandler,t),t.xscroll.boundry.resetBottom(),t.__isRender=!1,t._evtBinded=!1},render:function(){var t=this;if(!t.__isRender){if(t.__isRender=!0,t.userConfig.container)t.pullup=t.userConfig.container;else{var n=r+"container",e=t.userConfig.height,s=t.pullup=document.createElement("div");s.className=n,s.style.position="absolute",s.style.width="100%",s.style.height=e+"px",s.style.bottom=-e+"px",s.style.textAlign="center",t.xscroll.container.appendChild(s),i.addClass(s,r+t.status),s.innerHTML=t.userConfig[t.status+"Content"]||t.userConfig.content}return t.xscroll.boundry.expandBottom(t.userConfig.height),t.status="up",t._bindEvt(),t}},_bindEvt:function(){var t=this;if(!t._evtBinded){t._evtBinded=!0;var n=(t.pullup,t.xscroll);return n.on("pan",t._panHandler,t),t.userConfig.bufferHeight>0&&n.on("scroll",t._scrollHandler,t),n.on("scrollend",t._scrollEndHandler,t),t}},_scrollEndHandler:function(t){var n=this,e=n.xscroll,r=e.getScrollTop();return r==e.containerHeight-e.height+n.userConfig.height&&n._changeStatus("loading"),n},_scrollHandler:function(t){var n=this,e=n.xscroll;return!n.isLoading&&Math.abs(t.scrollTop)+e.height+n.userConfig.height+n.userConfig.bufferHeight>=e.containerHeight+e.boundry._xtop+e.boundry._xbottom&&n._changeStatus("loading"),n},_panHandler:function(t){var n=this,e=n.xscroll,r=-e.getScrollTop();return r