(function (exports) {
'use strict';

/**
 * Module : Sparrow touch event
 * Author : Kvkens(yueming@yonyou.com)
 * Date	  : 2016-07-28 14:41:17
 */

var on = function(element, eventName, child, listener) {
	if(!element)
		return;
	if(arguments.length < 4) {
		listener = child;
		child = undefined;
	} else {
		var childlistener = function(e) {
			if(!e) {
				return;
			}
			var tmpchildren = element.querySelectorAll(child);
			tmpchildren.forEach(function(node) {
				if(node == e.target) {
					listener.call(e.target, e);
				}
			});
		};
	}
	//capture = capture || false;

	if(!element["uEvent"]) {
		//在dom上添加记录区
		element["uEvent"] = {};
	}
	//判断是否元素上是否用通过on方法填加进去的事件
	if(!element["uEvent"][eventName]) {
		element["uEvent"][eventName] = [child ? childlistener : listener];
		if(u.event && u.event[eventName] && u.event[eventName].setup) {
			u.event[eventName].setup.call(element);
		}
		element["uEvent"][eventName + 'fn'] = function(e) {
			//火狐下有问题修改判断
			if(!e)
				e = typeof event != 'undefined' && event ? event : window.event;
			element["uEvent"][eventName].forEach(function(fn) {
				try {
					e.target = e.target || e.srcElement; //兼容IE8
				} catch(ee) {}
				if(fn)
					fn.call(element, e);
			});
		};
		if(element.addEventListener) { // 用于支持DOM的浏览器
			element.addEventListener(eventName, element["uEvent"][eventName + 'fn']);
		} else if(element.attachEvent) { // 用于IE浏览器
			element.attachEvent("on" + eventName, element["uEvent"][eventName + 'fn']);
		} else { // 用于其它浏览器
			element["on" + eventName] = element["uEvent"][eventName + 'fn'];
		}
	} else {
		//如果有就直接往元素的记录区添加事件
		var lis = child ? childlistener : listener;
		var hasLis = false;
		element["uEvent"][eventName].forEach(function(fn) {
			if(fn == lis) {
				hasLis = true;
			}
		});
		if(!hasLis) {
			element["uEvent"][eventName].push(child ? childlistener : listener);
		}
	}

};

/**
 * Module : Sparrow dom
 * Author : Kvkens(yueming@yonyou.com)
 * Date	  : 2016-08-16 13:59:17
 */
/**
 * 元素增加指定样式
 * @param value
 * @returns {*}
 */
var addClass = function(element, value) {
	if(element){
		if(typeof element.classList === 'undefined') {
			if(u._addClass){
				u._addClass(element, value);
			}else{
				$(element).addClass(value);
			}

		} else {
			element.classList.add(value);
		}
	}

	return this;
};
/**
 * 删除元素上指定样式
 * @param {Object} element
 * @param {Object} value
 */
var removeClass = function(element, value) {
	if(element){
		if(typeof element.classList === 'undefined') {
			if(u._removeClass){
				u._removeClass(element, value);
			}else{
				$(element).removeClass(value);
			}

		} else {
			element.classList.remove(value);
		}
	}
	return this;
};

/**
 * Module : Sparrow extend enum
 * Author : Kvkens(yueming@yonyou.com)
 * Date	  : 2016-07-27 21:46:50
 */

var enumerables = true;
var enumerablesTest = {
		toString: 1
	};
for(var i in enumerablesTest) {
	enumerables = null;
}
if(enumerables) {
	enumerables = ['hasOwnProperty', 'valueOf', 'isPrototypeOf', 'propertyIsEnumerable',
		'toLocaleString', 'toString', 'constructor'
	];
}

/**
 * Module : Sparrow extend
 * Author : Kvkens(yueming@yonyou.com)
 * Date	  : 2016-07-27 21:46:50
 */

/**
 * 复制对象属性
 *
 * @param {Object}  目标对象
 * @param {config} 源对象
 */
var extend = function(object, config) {
	var args = arguments,
		options;
	if(args.length > 1) {
		for(var len = 1; len < args.length; len++) {
			options = args[len];
			if(object && options && typeof options === 'object') {
				var i, j, k;
				for(i in options) {
					object[i] = options[i];
				}
				if(enumerables) {
					for(j = enumerables.length; j--;) {
						k = enumerables[j];
						if(options.hasOwnProperty && options.hasOwnProperty(k)) {
							object[k] = options[k];
						}
					}
				}
			}
		}
	}
	return object;
};

if(!Object.assign){
	Object.assign = extend;
}

/**
 * Module : Sparrow browser environment
 * Author : Kvkens(yueming@yonyou.com)
 * Date	  : 2016-07-27 21:46:50
 */

var u$1 = {};


extend(u$1, {
	isIE:  false,
	isFF: false,
	isOpera: false,
	isChrome: false,
	isSafari: false,
	isWebkit: false,
	isIE8_BEFORE: false,
	isIE8: false,
	isIE8_CORE: false,
	isIE9: false,
	isIE9_CORE: false,
	isIE10: false,
	isIE10_ABOVE: false,
	isIE11: false,
	isEdge: false,
	isIOS: false,
	isIphone: false,
	isIPAD: false,
	isStandard: false,
	version: 0,
	isWin: false,
	isUnix: false,
	isLinux: false,
	isAndroid: false,
	isAndroidPAD:false,
	isAndroidPhone:false,
	isMac: false,
	hasTouch: false,
	isMobile: false
});

(function() {
	var userAgent = navigator.userAgent,
		rMsie = /(msie\s|trident.*rv:)([\w.]+)/,
		rFirefox = /(firefox)\/([\w.]+)/,
		rOpera = /(opera).+version\/([\w.]+)/,
		rChrome = /(chrome)\/([\w.]+)/,
		rSafari = /version\/([\w.]+).*(safari)/,
		version,
		ua = userAgent.toLowerCase(),
		s,
		browserMatch = {
			browser: "",
			version: ''
		},
		match = rMsie.exec(ua);

	if(match != null) {
		browserMatch = {
			browser: "IE",
			version: match[2] || "0"
		};
	}
	match = rFirefox.exec(ua);
	if(match != null) {
		browserMatch = {
			browser: match[1] || "",
			version: match[2] || "0"
		};
	}
	match = rOpera.exec(ua);
	if(match != null) {
		browserMatch = {
			browser: match[1] || "",
			version: match[2] || "0"
		};
	}
	match = rChrome.exec(ua);
	if(match != null) {
		browserMatch = {
			browser: match[1] || "",
			version: match[2] || "0"
		};
	}
	match = rSafari.exec(ua);
	if(match != null) {
		browserMatch = {
			browser: match[2] || "",
			version: match[1] || "0"
		};
	}

	if(userAgent.indexOf("Edge") > -1){
		u$1.isEdge = true;
	}
	if(s = ua.match(/opera.([\d.]+)/)) {
		u$1.isOpera = true;
	} else if(browserMatch.browser == "IE" && browserMatch.version == 11) {
		u$1.isIE11 = true;
		u$1.isIE = true;
	} else if(s = ua.match(/chrome\/([\d.]+)/)) {
		u$1.isChrome = true;
		u$1.isStandard = true;
	} else if(s = ua.match(/version\/([\d.]+).*safari/)) {
		u$1.isSafari = true;
		u$1.isStandard = true;
	} else if(s = ua.match(/gecko/)) {
		//add by licza : support XULRunner
		u$1.isFF = true;
		u$1.isStandard = true;
	} else if(s = ua.match(/msie ([\d.]+)/)) {
		u$1.isIE = true;
	} else if(s = ua.match(/firefox\/([\d.]+)/)) {
		u$1.isFF = true;
		u$1.isStandard = true;
	}
	if(ua.match(/webkit\/([\d.]+)/)) {
		u$1.isWebkit = true;
	}
	if(ua.match(/ipad/i)) {
		u$1.isIOS = true;
		u$1.isIPAD = true;
		u$1.isStandard = true;
	}

	if(ua.match(/iphone/i)) {
		u$1.isIOS = true;
		u$1.isIphone = true;
	}

	if((navigator.platform == "Mac68K") || (navigator.platform == "MacPPC") || (navigator.platform == "Macintosh") || (navigator.platform == "MacIntel")) {
		//u.isIOS = true;
		u$1.isMac = true;
	}

	if((navigator.platform == "Win32") || (navigator.platform == "Windows") || (navigator.platform == "Win64")) {
		u$1.isWin = true;
	}

	if((navigator.platform == "X11") && !u$1.isWin && !u$1.isMac) {
		u$1.isUnix = true;
	}
	if((String(navigator.platform).indexOf("Linux") > -1)) {
		u$1.isLinux = true;
	}

	if(ua.indexOf('Android') > -1 || ua.indexOf('android') > -1 || ua.indexOf('Adr') > -1 || ua.indexOf('adr') > -1) {
		u$1.isAndroid = true;
	}

	u$1.version = version ? (browserMatch.version ? browserMatch.version : 0) : 0;
	if(u$1.isAndroid){
		if(window.screen.width>=768&&window.screen.width<1024){
			u$1.isAndroidPAD=true;
		}
		if(window.screen.width<=768) {
			u$1.isAndroidPhone = true;
		}
	}
	if(u$1.isIE) {
		var intVersion = parseInt(u$1.version);
		var mode = document.documentMode;
		if(mode == null) {
			if(intVersion == 6 || intVersion == 7) {
				u$1.isIE8_BEFORE = true;
			}
		} else {
			if(mode == 7) {
				u$1.isIE8_BEFORE = true;
			} else if(mode == 8) {
				u$1.isIE8 = true;
			} else if(mode == 9) {
				u$1.isIE9 = true;
				u$1.isSTANDARD = true;
			} else if(mode == 10) {
				u$1.isIE10 = true;
				u$1.isSTANDARD = true;
				u$1.isIE10_ABOVE = true;
			} else {
				u$1.isSTANDARD = true;
			}
			if(intVersion == 8) {
				u$1.isIE8_CORE = true;
			} else if(intVersion == 9) {
				u$1.isIE9_CORE = true;
			} else if(browserMatch.version == 11) {
				u$1.isIE11 = true;
			}
		}
	}
	if("ontouchend" in document) {
		u$1.hasTouch = true;
	}
	if(u$1.isIphone || u$1.isAndroidPhone)
		u$1.isMobile = true;

})();

var env = u$1;

/**
 * Module : Sparrow ripple
 * Author : Kvkens(yueming@yonyou.com)
 * Date	  : 2016-07-29 08:42:13
 */

var URipple = function URipple(element) {
    if (env.isIE8 || env.isMobile || env.isAndroidPAD || env.isIPAD) return;
    this._element = element;

    // Initialize instance.
    this.init();
  };
  //window['URipple'] = URipple;

  URipple.prototype._down = function(event) {
    if (env.isIE8 || env.isMobile || env.isAndroidPAD || env.isIPAD) return;
    if (!this._rippleElement.style.width && !this._rippleElement.style.height) {
      var rect = this._element.getBoundingClientRect();
      this.rippleSize_ = Math.sqrt(rect.width * rect.width + rect.height * rect.height) * 2 + 2;
      if(this.rippleSize_ > 0){
            this._rippleElement.style.width = this.rippleSize_ + 'px';
            this._rippleElement.style.height = this.rippleSize_ + 'px';
        }

    }

    addClass(this._rippleElement, 'is-visible');

    if (event.type === 'mousedown' && this._ignoringMouseDown) {
      this._ignoringMouseDown = false;
    } else {
      if (event.type === 'touchstart') {
        this._ignoringMouseDown = true;
      }
      var frameCount = this.getFrameCount();
      if (frameCount > 0) {
        return;
      }
      this.setFrameCount(1);
      var t = event.currentTarget || event.target || event.srcElement;
      var bound = t.getBoundingClientRect();
      var x;
      var y;
      // Check if we are handling a keyboard click.
      if (event.clientX === 0 && event.clientY === 0) {
        x = Math.round(bound.width / 2);
        y = Math.round(bound.height / 2);
      } else {
        var clientX = event.clientX ? event.clientX : event.touches[0].clientX;
        var clientY = event.clientY ? event.clientY : event.touches[0].clientY;
        x = Math.round(clientX - bound.left);
        y = Math.round(clientY - bound.top);
      }
      this.setRippleXY(x, y);
      this.setRippleStyles(true);
      if(window.requestAnimationFrame)
        window.requestAnimationFrame(this.animFrameHandler.bind(this));
    }
  };

  /**
   * Handle mouse / finger up on element.
   *
   * @param {Event} event The event that fired.
   * @private
   */
  URipple.prototype._up = function(event) {
    if (env.isIE8 || env.isMobile || env.isAndroidPAD || env.isIPAD) return;
    var self = this;
    // Don't fire for the artificial "mouseup" generated by a double-click.
    if (event && event.detail !== 2) {
      removeClass(this._rippleElement,'is-visible');
    }
    // Allow a repaint to occur before removing this class, so the animation
    // shows for tap events, which seem to trigger a mouseup too soon after
    // mousedown.
    window.setTimeout(function() {
      removeClass(self._rippleElement,'is-visible');
    }, 0);
  };

  /**
       * Getter for frameCount_.
       * @return {number} the frame count.
       */
  URipple.prototype.getFrameCount = function() {
    if (env.isIE8 || env.isMobile || env.isAndroidPAD || env.isIPAD) return;
    return this.frameCount_;
  };
  /**
       * Setter for frameCount_.
       * @param {number} fC the frame count.
       */
  URipple.prototype.setFrameCount = function(fC) {
    if (env.isIE8 || env.isMobile || env.isAndroidPAD || env.isIPAD) return;
    this.frameCount_ = fC;
  };


  /**
       * Getter for _rippleElement.
       * @return {Element} the ripple element.
       */
      URipple.prototype.getRippleElement = function() {
        if (env.isIE8 || env.isMobile || env.isAndroidPAD || env.isIPAD) return;
        return this._rippleElement;
      };

      /**
       * Sets the ripple X and Y coordinates.
       * @param  {number} newX the new X coordinate
       * @param  {number} newY the new Y coordinate
       */
      URipple.prototype.setRippleXY = function(newX, newY) {
        if (env.isIE8 || env.isMobile || env.isAndroidPAD || env.isIPAD) return;
        this.x_ = newX;
        this.y_ = newY;
      };

      /**
       * Sets the ripple styles.
       * @param  {boolean} start whether or not this is the start frame.
       */
      URipple.prototype.setRippleStyles = function(start) {
        if (env.isIE8 || env.isMobile || env.isAndroidPAD || env.isIPAD) return;
        if (this._rippleElement !== null) {
          var transformString;
          var scale;
          var size;
          var offset = 'translate(' + this.x_ + 'px, ' + this.y_ + 'px)';

          if (start) {
            scale = 'scale(0.0001, 0.0001)';
            size = '1px';
          } else {
            scale = '';
            size = this.rippleSize_ + 'px';
          }

          transformString = 'translate(-50%, -50%) ' + offset + scale;

          this._rippleElement.style.webkitTransform = transformString;
          this._rippleElement.style.msTransform = transformString;
          this._rippleElement.style.transform = transformString;

          if (start) {
            removeClass(this._rippleElement,'is-animating');
          } else {
            addClass(this._rippleElement,'is-animating');
          }
        }
      };

    /**
       * Handles an animation frame.
       */
      URipple.prototype.animFrameHandler = function() {
        if (env.isIE8 || env.isMobile || env.isAndroidPAD || env.isIPAD) return;
        if (this.frameCount_-- > 0) {
          window.requestAnimationFrame(this.animFrameHandler.bind(this));
        } else {
          this.setRippleStyles(false);
        }
      };

  /**
   * Initialize element.
   */
  URipple.prototype.init = function() {
    if (env.isIE8 || env.isMobile || env.isAndroidPAD || env.isIPAD) return;
    var self = this;
    if (this._element) {
      this._rippleElement = this._element.querySelector('.u-ripple');
      if (!this._rippleElement){
        this._rippleElement = document.createElement('span');
        addClass(this._rippleElement,'u-ripple');
        this._element.appendChild(this._rippleElement);
        this._element.style.overflow = 'hidden';
        this._element.style.position = 'relative';
      }
      this.frameCount_ = 0;
      this.rippleSize_ = 0;
      this.x_ = 0;
      this.y_ = 0;

      // Touch start produces a compat mouse down event, which would cause a
      // second ripples. To avoid that, we use this property to ignore the first
      // mouse down after a touch start.
      this._ignoringMouseDown = false;
      on(this._element, 'mousedown',function(e){self._down(e);});
      on(this._element, 'touchstart',function(e){self._down(e);});

      on(this._element, 'mouseup',function(e){self._up(e);});
      on(this._element, 'mouseleave',function(e){self._up(e);});
      on(this._element, 'touchend',function(e){self._up(e);});
      on(this._element, 'blur',function(e){self._up(e);});
    }
  };

var Ripple = URipple;

/**
 * Module : neoui-button
 * Author : Kvkens(yueming@yonyou.com)
 * Date	  : 2016-08-02 13:01:05
 */

var Button = u.BaseComponent.extend({
    init: function() {
        try {
            var rippleContainer = document.createElement('span');
            addClass(rippleContainer, 'u-button-container');
            this._rippleElement = document.createElement('span');
            addClass(this._rippleElement, 'u-ripple');
            if (env.isIE8)
                addClass(this._rippleElement, 'oldIE');
            rippleContainer.appendChild(this._rippleElement);
            on(this._rippleElement, 'mouseup', this.element.blur);
            this.element.appendChild(rippleContainer);
        } catch (e) {

        }


        // 增加disabled效果
        var disableAttr = this.element.getAttribute('disabled');
        if (disableAttr != null && disableAttr != '') {
            this.element.className += " disable";
        }

        on(this.element, 'mouseup', this.element.blur);
        on(this.element, 'mouseleave', this.element.blur);
        this.ripple = new Ripple(this.element);
    }

});

if (u.compMgr)
    u.compMgr.regComp({
        comp: Button,
        compAsString: 'u.Button',
        css: 'u-button'
    });

/**
 * Module : neoui-layout-md
 * Author : Kvkens(yueming@yonyou.com)
 * Date	  : 2016-08-02 15:42:33
 */

var MDLayout = u.BaseComponent.extend({
    _CssClasses: {
        MASTER: 'u-mdlayout-master',
        DETAIL: 'u-mdlayout-detail',
        PAGE: 'u-mdlayout-page',
        PAGE_HEADER: 'u-mdlayout-page-header',
        PAGE_SECTION: 'u-mdlayout-page-section',
        PAGE_FOOTER: 'u-mdlayout-page-footer'
    },
    init: function() {
        //this.browser = _getBrowserInfo();
        var me = this;
        this.minWidth = 600;
        //this.options = $.extend({}, MDLayout.DEFAULTS, options)
        //this.$element.css('position','relative').css('width','100%').css('height','100%').css('overflow','hidden')
        this._master = this.element.querySelector('.' + this._CssClasses.MASTER);
        this._detail = this.element.querySelector('.' + this._CssClasses.DETAIL);

        //this.$master.css('float','left').css('height','100%')
        //this.$detail.css('height','100%').css('overflow','hidden').css('position','relative');
        if (this.master)
            this.masterWidth = this._master.offsetWidth;
        else
            this.masterWidth = 0;
        this.detailWidth = this._detail.offsetWidth;
        if (this._master)
            this.mPages = this._master.querySelectorAll('.' + this._CssClasses.PAGE);
        this.dPages = this._detail.querySelectorAll('.' + this._CssClasses.PAGE);
        this.mPageMap = {};
        this.dPageMap = {};
        if (this._master)
            this.initPages(this.mPages, 'master');
        this.initPages(this.dPages, 'detail');

        this.mHistory = [];
        this.dHistory = [];
        this.isNarrow = null;
        this.response();
        // on(window, 'resize', function(){
        // 	me.response();
        // })

        setInterval(function() {
            me.response();
        }, 100);
    },

    initPages: function(pages, type) {
        var pageMap, pWidth;
        if (type === 'master') {
            pageMap = this.mPageMap;
            pWidth = this.masterWidth;
        } else {
            pageMap = this.dPageMap;
            pWidth = this.detailWidth;
        }
        for (var i = 0; i < pages.length; i++) {
            var pid = pages[i].getAttribute('id');
            if (!pid)
                throw new Error('u-mdlayout-page mast have id attribute')
            pageMap[pid] = pages[i];
            if (i === 0) {
                if (type === 'master')
                    this.current_m_pageId = pid;
                else
                    this.current_d_pageId = pid;
                addClass(pages[i], 'current');
                //pages[i].style.transform = 'translate3d('+ pWidth +'px,0,0)';
                pages[i].style.transform = 'translate3d(0,0,0)';
            } else {
                pages[i].style.transform = 'translate3d(' + pWidth + 'px,0,0)';
            }
            if (env.isIE8 || env.isIE9) {
                addClass(pages[i], 'let-ie9');
            }
        }
    },




    //	MDLayout.DEFAULTS = {
    //		minWidth: 600,
    ////		masterFloat: false,
    //		afterNarrow:function(){},
    //		afterUnNarrow:function(){},
    //		afterMasterGo:function(pageId){},
    //		afterMasterBack:function(pageId){},
    //		afterDetailGo:function(pageId){},
    //		afterDetailBack:function(pageId){}
    //	}

    response: function() {
        var totalWidth = this.element.offsetWidth;
        if (totalWidth < this.minWidth) {
            if (this.isNarrow == null || this.isNarrow == false)
                this.isNarrow = true;
            this.hideMaster();
        } else {
            if (this.isNarrow == null || this.isNarrow == true)
                this.isNarrow = false;
            this.showMaster();
        }
        this.calcWidth();

    },

    calcWidth: function() {
        if (!(env.isIE8 || env.isIE9)) {
            this.detailWidth = this._detail.offsetWidth;
            if (this._master)
                this.masterWidth = this._master.offsetWidth;
            else
                this.masterWidth = 0;
            //TODO this.mHistory中的panel应该置为-值
            for (var i = 0; i < this.dPages.length; i++) {
                var pid = this.dPages[i].getAttribute('id');
                if (pid !== this.current_d_pageId) {
                    this.dPages[i].style.transform = 'translate3d(' + this.detailWidth + 'px,0,0)';
                }
            }
            //this.$detail.find('[data-role="page"]').css('transform','translate3d('+ this.detailWidth +'px,0,0)')
            //this.$detail.find('#' + this.current_d_pageId).css('transform','translate3d(0,0,0)')
        }

    },

    mGo: function(pageId) {
        if (this.current_m_pageId == pageId) return;
        this.mHistory.push(this.current_m_pageId);
        _hidePage(this.mPageMap[this.current_m_pageId], this, '-' + this.masterWidth);
        this.current_m_pageId = pageId;
        _showPage(this.mPageMap[this.current_m_pageId], this);
    },

    mBack: function() {
        if (this.mHistory.length == 0) return;
        _hidePage(this.mPageMap[this.current_m_pageId], this, this.masterWidth);
        this.current_m_pageId = this.mHistory.pop();
        _showPage(this.mPageMap[this.current_m_pageId], this);
    },

    dGo: function(pageId) {
        if (this.current_d_pageId == pageId) return;
        this.dHistory.push(this.current_d_pageId);
        _hidePage(this.dPageMap[this.current_d_pageId], this, '-' + this.detailWidth);
        this.current_d_pageId = pageId;
        _showPage(this.dPageMap[this.current_d_pageId], this);
    },

    dBack: function() {
        if (this.dHistory.length == 0) return;
        _hidePage(this.dPageMap[this.current_d_pageId], this, this.detailWidth);
        this.current_d_pageId = this.dHistory.pop();
        _showPage(this.dPageMap[this.current_d_pageId], this);
    },

    showMaster: function() {
        if (this._master) {
            if (env.isIE8 || env.isIE9)
                this._master.style.display = 'none'; //IE下暂时不显示此区域
            else {
                this._master.style.transform = 'translate3d(0,0,0)';
            }
            if (!this.isNarrow)
                this._master.style.position = 'relative';
        }
    },

    hideMaster: function() {
        if (this._master) {
            if (this._master.offsetLeft < 0 || this._master.style.display == 'none')
                return;
            if (env.isIE8 || env.isIE9)
                this._master.style.display = 'none';
            else {
                this._master.style.transform = 'translate3d(-' + this.masterWidth + 'px,0,0)';
            }
            this._master.style.position = 'absolute';
            this._master.style.zIndex = 5;
            this.calcWidth();
        }
    }
});

/**
 * masterFloat属性只有在宽屏下起作用，为true时，master层浮动于detail层之上
 *
 */
//	MDLayout.fn.setMasterFloat = function(float){
//		this.masterFloat = float;
//
//	}

//function _getBrowserInfo(){
//	var browser = {};
//	var ua = navigator.userAgent.toLowerCase();
//	var s;
//	(s = ua.match(/rv:([\d.]+)\) like gecko/)) ? browser.ie = parseInt(s[1]) :
//			(s = ua.match(/msie ([\d.]+)/)) ? browser.ie = s[1] :
//					(s = ua.match(/firefox\/([\d.]+)/)) ? browser.firefox = s[1] :
//							(s = ua.match(/chrome\/([\d.]+)/)) ? browser.chrome = s[1] :
//									(s = ua.match(/opera.([\d.]+)/)) ? browser.opera = s[1] :
//											(s = ua.match(/version\/([\d.]+).*safari/)) ? browser.safari = s[1] : 0;
//	return browser;
//}

function _showPage(el, me) {
    addClass(el, 'current');
    if (!(env.isIE8 || env.isIE9))
        el.style.transform = 'translate3d(0,0,0)';
}

function _hidePage(el, me, width) {
    removeClass(el, 'current');
    if (!(env.isIE8 || env.isIE9))
        el.style.transform = 'translate3d(' + width + 'px,0,0)';
}

if (u.compMgr)
    u.compMgr.regComp({
        comp: MDLayout,
        compAsString: 'u.MDLayout',
        css: 'u-mdlayout'
    });

exports.MDLayout = MDLayout;

}((this.bar = this.bar || {})));
